GithubHelp home page GithubHelp logo

zigate's People

Contributors

alexbarcelo avatar doudz avatar fairecasoimeme avatar iso-b avatar jbouyoud avatar llaumgui avatar pawelka avatar pdecat avatar sebastienmusso avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

zigate's Issues

Logging improvement

Log HEX request and responses instead of b'\x01\x02\x10$\x02\x10\x02\x10$\x03'

but something like this:
<- 01 80 00 00 05 A6 00 00 00 23 00 03
-> 01 02 10 24 02 10 02 10 24 03

It will help with command debuging

Accessing ZiGate via the USB port of the Wifi module?

As wireless connection to the ZiGate is currently unstable (cf. #3), is there any mean to access it via USB using its USB-Wifi module?
Or can that only be done using the USB-TTL module?
I ask because I'd rather avoid having to swap modules between experiments.

When plugged, that USB-Wifi module is seen as:

# dmesg | tail -6
[1021400.252231] usb 3-5.1: new full-speed USB device number 39 using xhci_hcd
[1021400.353340] usb 3-5.1: New USB device found, idVendor=1a86, idProduct=7523
[1021400.353343] usb 3-5.1: New USB device strings: Mfr=0, Product=2, SerialNumber=0
[1021400.353344] usb 3-5.1: Product: USB2.0-Serial
[1021400.354079] ch341 3-5.1:1.0: ch341-uart converter detected
[1021400.354589] usb 3-5.1: ch341-uart converter now attached to ttyUSB0
# lsusb | grep 1a86:7523
Bus 003 Device 039: ID 1a86:7523 QinHeng Electronics HL-340 USB-Serial adapter

I've tried to naively put that ID in the discovery code:

git diff
diff --git a/zigate/transport.py b/zigate/transport.py
index dcccef1..e1395cf 100644
--- a/zigate/transport.py
+++ b/zigate/transport.py
@@ -102,7 +102,7 @@ class ThreadSerialConnection(object):
             LOGGER.info('Searching ZiGate port')
 #             context = pyudev.Context()
 #             devices = list(context.list_devices(ID_USB_DRIVER='pl2303', ID_VENDOR_ID='067b', subsystem='tty'))
-            devices = list(serial.tools.list_ports.grep('067b:2303'))
+            devices = list(serial.tools.list_ports.grep('1a86:7523'))
             if devices:
                 port = devices[0].device
                 if len(devices) == 1:

But it fails:

# ./venv/bin/python 
Python 3.6.5 (default, Apr  1 2018, 05:46:30) 
[GCC 7.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import logging
>>> logging.basicConfig()
>>> logging.root.setLevel(logging.DEBUG)
>>> import zigate
>>> z = zigate.ZiGate(port=None)
INFO:zigate:Searching ZiGate port
INFO:zigate:ZiGate found at /dev/ttyUSB0
DEBUG:zigate:Try loading persistent file
DEBUG:zigate:No file to load
DEBUG:zigate:REQUEST : 0x0021 b'\x03\x18\xc8\x00'
DEBUG:zigate:Msg to send b'00210004f60318c800'
DEBUG:zigate:Encoded Msg to send b'\x01\x02\x10!\x02\x10\x02\x14\xf6\x02\x13\x18\xc8\x02\x10\x03'
DEBUG:zigate:Waiting for status message for command 0x0021
ERROR:zigate:No response after command 0x0021
DEBUG:zigate:REQUEST : 0x0023 b'\x00'
DEBUG:zigate:Msg to send b'002300012200'
DEBUG:zigate:Encoded Msg to send b'\x01\x02\x10#\x02\x10\x02\x11"\x02\x10\x03'
DEBUG:zigate:Waiting for status message for command 0x0023
ERROR:zigate:No response after command 0x0023
DEBUG:zigate:Check network state
DEBUG:zigate:REQUEST : 0x0024 
DEBUG:zigate:Msg to send b'0024000024'
DEBUG:zigate:Encoded Msg to send b'\x01\x02\x10$\x02\x10\x02\x10$\x03'
DEBUG:zigate:Waiting for status message for command 0x0024
ERROR:zigate:No response after command 0x0024
DEBUG:zigate:REQUEST : 0x0009 
DEBUG:zigate:Msg to send b'0009000009'
DEBUG:zigate:Encoded Msg to send b'\x01\x02\x10\x02\x19\x02\x10\x02\x10\x02\x19\x03'
DEBUG:zigate:Waiting for status message for command 0x0009
ERROR:zigate:No response after command 0x0009
DEBUG:zigate:Waiting for message 0x8009
ERROR:zigate:No response waiting command 0x8009
ERROR:zigate:Failed to get network state
DEBUG:zigate:Network is down, start it
DEBUG:zigate:REQUEST : 0x0024 
DEBUG:zigate:Msg to send b'0024000024'
DEBUG:zigate:Encoded Msg to send b'\x01\x02\x10$\x02\x10\x02\x10$\x03'
DEBUG:zigate:Waiting for status message for command 0x0024
ERROR:zigate:No response after command 0x0024
DEBUG:zigate:Waiting for message 0x8024
ERROR:zigate:No response waiting command 0x8024
DEBUG:zigate:REQUEST : 0x0015 
DEBUG:zigate:Msg to send b'0015000015'
DEBUG:zigate:Encoded Msg to send b'\x01\x02\x10\x15\x02\x10\x02\x10\x15\x03'
DEBUG:zigate:Waiting for status message for command 0x0015
ERROR:zigate:No response after command 0x0015
DEBUG:zigate:Waiting for message 0x8015
ERROR:zigate:No response waiting command 0x8015
DEBUG:zigate:Auto saving /home/patrick/.zigate.json
>>> z.get_version()
DEBUG:zigate:REQUEST : 0x0010 
DEBUG:zigate:Msg to send b'0010000010'
DEBUG:zigate:Encoded Msg to send b'\x01\x02\x10\x10\x02\x10\x02\x10\x10\x03'
DEBUG:zigate:Waiting for status message for command 0x0010
ERROR:zigate:No response after command 0x0010
DEBUG:zigate:Waiting for message 0x8010
ERROR:zigate:No response waiting command 0x8010
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/patrick/workspaces/homeassistant/zigate/zigate/core.py", line 534, in get_version
    self._version = self.send_data(0x0010, wait_response=0x8010).data
AttributeError: 'NoneType' object has no attribute 'data'
>>>

Command 0x0009 failed Unhandled command : b''

j'ai ce message d'erreur à chaque démarrage de mon script python, qui fait juste :

import zigate
z = zigate.ZiGate(port=None)
print(z.get_version())

après tous semble fonctionner correctement.

Message d'erreur:
Command 0x0009 failed Unhandled command : b''
No response waiting command 0x8009
Failed to get network state
No response waiting command 0x8024
Command 0x0015 failed Unhandled command : b''
No response waiting command 0x8015
OrderedDict([('major', 1), ('installer', '30'), ('rssi', 0), ('version', '3.0')])

j'ai effectuer des tests avec l'interface officel de test de Zigate sur le "get network state":
11:49:44.937 -> 01 02 10 02 19 02 10 02 10 02 19 03
11:49:45.000 <- 01 80 00 00 05 8E 02 00 00 09 00 03

Discovered endpoints list empty

Hello,

I setup zigate-0.10.7 version on my raspberry pi (kernel 4.9.59-v7) which have the Zigate USB dongle (firmware 3.0d) connected. I have 4 devices connected to Zigate:

  • 1bd7: Xiaomi Aqara Smart Wireless Switch V2
  • 7629: Xiaomi WXKG02LM Aqara Smart Light Switch Wireles
  • 6f44: IKEA TRADFRI bulb E14
  • b26c: Xiaomi Aqara Temperature Humidity Sensor

Here is what my the python script outputs:

pi@raspberrypi:~/py-zigate$ python3 py-zigate.py 
Zigate version:
3.0d
is_permitting_join ? :
True

devices:
[Device 7629 , Device 1bd7 , Device 6f44 TRADFRI bulb E14 WS opal 400lm, Device 74d2 , Device b26c ]
7629
1bd7
discovered endpoints:
{}
well known attributes:
pi@raspberrypi:~/py-zigate$ 

I can notice the TRADFRI bulb: 'Device 6f44 TRADFRI bulb E14 WS opal 400lm'
But 'discovered endpoints' and 'well known attributes' are empty.

I have this on the Domoticz WebUI, still no TRADFRI bulb here:

Zigate	b26c	7	Zigate - Humi - b26c	Humidity
Zigate	b26c	8	Zigate - Baro - b26c	General
Zigate	b26c	6	Zigate test temp	Temp
Zigate	1bd7	1	Zigate Bouton Xiaomi	Light/Switch
Zigate	7629	4	Zigate - DSwitch - 7629	Light/Switch
Zigate	7629	5	Zigate - DSwitch - 7629	Light/Switch
Zigate	2eba	2	Zigate - DSwitch - 2eba	Light/Switch
Zigate	2eba	3	Zigate - DSwitch - 2eba	Light/Switch

Do you have any clue to fix that?

Here is the script:

cat py-zigate.py
# if you want logging
import logging
import pprint

logging.basicConfig()
logging.root.setLevel(logging.DEBUG)
logging.root.setLevel(logging.INFO)

pp = pprint.PrettyPrinter(depth=6)

import zigate
z = zigate.ZiGate(port=None) # Leave None to auto-discover the port

#print(z.get_version())

print('Zigate version:')
print(z.get_version_text())

# refresh devices list
z.get_devices_list()

# start inclusion mode
z.permit_join()
print('is_permitting_join ? :')
print(z.is_permitting_join())
print ('\n')

# list devices
print ('devices:')
print (z.devices)
pp.pprint(z.devices)

print (z.devices[0].addr)
print (z.devices[1].addr)


# get all discovered endpoints
print ('discovered endpoints:')
print (z.devices[0].endpoints)

# get well known attributes
print ('well known attributes:')
for attribute in z.devices[0].properties:
         print('attributes')
         print(attribute)

Regards,
Ludovic

osram devices does not respond the first time

Hi,

I'm using the zigate lib with home assistant component.
I'm also using nodered for automation.
I have two devices type from osram: smart plug and a lightify outdoor flex rgwb.
The problem is that it looks like osram devices use some kind of sleep after some time or something like that and the result is that the device does not react at the first command.
When I say some time it's very short, max one minute.

Please find the log below and the use case:
I turn on the light addr c28c using hass gui the node red detect it and send a service call turn_on to osram strip 6201.
But the strip does not turn on.
I turn off c28c, node red send a turn_off to 6201, I can see now in debug logs the answer of 6201 to turn_off, but it was already off.
Then I turn on c28c again, 6201 turn on. Finally I turn off c28c and 6201 turn off.

I have the same behaviour with a smartplug and a aqara wireless switch. First click does not turn on smart plug, second click yes, and then I can continue turn on and off while clicking.

Don't know I my description is clear, please find the log:

2019-01-10 15:03:23 DEBUG (SyncWorker_15) [zigate] REQUEST : 0x0092 b'\x02\xc2\x8c\x01\x01\x01'
2019-01-10 15:03:23 DEBUG (SyncWorker_15) [zigate] Msg to send b'00920006d902c28c010101'
2019-01-10 15:03:23 DEBUG (SyncWorker_15) [zigate] Encoded Msg to send b'0102109202100216d90212c28c02110211021103'
2019-01-10 15:03:23 DEBUG (SyncWorker_15) [zigate] Waiting for status message for command 0x0092
2019-01-10 15:03:23 DEBUG (ZiGate-Listen) [zigate] Raw packet received, b'\x01\x80\x02\x10\x02\x10\x02\x15o\x02\x10x\x02\x10\x92\x02\x10\x03\x01\x81\x02\x11\x02\x10\x02\x17\x90x\x02\x11\x02\x10\x02\x16\x02\x11\x02\x10i\x03\x01\x81\x02\x12\x02\x10\x02\x1eQ\xe3\xc2\x8c\x02\x11\x02\x10\x02\x16\x02\x10\x02\x10\x02\x10\x10\x02\x10\x02\x11\x02\x11f\x03\x01\x81\x02\x12\x02\x10\x11\xf6\xe3\xc2\x8c\x02\x11\x02\x10\x02\x16\xf0\x02\x10\x02\x10#\x02\x10\x02\x14\x02\x17\x02\x10\x02\x10xf\x03'
2019-01-10 15:03:23 DEBUG (ZiGate-Event Loop) [zigate] Dispatch ZIGATE_PACKET_RECEIVED
2019-01-10 15:03:23 DEBUG (ZiGate-Decode data) [zigate] Received response 0x8000: b'00780092'
2019-01-10 15:03:23 DEBUG (ZiGate-Event Loop) [zigate] Dispatch ZIGATE_PACKET_RECEIVED
2019-01-10 15:03:23 DEBUG (ZiGate-Decode data) [zigate] RESPONSE 0x8000 - Status response : status:0, sequence:120, packet_type:146, error:b'', rssi:0
2019-01-10 15:03:23 DEBUG (ZiGate-Decode data) [zigate] Received response 0x8101: b'780100060100'
2019-01-10 15:03:23 DEBUG (ZiGate-Event Loop) [zigate] Dispatch ZIGATE_PACKET_RECEIVED
2019-01-10 15:03:23 DEBUG (ZiGate-Decode data) [zigate] Dispatch ZIGATE_RESPONSE_RECEIVED
2019-01-10 15:03:23 DEBUG (ZiGate-Decode data) [zigate] RESPONSE 0x8101 - Default device response : sequence:120, endpoint:1, cluster:6, cmd:1, status:0, rssi:105
2019-01-10 15:03:23 DEBUG (ZiGate-Decode data) [zigate] Received response 0x8102: b'e3c28c01000600000010000101'
2019-01-10 15:03:23 DEBUG (ZiGate-Event Loop) [zigate] Dispatch ZIGATE_PACKET_RECEIVED
2019-01-10 15:03:23 DEBUG (ZiGate-Decode data) [zigate] Dispatch ZIGATE_RESPONSE_RECEIVED
2019-01-10 15:03:23 DEBUG (ZiGate-Decode data) [zigate] RESPONSE 0x8102 - Individual Attribute Report : sequence:227, addr:c28c, endpoint:1, cluster:6, attribute:0, status:0, data_type:16, size:1, data:True, rssi:102
2019-01-10 15:03:23 DEBUG (ZiGate-Decode data) [zigate] Received response 0x8102: b'e3c28c010006f0000023000407000078'
2019-01-10 15:03:23 DEBUG (ZiGate-Decode data) [zigate] Dispatch ZIGATE_RESPONSE_RECEIVED
2019-01-10 15:03:23 DEBUG (ZiGate-Decode data) [zigate] RESPONSE 0x8102 - Individual Attribute Report : sequence:227, addr:c28c, endpoint:1, cluster:6, attribute:61440, status:0, data_type:35, size:4, data:117440632, rssi:102
2019-01-10 15:03:23 DEBUG (ZiGate-Decode data) [zigate] Dispatch ZIGATE_ATTRIBUTE_UPDATED
2019-01-10 15:03:23 DEBUG (SyncWorker_15) [zigate] STATUS code to command 0x0092:0
2019-01-10 15:03:23 DEBUG (ZiGate-Decode data) [zigate] Dispatch ZIGATE_RESPONSE_RECEIVED
2019-01-10 15:03:23 DEBUG (ZiGate-Decode data) [zigate] Dispatch ZIGATE_ATTRIBUTE_UPDATED
2019-01-10 15:03:23 DEBUG (SyncWorker_16) [zigate] REQUEST : 0x0081 b'\x02b\x01\x01\x03\x01\xfe\x00\x05'
2019-01-10 15:03:23 DEBUG (SyncWorker_16) [zigate] Msg to send b'0081000911026201010301fe0005'
2019-01-10 15:03:23 DEBUG (SyncWorker_16) [zigate] Encoded Msg to send b'0102108102100219110212620211021102130211fe0210021503'
2019-01-10 15:03:23 DEBUG (SyncWorker_16) [zigate] Waiting for status message for command 0x0081
2019-01-10 15:03:23 DEBUG (ZiGate-Listen) [zigate] Raw packet received, b'\x01\x80\x02\x10\x02\x10\x02\x15}\x02\x10y\x02\x10\x81\x02\x10\x03'
2019-01-10 15:03:23 DEBUG (ZiGate-Event Loop) [zigate] Dispatch ZIGATE_PACKET_RECEIVED
2019-01-10 15:03:23 DEBUG (ZiGate-Decode data) [zigate] Received response 0x8000: b'00790081'
2019-01-10 15:03:23 DEBUG (ZiGate-Decode data) [zigate] RESPONSE 0x8000 - Status response : status:0, sequence:121, packet_type:129, error:b'', rssi:0
2019-01-10 15:03:23 DEBUG (ZiGate-Decode data) [zigate] Dispatch ZIGATE_RESPONSE_RECEIVED
2019-01-10 15:03:23 DEBUG (SyncWorker_16) [zigate] STATUS code to command 0x0081:0
2019-01-10 15:03:23 DEBUG (SyncWorker_16) [zigate] REQUEST : 0x00c0 b'\x02b\x01\x01\x03\x015\x00\x05'
2019-01-10 15:03:23 DEBUG (SyncWorker_16) [zigate] Msg to send b'00c000099b026201010301350005'
2019-01-10 15:03:23 DEBUG (SyncWorker_16) [zigate] Encoded Msg to send b'010210c0021002199b0212620211021102130211350210021503'
2019-01-10 15:03:23 DEBUG (SyncWorker_16) [zigate] Waiting for status message for command 0x00c0
2019-01-10 15:03:23 DEBUG (ZiGate-Listen) [zigate] Raw packet received, b'\x01\x81\x02\x12\x02\x10\x11%\xe4\xc2\x8c\x02\x13\x02\x10\x02\x1c\x02\x10U\x02\x109\x02\x10\x02\x14B$\)i\x03'
2019-01-10 15:03:23 DEBUG (ZiGate-Event Loop) [zigate] Dispatch ZIGATE_PACKET_RECEIVED
2019-01-10 15:03:23 DEBUG (ZiGate-Decode data) [zigate] Received response 0x8102: b'e4c28c03000c00550039000442245c29'
2019-01-10 15:03:23 DEBUG (ZiGate-Decode data) [zigate] RESPONSE 0x8102 - Individual Attribute Report : sequence:228, addr:c28c, endpoint:3, cluster:12, attribute:85, status:0, data_type:57, size:4, data:41.09000015258789, rssi:105
2019-01-10 15:03:23 DEBUG (ZiGate-Decode data) [zigate] Dispatch ZIGATE_RESPONSE_RECEIVED
2019-01-10 15:03:23 DEBUG (ZiGate-Listen) [zigate] Raw packet received, b'\x01\x80\x02\x10\x02\x10\x02\x15?\x02\x10z\x02\x10\xc0\x02\x10\x03'
2019-01-10 15:03:23 DEBUG (ZiGate-Decode data) [zigate] Set expire timer for 3-12-85 in 2
2019-01-10 15:03:23 DEBUG (ZiGate-Decode data) [zigate] Cancel previous Timer <Timer(Thread-285, stopped daemon 140490216548096)>
2019-01-10 15:03:23 DEBUG (ZiGate-Decode data) [zigate] Dispatch ZIGATE_ATTRIBUTE_UPDATED
2019-01-10 15:03:23 DEBUG (ZiGate-Event Loop) [zigate] Dispatch ZIGATE_PACKET_RECEIVED
2019-01-10 15:03:23 DEBUG (ZiGate-Decode data) [zigate] Received response 0x8000: b'007a00c0'
2019-01-10 15:03:23 DEBUG (ZiGate-Decode data) [zigate] RESPONSE 0x8000 - Status response : status:0, sequence:122, packet_type:192, error:b'', rssi:0
2019-01-10 15:03:23 DEBUG (ZiGate-Decode data) [zigate] Dispatch ZIGATE_RESPONSE_RECEIVED
2019-01-10 15:03:23 DEBUG (SyncWorker_16) [zigate] STATUS code to command 0x00c0:0
2019-01-10 15:03:23 ERROR (SyncWorker_16) [custom_components.light.zigate] {'brightness': 255, 'color_temp': 309, 'transition': 5.0}
2019-01-10 15:03:24 DEBUG (ZiGate-Listen) [zigate] Raw packet received, b'\x01\x81\x02\x12\x02\x10\x02\x1e[\xe6\xc2\x8c\x02\x11\x02\x10\x02\x16\x02\x10\x02\x10\x02\x10\x10\x02\x10\x02\x11\x02\x11i\x03'
2019-01-10 15:03:24 DEBUG (ZiGate-Event Loop) [zigate] Dispatch ZIGATE_PACKET_RECEIVED
2019-01-10 15:03:24 DEBUG (ZiGate-Decode data) [zigate] Received response 0x8102: b'e6c28c01000600000010000101'
2019-01-10 15:03:24 DEBUG (ZiGate-Decode data) [zigate] RESPONSE 0x8102 - Individual Attribute Report : sequence:230, addr:c28c, endpoint:1, cluster:6, attribute:0, status:0, data_type:16, size:1, data:True, rssi:105
2019-01-10 15:03:24 DEBUG (ZiGate-Decode data) [zigate] Dispatch ZIGATE_RESPONSE_RECEIVED
2019-01-10 15:03:24 DEBUG (ZiGate-Decode data) [zigate] Dispatch ZIGATE_ATTRIBUTE_UPDATED
2019-01-10 15:03:24 DEBUG (ZiGate-Listen) [zigate] Raw packet received, b'\x01\x81\x02\x11\x02\x10\x02\x17\x98y\x02\x13\x02\x10\x02\x18\x02\x14\x02\x10i\x03'
2019-01-10 15:03:25 DEBUG (ZiGate-Event Loop) [zigate] Dispatch ZIGATE_PACKET_RECEIVED
2019-01-10 15:03:25 DEBUG (ZiGate-Decode data) [zigate] Received response 0x8101: b'790300080400'
2019-01-10 15:03:25 DEBUG (ZiGate-Decode data) [zigate] RESPONSE 0x8101 - Default device response : sequence:121, endpoint:3, cluster:8, cmd:4, status:0, rssi:105
2019-01-10 15:03:25 DEBUG (ZiGate-Decode data) [zigate] Dispatch ZIGATE_RESPONSE_RECEIVED
2019-01-10 15:03:25 DEBUG (ZiGate-Listen) [zigate] Raw packet received, b'\x01\x81\x02\x11\x02\x10\x02\x17\x9ez\x02\x13\x02\x13\x02\x10\x02\x1a\x02\x10i\x03'
2019-01-10 15:03:25 DEBUG (ZiGate-Event Loop) [zigate] Dispatch ZIGATE_PACKET_RECEIVED
2019-01-10 15:03:25 DEBUG (ZiGate-Decode data) [zigate] Received response 0x8101: b'7a0303000a00'
2019-01-10 15:03:25 DEBUG (ZiGate-Decode data) [zigate] RESPONSE 0x8101 - Default device response : sequence:122, endpoint:3, cluster:768, cmd:10, status:0, rssi:105
2019-01-10 15:03:25 DEBUG (ZiGate-Decode data) [zigate] Dispatch ZIGATE_RESPONSE_RECEIVED
2019-01-10 15:03:25 DEBUG (Thread-287) [zigate] Dispatch ZIGATE_ATTRIBUTE_UPDATED
2019-01-10 15:03:26 DEBUG (ZiGate-Listen) [zigate] Raw packet received, b'\x01\x81\x02\x12\x02\x10\x11L\xe9\xc2\x8c\x02\x13\x02\x10\x02\x1c\x02\x10U\x02\x109\x02\x10\x02\x14B4\xcc\xcdi\x03'
2019-01-10 15:03:26 DEBUG (ZiGate-Event Loop) [zigate] Dispatch ZIGATE_PACKET_RECEIVED
2019-01-10 15:03:26 DEBUG (ZiGate-Decode data) [zigate] Received response 0x8102: b'e9c28c03000c0055003900044234cccd'
2019-01-10 15:03:26 DEBUG (ZiGate-Decode data) [zigate] RESPONSE 0x8102 - Individual Attribute Report : sequence:233, addr:c28c, endpoint:3, cluster:12, attribute:85, status:0, data_type:57, size:4, data:45.20000076293945, rssi:105
2019-01-10 15:03:26 DEBUG (ZiGate-Decode data) [zigate] Dispatch ZIGATE_RESPONSE_RECEIVED
2019-01-10 15:03:26 DEBUG (ZiGate-Decode data) [zigate] Set expire timer for 3-12-85 in 2
2019-01-10 15:03:26 DEBUG (ZiGate-Decode data) [zigate] Cancel previous Timer <Timer(Thread-287, stopped daemon 140490208155392)>
2019-01-10 15:03:26 DEBUG (ZiGate-Decode data) [zigate] Dispatch ZIGATE_ATTRIBUTE_UPDATED
2019-01-10 15:03:27 DEBUG (ZiGate-Listen) [zigate] Raw packet received, b'\x01\x81\x02\x12\x02\x10\x11.\xef\xc2\x8c\x02\x13\x02\x10\x02\x1c\x02\x10U\x02\x109\x02\x10\x02\x14B$\)i\x03'
2019-01-10 15:03:27 DEBUG (ZiGate-Event Loop) [zigate] Dispatch ZIGATE_PACKET_RECEIVED
2019-01-10 15:03:27 DEBUG (ZiGate-Decode data) [zigate] Received response 0x8102: b'efc28c03000c00550039000442245c29'
2019-01-10 15:03:27 DEBUG (ZiGate-Decode data) [zigate] RESPONSE 0x8102 - Individual Attribute Report : sequence:239, addr:c28c, endpoint:3, cluster:12, attribute:85, status:0, data_type:57, size:4, data:41.09000015258789, rssi:105
2019-01-10 15:03:27 DEBUG (ZiGate-Decode data) [zigate] Dispatch ZIGATE_RESPONSE_RECEIVED
2019-01-10 15:03:27 DEBUG (ZiGate-Decode data) [zigate] Set expire timer for 3-12-85 in 2
2019-01-10 15:03:27 DEBUG (ZiGate-Decode data) [zigate] Cancel previous Timer <Timer(Thread-288, started daemon 140490116687616)>
2019-01-10 15:03:27 DEBUG (ZiGate-Decode data) [zigate] Dispatch ZIGATE_ATTRIBUTE_UPDATED
2019-01-10 15:03:29 DEBUG (SyncWorker_14) [zigate] REQUEST : 0x0092 b'\x02\xc2\x8c\x01\x01\x00'
2019-01-10 15:03:29 DEBUG (SyncWorker_14) [zigate] Msg to send b'00920006d802c28c010100'
2019-01-10 15:03:29 DEBUG (SyncWorker_14) [zigate] Encoded Msg to send b'0102109202100216d80212c28c02110211021003'
2019-01-10 15:03:29 DEBUG (SyncWorker_14) [zigate] Waiting for status message for command 0x0092
2019-01-10 15:03:29 DEBUG (ZiGate-Listen) [zigate] Raw packet received, b'\x01\x80\x02\x10\x02\x10\x02\x15l\x02\x10{\x02\x10\x92\x02\x10\x03\x01\x81\x02\x11\x02\x10\x02\x17\x92{\x02\x11\x02\x10\x02\x16\x02\x10\x02\x10i\x03\x01\x81\x02\x12\x02\x10\x02\x1eG\xf4\xc2\x8c\x02\x11\x02\x10\x02\x16'
2019-01-10 15:03:29 DEBUG (ZiGate-Listen) [zigate] Raw packet received, b'\x02\x10\x02\x10\x02\x10\x10\x02\x10\x02\x11\x02\x10f\x03\x01\x81\x02\x12\x02\x10\x11\xe2\xf4\xc2\x8c\x02\x11\x02\x10\x02\x16\xf0\x02\x10\x02\x10#\x02\x10\x02\x14\x02\x17\x02\x10\x02\x10{f\x03\x01\x81\x02\x12\x02\x10\x11"\xf5\xc2\x8c\x02\x13\x02\x10\x02\x1c\x02\x10U\x02\x109\x02\x10\x02\x14\x02\x10\x02\x10\x02\x10\x02\x10l\x03'
2019-01-10 15:03:29 DEBUG (Thread-289) [zigate] Dispatch ZIGATE_ATTRIBUTE_UPDATED
2019-01-10 15:03:29 DEBUG (ZiGate-Event Loop) [zigate] Dispatch ZIGATE_PACKET_RECEIVED
2019-01-10 15:03:29 DEBUG (ZiGate-Decode data) [zigate] Received response 0x8000: b'007b0092'
2019-01-10 15:03:29 DEBUG (ZiGate-Event Loop) [zigate] Dispatch ZIGATE_PACKET_RECEIVED
2019-01-10 15:03:29 DEBUG (ZiGate-Decode data) [zigate] RESPONSE 0x8000 - Status response : status:0, sequence:123, packet_type:146, error:b'', rssi:0
2019-01-10 15:03:29 DEBUG (ZiGate-Decode data) [zigate] Received response 0x8101: b'7b0100060000'
2019-01-10 15:03:29 DEBUG (ZiGate-Event Loop) [zigate] Dispatch ZIGATE_PACKET_RECEIVED
2019-01-10 15:03:29 DEBUG (ZiGate-Decode data) [zigate] Dispatch ZIGATE_RESPONSE_RECEIVED
2019-01-10 15:03:29 DEBUG (ZiGate-Decode data) [zigate] RESPONSE 0x8101 - Default device response : sequence:123, endpoint:1, cluster:6, cmd:0, status:0, rssi:105
2019-01-10 15:03:29 DEBUG (ZiGate-Decode data) [zigate] Received response 0x8102: b'f4c28c01000600000010000100'
2019-01-10 15:03:29 DEBUG (ZiGate-Event Loop) [zigate] Dispatch ZIGATE_PACKET_RECEIVED
2019-01-10 15:03:29 DEBUG (ZiGate-Decode data) [zigate] Dispatch ZIGATE_RESPONSE_RECEIVED
2019-01-10 15:03:29 DEBUG (ZiGate-Decode data) [zigate] RESPONSE 0x8102 - Individual Attribute Report : sequence:244, addr:c28c, endpoint:1, cluster:6, attribute:0, status:0, data_type:16, size:1, data:False, rssi:102
2019-01-10 15:03:29 DEBUG (ZiGate-Decode data) [zigate] Dispatch ZIGATE_RESPONSE_RECEIVED
2019-01-10 15:03:29 DEBUG (ZiGate-Event Loop) [zigate] Dispatch ZIGATE_PACKET_RECEIVED
2019-01-10 15:03:29 DEBUG (ZiGate-Decode data) [zigate] Received response 0x8102: b'f4c28c010006f000002300040700007b'
2019-01-10 15:03:29 DEBUG (ZiGate-Decode data) [zigate] Dispatch ZIGATE_ATTRIBUTE_UPDATED
2019-01-10 15:03:29 DEBUG (SyncWorker_14) [zigate] STATUS code to command 0x0092:0
2019-01-10 15:03:29 DEBUG (ZiGate-Decode data) [zigate] Received response 0x8102: b'f5c28c03000c00550039000400000000'
2019-01-10 15:03:29 DEBUG (ZiGate-Decode data) [zigate] RESPONSE 0x8102 - Individual Attribute Report : sequence:244, addr:c28c, endpoint:1, cluster:6, attribute:61440, status:0, data_type:35, size:4, data:117440635, rssi:102
2019-01-10 15:03:29 DEBUG (ZiGate-Decode data) [zigate] RESPONSE 0x8102 - Individual Attribute Report : sequence:245, addr:c28c, endpoint:3, cluster:12, attribute:85, status:0, data_type:57, size:4, data:0.0, rssi:108
2019-01-10 15:03:29 DEBUG (ZiGate-Decode data) [zigate] Dispatch ZIGATE_RESPONSE_RECEIVED
2019-01-10 15:03:29 DEBUG (ZiGate-Decode data) [zigate] Dispatch ZIGATE_RESPONSE_RECEIVED
2019-01-10 15:03:29 DEBUG (ZiGate-Decode data) [zigate] Dispatch ZIGATE_ATTRIBUTE_UPDATED
2019-01-10 15:03:29 DEBUG (ZiGate-Decode data) [zigate] Set expire timer for 3-12-85 in 2
2019-01-10 15:03:29 DEBUG (ZiGate-Decode data) [zigate] Cancel previous Timer <Timer(Thread-289, stopped daemon 140489932048128)>
2019-01-10 15:03:29 DEBUG (ZiGate-Decode data) [zigate] Dispatch ZIGATE_ATTRIBUTE_UPDATED
2019-01-10 15:03:29 DEBUG (SyncWorker_15) [zigate] REQUEST : 0x0092 b'\x02b\x01\x01\x03\x00'
2019-01-10 15:03:29 DEBUG (SyncWorker_15) [zigate] Msg to send b'00920006f7026201010300'
2019-01-10 15:03:29 DEBUG (SyncWorker_15) [zigate] Encoded Msg to send b'0102109202100216f7021262021102110213021003'
2019-01-10 15:03:29 DEBUG (SyncWorker_15) [zigate] Waiting for status message for command 0x0092
2019-01-10 15:03:29 DEBUG (ZiGate-Listen) [zigate] Raw packet received, b'\x01\x80\x02\x10\x02\x10\x02\x15k\x02\x10|\x02\x10\x92\x02\x10\x03'
2019-01-10 15:03:29 DEBUG (ZiGate-Event Loop) [zigate] Dispatch ZIGATE_PACKET_RECEIVED
2019-01-10 15:03:29 DEBUG (ZiGate-Decode data) [zigate] Received response 0x8000: b'007c0092'
2019-01-10 15:03:29 DEBUG (ZiGate-Decode data) [zigate] RESPONSE 0x8000 - Status response : status:0, sequence:124, packet_type:146, error:b'', rssi:0
2019-01-10 15:03:29 DEBUG (ZiGate-Decode data) [zigate] Dispatch ZIGATE_RESPONSE_RECEIVED
2019-01-10 15:03:29 DEBUG (SyncWorker_15) [zigate] STATUS code to command 0x0092:0
2019-01-10 15:03:29 DEBUG (ZiGate-Listen) [zigate] Raw packet received, b'\x01\x81\x02\x11\x02\x10\x02\x17\x92|\x02\x13\x02\x10\x02\x16\x02\x10\x02\x10l\x03'
2019-01-10 15:03:29 DEBUG (ZiGate-Listen) [zigate] Raw packet received, b'\x01\x81\x02\x12\x02\x10\x02\x1e\xf6`b\x02\x11\x02\x13\x02\x10\x02\x16\x02\x10\x02\x10\x02\x10\x10\x02\x10\x02\x11\x02\x10l\x03\x01\x81\x02\x12\x02\x10\x02\x1e7ab\x02\x11\x02\x13\x02\x10\x02\x18\x02\x10\x02\x10\x02\x10 \x02\x10\x02\x11\xfel\x03'
2019-01-10 15:03:29 DEBUG (ZiGate-Event Loop) [zigate] Dispatch ZIGATE_PACKET_RECEIVED
2019-01-10 15:03:29 DEBUG (ZiGate-Decode data) [zigate] Received response 0x8101: b'7c0300060000'
2019-01-10 15:03:29 DEBUG (ZiGate-Event Loop) [zigate] Dispatch ZIGATE_PACKET_RECEIVED
2019-01-10 15:03:29 DEBUG (ZiGate-Decode data) [zigate] RESPONSE 0x8101 - Default device response : sequence:124, endpoint:3, cluster:6, cmd:0, status:0, rssi:108
2019-01-10 15:03:29 DEBUG (ZiGate-Decode data) [zigate] Dispatch ZIGATE_RESPONSE_RECEIVED
2019-01-10 15:03:29 DEBUG (ZiGate-Decode data) [zigate] Received response 0x8102: b'60620103000600000010000100'
2019-01-10 15:03:29 DEBUG (ZiGate-Event Loop) [zigate] Dispatch ZIGATE_PACKET_RECEIVED
2019-01-10 15:03:29 DEBUG (ZiGate-Decode data) [zigate] RESPONSE 0x8102 - Individual Attribute Report : sequence:96, addr:6201, endpoint:3, cluster:6, attribute:0, status:0, data_type:16, size:1, data:False, rssi:108
2019-01-10 15:03:29 DEBUG (ZiGate-Decode data) [zigate] Dispatch ZIGATE_RESPONSE_RECEIVED
2019-01-10 15:03:29 DEBUG (ZiGate-Decode data) [zigate] Dispatch ZIGATE_ATTRIBUTE_UPDATED
2019-01-10 15:03:29 DEBUG (ZiGate-Decode data) [zigate] Received response 0x8102: b'616201030008000000200001fe'
2019-01-10 15:03:29 DEBUG (ZiGate-Decode data) [zigate] RESPONSE 0x8102 - Individual Attribute Report : sequence:97, addr:6201, endpoint:3, cluster:8, attribute:0, status:0, data_type:32, size:1, data:254, rssi:108
2019-01-10 15:03:29 DEBUG (ZiGate-Decode data) [zigate] Dispatch ZIGATE_RESPONSE_RECEIVED
2019-01-10 15:03:29 DEBUG (ZiGate-Decode data) [zigate] Dispatch ZIGATE_ATTRIBUTE_UPDATED
2019-01-10 15:03:30 DEBUG (ZiGate-Listen) [zigate] Raw packet received, b'\x01\x81\x02\x12\x02\x10\x02\x1eN\xf7\xc2\x8c\x02\x11\x02\x10\x02\x16\x02\x10\x02\x10\x02\x10\x10\x02\x10\x02\x11\x02\x10l\x03'
2019-01-10 15:03:30 DEBUG (ZiGate-Event Loop) [zigate] Dispatch ZIGATE_PACKET_RECEIVED
2019-01-10 15:03:30 DEBUG (ZiGate-Decode data) [zigate] Received response 0x8102: b'f7c28c01000600000010000100'
2019-01-10 15:03:30 DEBUG (ZiGate-Decode data) [zigate] RESPONSE 0x8102 - Individual Attribute Report : sequence:247, addr:c28c, endpoint:1, cluster:6, attribute:0, status:0, data_type:16, size:1, data:False, rssi:108
2019-01-10 15:03:30 DEBUG (ZiGate-Decode data) [zigate] Dispatch ZIGATE_RESPONSE_RECEIVED
2019-01-10 15:03:30 DEBUG (ZiGate-Decode data) [zigate] Dispatch ZIGATE_ATTRIBUTE_UPDATED
2019-01-10 15:03:31 DEBUG (Thread-290) [zigate] Dispatch ZIGATE_ATTRIBUTE_UPDATED
2019-01-10 15:03:32 DEBUG (SyncWorker_7) [zigate] REQUEST : 0x0092 b'\x02\xc2\x8c\x01\x01\x01'
2019-01-10 15:03:32 DEBUG (SyncWorker_7) [zigate] Msg to send b'00920006d902c28c010101'
2019-01-10 15:03:32 DEBUG (SyncWorker_7) [zigate] Encoded Msg to send b'0102109202100216d90212c28c02110211021103'
2019-01-10 15:03:32 DEBUG (SyncWorker_7) [zigate] Waiting for status message for command 0x0092
2019-01-10 15:03:32 DEBUG (ZiGate-Listen) [zigate] Raw packet received, b'\x01\x80\x02\x10\x02\x10\x02\x15j\x02\x10}\x02\x10\x92\x02\x10\x03\x01\x81\x02\x11\x02\x10\x02\x17\x95}\x02\x11\x02\x10\x02\x16\x02\x11\x02\x10i\x03\x01\x81'
2019-01-10 15:03:32 DEBUG (ZiGate-Event Loop) [zigate] Dispatch ZIGATE_PACKET_RECEIVED
2019-01-10 15:03:32 DEBUG (ZiGate-Decode data) [zigate] Received response 0x8000: b'007d0092'
2019-01-10 15:03:32 DEBUG (ZiGate-Event Loop) [zigate] Dispatch ZIGATE_PACKET_RECEIVED
2019-01-10 15:03:32 DEBUG (ZiGate-Decode data) [zigate] RESPONSE 0x8000 - Status response : status:0, sequence:125, packet_type:146, error:b'', rssi:0
2019-01-10 15:03:32 DEBUG (ZiGate-Decode data) [zigate] Received response 0x8101: b'7d0100060100'
2019-01-10 15:03:32 DEBUG (ZiGate-Decode data) [zigate] Dispatch ZIGATE_RESPONSE_RECEIVED
2019-01-10 15:03:32 DEBUG (ZiGate-Decode data) [zigate] RESPONSE 0x8101 - Default device response : sequence:125, endpoint:1, cluster:6, cmd:1, status:0, rssi:105
2019-01-10 15:03:32 DEBUG (ZiGate-Decode data) [zigate] Dispatch ZIGATE_RESPONSE_RECEIVED
2019-01-10 15:03:32 DEBUG (SyncWorker_7) [zigate] STATUS code to command 0x0092:0
2019-01-10 15:03:32 DEBUG (ZiGate-Listen) [zigate] Raw packet received, b'\x02\x12\x02\x10\x02\x1eA\xfc\xc2\x8c\x02\x11\x02\x10\x02\x16\x02\x10\x02\x10\x02\x10\x10\x02\x10\x02\x11\x02\x11i\x03\x01\x81\x02\x12\x02\x10\x11\xe3\xfc\xc2\x8c\x02\x11\x02\x10\x02\x16\xf0\x02\x10\x02\x10#\x02\x10\x02\x14\x02\x17\x02\x10\x02\x10}i\x03'
2019-01-10 15:03:32 DEBUG (ZiGate-Event Loop) [zigate] Dispatch ZIGATE_PACKET_RECEIVED
2019-01-10 15:03:32 DEBUG (ZiGate-Decode data) [zigate] Received response 0x8102: b'fcc28c01000600000010000101'
2019-01-10 15:03:32 DEBUG (ZiGate-Event Loop) [zigate] Dispatch ZIGATE_PACKET_RECEIVED
2019-01-10 15:03:32 DEBUG (ZiGate-Decode data) [zigate] RESPONSE 0x8102 - Individual Attribute Report : sequence:252, addr:c28c, endpoint:1, cluster:6, attribute:0, status:0, data_type:16, size:1, data:True, rssi:105
2019-01-10 15:03:32 DEBUG (ZiGate-Decode data) [zigate] Received response 0x8102: b'fcc28c010006f000002300040700007d'
2019-01-10 15:03:32 DEBUG (ZiGate-Decode data) [zigate] Dispatch ZIGATE_RESPONSE_RECEIVED
2019-01-10 15:03:32 DEBUG (ZiGate-Decode data) [zigate] RESPONSE 0x8102 - Individual Attribute Report : sequence:252, addr:c28c, endpoint:1, cluster:6, attribute:61440, status:0, data_type:35, size:4, data:117440637, rssi:105
2019-01-10 15:03:32 DEBUG (ZiGate-Decode data) [zigate] Dispatch ZIGATE_ATTRIBUTE_UPDATED
2019-01-10 15:03:32 DEBUG (ZiGate-Decode data) [zigate] Dispatch ZIGATE_RESPONSE_RECEIVED
2019-01-10 15:03:32 DEBUG (ZiGate-Decode data) [zigate] Dispatch ZIGATE_ATTRIBUTE_UPDATED
2019-01-10 15:03:32 DEBUG (SyncWorker_4) [zigate] REQUEST : 0x0081 b'\x02b\x01\x01\x03\x01\xfe\x00\x05'
2019-01-10 15:03:32 DEBUG (SyncWorker_4) [zigate] Msg to send b'0081000911026201010301fe0005'
2019-01-10 15:03:32 DEBUG (SyncWorker_4) [zigate] Encoded Msg to send b'0102108102100219110212620211021102130211fe0210021503'
2019-01-10 15:03:32 DEBUG (SyncWorker_4) [zigate] Waiting for status message for command 0x0081
2019-01-10 15:03:32 DEBUG (ZiGate-Listen) [zigate] Raw packet received, b'\x01\x80\x02\x10\x02\x10\x02\x15z\x02\x10~\x02\x10\x81\x02\x10\x03'
2019-01-10 15:03:32 DEBUG (ZiGate-Event Loop) [zigate] Dispatch ZIGATE_PACKET_RECEIVED
2019-01-10 15:03:32 DEBUG (ZiGate-Decode data) [zigate] Received response 0x8000: b'007e0081'
2019-01-10 15:03:32 DEBUG (ZiGate-Decode data) [zigate] RESPONSE 0x8000 - Status response : status:0, sequence:126, packet_type:129, error:b'', rssi:0
2019-01-10 15:03:32 DEBUG (ZiGate-Decode data) [zigate] Dispatch ZIGATE_RESPONSE_RECEIVED
2019-01-10 15:03:32 DEBUG (SyncWorker_4) [zigate] STATUS code to command 0x0081:0
2019-01-10 15:03:32 DEBUG (SyncWorker_4) [zigate] REQUEST : 0x00c0 b'\x02b\x01\x01\x03\x015\x00\x05'
2019-01-10 15:03:32 DEBUG (SyncWorker_4) [zigate] Msg to send b'00c000099b026201010301350005'
2019-01-10 15:03:32 DEBUG (SyncWorker_4) [zigate] Encoded Msg to send b'010210c0021002199b0212620211021102130211350210021503'
2019-01-10 15:03:32 DEBUG (SyncWorker_4) [zigate] Waiting for status message for command 0x00c0
2019-01-10 15:03:32 DEBUG (ZiGate-Listen) [zigate] Raw packet received, b'\x01\x81\x02\x11\x02\x10\x02\x17\x9a~\x02\x13\x02\x10\x02\x18\x02\x14\x02\x10l\x03'
2019-01-10 15:03:32 DEBUG (ZiGate-Listen) [zigate] Raw packet received, b'\x01\x81\x02\x12\x02\x10\x02\x1e\xf0bb\x02\x11\x02\x13\x02\x10\x02\x16\x02\x10\x02\x10\x02\x10\x10\x02\x10\x02\x11\x02\x11i\x03\x01\x80\x02\x10\x02\x10\x02\x15:\x02\x10\x7f\x02\x10\xc0\x02\x10\x03'
2019-01-10 15:03:32 DEBUG (ZiGate-Event Loop) [zigate] Dispatch ZIGATE_PACKET_RECEIVED
2019-01-10 15:03:32 DEBUG (ZiGate-Decode data) [zigate] Received response 0x8101: b'7e0300080400'
2019-01-10 15:03:32 DEBUG (ZiGate-Event Loop) [zigate] Dispatch ZIGATE_PACKET_RECEIVED
2019-01-10 15:03:32 DEBUG (ZiGate-Decode data) [zigate] RESPONSE 0x8101 - Default device response : sequence:126, endpoint:3, cluster:8, cmd:4, status:0, rssi:108
2019-01-10 15:03:32 DEBUG (ZiGate-Decode data) [zigate] Received response 0x8102: b'62620103000600000010000101'
2019-01-10 15:03:32 DEBUG (ZiGate-Event Loop) [zigate] Dispatch ZIGATE_PACKET_RECEIVED
2019-01-10 15:03:32 DEBUG (ZiGate-Decode data) [zigate] Dispatch ZIGATE_RESPONSE_RECEIVED
2019-01-10 15:03:32 DEBUG (ZiGate-Decode data) [zigate] RESPONSE 0x8102 - Individual Attribute Report : sequence:98, addr:6201, endpoint:3, cluster:6, attribute:0, status:0, data_type:16, size:1, data:True, rssi:105
2019-01-10 15:03:32 DEBUG (ZiGate-Decode data) [zigate] Dispatch ZIGATE_RESPONSE_RECEIVED
2019-01-10 15:03:32 DEBUG (ZiGate-Decode data) [zigate] Dispatch ZIGATE_ATTRIBUTE_UPDATED
2019-01-10 15:03:32 DEBUG (ZiGate-Decode data) [zigate] Received response 0x8000: b'007f00c0'
2019-01-10 15:03:32 DEBUG (ZiGate-Decode data) [zigate] RESPONSE 0x8000 - Status response : status:0, sequence:127, packet_type:192, error:b'', rssi:0
2019-01-10 15:03:32 DEBUG (ZiGate-Decode data) [zigate] Dispatch ZIGATE_RESPONSE_RECEIVED
2019-01-10 15:03:32 DEBUG (SyncWorker_4) [zigate] STATUS code to command 0x00c0:0
2019-01-10 15:03:32 ERROR (SyncWorker_4) [custom_components.light.zigate] {'brightness': 255, 'color_temp': 309, 'transition': 5.0}
2019-01-10 15:03:32 DEBUG (ZiGate-Listen) [zigate] Raw packet received, b'\x01\x81\x02\x11\x02\x10\x02\x17\x9b\x7f\x02\x13\x02\x13\x02\x10\x02\x1a\x02\x10i\x03'
2019-01-10 15:03:32 DEBUG (ZiGate-Event Loop) [zigate] Dispatch ZIGATE_PACKET_RECEIVED
2019-01-10 15:03:32 DEBUG (ZiGate-Decode data) [zigate] Received response 0x8101: b'7f0303000a00'
2019-01-10 15:03:32 DEBUG (ZiGate-Decode data) [zigate] RESPONSE 0x8101 - Default device response : sequence:127, endpoint:3, cluster:768, cmd:10, status:0, rssi:105
2019-01-10 15:03:32 DEBUG (ZiGate-Decode data) [zigate] Dispatch ZIGATE_RESPONSE_RECEIVED
2019-01-10 15:03:33 DEBUG (ZiGate-Listen) [zigate] Raw packet received, b'\x01\x81\x02\x12\x02\x10\x02\x1eC\xfe\xc2\x8c\x02\x11\x02\x10\x02\x16\x02\x10\x02\x10\x02\x10\x10\x02\x10\x02\x11\x02\x11i\x03'
2019-01-10 15:03:33 DEBUG (ZiGate-Event Loop) [zigate] Dispatch ZIGATE_PACKET_RECEIVED
2019-01-10 15:03:33 DEBUG (ZiGate-Decode data) [zigate] Received response 0x8102: b'fec28c01000600000010000101'
2019-01-10 15:03:33 DEBUG (ZiGate-Decode data) [zigate] RESPONSE 0x8102 - Individual Attribute Report : sequence:254, addr:c28c, endpoint:1, cluster:6, attribute:0, status:0, data_type:16, size:1, data:True, rssi:105
2019-01-10 15:03:33 DEBUG (ZiGate-Decode data) [zigate] Dispatch ZIGATE_RESPONSE_RECEIVED
2019-01-10 15:03:33 DEBUG (ZiGate-Decode data) [zigate] Dispatch ZIGATE_ATTRIBUTE_UPDATED
2019-01-10 15:03:35 DEBUG (SyncWorker_18) [zigate] REQUEST : 0x0092 b'\x02\xc2\x8c\x01\x01\x00'
2019-01-10 15:03:35 DEBUG (SyncWorker_18) [zigate] Msg to send b'00920006d802c28c010100'
2019-01-10 15:03:35 DEBUG (ZiGate-Listen) [zigate] Raw packet received, b'\x01\x81\x02\x12\x02\x10\x11\xa3\x02\x13\xc2\x8c\x02\x13\x02\x10\x02\x1c\x02\x10U\x02\x109\x02\x10\x02\x14B4\xcc\xcdl\x03'
2019-01-10 15:03:35 DEBUG (SyncWorker_18) [zigate] Encoded Msg to send b'0102109202100216d80212c28c02110211021003'
2019-01-10 15:03:35 DEBUG (SyncWorker_18) [zigate] Waiting for status message for command 0x0092
2019-01-10 15:03:35 DEBUG (ZiGate-Event Loop) [zigate] Dispatch ZIGATE_PACKET_RECEIVED
2019-01-10 15:03:35 DEBUG (ZiGate-Decode data) [zigate] Received response 0x8102: b'03c28c03000c0055003900044234cccd'
2019-01-10 15:03:35 DEBUG (ZiGate-Decode data) [zigate] RESPONSE 0x8102 - Individual Attribute Report : sequence:3, addr:c28c, endpoint:3, cluster:12, attribute:85, status:0, data_type:57, size:4, data:45.20000076293945, rssi:108
2019-01-10 15:03:35 DEBUG (ZiGate-Decode data) [zigate] Dispatch ZIGATE_RESPONSE_RECEIVED
2019-01-10 15:03:35 DEBUG (ZiGate-Decode data) [zigate] Set expire timer for 3-12-85 in 2
2019-01-10 15:03:35 DEBUG (ZiGate-Decode data) [zigate] Cancel previous Timer <Timer(Thread-290, stopped daemon 140489932048128)>
2019-01-10 15:03:35 DEBUG (ZiGate-Decode data) [zigate] Dispatch ZIGATE_ATTRIBUTE_UPDATED
2019-01-10 15:03:35 DEBUG (ZiGate-Listen) [zigate] Raw packet received, b'\x01\x80\x02\x10\x02\x10\x02\x15\x97\x02\x10\x80\x02\x10\x92\x02\x10\x03\x01\x81\x02\x11\x02\x10\x02\x17i\x80\x02\x11\x02\x10\x02\x16\x02\x10\x02\x10i\x03\x01\x81\x02\x12\x02\x10\x02\x1e\xb8\x02\x14\xc2\x8c\x02\x11\x02\x10\x02\x16\x02\x10\x02\x10'
2019-01-10 15:03:35 DEBUG (ZiGate-Listen) [zigate] Raw packet received, b'\x02\x10\x10\x02\x10\x02\x11\x02\x10i\x03\x01\x81\x02\x12\x02\x10\x11\xe6\x02\x14\xc2\x8c\x02\x11\x02\x10\x02\x16\xf0\x02\x10\x02\x10#\x02\x10\x02\x14\x02\x17\x02\x10\x02\x10\x80i\x03\x01\x81\x02\x12\x02\x10\x11\xd2\x02\x15\xc2\x8c\x02\x13\x02\x10\x02\x1c\x02\x10U\x02\x109\x02\x10\x02\x14\x02\x10\x02\x10\x02\x10\x02\x10l\x03'
2019-01-10 15:03:35 DEBUG (ZiGate-Event Loop) [zigate] Dispatch ZIGATE_PACKET_RECEIVED
2019-01-10 15:03:35 DEBUG (ZiGate-Decode data) [zigate] Received response 0x8000: b'00800092'
2019-01-10 15:03:35 DEBUG (ZiGate-Event Loop) [zigate] Dispatch ZIGATE_PACKET_RECEIVED
2019-01-10 15:03:35 DEBUG (ZiGate-Decode data) [zigate] RESPONSE 0x8000 - Status response : status:0, sequence:128, packet_type:146, error:b'', rssi:0
2019-01-10 15:03:35 DEBUG (ZiGate-Decode data) [zigate] Received response 0x8101: b'800100060000'
2019-01-10 15:03:35 DEBUG (ZiGate-Event Loop) [zigate] Dispatch ZIGATE_PACKET_RECEIVED
2019-01-10 15:03:35 DEBUG (ZiGate-Decode data) [zigate] Dispatch ZIGATE_RESPONSE_RECEIVED
2019-01-10 15:03:35 DEBUG (ZiGate-Decode data) [zigate] RESPONSE 0x8101 - Default device response : sequence:128, endpoint:1, cluster:6, cmd:0, status:0, rssi:105
2019-01-10 15:03:35 DEBUG (ZiGate-Decode data) [zigate] Received response 0x8102: b'04c28c01000600000010000100'
2019-01-10 15:03:35 DEBUG (ZiGate-Event Loop) [zigate] Dispatch ZIGATE_PACKET_RECEIVED
2019-01-10 15:03:35 DEBUG (ZiGate-Decode data) [zigate] Dispatch ZIGATE_RESPONSE_RECEIVED
2019-01-10 15:03:35 DEBUG (ZiGate-Decode data) [zigate] RESPONSE 0x8102 - Individual Attribute Report : sequence:4, addr:c28c, endpoint:1, cluster:6, attribute:0, status:0, data_type:16, size:1, data:False, rssi:105
2019-01-10 15:03:35 DEBUG (ZiGate-Decode data) [zigate] Received response 0x8102: b'04c28c010006f0000023000407000080'
2019-01-10 15:03:35 DEBUG (ZiGate-Event Loop) [zigate] Dispatch ZIGATE_PACKET_RECEIVED
2019-01-10 15:03:35 DEBUG (ZiGate-Decode data) [zigate] Dispatch ZIGATE_RESPONSE_RECEIVED
2019-01-10 15:03:35 DEBUG (ZiGate-Decode data) [zigate] RESPONSE 0x8102 - Individual Attribute Report : sequence:4, addr:c28c, endpoint:1, cluster:6, attribute:61440, status:0, data_type:35, size:4, data:117440640, rssi:105
2019-01-10 15:03:35 DEBUG (ZiGate-Decode data) [zigate] Dispatch ZIGATE_RESPONSE_RECEIVED
2019-01-10 15:03:35 DEBUG (ZiGate-Decode data) [zigate] Dispatch ZIGATE_ATTRIBUTE_UPDATED
2019-01-10 15:03:35 DEBUG (ZiGate-Decode data) [zigate] Received response 0x8102: b'05c28c03000c00550039000400000000'
2019-01-10 15:03:35 DEBUG (ZiGate-Decode data) [zigate] Dispatch ZIGATE_ATTRIBUTE_UPDATED
2019-01-10 15:03:35 DEBUG (SyncWorker_18) [zigate] STATUS code to command 0x0092:0
2019-01-10 15:03:35 DEBUG (ZiGate-Decode data) [zigate] RESPONSE 0x8102 - Individual Attribute Report : sequence:5, addr:c28c, endpoint:3, cluster:12, attribute:85, status:0, data_type:57, size:4, data:0.0, rssi:108
2019-01-10 15:03:35 DEBUG (ZiGate-Decode data) [zigate] Dispatch ZIGATE_RESPONSE_RECEIVED
2019-01-10 15:03:35 DEBUG (ZiGate-Decode data) [zigate] Set expire timer for 3-12-85 in 2
2019-01-10 15:03:35 DEBUG (ZiGate-Decode data) [zigate] Cancel previous Timer <Timer(Thread-291, started daemon 140490208155392)>
2019-01-10 15:03:35 DEBUG (ZiGate-Decode data) [zigate] Dispatch ZIGATE_ATTRIBUTE_UPDATED
2019-01-10 15:03:35 DEBUG (SyncWorker_6) [zigate] REQUEST : 0x0092 b'\x02b\x01\x01\x03\x00'
2019-01-10 15:03:35 DEBUG (SyncWorker_6) [zigate] Msg to send b'00920006f7026201010300'
2019-01-10 15:03:35 DEBUG (SyncWorker_6) [zigate] Encoded Msg to send b'0102109202100216f7021262021102110213021003'
2019-01-10 15:03:35 DEBUG (SyncWorker_6) [zigate] Waiting for status message for command 0x0092
2019-01-10 15:03:35 DEBUG (ZiGate-Listen) [zigate] Raw packet received, b'\x01\x80\x02\x10\x02\x10\x02\x15\x96\x02\x10\x81\x02\x10\x92\x02\x10\x03'
2019-01-10 15:03:35 DEBUG (ZiGate-Listen) [zigate] Raw packet received, b'\x01\x81\x02\x11\x02\x10\x02\x17o\x81\x02\x13\x02\x10\x02\x16\x02\x10\x02\x10l\x03'
2019-01-10 15:03:35 DEBUG (ZiGate-Event Loop) [zigate] Dispatch ZIGATE_PACKET_RECEIVED
2019-01-10 15:03:35 DEBUG (ZiGate-Decode data) [zigate] Received response 0x8000: b'00810092'
2019-01-10 15:03:35 DEBUG (ZiGate-Event Loop) [zigate] Dispatch ZIGATE_PACKET_RECEIVED
2019-01-10 15:03:35 DEBUG (ZiGate-Decode data) [zigate] RESPONSE 0x8000 - Status response : status:0, sequence:129, packet_type:146, error:b'', rssi:0
2019-01-10 15:03:35 DEBUG (ZiGate-Decode data) [zigate] Received response 0x8101: b'810300060000'
2019-01-10 15:03:35 DEBUG (ZiGate-Decode data) [zigate] Dispatch ZIGATE_RESPONSE_RECEIVED
2019-01-10 15:03:35 DEBUG (ZiGate-Decode data) [zigate] RESPONSE 0x8101 - Default device response : sequence:129, endpoint:3, cluster:6, cmd:0, status:0, rssi:108
2019-01-10 15:03:35 DEBUG (ZiGate-Decode data) [zigate] Dispatch ZIGATE_RESPONSE_RECEIVED
2019-01-10 15:03:35 DEBUG (SyncWorker_6) [zigate] STATUS code to command 0x0092:0
2019-01-10 15:03:35 DEBUG (ZiGate-Listen) [zigate] Raw packet received, b'\x01\x81\x02\x12\x02\x10\x02\x1e\xf5cb\x02\x11\x02\x13\x02\x10\x02\x16\x02\x10\x02\x10\x02\x10\x10\x02\x10\x02\x11\x02\x10l\x03'
2019-01-10 15:03:36 DEBUG (ZiGate-Listen) [zigate] Raw packet received, b'\x01\x81\x02\x12\x02\x10\x02\x1e2db\x02\x11\x02\x13\x02\x10\x02\x18\x02\x10\x02\x10\x02\x10 \x02\x10\x02\x11\xfel\x03'
2019-01-10 15:03:36 DEBUG (ZiGate-Event Loop) [zigate] Dispatch ZIGATE_PACKET_RECEIVED
2019-01-10 15:03:36 DEBUG (ZiGate-Decode data) [zigate] Received response 0x8102: b'63620103000600000010000100'
2019-01-10 15:03:36 DEBUG (ZiGate-Event Loop) [zigate] Dispatch ZIGATE_PACKET_RECEIVED
2019-01-10 15:03:36 DEBUG (ZiGate-Decode data) [zigate] RESPONSE 0x8102 - Individual Attribute Report : sequence:99, addr:6201, endpoint:3, cluster:6, attribute:0, status:0, data_type:16, size:1, data:False, rssi:108
2019-01-10 15:03:36 DEBUG (ZiGate-Decode data) [zigate] Received response 0x8102: b'646201030008000000200001fe'
2019-01-10 15:03:36 DEBUG (ZiGate-Decode data) [zigate] Dispatch ZIGATE_RESPONSE_RECEIVED
2019-01-10 15:03:36 DEBUG (ZiGate-Decode data) [zigate] RESPONSE 0x8102 - Individual Attribute Report : sequence:100, addr:6201, endpoint:3, cluster:8, attribute:0, status:0, data_type:32, size:1, data:254, rssi:108
2019-01-10 15:03:36 DEBUG (ZiGate-Decode data) [zigate] Dispatch ZIGATE_ATTRIBUTE_UPDATED
2019-01-10 15:03:36 DEBUG (ZiGate-Decode data) [zigate] Dispatch ZIGATE_RESPONSE_RECEIVED
2019-01-10 15:03:36 DEBUG (ZiGate-Decode data) [zigate] Dispatch ZIGATE_ATTRIBUTE_UPDATED
2019-01-10 15:03:36 DEBUG (ZiGate-Listen) [zigate] Raw packet received, b'\x01\x81\x02\x12\x02\x10\x02\x1e\xbb\x02\x17\xc2\x8c\x02\x11\x02\x10\x02\x16\x02\x10\x02\x10\x02\x10\x10\x02\x10\x02\x11\x02\x10i\x03'
2019-01-10 15:03:36 DEBUG (ZiGate-Event Loop) [zigate] Dispatch ZIGATE_PACKET_RECEIVED
2019-01-10 15:03:36 DEBUG (ZiGate-Decode data) [zigate] Received response 0x8102: b'07c28c01000600000010000100'
2019-01-10 15:03:36 DEBUG (ZiGate-Decode data) [zigate] RESPONSE 0x8102 - Individual Attribute Report : sequence:7, addr:c28c, endpoint:1, cluster:6, attribute:0, status:0, data_type:16, size:1, data:False, rssi:105
2019-01-10 15:03:36 DEBUG (ZiGate-Decode data) [zigate] Dispatch ZIGATE_RESPONSE_RECEIVED
2019-01-10 15:03:36 DEBUG (ZiGate-Decode data) [zigate] Dispatch ZIGATE_ATTRIBUTE_UPDATED
2019-01-10 15:03:36 DEBUG (ZiGate-Listen) [zigate] Raw packet received, b'\x01\x81\x02\x11\x02\x10\x02\x17o\x81\x02\x13\x02\x10\x02\x16\x02\x10\x02\x10l\x03'
2019-01-10 15:03:36 DEBUG (ZiGate-Event Loop) [zigate] Dispatch ZIGATE_PACKET_RECEIVED
2019-01-10 15:03:36 DEBUG (ZiGate-Decode data) [zigate] Received response 0x8101: b'810300060000'
2019-01-10 15:03:36 DEBUG (ZiGate-Decode data) [zigate] RESPONSE 0x8101 - Default device response : sequence:129, endpoint:3, cluster:6, cmd:0, status:0, rssi:108
2019-01-10 15:03:36 DEBUG (ZiGate-Decode data) [zigate] Dispatch ZIGATE_RESPONSE_RECEIVED
2019-01-10 15:03:37 DEBUG (Thread-292) [zigate] Dispatch ZIGATE_ATTRIBUTE_UPDATED
2019-01-10 15:03:43 DEBUG (ZiGate-Listen) [zigate] Raw packet received, b'\x01\x81\x02\x12\x02\x10\x02\x1e3eb\x02\x11\x02\x13\x02\x10\x02\x18\x02\x10\x02\x10\x02\x10 \x02\x10\x02\x11\xfel\x03'
2019-01-10 15:03:43 DEBUG (ZiGate-Event Loop) [zigate] Dispatch ZIGATE_PACKET_RECEIVED
2019-01-10 15:03:43 DEBUG (ZiGate-Decode data) [zigate] Received response 0x8102: b'656201030008000000200001fe'
2019-01-10 15:03:43 DEBUG (ZiGate-Decode data) [zigate] RESPONSE 0x8102 - Individual Attribute Report : sequence:101, addr:6201, endpoint:3, cluster:8, attribute:0, status:0, data_type:32, size:1, data:254, rssi:108
2019-01-10 15:03:43 DEBUG (ZiGate-Decode data) [zigate] Dispatch ZIGATE_RESPONSE_RECEIVED
2019-01-10 15:03:43 DEBUG (ZiGate-Decode data) [zigate] Dispatch ZIGATE_ATTRIBUTE_UPDATED
2019-01-10 15:03:54 DEBUG (ZiGate-Listen) [zigate] Raw packet received, b'\x01\x81\x02\x12\x02\x10.\xa1R\xa4^\x02\x11\x02\x10\x02\x10\xff\x02\x11\x02\x10B\x02\x10!\x02\x11!\xb3\x02\x1b\x02\x13(\x15\x02\x14!\xa8\x13\x02\x15!\x02\x1c\x02\x10\x02\x16$\x02\x11\x02\x10\x02\x10\x02\x10\x02\x10\x02\x1a!\x02\x10\x02\x10d\x10\x02\x10\x02\x1b!\x02\x10\x02\x10~\x03'
2019-01-10 15:03:54 DEBUG (ZiGate-Event Loop) [zigate] Dispatch ZIGATE_PACKET_RECEIVED
2019-01-10 15:03:54 DEBUG (ZiGate-Decode data) [zigate] Received response 0x8102: b'52a45e010000ff01004200210121b30b0328150421a81305210c00062401000000000a2100006410000b210000'
2019-01-10 15:03:54 DEBUG (ZiGate-Decode data) [zigate] RESPONSE 0x8102 - Individual Attribute Report : sequence:82, addr:a45e, endpoint:1, cluster:0, attribute:65281, status:0, data_type:66, size:33, data:0121b30b0328150421a81305210c00062401000000000a2100006410000b210000, rssi:126
2019-01-10 15:03:54 DEBUG (ZiGate-Decode data) [zigate] Dispatch ZIGATE_RESPONSE_RECEIVED
2019-01-10 15:03:54 DEBUG (ZiGate-Decode data) [zigate] Dispatch ZIGATE_ATTRIBUTE_UPDATED

Zigate KeyError: 'ieee'

j'ai un zigate-USB-TTL et un detecteur d'inondation aqara, quand le detecteur detecte une inondation j'ai ce message d'erreur dans la console python3.6.
Ce message apparait même avec le bouton de Xiaomi (rond) ainsi que le double switch.
j'ai utilisé pip3.6 install zigate==0.16.5 pour installer la lib zigate.

Device not found, create it (this isn't normal) Exception in thread Thread-31: Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/threading.py", line 916, in _bootstrap_inner self.run() File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/threading.py", line 864, in run self._target(*self._args, **self._kwargs) File "/Users/thibaud/Documents/TMC/01_Powerail/01_Raspower/Docker/docker_raspower/venv/lib/python3.6/site-packages/zigate/transport.py", line 61, in packet_received dispatcher.send(ZIGATE_PACKET_RECEIVED, packet=raw_message) File "/Users/thibaud/Documents/TMC/01_Powerail/01_Raspower/Docker/docker_raspower/venv/lib/python3.6/site-packages/pydispatch/dispatcher.py", line 338, in send **named File "/Users/thibaud/Documents/TMC/01_Powerail/01_Raspower/Docker/docker_raspower/venv/lib/python3.6/site-packages/pydispatch/robustapply.py", line 55, in robustApply return receiver(*arguments, **named) File "/Users/thibaud/Documents/TMC/01_Powerail/01_Raspower/Docker/docker_raspower/venv/lib/python3.6/site-packages/zigate/core.py", line 327, in decode_data dispatcher.send(ZIGATE_RESPONSE_RECEIVED, self, response=response) File "/Users/thibaud/Documents/TMC/01_Powerail/01_Raspower/Docker/docker_raspower/venv/lib/python3.6/site-packages/pydispatch/dispatcher.py", line 338, in send **named File "/Users/thibaud/Documents/TMC/01_Powerail/01_Raspower/Docker/docker_raspower/venv/lib/python3.6/site-packages/pydispatch/robustapply.py", line 55, in robustApply return receiver(*arguments, **named) File "/Users/thibaud/Documents/TMC/01_Powerail/01_Raspower/Docker/docker_raspower/venv/lib/python3.6/site-packages/zigate/core.py", line 381, in interpret_response device = self._get_device(response['addr']) File "/Users/thibaud/Documents/TMC/01_Powerail/01_Raspower/Docker/docker_raspower/venv/lib/python3.6/site-packages/zigate/core.py", line 417, in _get_device self._set_device(d) File "/Users/thibaud/Documents/TMC/01_Powerail/01_Raspower/Docker/docker_raspower/venv/lib/python3.6/site-packages/zigate/core.py", line 442, in _set_device d = self.get_device_from_ieee(device.ieee) File "/Users/thibaud/Documents/TMC/01_Powerail/01_Raspower/Docker/docker_raspower/venv/lib/python3.6/site-packages/zigate/core.py", line 1351, in ieee return self.info['ieee'] KeyError: 'ieee'

Avoid duplicate properties

Sometimes a device has many endpoints with same cluster type, example multiple wall switch has many endpoints with cluster 0x0006.
In that case we have many onoff properties, this can be confusing.

try to rename "duplicated" property by adding endpoint id in the name

Support de la télécommande ikea Tradfri

Bonjour

J'ai bien lu ton article
https://faire-ca-soi-meme.fr/test/2017/06/06/ikea-tradfri-zigbee-3-0-compatibilite-zigate/

Ce que je cherche à faire, ce n'est pas d'associer ma télécommande à une lampe, mais à associer la télécommande à ma zigate, pour ensuite binder les evenements sur le broker pour lancer diverses actions.

Je n'arrive pas à associer la télécommande à la zigate / à recevoir des evenements

Lorsque je tiens le bouton appuyé 10 seconde,s rien coté zigate

Et si je fias un factory reset, j'arrive à avoir des choses
string(26) "zigate/device_changed/38b8"
string(128) "{"endpoints": [], "addr": "38b8", "info": {"addr": "38b8", "ieee": "d0cf5efffe05aa5d", "mac_capability": "10000000", "rssi": 3}}"
string(4) "XXXX"
string(26) "zigate/device_changed/38b8"
string(128) "{"endpoints": [], "addr": "38b8", "info": {"addr": "38b8", "ieee": "d0cf5efffe05aa5d", "mac_capability": "10000000", "rssi": 3}}"

Mais rien ensuite concernant les clics sur les boutons

Est-ce quelque chose de possible ?

Merci

'NoneType' object is not iterable

Exception in thread Thread-1506:
Traceback (most recent call last):
File "/usr/lib/python3.5/threading.py", line 914, in _bootstrap_inner
self.run()
File "/usr/lib/python3.5/threading.py", line 862, in run
self._target(*self._args, **self._kwargs)
File "/usr/local/lib/python3.5/dist-packages/zigate/transport.py", line 36, in packet_received
dispatcher.send(ZIGATE_PACKET_RECEIVED, packet=raw_message)
File "/usr/lib/python3/dist-packages/pydispatch/dispatcher.py", line 338, in send
**named
File "/usr/lib/python3/dist-packages/pydispatch/robustapply.py", line 55, in robustApply
return receiver(*arguments, **named)
File "/usr/local/lib/python3.5/dist-packages/zigate/core.py", line 294, in decode_data
dispatcher.send(ZIGATE_RESPONSE_RECEIVED, self, response=response)
File "/usr/lib/python3/dist-packages/pydispatch/dispatcher.py", line 338, in send
**named
File "/usr/lib/python3/dist-packages/pydispatch/robustapply.py", line 55, in robustApply
return receiver(*arguments, **named)
File "/usr/local/lib/python3.5/dist-packages/zigate/core.py", line 357, in interpret_response
response['attribute'], True)
File "/usr/local/lib/python3.5/dist-packages/zigate/core.py", line 1343, in get_attribute
attr.update(attribute)
TypeError: 'NoneType' object is not iterable

Response parsing bug - Report Individual Attribute response

Stack:

2018-11-03 21:42:03 DEBUG (Thread-3) [zigate] Received response 0x8102: b'\x14\xa0~\x01\x00\x00\xff\xf0\x00A\x00\t\xaa\x10\x05A\x87\x14\x01\x10\x01'
Exception in thread Thread-3:
Traceback (most recent call last):
File "/usr/local/lib/python3.6/threading.py", line 916, in _bootstrap_inner
self.run()
File "/usr/local/lib/python3.6/threading.py", line 864, in run
self._target(*self._args, **self._kwargs)
File "/config/deps/lib/python3.6/site-packages/zigate/core.py", line 151, in _event_loop
self.decode_data(packet)
File "/config/deps/lib/python3.6/site-packages/zigate/core.py", line 365, in decode_data
response = RESPONSES.get(msg_type, Response)(value, rssi)
File "/config/deps/lib/python3.6/site-packages/zigate/responses.py", line 46, in init
self.decode()
File "/config/deps/lib/python3.6/site-packages/zigate/responses.py", line 292, in decode
data = struct.unpack(fmt, self.data['data'])[0]
struct.error: unpack requires a buffer of 8 bytes

Device: Xiaomi wireless button double

Message sent during leaving network/unpairing.

Read Write attributes with manufacturer specific command

Hello

is it possible to extend the read_attribute_request and write_attribute_request command with the manufacturer specific code when sending the command over MQTT? Or is there a workaround?

It seems in order to read the status of a Xiamo detector, the manufacturer specific code 0x115F has to be added. And this is the same, to set its sensitivity.

If I am not mistaken, the Zigate command 0x0100 (read) and 0x0110 (write), could deal with it.

Soors

Too much Thread created

jeedom-zigate/jeedom-plugin-zigate#81

Exception in thread Thread-3:
Traceback (most recent call last):
File "/usr/lib/python3.5/threading.py", line 914, in _bootstrap_inner
self.run()
File "/usr/lib/python3.5/threading.py", line 862, in run
self._target(*self._args, **self._kwargs)
File "/usr/local/lib/python3.5/dist-packages/zigate/transport.py", line 93, in listen
self.read_data(data)
File "/usr/local/lib/python3.5/dist-packages/zigate/transport.py", line 80, in read_data
threading.Thread(target=self.packet_received, args=(raw_message,)).start()
File "/usr/lib/python3.5/threading.py", line 844, in start
_start_new_thread(self._bootstrap, ())
RuntimeError: can't start new thread

Issue with Ikea lights

Hello there,

great work! I love your job and effort on this matter!

I am using your last version 0.8.2, I have been able to paring and greatly control an Ikea bulb by sending ON/OFF command ("z.action_onoff(....)") and control the light level ("z.action_move_level_onoff(....)").

Unfortunately the documented methods ("z.devices[0].endpoints" and "z.devices[0].properties") they do not work as they reply with "{ }" and with an empty string.

Of course, I can ensure that I am okay with the pairing, as the command z.devices[0].addr it does reply with the short zigbee address of my bulb.

Cheers
Mirco

Pilotage ampoule Ikea tradfi

Bonjour

J'ai essayé d'utiliser l'ampoule Ikea tradfi (variateur de "blanc") avec une zigate et ta librairie.

Je lance le broker, permet l'association et fait un factory reset de l'ampoule

Je vois bien dans mes traces :

string(14) "zigate/command"
string(39) "{"function": "permit_join", "args": []}"

puis

string(26) "zigate/device_changed/f4c6"
string(130) "{"addr": "f4c6", "info": {"addr": "f4c6", "ieee": "90fd9ffffe8b41a6", "mac_capability": "10001110", "rssi": 150}, "endpoints": []}"

Je me dit, gagné, l'adresse est f4c6.
A minima je devrais pouvoir faire du on / off dessus (comme je le fait déjà pour mes bandeaux de led)

Ne connaissait pas le endpoint, et ne sachant pas trop comment le trouver, je fais donc un peu le bourrin pour le trouver :

for($i=0; $i < 64; $i++)
{
sleep(1);
echo "\n$i";
$payload = '{"function": "action_onoff", "args": ["f4c6", '.$i.', 2]}';
$mqtt->publish("zigate/command", $payload, 0);
}

Je lance un toogle en testant tous les endpoints entre 0 et 64.
Mais là c'est le drame, l'ampoule ne change pas d'état :(

Merci pour l'aide

Popin santé

Bonjour,

Pour faciliter la maintenance, une page de santé remontant les dernières dates de communication, la qualité de réception, les piles, etc... le tout par équipement serait appréciable.
De même certaines infos pourraient figurer directement dans la page équipement, à la manière des plugins ZWave et RFX.

Issues with TRADFRI bulb E27 WS clear 950lm

I was able to pair this bulb correctly with endpoint discovery looking fine as well, but the integration is not perfect yet.

  1. I am able of turning it off immediately and the light bulb turns off as expected but a couple of seconds later, the switch is turned on again automatically. The light remains off in an inconsistent state (see next issue).
2018-12-01 00:32:54 DEBUG (SyncWorker_6) [zigate] REQUEST : 0x0092 b'\x02\xd3\xd0\x01\x01\x00'
2018-12-01 00:32:54 DEBUG (SyncWorker_6) [zigate] Msg to send b'009200069502d3d0010100'
2018-12-01 00:32:54 DEBUG (SyncWorker_6) [zigate] Encoded Msg to send b'0102109202100216950212d3d002110211021003'
2018-12-01 00:32:54 DEBUG (SyncWorker_6) [zigate] Waiting for status message for command 0x0092
2018-12-01 00:32:54 DEBUG (ZiGate-Event Loop) [zigate] Dispatch ZIGATE_PACKET_RECEIVED
2018-12-01 00:32:54 DEBUG (ZiGate-Event Loop) [zigate] Received response 0x8000: b'00640092'
2018-12-01 00:32:54 DEBUG (ZiGate-Event Loop) [zigate] RESPONSE 0x8000 - Status response : status:0, sequence:100, packet_type:146, error:b'', rssi:0
2018-12-01 00:32:54 DEBUG (ZiGate-Event Loop) [zigate] Dispatch ZIGATE_RESPONSE_RECEIVED
2018-12-01 00:32:54 DEBUG (SyncWorker_6) [zigate] STATUS code to command 0x0092:0
  1. After turning the light off, it turns on immediately when changing its brightness. Right now this is the only way of turning it on:
2018-12-01 00:33:48 DEBUG (SyncWorker_18) [zigate] REQUEST : 0x0081 b'\x02\xd3\xd0\x01\x01\x01\xd2\x00\x00'
2018-12-01 00:33:48 DEBUG (SyncWorker_18) [zigate] Msg to send b'008100095a02d3d0010101d20000'
2018-12-01 00:33:48 DEBUG (SyncWorker_18) [zigate] Encoded Msg to send b'01021081021002195a0212d3d0021102110211d20210021003'
2018-12-01 00:33:48 DEBUG (SyncWorker_18) [zigate] Waiting for status message for command 0x0081
2018-12-01 00:33:48 DEBUG (ZiGate-Event Loop) [zigate] Dispatch ZIGATE_PACKET_RECEIVED
2018-12-01 00:33:48 DEBUG (ZiGate-Event Loop) [zigate] Received response 0x8000: b'006e0081'
2018-12-01 00:33:48 DEBUG (ZiGate-Event Loop) [zigate] RESPONSE 0x8000 - Status response : status:0, sequence:110, packet_type:129, error:b'', rssi:0
2018-12-01 00:33:48 DEBUG (ZiGate-Event Loop) [zigate] Dispatch ZIGATE_RESPONSE_RECEIVED
2018-12-01 00:33:48 DEBUG (SyncWorker_18) [zigate] STATUS code to command 0x0081:0
  1. Changing the color temperature appears to record the right state but does not trigger a change on the light bulb:
2018-12-01 00:34:22 DEBUG (SyncWorker_1) [zigate] REQUEST : 0x0092 b'\x02\xd3\xd0\x01\x01\x01'
2018-12-01 00:34:22 DEBUG (SyncWorker_1) [zigate] Msg to send b'009200069402d3d0010101'
2018-12-01 00:34:22 DEBUG (SyncWorker_1) [zigate] Encoded Msg to send b'0102109202100216940212d3d002110211021103'
2018-12-01 00:34:22 DEBUG (SyncWorker_1) [zigate] Waiting for status message for command 0x0092
2018-12-01 00:34:22 DEBUG (ZiGate-Event Loop) [zigate] Dispatch ZIGATE_PACKET_RECEIVED
2018-12-01 00:34:22 DEBUG (ZiGate-Event Loop) [zigate] Received response 0x8000: b'00760092'
2018-12-01 00:34:22 DEBUG (ZiGate-Event Loop) [zigate] RESPONSE 0x8000 - Status response : status:0, sequence:118, packet_type:146, error:b'', rssi:0
2018-12-01 00:34:22 DEBUG (ZiGate-Event Loop) [zigate] Dispatch ZIGATE_RESPONSE_RECEIVED
2018-12-01 00:34:22 DEBUG (SyncWorker_1) [zigate] STATUS code to command 0x0092:0

If it helps, this is what the zigate entity looks like in home assistant:

battery_voltage: null
battery_level: 100
rssi_percent: 15
type: TRADFRI bulb E27 WS clear 950lm
manufacturer: 117c
receiver_on_when_idle: true
missing: false
addr: d3d0
ieee: d0cf5efffe22c8d9
mac_capability: 10001110
rssi: 39
max_rx: 82
max_tx: 82
server_mask: 0
descriptor_capability: 00000000
max_buffer: 82
bit_field: 0100000000000001
last_seen: 2018-12-01 00:28:47
friendly_name: Device d0cf5efffe22c8d9 (d3d0) TRADFRI bulb E27 WS clear 950lm
icon: mdi:access-point

And the light entity:

min_mireds: 153
max_mireds: 500
brightness: 33
color_temp: 2702
addr: d3d0
ieee: d0cf5efffe22c8d9
endpoint: 1
friendly_name: Device d0cf5efffe22c8d9 (d3d0) TRADFRI bulb E27 WS clear 950lm 1
supported_features: 35

Brightness does not appear to change on the entity state, but it does indeed change on the bulb.

No response after command

Hello

I have several output of this kind on my broker :
python3 -m zigate.mqtt_broker --device auto --mqtt_host localhost:1883
INFO:zigate:Searching ZiGate port
INFO:zigate:ZiGate found at /dev/ttyUSB0
INFO:root:Publish zigate/device_changed/0cba
INFO:root:Publish zigate/device_changed/62ce
INFO:root:MQTT connected with result code 0
ERROR:zigate:No response after command 0x0042
ERROR:zigate:No response after command 0x0044
ERROR:zigate:No response after command 0x0045
INFO:root:Publish zigate/device_changed/be02
ERROR:zigate:No response after command 0x0042
ERROR:zigate:No response after command 0x0044
ERROR:zigate:No response after command 0x0045
INFO:root:Publish zigate/device_changed/ee65
ERROR:zigate:No response after command 0x0042
ERROR:zigate:No response after command 0x0044
ERROR:zigate:No response after command 0x0045
INFO:root:Publish zigate/device_changed/b89c
ERROR:zigate:No response after command 0x0042

ERROR:zigate:No response after command 0x0044
ERROR:zigate:No response after command 0x0045

During this period, I hit several times my button switch

After some time (more than 15 seconds) Appears informations related to my buttons :

INFO:root:Publish zigate/attribute_changed/0cba/01/0006/0000
INFO:root:Publish zigate/attribute_changed/0cba/01/0006/0000
INFO:root:Publish zigate/attribute_changed/0cba/01/0006/0000
INFO:root:Publish zigate/attribute_changed/0cba/01/0006/0000
INFO:root:Publish zigate/attribute_changed/0cba/01/0006/8000
INFO:root:Publish zigate/attribute_changed/62ce/01/0000/0005
INFO:root:Publish zigate/attribute_changed/62ce/01/0000/ff01
INFO:root:Publish zigate/attribute_changed/62ce/01/0006/0000
INFO:root:Publish zigate/attribute_changed/62ce/01/0006/0000
INFO:root:Publish zigate/attribute_changed/0cba/01/0006/8000
INFO:root:Publish zigate/attribute_changed/0cba/01/0006/8000
INFO:root:Publish zigate/attribute_changed/62ce/01/0006/0000
INFO:root:Publish zigate/attribute_changed/62ce/01/0006/0000
INFO:root:Publish zigate/attribute_changed/62ce/01/0006/8000
INFO:root:Publish zigate/attribute_changed/0cba/01/0006/8000
INFO:root:Publish zigate/attribute_changed/62ce/01/0006/8000

Why thoose error messages ?
Why this delay ?

Thanks

Cannot parse network join response

Zigate firmware 3.0e
Zigate library 0.21.1

I cannot start network, but when I'm using TestGUI for ZiGate network starts.

Zigate lib logs:

z = zigate.connect(port=None) # Leave None to auto-discover the port
DEBUG:zigate:Try loading persistent file
DEBUG:zigate:Load success
INFO:zigate:Searching ZiGate port
INFO:zigate:ZiGate found at /dev/cu.usbserial
DEBUG:zigate:REQUEST : 0x0010
DEBUG:zigate:Msg to send b'0010000010'
DEBUG:zigate:Encoded Msg to send b'\x01\x02\x10\x10\x02\x10\x02\x10\x10\x03'
DEBUG:zigate:Waiting for status message for command 0x0010
DEBUG:zigate:Received response 0x8000: b'\x00\x00\x00\x10'
DEBUG:zigate:RESPONSE 0x8000 - Status response : status:0, sequence:0, packet_type:16, error:b'', rssi:0
DEBUG:zigate:Dispatch ZIGATE_RESPONSE_RECEIVED
DEBUG:zigate:Received response 0x8010: b'\x00\x02\x03\x0e'
DEBUG:zigate:RESPONSE 0x8010 - Version list : major:2, installer:30e, rssi:0, version:3.0e
DEBUG:zigate:Dispatch ZIGATE_RESPONSE_RECEIVED
DEBUG:zigate:STATUS code to command 0x0010:0
DEBUG:zigate:Waiting for message 0x8010
DEBUG:zigate:Stop waiting, got message 0x8010
DEBUG:zigate:REQUEST : 0x0021 b'\x03\x18\xc8\x00'
DEBUG:zigate:Msg to send b'00210004f60318c800'
DEBUG:zigate:Encoded Msg to send b'\x01\x02\x10!\x02\x10\x02\x14\xf6\x02\x13\x18\xc8\x02\x10\x03'
DEBUG:zigate:Waiting for status message for command 0x0021
ERROR:zigate:OOPS connection lost, reconnect...
DEBUG:zigate:Received response 0x8000: b'\x00\x00\x00!'
DEBUG:zigate:RESPONSE 0x8000 - Status response : status:0, sequence:0, packet_type:33, error:b'', rssi:0
DEBUG:zigate:Dispatch ZIGATE_RESPONSE_RECEIVED
DEBUG:zigate:STATUS code to command 0x0021:0
DEBUG:zigate:REQUEST : 0x0023 b'\x00'
DEBUG:zigate:Msg to send b'002300012200'
DEBUG:zigate:Encoded Msg to send b'\x01\x02\x10#\x02\x10\x02\x11"\x02\x10\x03'
DEBUG:zigate:Waiting for status message for command 0x0023
DEBUG:zigate:Received response 0x8000: b'\x00\x00\x00#'
DEBUG:zigate:RESPONSE 0x8000 - Status response : status:0, sequence:0, packet_type:35, error:b'', rssi:0
DEBUG:zigate:Dispatch ZIGATE_RESPONSE_RECEIVED
DEBUG:zigate:STATUS code to command 0x0023:0
DEBUG:zigate:Check network state
DEBUG:zigate:REQUEST : 0x0024
DEBUG:zigate:Msg to send b'0024000024'
DEBUG:zigate:Encoded Msg to send b'\x01\x02\x10$\x02\x10\x02\x10$\x03'
DEBUG:zigate:Waiting for status message for command 0x0024
DEBUG:zigate:Received response 0x8024: b'\x04'
Exception in thread Thread-46:
Traceback (most recent call last):
File "/usr/local/Cellar/python/3.7.0/Frameworks/Python.framework/Versions/3.7/lib/python3.7/threading.py", line 917, in _bootstrap_inner
self.run()
File "/usr/local/Cellar/python/3.7.0/Frameworks/Python.framework/Versions/3.7/lib/python3.7/threading.py", line 865, in run
self._target(*self._args, **self._kwargs)
File "/Users/pkarpins/projects/home/home-assistant/lib/python3.7/site-packages/zigate/core.py", line 155, in _event_loop
self.decode_data(packet)
File "/Users/pkarpins/projects/home/home-assistant/lib/python3.7/site-packages/zigate/core.py", line 373, in decode_data
response = RESPONSES.get(msg_type, Response)(value, rssi)
File "/Users/pkarpins/projects/home/home-assistant/lib/python3.7/site-packages/zigate/responses.py", line 46, in init
self.decode()
File "/Users/pkarpins/projects/home/home-assistant/lib/python3.7/site-packages/zigate/responses.py", line 107, in decode
sdata, msg_data = self.__decode(fmt, keys, msg_data)
File "/Users/pkarpins/projects/home/home-assistant/lib/python3.7/site-packages/zigate/responses.py", line 118, in __decode
sdata = OrderedDict(zip(keys, struct.unpack(fmt, data[:size])))
struct.error: unpack requires a buffer of 12 bytes

WARNING:zigate:No response after command 0x0024
DEBUG:zigate:REQUEST : 0x0009
DEBUG:zigate:Msg to send b'0009000009'
DEBUG:zigate:Encoded Msg to send b'\x01\x02\x10\x02\x19\x02\x10\x02\x10\x02\x19\x03'
DEBUG:zigate:Waiting for status message for command 0x0009

TestGUI Logs:
00:29:06.436 -> 01 02 10 10 02 10 02 10 10 03
00:29:06.483 <- 01 80 00 00 05 95 00 00 00 10 00 03
00:29:06.545 <- 01 80 10 00 05 9A 00 02 03 0E 00 03
00:29:07.843 -> 01 02 10 21 02 10 02 14 2D 02 10 02 10 02 18 02 10 03
00:29:07.920 <- 01 80 00 00 05 A4 00 00 00 21 00 03
00:29:16.952 -> 01 02 10 23 02 10 02 11 22 02 10 03
00:29:17.030 <- 01 80 00 00 05 A6 00 00 00 23 00 03
00:29:19.030 -> 01 02 10 24 02 10 02 10 24 03
00:29:19.123 <- 01 80 24 00 02 A2 04 00 03
00:29:19.186 <- 01 80 00 00 05 A1 00 00 00 24 00 03

Obtenir la version

Histoire d'améliorer le debug ainsi que le reporting, je souhaiterais récupérer la version de la lib à partir du daemon... Actuellement on peut récupérer la version du firmware mais c'est tout.

Te serait-il possible de passer la version de ta librairie via une commande ?

C'est pour ce bug: jeedom-zigate/jeedom-plugin-zigate#75

MQTT function

Hi Sébastien,
well done!

I have seen that you have deployed the MQTT function as we discussed!
As soon as possible (it means as soon as I will stop following "white rabbits" on my home automation project) I will give a shot and run a test with it! ;-)

Cheers!

Alarm not working

b'\x1e\x01\x05\x00\x02\tc\x00\x01\x00\xff\x00\x00'
Exception in thread Thread-16:
Traceback (most recent call last):
File "/usr/lib/python3.6/threading.py", line 916, in _bootstrap_inner
self.run()
File "/usr/lib/python3.6/threading.py", line 864, in run
self._target(*self._args, **self._kwargs)
File "/home/doudz/MEGA/Dev/zigate/zigate/transport.py", line 61, in packet_received
dispatcher.send(ZIGATE_PACKET_RECEIVED, packet=raw_message)
File "/home/doudz/.local/lib/python3.6/site-packages/pydispatch/dispatcher.py", line 338, in send
**named
File "/home/doudz/.local/lib/python3.6/site-packages/pydispatch/robustapply.py", line 55, in robustApply
return receiver(*arguments, **named)
File "/home/doudz/MEGA/Dev/zigate/zigate/core.py", line 318, in decode_data
response = RESPONSES.get(msg_type, Response)(value, rssi)
File "/home/doudz/MEGA/Dev/zigate/zigate/responses.py", line 45, in init
self.decode()
File "/home/doudz/MEGA/Dev/zigate/zigate/responses.py", line 106, in decode
sdata, msg_data = self.__decode(fmt, keys, msg_data)
File "/home/doudz/MEGA/Dev/zigate/zigate/responses.py", line 117, in __decode
sdata = OrderedDict(zip(keys, struct.unpack(fmt, data[:size])))
struct.error: unpack requires a buffer of 14 bytes

b'\x1f\x01\x05\x00\x02\tc\x00\x00\x00\xff\x00\x00'
Exception in thread Thread-17:
Traceback (most recent call last):
File "/usr/lib/python3.6/threading.py", line 916, in _bootstrap_inner
self.run()
File "/usr/lib/python3.6/threading.py", line 864, in run
self._target(*self._args, **self._kwargs)
File "/home/doudz/MEGA/Dev/zigate/zigate/transport.py", line 61, in packet_received
dispatcher.send(ZIGATE_PACKET_RECEIVED, packet=raw_message)
File "/home/doudz/.local/lib/python3.6/site-packages/pydispatch/dispatcher.py", line 338, in send
**named
File "/home/doudz/.local/lib/python3.6/site-packages/pydispatch/robustapply.py", line 55, in robustApply
return receiver(*arguments, **named)
File "/home/doudz/MEGA/Dev/zigate/zigate/core.py", line 318, in decode_data
response = RESPONSES.get(msg_type, Response)(value, rssi)
File "/home/doudz/MEGA/Dev/zigate/zigate/responses.py", line 45, in init
self.decode()
File "/home/doudz/MEGA/Dev/zigate/zigate/responses.py", line 106, in decode
sdata, msg_data = self.__decode(fmt, keys, msg_data)
File "/home/doudz/MEGA/Dev/zigate/zigate/responses.py", line 117, in __decode
sdata = OrderedDict(zip(keys, struct.unpack(fmt, data[:size])))
struct.error: unpack requires a buffer of 14 bytes

Fake clusters/endpoints. How to skip?

Probably improvement is needed.

I'm using Xiaomi staff and I noticed that Aqara wall switch single button replay for endpoints which doesn't exists. For example this single key button work on endpoint 2 and endpoint 1 do nothing. Another example is wireless switch with responding for cluster 18 and to nothing.

Idea for improvement is to introduce device configuration file (aka file later). Device is configured per manufacturer and type.

I see two options :

  1. file contains device clusters and endpoints if match to paired on configuration is used and if not autodiscovery applied as is
  2. file contains only cluster & endpoints to exclude when scanning (deconz use exclusion in code, but easier will be have file)

I prefer first options because in case of pairing new device which exists adding will be fast because scan is not needed or mix 1) and 2) is possible.

This is needed for home-assistant plugin which creates entities automatically and in case of fake endpoints and clusters there are fake entities :-/

Appel des constante

Salut,

avec la 0.20.0, pour appeler les constantes c'est plus zigate.ZIGATE_FAILED_TO_CONNECT mais zigate.const.ZIGATE_FAILED_TO_CONNECT

La solution serait de faire comme pour la version et faire des trucs du genre ZIGATE_FAILED_TO_CONNECT = const.ZIGATE_FAILED_TO_CONNECT

tu en penses quoi ? Le but étant de ne pas importer de choses non utilisé (flake8)

Failed to load persistent if it contains lumi wleak sensor

2019-01-04 18:32:57 ERROR (Thread-21) [zigate] Traceback (most recent call last):
  File "/home/pi/.homeassistant/deps/lib/python3.5/site-packages/zigate/core.py", line 238, in load_state
    device = Device.from_json(data, self)
  File "/home/pi/.homeassistant/deps/lib/python3.5/site-packages/zigate/core.py", line 1945, in from_json
    cluster = Cluster.from_json(cl, endpoint)
  File "/home/pi/.homeassistant/deps/lib/python3.5/site-packages/zigate/clusters.py", line 138, in from_json
    cluster.update(attribute)
  File "/home/pi/.homeassistant/deps/lib/python3.5/site-packages/zigate/clusters.py", line 418, in update
    zone_id = data['zone_id']
