Hello,
I am kind of a newbee with Home Assistant but I am a pretty experienced user with ZWave.
I am using zwave js and not zwave2mqtt
For the Zipato keypad I found that I could call ZWave API using this service zwave_js.invoke_cc_api
So in order to add a RFID tag, the ZWave command would be about
- command_class: 99
method_name: set
with 3 parameters:
- first one with 1 for the user id / slot
- second one with 1 to enable the RFID tag / user code on keyboard
- third one with the raw data for the code / RFID tag:
[b'49', b'52', b'52', b'49', b'0', b'0', b'0', b'0', b'0', b'0'] for "1441" user code
or
[b'43', b'79', b'54', b'173', b'41', b'0', b'1', b'4', b'0', b'0'] for my RFID Tag
in ZWave API frame build in python it would be something like
.......
frame += COMMAND_CLASS_USER_CODE (99)
frame += USER_CODE_SET
frame += int(uid).to_bytes(1, "big")
frame += int(1).to_bytes(1, "big") # 1 activate or 0 do not activate
for i in range(0, 10):
frame += tag[i] # 10 bytes
.......
in Home Assistant I use
- service: zwave_js.invoke_cc_api
metadata: {}
data:
command_class: 99
method_name: set
parameters:
- 1
- 1
- "1441"
target:
device_id: d93123d26ef067d9f8d0c8da14b249cc
This works for string like “1441”, but I can’t get it work for raw datas [b’43’, b’79’, b’54’, b’173’, b’41’, b’0’, b’1’, b’4’, b’0’, b’0’]
I tried something like
- service: zwave_js.invoke_cc_api
metadata: {}
data:
command_class: 99
method_name: set
parameters:
- 1
- 1
- [ 43, 79, 54, 173, 41, 0, 1, 4, 0, 0 ]
target:
device_id: d93123d26ef067d9f8d0c8da14b249cc
This does not work, it seems I cannot pass some thing if it is not a string
Do you have any solution, another way of doing it ?
Any help would be appreciated.