home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
73.64k stars 30.79k forks source link

Unable to get/set RFID user code in HA z-wave management #10754

Closed frittes closed 6 years ago

frittes commented 6 years ago

Home Assistant release (hass --version):

0.58.0

Python release (python3 --version):

Python 3.5.2

Description of problem:

Unable to get/set hex RFID user code for Zipato z-wave keypad. The hex code of the RFID tag is displayed in OZW.log, but not displayed in user codes:

bildschirmfoto 2017-11-22 um 20 32 02

User code field does not accept hex values, but RFID code is a ten value hex code.

Only numeric codes are possible to get and set.

turbokongen commented 6 years ago

What is the output in your home assistant log when you issue the get_usercode service for the node?

frittes commented 6 years ago

There is no output in the ha log.

If I scan the tag, in OZW.log:

2017-11-22 21:56:44.081 Info, Node027, Received User Code Report from node 27 for User Code 0 (Available)...

but in the node field 0 is empty.

If I type a code in the keypad, it is shown in field 0.

If I copy the hex code an try to enter it in field 1, the interface is reseted.

turbokongen commented 6 years ago

In the developer tools menu: image Choose: Domain: lock Service: get_usercode and type your appropiate data. In homeassistant.log you will get a line like: Usercode at slot x is: xxxx

frittes commented 6 years ago

That is right for json?

{ 
"node_id":"27", 
"code_slot":"1"
}
turbokongen commented 6 years ago

Looks good.👍

frittes commented 6 years ago

This is what I get from code 0 with pincode 1111:

2017-11-22 22:36:04 DEBUG (Dummy-13) [openzwave] zwcallback args=[{'valueId': {'commandClass': 'COMMAND_CLASS_USER_CODE', 'readOnly': True, 'id': 72057594496729097, 'type': 'Raw', 'index': 0, 'nodeId': 27, 'instance': 1, 'value': '1111\x00\x00\x00\x00\x00\x00', 'homeId': 3784945032, 'units': '', 'genre': 'User', 'label': 'Enrollment Code'}, 'homeId': 3784945032, 'notificationType': 'ValueChanged', 'nodeId': 27}]

With RFID...nothing.

frittes commented 6 years ago

And that is what I get in OZW.log:

2017-11-22 23:12:07.991 Info, Node027, User Code Packet is 10
2017-11-22 23:12:07.991 Detail, Node027, Refreshed Value: old value=642b1110, new value=80f11720, type=raw
2017-11-22 23:12:07.991 Detail, Node027, Changes to this value are not verified
2017-11-22 23:12:07.991 Info, Node027, Received User Code Report from node 27 for User Code 0 (Available)
2017-11-22 23:12:07.991 Detail, Node027, Notification: ValueChanged
2017-11-22 23:12:08.046 Detail, Node027,   Received: TEN_VALUE_HEX
turbokongen commented 6 years ago

does the ten digit hex recieved for the tag comply with this: image

turbokongen commented 6 years ago

Ah, also I came accross this: https://github.com/OpenZWave/open-zwave/pull/1059 So for now we are left in the dark.

frittes commented 6 years ago

I tried with ozwcp and I was able to set to RFID tag as usercode to slot 2.

But in HA z-wave management I cannot see the code.

Log:

2017-11-23 20:08:14 INFO (Thread-5) [homeassistant.components.lock.zwave] Usercode at slot 2 is:
turbokongen commented 6 years ago

Fixed by https://github.com/home-assistant/home-assistant-polymer/pull/677