KeyError: 'zone_id'

Calcul du % de batterie...

On a initié une discussion ici mais la solution est à corriger dans la lib Python.

La problème est dans la décharge non linéaire des piles qui entraine une imprécision du suivie:
44849076-39683e80-ac59-11e8-8a11-4214f17f1878

Associate a switch to a light

Bonjour

J'essayer d'associer directement un interrupteur à un bandeau de led en utilisant ta librairie.
Inspiré de http://faire-ca-soi-meme.fr/domotique/2018/03/14/une-telecommande-zigbee-pour-les-controler-tous/

Mon approche est la suivante :
J'ai un brokker lancé

J'appelle une premiere fois
$payload = '{"function": "add_group", "args": ["b89c", 11]}';
$mqtt->publish("zigate/command", $payload, 0);

Et dans un listener je recupère l'adresse du groupe.

Je lance ensuite

$groupAddr = "0b71";

echo "\nadd group to light 1";
$payload = '{"function": "add_group", "args": ["b89c", 11, "'.$groupAddr.'"]}';
$mqtt->publish("zigate/command", $payload, 0);

echo "\nadd group to switch 1";
$payload = '{"function": "add_group", "args": ["fd1d", 1, "'.$groupAddr.'"]}';
$mqtt->publish("zigate/command", $payload, 0);

echo "\nview grouips";
$payload = '{"function": "get_group_membership", "args": ["b89c", 11]}';
$mqtt->publish("zigate/command", $payload, 0);

Les 2 premières commandes se passent sans erreur, la dernière échoue :
ERROR:root:Error calling function get_group_membership

En, en résultat... :/ appuyer sur mon bouton ne change pas le status on/off de mon interrupteur :(

J'ai essayé le bouton d’appareillage :
(adresse différente car entre temps je l'ai supprimé puis ajouté de nouveau)

string(42) "zigate/attribute_changed/0cba/01/0000/0005"
string(146) "{"attribute": 5, "addr": "0cba", "cluster": 0, "data": "lumi.sensor_switch.aq2", "name": "type", "value": "lumi.sensor_switch.aq2", "endpoint": 1}"
string(4) "XXXX"
string(42) "zigate/attribute_changed/0cba/01/0000/ff01"
string(177) "{"attribute": 65281, "cluster": 0, "data": "0121030c0328210421a81305214600062402000200000a210000", "value": 3.075, "endpoint": 1, "addr": "0cba", "unit": "V", "name": "battery"}"
string(4) "XXXX"

et suppression / association, rien de mieux.

Mes dispositifs :
switch : lumi.sensor_switch.aq2
osram : bandeau de led
jiawen : bandeau de led

Sinon, si j'intercepte l'event avec le broker et que je lance une action, cela marche, mais j'aimerais avoir une installation indépendante du raspberry

Merci pour ton aide

Legrand Celiane

First, thanks for publishing the code of this project, it seems to be one of the best one out there!

I'm trying to pair a Legrand store switch (https://www.legrand.fr/pro/catalogue/42566-version-celiane-with-netatmo/interrupteur-filaire-connecte-pour-volet-roulant-celiane-with-netatmo-blanc) and I'm getting the following error when trying:

>>> z.permit_join()
DEBUG:zigate:REQUEST : 0x0049 FFFC1E00
DEBUG:zigate:Msg to send b'0049000450fffc1e00'
DEBUG:zigate:Encoded Msg to send b'010210490210021450fffc1e021003'
DEBUG:zigate:Waiting for status message for command 0x0049
DEBUG:zigate:Raw packet received, b'\x01\x80\x02\x10\x02\x10\x02\x15L\x80\x02\x10\x02\x10I\x02\x10\x03'
DEBUG:zigate:Dispatch ZIGATE_PACKET_RECEIVED
DEBUG:zigate:Received response 0x8000: b'80000049'
DEBUG:zigate:RESPONSE 0x8000 - Status response : status:128, sequence:0, packet_type:73, error:b'', rssi:0
DEBUG:zigate:Dispatch ZIGATE_RESPONSE_RECEIVED
ERROR:zigate:Command 0x0049 failed Failed (ZigBee event codes) 128 : b''
DEBUG:zigate:STATUS code to command 0x0049:128
128
  • zigate firmware: 3.0e
  • host: rpi3
  • python version: 3.5

Do you have suggestions on what could go wrong ?

Device 0x0102 should have color actions

see fairecasoimeme/ZiGate#103

{
            "addr": "7df3",
            "discovery": "auto-discovered",
            "endpoints": [
                {
                    "clusters": [
                        {
                            "attributes": [
                                {
                                    "attribute": 1,
                                    "data": 22,
                                    "name": "application_version",
                                    "value": 22
                                },
                                {
                                    "attribute": 5,
                                    "data": "lumi.light.aqcn02",
                                    "name": "type",
                                    "type": "str",
                                    "value": "lumi.light.aqcn02"
                                },
                                {
                                    "attribute": 6,
                                    "data": "09-30-2018",
                                    "name": "datecode",
                                    "value": "09-30-2018"
                                }
                            ],
                            "cluster": 0
                        },
                        {
                            "attributes": [
                                {
                                    "attribute": 0,
                                    "data": 254,
                                    "name": "current_level",
                                    "type": "int",
                                    "value": 100
                                },
                                {
                                    "attribute": 61440,
                                    "data": 10205440
                                }
                            ],
                            "cluster": 8
                        },
                        {
                            "attributes": [
                                {
                                    "attribute": 0,
                                    "data": true,
                                    "name": "onoff",
                                    "type": "bool",
                                    "value": true
                                },
                                {
                                    "attribute": 61440,
                                    "data": 8254208
                                }
                            ],
                            "cluster": 6
                        }
                    ],
                    "device": 258,
                    "endpoint": 1,
                    "in_clusters": [
                        0,
                        4,
                        3,
                        5,
                        10,
                        258,
                        13,
                        19,
                        6,
                        1,
                        1030,
                        8,
                        768,
                        1027,
                        1029,
                        1026
                    ],
                    "out_clusters": [
                        25,
                        10,
                        13,
                        258,
                        19,
                        6,
                        1,
                        1030,
                        8,
                        768
                    ],
                    "profile": 260
                }
            ],
            "generictype": "",
            "info": {
                "addr": "7df3",
                "id": 50,
                "ieee": "00158d0002c65701",
                "last_seen": "2019-01-11 12:56:58",
                "mac_capability": "10001110",
                "power_type": 1,
                "rssi": 69
            }
        },

Trying to get the 'current_level'

@cloudz, I'm trying to use your plugin to interact with a USB Zigate. While the connectivity seems to work. Bascially the example in the README works fine.

However, I'm not getting any results for the 2 commandes

# get all discovered endpoints
print(" get all discovered endpoints")
z.devices[0].endpoints

# get well known attributes
print(" get well known attributes")
for attribute in z.devices[0].properties:
     print(attribute)

In addition, I'm trying to use the 'current_level' in order to ready the level of my shutter, with the following command, but nothing.

# Recupère le status du Volet
print("z.devices[0].get_property('current_level')")
z.devices[0].get_property('current_level')

Should I get the result via CallBack ? How ?

Failed to save groups in persistent file

Hello

In my brokker stack trace, I can see

ERROR:zigate:Failed to save persistent file /root/.zigate.json
ERROR:zigate:Traceback (most recent call last):
File "/usr/local/lib/python3.5/dist-packages/zigate/core.py", line 171, in save_state
sort_keys=True, indent=4, separators=(',', ': '))
File "/usr/lib/python3.5/json/init.py", line 178, in dump
for chunk in iterable:
File "/usr/lib/python3.5/json/encoder.py", line 429, in _iterencode
yield from _iterencode_dict(o, _current_indent_level)
File "/usr/lib/python3.5/json/encoder.py", line 403, in _iterencode_dict
yield from chunks
File "/usr/lib/python3.5/json/encoder.py", line 403, in _iterencode_dict
yield from chunks
File "/usr/lib/python3.5/json/encoder.py", line 436, in _iterencode
o = _default(o)
File "/usr/local/lib/python3.5/dist-packages/zigate/core.py", line 1256, in default
return json.JSONEncoder.default(self, obj)
File "/usr/lib/python3.5/json/encoder.py", line 179, in default
raise TypeError(repr(o) + " is not JSON serializable")
TypeError: {('fd1d', 1), ('b89c', 11), ('ee65', 3)} is not JSON serializable

Am i doin'g something wrong ?

Thanks

unable to start ZIgate MQTT brooker

Hello
nice work with Zigate python library.
Although the zigate recognises my smoke detectors running from python3, i do not succeed in starting the mqtt broker. I always get the following "connection refused error ":

$ sudo python3 -m zigate.mqtt_broker --device auto --mqtt_host localhost:1883
Traceback (most recent call last):
File "/usr/lib/python3.5/runpy.py", line 193, in _run_module_as_main
"main", mod_spec)
File "/usr/lib/python3.5/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/home/pi/zigate/zigate/mqtt_broker.py", line 111, in
broker.start()
File "/home/pi/zigate/zigate/mqtt_broker.py", line 38, in start
self.connect()
File "/home/pi/zigate/zigate/mqtt_broker.py", line 35, in connect
self.client.connect(host, port)
File "/usr/local/lib/python3.5/dist-packages/paho/mqtt/client.py", line 839, in connect
return self.reconnect()
File "/usr/local/lib/python3.5/dist-packages/paho/mqtt/client.py", line 962, in reconnect
sock = socket.create_connection((self._host, self._port), source_address=(self._bind_address, 0))
File "/usr/lib/python3.5/socket.py", line 712, in create_connection
raise err
File "/usr/lib/python3.5/socket.py", line 703, in create_connection
sock.connect(sa)
ConnectionRefusedError: [Errno 111] Connection refused

