tomasy / zigbee-conbee-adapter

Adapter for Mozila IoT. Supports Zigbee by using ConBee USB stick
Mozilla Public License 2.0
5 stars 2 forks source link

Mapping of ZHASwitch fails with "Unknow sensor. Not added" #7

Open stefanreimers opened 5 years ago

stefanreimers commented 5 years ago

Hey tomasy, thanks for supplying the adapter.

I finally managed to get Raspbee module running on my RPi which is also running Mozilla IoT. A couple of sensors are registered via Phoscon App and an API call

http://192.168.1.99/api/<my_api_key>/sensors

gives me a list of them. But I cannot see them in Mozilla IoT. The run-app.log shows that the Conbee Adapter iterates through the list of Zigbee devices every time I start the process of device discovery (at https://url_of_your_iot_gateway/things when "Scanning for new devices"). Unfortunately the process times out before finding the Zigbee devices. See https://gist.github.com/stefanreimers/e0e9eb2dffa5861a6e4b2ef39c3c10cf for an excerpt of my log.

Am I missing something?

stefanreimers commented 5 years ago

The Mozilla IoT log show "Unknow sensor. Not added" for all sensors. But this issue seems to have 2 parts:

First I have a ZHASwitch (Gist Line 22) sensor which should handled by the code in conbee_adapter.py (Line 110). Unfortunately I cannot see why that fails.

2019-04-04 18:03:31.437 INFO   : zigbee-conbee: conbee_adapter.py:57 INFO Sensors: 2 ep 1
2019-04-04 18:03:31.438 INFO   : zigbee-conbee: conbee_adapter.py:57 INFO Sensors: 2 etag 3791a291e80a8d1a7c9540fa0d962113
2019-04-04 18:03:31.440 INFO   : zigbee-conbee: conbee_adapter.py:57 INFO Sensors: 2 manufacturername IKEA of Sweden
2019-04-04 18:03:31.442 INFO   : zigbee-conbee: conbee_adapter.py:57 INFO Sensors: 2 mode 3
2019-04-04 18:03:31.443 INFO   : zigbee-conbee: conbee_adapter.py:57 INFO Sensors: 2 uniqueid d0:cf:5e:ff:fe:0d:62:3d-01-1000
2019-04-04 18:03:31.445 INFO   : zigbee-conbee: conbee_adapter.py:57 INFO Sensors: 2 type ZHASwitch
2019-04-04 18:03:31.447 INFO   : zigbee-conbee: conbee_adapter.py:57 INFO Sensors: 2 name TRÅDFRI Fernbedienung
2019-04-04 18:03:31.449 INFO   : zigbee-conbee: conbee_adapter.py:57 INFO Sensors: 2 modelid TRADFRI remote control
2019-04-04 18:03:31.451 INFO   : zigbee-conbee: conbee_adapter.py:57 INFO Sensors: 2 swversion 1.2.214
2019-04-04 18:03:31.453 INFO   : zigbee-conbee: conbee_adapter.py:57 INFO Sensors: 2 config {'on': True, 'battery': 87, 'alert': 'none', 'reachable': True, 'group': '48082'}
2019-04-04 18:03:31.454 INFO   : zigbee-conbee: conbee_adapter.py:57 INFO Sensors: 2 state {'buttonevent': 5002, 'lastupdated': '2019-03-31T11:15:37'}
2019-04-04 18:03:31.456 INFO : zigbee-conbee: conbee_adapter.py:64 INFO Unknow sensor. Not added

Second, I use multiple ZHAOpenClose sensors. For this type of device I cannot find any reference in the code. of conbee_adapter.py. I will open another issue for tracking its addition.