WebThingsIO / zigbee-adapter

Zigbee adapter add-on for WebThings Gateway
Mozilla Public License 2.0
46 stars 29 forks source link

Conbee II not detected using Docker version of webthings gateway #271

Closed SteveWiFi closed 3 years ago

SteveWiFi commented 3 years ago

Hi,

I upgraded my Docker container from a 6 month old version of the Mozilla IoT Gateway to the v1.0.0 of the WebThingsIO Docker image.

When I upgraded, my Conbee 2 dongle was detected, but not functioning. Upon reading a few other issues on this Github page, I figured I would try to upgrade the firmware to the latest version (20th Nov) for which I now get the following errors:

2020-12-22 22:33:43.365 INFO : zigbee-adapter: DEBUG config = '' 2020-12-22 22:33:46.756 ERROR : zigbee-adapter: SerialProber: timeout: deConz dongle not detected on /dev/ttyACM0 2020-12-22 22:33:46.761 ERROR : zigbee-adapter: [Error: Error: No such file or directory, cannot open /dev/ttyAMA] 2020-12-22 22:33:46.763 INFO : zigbee-adapter: Serial ports that were found: 2020-12-22 22:33:46.835 INFO : zigbee-adapter: USB Serial Device 1cf1:0030 Vendor: dresden elektronik ingenieurtechnik GmbH Serial: DE2123125 found @ /dev/ttyACM0 2020-12-22 22:33:46.836 INFO : zigbee-adapter: Serial Device found @ /dev/ttyAMA 2020-12-22 22:33:46.838 ERROR : zigbee-adapter: Failed to start add-on zigbee-adapter: No Zigbee dongle found

Before the firmware update, this is what I would see:

2020-12-21 17:40:52.906 INFO : zigbee-adapter: DEBUG config = '' 2020-12-21 17:40:54.074 INFO : zigbee-adapter: this.driver = DeconzDriver {} 2020-12-21 17:40:54.076 INFO : zigbee-adapter: DeconzDriver: Using serial port /dev/ttyACM0 2020-12-21 17:40:54.085 INFO : zigbee-adapter: DeConz Firmware version: 264a0700 2020-12-21 17:40:54.118 INFO : zigbee-adapter: Kicking WatchDog for 3600 seconds 2020-12-21 17:40:57.140 INFO : zigbee-adapter: MAC Address: 00212effff04e672 2020-12-21 17:40:57.142 INFO : zigbee-adapter: Network PANID16: 1547 2020-12-21 17:40:57.143 INFO : zigbee-adapter: Network Addr16: 0000 2020-12-21 17:40:57.144 INFO : zigbee-adapter: Network PANID64: 0000000000000000 2020-12-21 17:40:57.145 INFO : zigbee-adapter: APS Designated Coordinator: 1 2020-12-21 17:40:57.146 INFO : zigbee-adapter: Scan Channels: 00008000 2020-12-21 17:40:57.147 INFO : zigbee-adapter: APS PANID64: 0000000000000000 2020-12-21 17:40:57.148 INFO : zigbee-adapter: Trust Center Addr64: 00212effff04e672 2020-12-21 17:40:57.149 INFO : zigbee-adapter: Security Mode: 3 2020-12-21 17:40:57.150 INFO : zigbee-adapter: Network Key: 41921bb9bdb2f743793013eb75a56f00 2020-12-21 17:40:57.151 INFO : zigbee-adapter: Operating Channel: 15 2020-12-21 17:40:57.152 INFO : zigbee-adapter: Protocol Version: 267 2020-12-21 17:40:57.153 INFO : zigbee-adapter: Network Update ID: 3 2020-12-21 17:40:57.155 INFO : zigbee-adapter: Permit Join: 0 2020-12-21 17:40:57.156 INFO : zigbee-adapter: WatchDog TTL: 3600 2020-12-21 17:40:57.158 INFO : zigbee-adapter: Version: 264a0700

I am 100% certain I have the correct permissions set as this has worked flawlessly for the past year. I am using Arch with the permissions set as:

crw-rw-rw- 1 root uucp 166, 0 Dec 21 05:38 /dev/ttyACM0

I have set a udev rule to set these permissions at boot and I can confirm that the device is detected by both Windows and the Arch host.

Output of lsusb

Bus 001 Device 004: ID 1cf1:0030 Dresden Elektronik ZigBee gateway [ConBee II]

mrstegeman commented 3 years ago

@chas-iot any ideas?

chas-iot commented 3 years ago

Please restart the ZigBee adapter with debug = serialProber If the probe sequence is sent and no response received then there is a patch. I’ll get the details later today

Regards, Charles

On 23 Dec 2020, at 7:00 AM, Michael Stegeman notifications@github.com wrote:

 @chas-iot any ideas?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.

chas-iot commented 3 years ago

the two patches (which work most of the time) are at

They are awaiting testing to ensure that the change does not break adapters with the older firmware. Also, I'd like the documentation requested at https://github.com/dresden-elektronik/deconz-rest-plugin/issues/3787

I should get time in the next 10 days to get back to this and enhance the serial prober to allow multiple variant probes to be sent in 1 probe package, which should prevent the occasional failure that I noticed.

SteveWiFi commented 3 years ago

This is the output from using debug = serialProber:

2020-12-23 08:40:45.069 INFO : zigbee-adapter: DEBUG config = 'serialProber' 2020-12-23 08:40:45.070 INFO : zigbee-adapter: Enabling DEBUG_serialProber 2020-12-23 08:41:02.112 INFO : zigbee-adapter: SerialProber: /dev/ttyACM0 filter for XBee didn't match. 2020-12-23 08:41:02.114 INFO : zigbee-adapter: SerialProber: Probing /dev/ttyACM0 at 38400 for deConz 2020-12-23 08:41:02.115 INFO : zigbee-adapter: SerialProber: Opening /dev/ttyACM0 at 38400 baud 2020-12-23 08:41:02.122 INFO : zigbee-adapter: SerialProber: Probing /dev/ttyACM0 ... 2020-12-23 08:41:02.125 INFO : zigbee-adapter: SerialProber: Sent: <Buffer c0 0d 01 00 05 00 ed ff c0> 2020-12-23 08:41:02.627 INFO : zigbee-adapter: SerialProber: closing /dev/ttyACM0 2020-12-23 08:41:02.629 INFO : zigbee-adapter: SerialProber: timeout: deConz dongle not detected on /dev/ttyACM0 2020-12-23 08:41:02.632 ERROR : zigbee-adapter: SerialProber: timeout: deConz dongle not detected on /dev/ttyACM0 2020-12-23 08:41:02.634 INFO : zigbee-adapter: SerialProber: /dev/ttyACM0 filter for cc2531 didn't match. 2020-12-23 08:41:02.635 INFO : zigbee-adapter: SerialProber: /dev/ttyAMA filter for XBee didn't match. 2020-12-23 08:41:02.636 INFO : zigbee-adapter: SerialProber: allowAMASerial 2020-12-23 08:41:02.637 INFO : zigbee-adapter: SerialProber: Probing /dev/ttyAMA at 38400 for deConz 2020-12-23 08:41:02.639 INFO : zigbee-adapter: SerialProber: Opening /dev/ttyAMA at 38400 baud 2020-12-23 08:41:02.640 INFO : zigbee-adapter: SerialProber: /dev/ttyAMA filter for cc2531 didn't match. 2020-12-23 08:41:02.641 INFO : zigbee-adapter: Serial ports that were found: 2020-12-23 08:41:02.642 ERROR : zigbee-adapter: [Error: Error: No such file or directory, cannot open /dev/ttyAMA] 2020-12-23 08:41:02.643 ERROR : zigbee-adapter: [Error: Error: No such file or directory, cannot open /dev/ttyAMA] 2020-12-23 08:41:02.713 INFO : zigbee-adapter: USB Serial Device 1cf1:0030 Vendor: dresden elektronik ingenieurtechnik GmbH Serial: DE2123125 found @ /dev/ttyACM0 2020-12-23 08:41:02.714 INFO : zigbee-adapter: Serial Device found @ /dev/ttyAMA* 2020-12-23 08:41:02.715 ERROR : zigbee-adapter: Failed to start add-on zigbee-adapter: No Zigbee dongle found

Should I attempt to use the patches to see if it resolves my issues?

SteveWiFi commented 3 years ago

I applied the two fixes and this has resolved my problem.

Thank you very much for the help!