Any help on this?

Thx

Le refresh d'un dispositif entraine un lag

Bonjour
J'utilise la lib python, avec le broker

Lorsque j'envoie une commande de refresh device au broker, je dois attendre de nombreuses secondes que la mise à jour se fasse.
Si pendant ce temps là j'utilise mon bouton aqara par exemple, je ne vois pas mon événement dans listener, ou plutôt je ne vois bien plus tard

J'ai l'impression que lorsque l'on demande un refresh, la zigate se met en "pause" tant qu'elle n'a pas obtenu les informations qu'elle est sencée recevoir, et traite les autres messages ensuite

Exemple de commande envoyée :
zigate/command
{"function": "refresh_device", "args": ["7d56"]}

Je demande l'état d'une ampoule Ikea. Je souhaite avoir des attributs à jour
(mon but final est de savoir son état allumé / etteint et son niveau de luminosité).

S'il y a un autre moyen de connaitre l'état de mon ampoule, je suis preneur :)

Je ne suis pas certain de devoir déclarer un bug / un comportement genant sur ta lib ou sur la zigate elle même.

Merci :)

Is light grouping possible?

Hi,

I have multiple ikea bulbs and I want to control them as one. I saw in some thread @doudz explain that groups are not supported/untested. Does this mean one of:

  1. it's not possible with current zigate implementation to do that
  2. it's possible and I should use default HA light grouping as in official docs (was not able to setup, but maybe I just need different configuration)
  3. it's possible but I should use some zigate specific configuration

