Skip to content

Conversation

@bskjon
Copy link
Contributor

@bskjon bskjon commented Feb 21, 2025

Due to the limited functionality of the device, and no documentation, there is no way to pull correct data at all.
If the function key on the inside is pressed the whole locks status will change, even though the exterior locking is unlocked, the device will for example say that it is locked. This code attempts to work around the issue by keeping a local history of the states and executor.

Sound volume is now mapped against the correct values for this device.
Other functionality is kept, but it does not work for this device (pin lock, user edit etc)
Battery will now show up in overview, but device has to bee reconfigured.

I've converted the code from my local converter at best effort, though I'm unsure how to test it locally for Z2M...
Suggestions are welcome

device.save();
},
exposes: [e.lock(), e.pincode(), e.battery(), e.sound_volume()],
extend: [h.slm_2.soundVolume()],
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use some more modernExtends here, e.g. m.battery(), m.lock() m.forcePowerSource({powerSource: 'Battery'}),

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

with m.forcePowerSource({powerSource: 'Battery'}),. I Dont need the part in configure right?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also. Since modern m.lock() includes lock_sound_volume. how do i exclude this?

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

with m.forcePowerSource({powerSource: 'Battery'}),. I Dont need the part in configure right?

Exactly

Also. Since modern m.lock() includes lock_sound_volume. how do i exclude this?

You can add a parameter to the modernExtend.ts/lock to disable this conditionally.

@bskjon bskjon changed the title Heimgard SLM2 - Locking history for internal vs external lock status Draft: Heimgard SLM2 - Locking history for internal vs external lock status Mar 9, 2025
@bskjon bskjon changed the title Draft: Heimgard SLM2 - Locking history for internal vs external lock status Heimgard SLM2 - Locking history for internal vs external lock status Mar 9, 2025
@bskjon bskjon marked this pull request as draft March 9, 2025 14:10
@bskjon
Copy link
Contributor Author

bskjon commented Mar 9, 2025

Need to do some adjustment to the state stuff.

@bskjon bskjon marked this pull request as ready for review March 26, 2025 22:43
@bskjon
Copy link
Contributor Author

bskjon commented Mar 26, 2025

Got some time, so i added the original state mapping as well since i expierenced a fault.. Should fix it

@github-actions
Copy link
Contributor

This pull request is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days

@github-actions github-actions bot added the stale label Jun 12, 2025
@github-actions github-actions bot closed this Jun 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants