Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Heimgard SLM2 - Locking history for internal vs external lock status #8864

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

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

@@ -1,11 +1,13 @@
import fz from '../converters/fromZigbee';
import tz from '../converters/toZigbee';
import * as exposes from '../lib/exposes';
import * as h from '../lib/heimgard';
Copy link
Owner

Choose a reason for hiding this comment

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

Suggested change
import * as h from '../lib/heimgard';
import * as heimgard from '../lib/heimgard';

},
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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants