doudz / homeassistant-zigate

zigate component for Home Assistant
MIT License
48 stars 13 forks source link

no information of ikea remote #36

Closed max5962 closed 4 years ago

max5962 commented 5 years ago

Hello,

I upgraded the zigate to 3.0f. so i tried to pair the remote on/off ( with the plug ).

After pairing it ( 4 click on the pair button), red light :

2019-02-16 18:38:52 DEBUG (ZiGate-Listen) [zigate] Raw packet received, b'\x01\x02\x10M\x02\x10\x02\x1c\xb6\xbf\xac\x02\x10\x02\x1do\xff\xfe\x02\x1eFO\x80\x02\x10\x03'
2019-02-16 18:38:52 DEBUG (ZiGate-Event Loop) [zigate] Dispatch ZIGATE_PACKET_RECEIVED
2019-02-16 18:38:52 DEBUG (ZiGate-Decode data) [zigate] Received response 0x004d: b'bfac000d6ffffe0e464f80'
2019-02-16 18:38:52 DEBUG (ZiGate-Decode data) [zigate] RESPONSE 0x004D - Device announce : addr:bfac, ieee:000d6ffffe0e464f, mac_capability:10000000, rssi:0
2019-02-16 18:38:52 DEBUG (ZiGate-Decode data) [zigate] Device Announce RESPONSE 0x004D - Device announce : addr:bfac, ieee:000d6ffffe0e464f, mac_capability:10000000, rssi:0
2019-02-16 18:38:52 DEBUG (ZiGate-Decode data) [zigate] Dispatch ZIGATE_DEVICE_UPDATED
2019-02-16 18:38:52 DEBUG (ZiGate-Decode data) [custom_components.zigate] Update device Device  (bfac) 000d6ffffe0e464f
2019-02-16 18:38:52 DEBUG (ZiGate-Decode data) [zigate] Dispatch ZIGATE_RESPONSE_RECEIVED

After hass restart :

2019-02-16 18:37:58 WARNING (Thread-2) [zigate] No response waiting for type
2019-02-16 18:37:58 WARNING (Thread-2) [zigate] No type (modelIdentifier) for device bfac
2019-02-16 18:37:58 DEBUG (Thread-2) [zigate] Need discovery : no type

2019-02-16 18:37:58 DEBUG (Thread-2) [zigate] Need discovery : no endpoints
2019-02-16 18:37:58 DEBUG (Thread-2) [zigate] Dispatch ZIGATE_DEVICE_NEED_DISCOVERY

After pairing no information ..., not be able to run refresh_device in order to get missing information.

After calling "refresh_device" there is nothing in the logs :/

an idea ?

doudz commented 5 years ago

When you call refresh_device, you have to push the pair in order to wake up the remote. Without that you won't get answer from the remote

max5962 commented 5 years ago

I already did it, absolutely no logs. It seems that no request are sent .

doudz commented 5 years ago

You have to do the same with discover_device

doudz commented 5 years ago

Threre was a bug with the lib 0.28.1, it should be fixed in 0.28.2

max5962 commented 5 years ago

It's better but partial work.

2019-03-03 17:01:38 DEBUG (ZiGate-Listen) [zigate] Raw packet received, b'\x01\x81' 2019-03-03 17:01:38 DEBUG (ZiGate-Listen) [zigate] Raw packet received, b'\x02\x12\x02\x10\x02\x1e\x90Q\xdfI\x02\x11\x02\x10\x02\x11\x02\x10 \x02\x10 \x02\x10\x02\x11\x1b\xc0\x03\x01\x81\x02\x12\x02\x10\x02\x1e\xa8Q\xdfI\x02\x11\x02\x10\x02\x11\x02\x10!\x02\x10 \x02\x10\x02\x11"\xc0\x03' 2019-03-03 17:01:38 DEBUG (ZiGate-Event Loop) [zigate] Dispatch ZIGATE_PACKET_RECEIVED 2019-03-03 17:01:38 DEBUG (ZiGate-Decode data) [zigate] Received response 0x8102: b'51df490100010020002000011b' 2019-03-03 17:01:38 DEBUG (ZiGate-Event Loop) [zigate] Dispatch ZIGATE_PACKET_RECEIVED 2019-03-03 17:01:38 DEBUG (ZiGate-Decode data) [zigate] RESPONSE 0x8102 - Individual Attribute Report : sequence:81, addr:df49, endpoint:1, cluster:1, attribute:32, status:0, data_type:32, size:1, data:27, lqi:192 2019-03-03 17:01:38 DEBUG (ZiGate-Decode data) [zigate] Received response 0x8102: b'51df4901000100210020000122' 2019-03-03 17:01:38 DEBUG (ZiGate-Decode data) [zigate] Dispatch ZIGATE_ATTRIBUTE_UPDATED 2019-03-03 17:01:38 DEBUG (ZiGate-Decode data) [zigate] RESPONSE 0x8102 - Individual Attribute Report : sequence:81, addr:df49, endpoint:1, cluster:1, attribute:33, status:0, data_type:32, size:1, data:34, lqi:192 2019-03-03 17:01:38 DEBUG (ZiGate-Decode data) [custom_components.zigate] Update attribute for device IKEA of Sweden TRADFRI on/off switch (df49) 000d6ffffe0e464f {'endpoint': 1, 'cluster': 1, 'addr': 'df49', 'attribute': 32, 'data': 27, 'name': 'battery_voltage', 'type': <class 'float'>, 'value': 2.7} 2019-03-03 17:01:38 DEBUG (ZiGate-Decode data) [zigate] Dispatch ZIGATE_ATTRIBUTE_UPDATED 2019-03-03 17:01:38 DEBUG (ZiGate-Decode data) [zigate] Dispatch ZIGATE_RESPONSE_RECEIVED 2019-03-03 17:01:38 DEBUG (ZiGate-Decode data) [custom_components.zigate] Update attribute for device IKEA of Sweden TRADFRI on/off switch (df49) 000d6ffffe0e464f {'endpoint': 1, 'cluster': 1, 'addr': 'df49', 'attribute': 33, 'data': 34, 'name': 'battery_percent', 'type': <class 'int'>, 'value': 34}2019-03-03 17:01:38 DEBUG (ZiGate-Decode data) [zigate] Dispatch ZIGATE_RESPONSE_RECEIVED Is it normal that the remote do not push it state (on/off) ?

doudz commented 5 years ago

Not sure but maybe you have to put zigate into the group 0000 Please try to call the service zigate.add_group with the following data

{
  "endpoint": "1",
  "group_addr": "0000",
  "addr": "0000"
}
max5962 commented 5 years ago

Adding the remote add the outlet in the same group make my automation working (remote Working and outlet changes reporting) I just asking if is it normal that the Ikea remote do not report "on" or "off" status :(

doudz commented 5 years ago

If you put the zigate itself in the same group too, in theory you should see a new HA sensor with values from remote

doudz commented 5 years ago

You could retrieve the group using the group membership service on the outlet

max5962 commented 5 years ago

hum OK, can i set the zigate to multiple group ?

doudz commented 5 years ago

Yes, you can set up to 5 groups

cgradl commented 5 years ago

@max5962 Did that work for you? i have the same issue and no success so far.