Mecheng70 Posted February 23, 2023 Posted February 23, 2023 (edited) Update 4.0.10 now has the ability to set and delete user codes from HA!!!!! THANK YOU @shbatm No REST - kinda I have the need to be able to change lock codes and control when lock codes are used or not used. Typically I use HA for user interaction programs and ISY for more system control (almost scene control - lock unlocks then turn on patio light). However there is no functionality that suits my need to be able to update ISY when not having direct access to my network. That and having something that my SO is comfortable using. Here is the basic set up: ISY Create two integer variables. iDoorUser - make note of the variable ID. In my case the ID was 28 iDoorCode - ID was 27 Create two Network Resources for each lock. Add User - Named mine Program Doors.NAMEOFDOOR Create a New Resource HTTP GET host: user:pass@172.16.5.251 user - your username pass - your password port: 8080 Path: /rest/zmatter/zwave/node/ZY022_1/security/user/${var.1.28}/set/code/${var.1.27} ZY002_1 - substitute your device number here. ${var.1.27} - iDoorCode ID ${var.1.1.28} - iDoorUser ID Click UPDATE and SAVE Delete Code - Named mine Delete Code Doors.NAMEOFDOOR Create a New Resource HTTP GET host: user:pass@172.16.5.251 user - your username pass - your password port: 8080 Path: /rest/zmatter/zwave/node/ZY022_1/security/user/${var.1.28}/delete ZY002_1 - substitute your device number here. ${var.1.1.28} - iDoorUser ID Click UPDATE and SAVE Create one program for each ZWAVE lock - Take note of the Program Number IF - nothing needs to be here THEN - add the RESOURCE for the Add User ELSE - add the RESOURCE for the Delete User HOMEASSISTANT In home assistant, in an automation: Set the iDoorUser and iDoorCode - each require a call service for the Number: Set service Call the ISY/IoX Send Program Code- service using the Program Number. That's pretty much it. On the ISY I have created a repeat function that will wipe out all the codes and reprogram User 1. So have fun with that. Edited February 25, 2023 by Mecheng70 Update with HA info 1
shbatm Posted February 24, 2023 Posted February 24, 2023 (edited) @Mecheng70 Try this: https://github.com/shbatm/hacs-isy994/releases/tag/v4.0.7 I don't have any way to test, so let me know if the services work. Edited February 24, 2023 by shbatm
Mecheng70 Posted February 24, 2023 Author Posted February 24, 2023 28 minutes ago, shbatm said: @Mecheng70 Try this: https://github.com/shbatm/hacs-isy994/releases/tag/v4.0.7 I don't have any way to test, so let me know if the services work. you're killing me!!!! thats awesome. I will check it out!
Mecheng70 Posted February 24, 2023 Author Posted February 24, 2023 @shbatm found two issues, see github issues.
Mecheng70 Posted February 24, 2023 Author Posted February 24, 2023 In the example, can you use 8675309? 😆
shbatm Posted February 25, 2023 Posted February 25, 2023 Get what you pay for, I guess? Try again with 4.0.8.
Mecheng70 Posted February 25, 2023 Author Posted February 25, 2023 17 minutes ago, shbatm said: Get what you pay for, I guess? Try again with 4.0.8. Claims it is not a zwave device. Heading over to upload the logs.
Mecheng70 Posted February 25, 2023 Author Posted February 25, 2023 @shbatm Awesome on the example code!!!! That made my day!
Mecheng70 Posted February 25, 2023 Author Posted February 25, 2023 Is this automatically installed with the 4.0.8? New Python Module repo: https://github.com/shbatm/pyisyox
shbatm Posted February 25, 2023 Posted February 25, 2023 12 minutes ago, Mecheng70 said: Is this automatically installed with the 4.0.8? Yes 1
shbatm Posted February 25, 2023 Posted February 25, 2023 To summarize: New services have been added in the hacs-isy994 (alpha testing) version and will also be added in an upcoming HA Core release (https://github.com/home-assistant/core/pull/88754). Add custom services to ISY994 to set and delete Z-Wave Lock User Codes, which use a different end-point then other ISY Z-Wave Parameters. Services to be added are: isy994.set_zwave_lock_user_code isy994.delete_zwave_lock_user_code 1 1
Mecheng70 Posted February 25, 2023 Author Posted February 25, 2023 (edited) Thanks again @shbatm I will leave this here if someone is looking to create a way to update or delete user codes. My situation is that I need to update a lock based on who is renting the unit (airbnb). Here is the card layout: Row 1 - Left - uses a dropdown helper called "user_number_idooruser" Row 1 - Right - users a text helper called "door_code_idoorcode" Row 2 - uses a dropdown helper called "locks", here the drop down options are lock.front, lock.casita, etc Row 3 - Left - Uses a button that calls a service when activated. The service for the left button is the one that sets the lock.front, users 3 to 8675309. Row 3 - Right - Users the same button but calls a different service when clicked. The service for the right button deletes the user number 3 on the lock.front entity. Example of the lock selector: Script to set the lock code service: isy994.set_zwave_lock_user_code data: user_num: "{{ states('input_select.user_number_idooruser') | int }}" code: "{{ states('input_text.door_code_idoorcode') | int }}" target: entity_id: "{{ states('input_select.locks') | string }}" Script to delete the lock code. service: isy994.delete_zwave_lock_user_code data: user_num: "{{ states('input_select.user_number_idooruser') | int }}" target: entity_id: "{{ states('input_select.locks') | string }}" Have tested this and the ISY does report the status of user added or user deleted. Thanks again @shbatm Edited February 25, 2023 by Mecheng70
shbatm Posted February 26, 2023 Posted February 26, 2023 You should also check out mushroom-cards, the creator now works for Nabu Casa, but not all of the features have been integrated to the built-in tile card yet (e.g. Select).
Mecheng70 Posted February 26, 2023 Author Posted February 26, 2023 Just now, shbatm said: You should also check out mushroom-cards, the creator now works for Nabu Casa, but not all of the features have been integrated to the built-in tile card yet (e.g. Select). those are all I use... I will continue to watch them
Recommended Posts