-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
Enhance reporting of nimly pro door lock #6010
Conversation
src/devices/onesti.ts
Outdated
const hex = msg.data['256'].toString(16).padStart(8, '0'); | ||
const firstOctet = String(hex.substring(0, 2)); | ||
const lookup: { [key: string]: string } = { | ||
'00': 'MQTT', |
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.
- I proprose to change this to
zigbee
, this library is used by more projects than just Zigbee2MQTT. - Please make everything lower case here
src/devices/onesti.ts
Outdated
@@ -26,8 +76,11 @@ const definitions: Definition[] = [ | |||
device.save(); | |||
}, | |||
exposes: [e.lock(), e.battery(), e.sound_volume(), | |||
e.lock_action_source_name(), e.lock_action_user(), | |||
e.action(Array.from(Object.values(constants.easyCodeTouchActions))), | |||
e.text('last_unlock_source', ea.STATE).withDescription('Last unlock source'), |
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.
I missed this in my initial review, but this should be an e.enum
with all the values from the lookup. (same for last_lock_source
)
Thanks! |
Thanks for your superb works guys, but our locks doesn't show zeros '0' in the 'last_used_pin_code' eg. '440605' shows '4465' can you fix this .... Regards ... /Stefan |
Enhancing support for Nimly Pro smart lock. The original version does not report values for numerous fields - see Koenkk/zigbee2mqtt#17205
Parsing messages 256 and 257 to return the following:
last_unlock_source: Whether self, keypad, fingerprint, rfid which unlocked the door
last_unlock_user: numerical value of which user unlocked the door
last_lock_source: Whether self, keypad, fingerprint, rfid which locked the door
last_lock_user: numerical value of which user locked the door
As well the last reported pin entry -- This is whatever numbers were entered into the keypad.
This works for me as an external converter, this is my first time trying to merge in to your repo. Hopefully i've followed things correct :)