Can you share your lovelace cards? I really like this layout.
Yeah, when I get back to my computer I can share my codes. I linked a post up above that I based mine off. Essentially using custom button card and browser_mod popup.
Will try to remember to link them tomorrow since I’m working the rest of the day.
Gah, they were in core.entity_registry. I swear I looked there. Thanks for the help!
Hey,
I’ve opened an issue on Github for this.
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.
Thanks for writing up the issue, we’ll have a look to see what’s going on.
@PrayerfulDrop sorry about the wait. Finally got around to hopping on the PC.
So I have a keymaster lovelace folder where I put all my yamls for keymaster. Starts off with the ui-lovelace main page linking to a default.yaml view. Uses button-card and browser_mod along with the other HACS frontend card elements used by keymaster.
default.yaml:
cards:
- type: vertical-stack
cards:
- type: custom:button-card
template: header
name: Front Door
- type: horizontal-stack
cards:
- type: custom:button-card
entity: binary_sensor.active_frontdoor_1
template: lock_manager_button
name: "Code 1"
tap_action:
!include frontdoor/code_1.yaml
- type: custom:button-card
name: "Code 2"
entity: binary_sensor.active_frontdoor_2
template: lock_manager_button
tap_action:
!include frontdoor/code_2.yaml
- type: custom:button-card
name: "Code 3"
entity: binary_sensor.active_frontdoor_3
template: lock_manager_button
tap_action:
!include frontdoor/code_3.yaml
- type: horizontal-stack
cards:
- type: custom:button-card
name: "Code 4"
entity: binary_sensor.active_frontdoor_4
template: lock_manager_button
tap_action:
!include frontdoor/code_4.yaml
- type: custom:button-card
name: "Code 5"
entity: binary_sensor.active_frontdoor_5
template: lock_manager_button
tap_action:
!include frontdoor/code_5.yaml
- type: custom:button-card
name: "Code 6"
entity: binary_sensor.active_frontdoor_6
template: lock_manager_button
tap_action:
!include frontdoor/code_6.yaml
Rinse and repeat for multiple locks (I have backdoor and sidedoor as well.)
Each button click brings up a popup dialog courtesy of browser_mod.
Then each code.yaml looks like this:
action: fire-dom-event
browser_mod:
command: popup
title: 'Front Door - Code 1'
style:
background: none
card:
type: entities
show_header_toggle: false
entities:
- type: divider
- entity: input_text.frontdoor_name_1
- entity: input_text.frontdoor_pin_1
- entity: input_boolean.enabled_frontdoor_1
- entity: input_boolean.notify_frontdoor_1
- type: divider
- entity: sensor.connected_frontdoor_1
state_color: true
- entity: binary_sensor.active_frontdoor_1
state_color: true
- entity: binary_sensor.pin_synched_frontdoor_1
state_color: true
- type: 'custom:fold-entity-row'
head:
type: section
label: Advanced Options
entities:
- entity: input_boolean.reset_codeslot_frontdoor_1
- type: divider
- entity: input_boolean.accesslimit_frontdoor_1
- entity: input_number.accesscount_frontdoor_1
type: 'custom:numberbox-card'
icon: 'mdi:key-variant'
speed: 250
- type: divider
- entity: input_boolean.daterange_frontdoor_1
- entity: input_datetime.start_date_frontdoor_1
- entity: input_datetime.end_date_frontdoor_1
- type: custom:fold-entity-row
head:
type: section
label: 'Daily Access Breakdown'
entities:
- type: custom:fold-entity-row
head:
type: section
label: 'Sunday'
entities:
- input_boolean.sun_frontdoor_1
- input_boolean.sun_inc_frontdoor_1
- input_datetime.sun_start_date_frontdoor_1
- input_datetime.sun_end_date_frontdoor_1
- type: custom:fold-entity-row
head:
type: section
label: 'Monday'
entities:
- input_boolean.mon_frontdoor_1
- input_boolean.mon_inc_frontdoor_1
- input_datetime.mon_start_date_frontdoor_1
- input_datetime.mon_end_date_frontdoor_1
- type: custom:fold-entity-row
head:
type: section
label: 'Tuesday'
entities:
- input_boolean.tue_frontdoor_1
- input_boolean.tue_inc_frontdoor_1
- input_datetime.tue_start_date_frontdoor_1
- input_datetime.tue_end_date_frontdoor_1
- type: custom:fold-entity-row
head:
type: section
label: 'Wednesday'
entities:
- input_boolean.wed_frontdoor_1
- input_boolean.wed_inc_frontdoor_1
- input_datetime.wed_start_date_frontdoor_1
- input_datetime.wed_end_date_frontdoor_1
- type: custom:fold-entity-row
head:
type: section
label: 'Thursday'
entities:
- input_boolean.thu_frontdoor_1
- input_boolean.thu_inc_frontdoor_1
- input_datetime.thu_start_date_frontdoor_1
- input_datetime.thu_end_date_frontdoor_1
- type: custom:fold-entity-row
head:
type: section
label: 'Friday'
entities:
- input_boolean.fri_frontdoor_1
- input_boolean.fri_inc_frontdoor_1
- input_datetime.fri_start_date_frontdoor_1
- input_datetime.fri_end_date_frontdoor_1
- type: custom:fold-entity-row
head:
type: section
label: 'Saturday'
entities:
- input_boolean.sat_frontdoor_1
- input_boolean.sat_inc_frontdoor_1
- input_datetime.sat_start_date_frontdoor_1
- input_datetime.sat_end_date_frontdoor_1
I think I got everything on here. Lots of copy/paste and replace entities involved
*edited to add: All from this previous post!
**EDIT:
Error still occurs post v0.0.24 with package regeneration. Saw the guard for v0.0.24, which means multiples don’t get created and there’s just a log error. Is this working as intended? (Error occurs twice, which I assume is because I have 3 locks total.)
Logger: homeassistant.components.binary_sensor
Source: helpers/entity_platform.py:492
Integration: Binary sensor (documentation, issues)
First occurred: 1:00:06 PM (2 occurrences)
Last logged: 1:00:06 PM
Platform keymaster does not generate unique IDs. ID keymaster_zwave_network_ready already exists - ignoring binary_sensor.keymaster_zwave_network_ready
Keymaster is working perfectly for me the last several versions. Love it!
This probably does not belong here, but I know there are a lot of schlage be469 users using this. This does work for me with the new 2021.3.0 zwave.js
Have a look to get an idea on how the zwave config parameters can work for your.
automation:
- alias: Set Lock Options (Front Door)
trigger:
- platform: state
entity_id:
- input_select.lock_zwave_option_3_front
- input_select.lock_zwave_option_4_front
- input_select.lock_zwave_option_5_front
- input_select.lock_zwave_option_7_front
- input_select.lock_zwave_option_8_front
- input_select.lock_zwave_option_9_front
- input_select.lock_zwave_option_10_front
- input_select.lock_zwave_option_11_front
- input_select.lock_zwave_option_15_front
- input_select.lock_zwave_option_16_front
condition:
- condition: state
entity_id: 'input_boolean.allow_automation_execution'
state: 'on'
action:
- service: zwave_js.set_config_parameter
entity_id: lock.front_door
data_template:
parameter: >-
{% if trigger.entity_id == 'input_select.lock_zwave_option_3_front' %}
3
{% elif trigger.entity_id == 'input_select.lock_zwave_option_4_front' %}
4
{% elif trigger.entity_id == 'input_select.lock_zwave_option_5_front' %}
5
{% elif trigger.entity_id == 'input_select.lock_zwave_option_7_front' %}
7
{% elif trigger.entity_id == 'input_select.lock_zwave_option_8_front' %}
8
{% elif trigger.entity_id == 'input_select.lock_zwave_option_9_front' %}
9
{% elif trigger.entity_id == 'input_select.lock_zwave_option_10_front' %}
10
{% elif trigger.entity_id == 'input_select.lock_zwave_option_11_front' %}
11
{% elif trigger.entity_id == 'input_select.lock_zwave_option_15_front' %}
15
{% elif trigger.entity_id == 'input_select.lock_zwave_option_16_front' %}
16
{% else %}
0
{% endif %}
value: >-
{{ trigger.to_state.state }}
input_select:
lock_zwave_option_3_front:
name: Enable or disable the beeper.
options:
- Enable Beeper
- Disable Beeper
lock_zwave_option_4_front:
name: Prevents all user codes from unlocking the deadbolt
options:
- Disable Vacation Mode
- Enable Vacation Mode
lock_zwave_option_5_front:
name: Press the Outside Schlage Button to lock the deadbolt
options:
- Enable Lock & Leave
- Disable Lock & Leave
lock_zwave_option_7_front:
name: Alarm sounds based on door activity
options:
- Alarm Off
- Activity
- Tamper
- Forced Entry
lock_zwave_option_8_front:
name: Activity Alarm Sensitivity
options:
- Medium Sensitivity
- Most Sensitive
- Medium/high Sensitivity
- Medium/low Sensitivity
- Least Sensitivity
lock_zwave_option_9_front:
name: Tamper Alarm Sensitivity
options:
- Medium Sensitivity
- Most Sensitive
- Medium/high Sensitivity
- Medium/low Sensitivity
- Least Sensitivity
lock_zwave_option_10_front:
name: Forced Entry Alarm Sensitivity
options:
- Medium Sensitivity
- Most Sensitive
- Medium/high Sensitivity
- Medium/low Sensitivity
- Least Sensitivity
lock_zwave_option_11_front:
name: Disable Local Alarm Controls
options:
- Enable local alarm controls
- Disable local alarm controls
lock_zwave_option_15_front:
name: Auto lock
options:
- Disable auto lock
- Enable auto lock
lock_zwave_option_16_front:
name: User code pin length (changing Length erases all codes)
options:
- 4
- 5
- 6
- 7
- 8
And basic lovelace card
entities:
- input_select.lock_zwave_option_3_front
- input_select.lock_zwave_option_4_front
- input_select.lock_zwave_option_5_front
- input_select.lock_zwave_option_7_front
- input_select.lock_zwave_option_8_front
- input_select.lock_zwave_option_9_front
- input_select.lock_zwave_option_10_front
- input_select.lock_zwave_option_11_front
- input_select.lock_zwave_option_15_front
- input_select.lock_zwave_option_16_front
show_header_toggle: false
title: Front Door Zwave Config Options
type: entities
Just an entity card
Is there a walkthrough for ZwaveJS2MQTT users? I installed via HACS and I’m running into problems…
I’ve added a binary_sensor.yaml
file containing this:
# Added for KeyMaster
binary_sensor:
- platform: mqtt
name: ozw_network_status
state_topic: OpenZWave/1/status/
value_template: >
{{ "ON" if value_json.Status in ["driverAwakeNodesQueried", "driverAllNodesQueriedSomeDead", "driverAllNodesQueried"] else "OFF" }}
json_attributes_topic: OpenZWave/1/status/
device_class: "connectivity"
I’ve added this to automations.yaml
:
# Added for KeyMaster
# This automation ensures that input_boolean.allow_automation_execution
# is turned off when the system starts loading. You can also use this automation
# to handle other startup functions.
- alias: homeassistant start-up
initial_state: true
trigger:
platform: homeassistant
event: start
action:
- service: input_boolean.turn_off
entity_id: 'input_boolean.allow_automation_execution'
- service: input_boolean.turn_off
entity_id: input_boolean.system_ready
- service: timer.cancel
entity_id:
- timer.litterbox
- timer.fireplace
- service: google_assistant.request_sync
data_template:
agent_user_id: !secret GAagent_user_i
- service: system_startup_cleanup
# When either z-wave network stops, disable the automation boolean
- alias: open_zwave_network_down
initial_state: true
trigger:
- platform: state
entity_id: binary_sensor.ozw_network_status
to: "off"
- platform: event
event_type: zwave.network_stop
action:
- service: homeassistant.turn_off
entity_id: input_boolean.allow_automation_execution
# When either z-wave network starts up, call the cleanup code
- alias: zwave_ozw_network_up
initial_state: true
trigger:
- platform: state
entity_id: binary_sensor.ozw_network_status
to: "on"
- platform: event
event_type: zwave.network_ready
- platform: event
event_type: zwave.network_complete
action:
- service: script.system_startup_cleanup
I added this to scripts.yaml
(I’m not using HomeKit):
# Note the last call turns on input_boolean.allow_automation_execution
system_startup_cleanup:
sequence:
- service: input_boolean.turn_on
entity_id: input_boolean.system_ready
- service: input_boolean.turn_on
entity_id: 'input_boolean.allow_automation_execution'
I’ve created my input_boolean… and I’m getting a configuration.yaml
error:
Error loading /config/configuration.yaml: Secret GAagent_user_i not defined
Any ideas?
My \packages folder does not contain a key-master folder. I see no *.ini files related to this add-on. I have added _LockName1 and _LockName2 to all of the entities associated with the two locks I have.
I was under the impression v.24 didn’t need those files. I deleted those entries, updated to the latest version, and it works perfect for me.
Have you read the wiki?
Assuming you’re on the latest version of keymaster, you don’t need the first “pre-installation” step listed. But yes, update to the latest version via HACS and follow the wiki!
Ah, yes… that’s what I get for starting from post #1!
Thanks. I’m making progress. I suppose it’s normal for the binary sensor to show as “entity not found” in Lovelace if I don’t in fact have door sensors?
That is correct, you can remove them from your lovelace if you don’t have them.
Yeah… I really don’t like badges, most of the time. I don’t like that they can’t be renamed. I’m planning to get door sensors, so I’ll just add them back in when I have them in the network.
Quick suggestion that’s probably been suggested/considered before…
In the lovelace file, adding a button for the “allow_automations” boolean has been a big help for me. I was having issues getting codes to take,etc and it’s generally been because allow_automations was off. By adding a button in the lovelace yaml, I can see quickly if that’s the issue and toggle it right there if it is.
Just a note that this input_boolean is no longer necessary for v0.0.23 and on.
Need help with the notifications. Now that the latest version of HA and ZwaveJS2MQTT I now have the two sensors from my Yale needed for latest version of keymaster. I am struggling with getting the notifications to work properly. Here is what I want:
- when user unlocks door notification is sent immediately to notify.pushover
- the message to say LOCKUSER unlocked DOORTHATWASUNLOCKED or a better way to customize the message itself
What I get is a message that says front door - Aaron about 30min after the event. I am also getting a ton of notifications that’s lock codes are deleted every 2-3 hours.
So how do I make these dreams come true?
Keymaster emits an event you can trigger automations off of keymaster_lock_state_changed
if you throw this into your Dev-Tools
->Events
and hit “Start Listening” then do something with your lock, you’ll see the information it sends out.