struct.error: required argument is not an integer

I'm not sure what happened. I touch nothing maybe it's related with xiaomi disappearing devices, but required argument can be handled

IEEE is missing for 7f72, please pair it again !
Exception dispatching signal ZIGATE_RESPONSE_RECEIVED
Traceback (most recent call last):
File "/usr/local/lib/python3.7/site-packages/zigate/core.py", line 111, in dispatch_signal
dispatcher.send(signal, sender, *arguments, **named)
File "/usr/local/lib/python3.7/site-packages/pydispatch/dispatcher.py", line 338, in send
**named
File "/usr/local/lib/python3.7/site-packages/pydispatch/robustapply.py", line 55, in robustApply
return receiver(*arguments, **named)
File "/usr/local/lib/python3.7/site-packages/zigate/core.py", line 430, in interpret_response
d._bind_report(endpoint)
File "/usr/local/lib/python3.7/site-packages/zigate/core.py", line 1567, in _bind_report
self._zigate.bind(self.ieee, endpoint_id, 0x0006)
File "/usr/local/lib/python3.7/site-packages/zigate/core.py", line 816, in bind
dst_addr, dst_endpoint)
File "/usr/local/lib/python3.7/site-packages/zigate/core.py", line 806, in _bind_unbind
cluster, dst_addr_mode, dst_addr, dst_endpoint)
struct.error: required argument is not an integer

