keymaster: keymaster.add_code service not being called. Results in 'Connecting' issue.
Hey,
I had lock-manager
for ozw
. In a working state, but I saw lots of weird glitches with Z-Wave and my lock entities becoming unavailable. I was bored one weekend and decided to give Z-Wave JS a try. I settled on zwavejstomqtt
because of the control panel (MQTT Disabled).
I set it up with Keymaster
which went quite smoothly. The only issue I am running into is that when I enable a code I dont see and attempt to set the usercode from zwavejs.
Disabling works very well - quick and easy. I see the zwavejstomqtt
log should the code being cleared without issue.
The keymaster
logs show that the code slot is disabled even when the switch in the dashboard is enabled and it looks like there is no attempt from zwavejstomqtt
to update the code slot.
When I manually set the code in the control panel it gets picked up right away and changes to ‘Connected’. When I call zwave_js.set_lock_usercode
it also updates immediately and changes to ‘Connected’.
This must mean that the service is not getting called properly from Keymaster? input_boolean.allow_automation_execution
is on
.
automation.zwave_js_homeassistant_up
is on
.
automation.zwave_js_homeassistant_shutdown
is on
. Is this right?
Is there something else I should be checking? Or more information I can give to help?
Thanks.
Edit:
When I attempt to call keymaster.add_code
:
2021-02-27 15:19:00 DEBUG (MainThread) [custom_components.keymaster] Add Code service: <ServiceCall keymaster.add_code (c:b81b6dadf0e4c12f137c73cb8af46dbf): entity_id=lock.frontdoorlock, code_slot=3, usercode=1234>
2021-02-27 15:19:00 DEBUG (MainThread) [custom_components.keymaster.services] Attempting to call set_usercode...
2021-02-27 15:19:00 ERROR (MainThread) [custom_components.keymaster.services] Error calling zwave_js.set_lock_usercode service call: required key not provided @ data['usercode']
Although I don’t see this when enabling a code in the dashboard at all.
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 24 (2 by maintainers)
@raman325 No worries, I used to code in University but ended up as an Elementary School teacher 😉 It was fun to go back and troubleshoot and learn more about how HA and Keymaster works!
Confirmed that regeneration of the package files and running latest version I can now add/remove codes. Thank you.
Right because the PINs in lovelace/your dash are the ones we sync with so manually setting the codes will force the sync automations to kick in and change the codes.
@firstof9 So super weird thing just happened. I was putting Logger statements into the code to see was was getting passed on the service calls (and restarting HASS a few times) and suddenly the
keymaster.add_code
call worked… Now the issue is that enabling code slot 3 on the dashboard doesn’t actually callkeymaster.add_code
.Yes, HACS shows v0.0.21
Sounds like the zwave_js call is missing a field.
We’ll check it out.