-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
base: master
Are you sure you want to change the base?
Conversation
@@ -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'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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()], |
There was a problem hiding this comment.
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'}),
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
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