zigate.flasher - Erase EEPROM doesn't work !

Hello

I am running Python 3.5.3 on my raspberrypi. I am trying to Erase EEPROM but it fails.

pi@raspberrypi:~ $ python3 -V
Python 3.5.3

pi@raspberrypi:~ $ sudo pip3 install -U zigate
Collecting zigate
  Downloading https://files.pythonhosted.org/packages/7d/88/f34edb6e2615990c45656aa4bda404845998f47935c09e2adbaed655fbf3/zigate-0.25.0-py3-none-any.whl (48kB)
    100% |████████████████████████████████| 51kB 447kB/s 
Requirement already up-to-date: pydispatcher in /usr/local/lib/python3.5/dist-packages (from zigate)
Collecting pyserial (from zigate)
  Downloading https://files.pythonhosted.org/packages/0d/e4/2a744dd9e3be04a0c0907414e2a01a7c88bb3915cbe3c8cc06e209f59c30/pyserial-3.4-py2.py3-none-any.whl (193kB)
    100% |████████████████████████████████| 194kB 656kB/s 
Requirement already up-to-date: bottle in /usr/local/lib/python3.5/dist-packages (from zigate)
Installing collected packages: pyserial, zigate
  Found existing installation: pyserial 3.2.1
    Not uninstalling pyserial at /usr/lib/python3/dist-packages, outside environment /usr
  Found existing installation: zigate 0.25.0.dev0
    Uninstalling zigate-0.25.0.dev0:
      Successfully uninstalled zigate-0.25.0.dev0
Successfully installed pyserial-3.4 zigate-0.25.0
pi@raspberrypi:~ $ python3 -m zigate.flasher -h
usage: flasher.py [-h] -p {/dev/ttyAMA0,/dev/ttyUSB0} [-w WRITE] [-s SAVE]
                  [-e] [--pdm-only]

optional arguments:
  -h, --help            show this help message and exit
  -p {/dev/ttyAMA0,/dev/ttyUSB0}, --serialport {/dev/ttyAMA0,/dev/ttyUSB0}
                        Serial port, e.g. /dev/ttyUSB0
  -w WRITE, --write WRITE
                        Firmware bin to flash onto the chip
  -s SAVE, --save SAVE  File to save the currently loaded firmware to
  -e, --erase           Erase EEPROM
  --pdm-only            Erase PDM only, use it with --erase

It found the MAC-address but I got Python IndexError: index out of range error:

pi@raspberrypi:~ $ python3 -m zigate.flasher -p /dev/ttyUSB0 -e
Found MAC-address: 00:15:8d:00:01:b2:2e:3a
Traceback (most recent call last):
  File "/usr/lib/python3.5/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/usr/lib/python3.5/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/usr/local/lib/python3.5/dist-packages/zigate/flasher.py", line 366, in <module>
    main()
  File "/usr/local/lib/python3.5/dist-packages/zigate/flasher.py", line 362, in main
    erase_EEPROM(ser, args.pdm_only)
  File "/usr/local/lib/python3.5/dist-packages/zigate/flasher.py", line 323, in erase_EEPROM
    res = read_response(ser)
  File "/usr/local/lib/python3.5/dist-packages/zigate/flasher.py", line 108, in read_response
    return _unpack_raw_message(length, answer)
  File "/usr/local/lib/python3.5/dist-packages/zigate/flasher.py", line 119, in _unpack_raw_message
    return _responses.get(type_, Response)(type_, data, chksum)
  File "/usr/local/lib/python3.5/dist-packages/zigate/flasher.py", line 69, in __init__
    self.status = data[0]
IndexError: index out of range

Could you help me to fix that?

Regards,

lumi.remote.b1acn01 badly recognize

lumi.remote.b1acn01 is a aqara wireless button but use same cluster xiaomi cube

  • appuie simple court : flip90_81 puis (rien) 2 secondes après
  • appuie simple long : shake puis flip180_127 puis (rien) 2 secondes après
  • appuie double rapide : wakup puis (rien) 2 secondes après
 {
            "addr": "d62a",
            "endpoints": [
                {
                    "clusters": [
                        {
                            "attributes": [
                                {
                                    "attribute": 1,
                                    "data": 2,
                                    "name": "application_version",
                                    "value": 2
                                },
                                {
                                    "attribute": 5,
                                    "data": "lumi.remote.b1acn01",
                                    "name": "type",
                                    "value": "lumi.remote.b1acn01"
                                },
                                {
                                    "attribute": 65281,
                                    "data": "01215d0c0328190421a81305214400062401000000000a210000",
                                    "name": "battery",
                                    "unit": "V",
                                    "value": 3.165
                                }
                            ],
                            "cluster": 0
                        },
                        {
                            "attributes": [
                                {
                                    "attribute": 85,
                                    "data": "",
                                    "expire": 2,
                                    "expire_value": "",
                                    "name": "movement",
                                    "value": ""
                                }
                            ],
                            "cluster": 18
                        }
                    ],
                    "device": 259,
                    "endpoint": 1,
                    "in_clusters": [
                        0,
                        18,
                        3
                    ],
                    "out_clusters": [
                        0
                    ],
                    "profile": 260
                }
            ],
            "info": {
                "addr": "d62a",
                "bit_field": "0100000000000010",
                "descriptor_capability": "00000000",
                "id": 1,
                "ieee": "00158d00021336ff",
                "last_seen": "2018-11-27 19:08:53",
                "mac_capability": "10000000",
                "manufacturer": "1037",
                "max_buffer": 127,
                "max_rx": 100,
                "max_tx": 100,
                "power_type": 0,
                "rssi": 204,
                "server_mask": 0
            }
        }

Hue osram led stripe move_hue_rgb issue ?

Hello

I can't use my osram RGB light if I don't do that :


    @register_actions(ACTIONS_HUE)
    def actions_move_hue_rgb(self, addr, endpoint, rgb, transition=0):
        '''
        move to hue (r,g,b) example : (1.0, 1.0, 1.0)
        transition in second
        '''
        hue, saturation, level = colorsys.rgb_to_hsv(*rgb)
        hue = int(hue*360)
        saturation = int(saturation*100)


=====>
        #custom : I comment the line
        #level = int(level*254)
=====>

        self.action_move_level_onoff(addr, endpoint, ON, level, transition)
        self.actions_move_hue_saturation(addr, endpoint, hue, saturation, transition)



Example of call : 

$payload = '{"function": "actions_move_hue_hex", "args": ["ee65", 3, "#0000FF"]}';

Am I doing something wrong or there is a "bug" in the libs ?


Occupancy cluster should be binary

‘Occupancy Sensor Information’ Attribute Set
u8Occupancy is a mandatory attribute indicating the sensed occupancy in a
bitmap in which bit 0 is used as follows (and all other bits are reserved):
bit 0 = 1 : occupied
bit 0 = 0 : unoccupied

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.