Open lgretton opened 5 years ago
Maybe not quite the same issue but have you tried the work around posted here https://github.com/mozilla-iot/zigbee-adapter/issues/106#issuecomment-471153598?
Seems the UI allows the found device to be saved even though pairing hasn't yet completed. Turn on frame level debugging see https://github.com/mozilla-iot/zigbee-adapter/issues/84#issuecomment-454113905, watch the log file and only save once the pairing has actually completed.
The debug output above is already at frame level (see line 8). During pairing no discovered devices are shown in the UI, it just chugs away and then tells me nothing was found. If it wasn't for the debug output I wouldn't be aware that the dongle has communicated with the device at all.
I've tried deleting the json file, resetting the dongle (by unplugging and replugging), no change.
I see this message:
2019-03-27 08:21:38.094 INFO : zigbee: Rcvd: Explicit Rx 8418260000cbbafc ZDO 0013 End Device Announcement (0x0013) status: none (undefined)
which tells me that the dongle was able to successfully pair with the device. Looking at the json file, it looks like all of the information was collected. So this tells me that the device should either already be shown as a thing, or it should be showing in the list of new devices. The + screen shows devices which the adapter knows about but which aren't already shown as a thing.
Further debugging would be to run some scripts from this repository: https://github.com/mozilla-iot/curl-examples
First run the login.sh script, and then run the get-things.sh script. This will report all of the things that the gateway knows about. We need to check and see if there is a device already there with an href of "/things/zb-8418260000cbbafc"
Rebooting the gateway might also help, as I think I've seen cases where the gateways notion of the devices and the adapters notion of the devices get out of sync.
When resetting the dongle *by unplugging and replugging" you also need to disable/re-enable the zigbee adapter as it doesn't detect the insertion of the dongle.
If none of that is fruitful, then we can enable some more debugging in the zigbee-adapter. In particular, goto Settings->Addons and click Configure for the Zigbee adapter and then add
classifier, flow, node
to the options already there (presumably frames).
I'd just written a very long reply having followed all your advice, and then by accident discovered the issue.
I've got the gateway running on a Pi which is fronted by another system ProxyPassing to it within an Apache virtual host. There must be something not quite right about my Apache configuration on the proxy because as soon as I try the Pi directly I see the things in the UI. When going through the proxy the things aren't displayed!
Apologies for the confusion and thanks for all your help, I'll work this one out myself.
Our gateway also relies on websockets, so I'm guessing that there might be an issue if the websockets aren't also being proxied.
Thanks - I'm mostly there now, just by including the wstunnel proxy mod in Apache. The thing UI at the point of pairing still doesn't appear, and all things are shown as being disconnected when viewing their properties (though I can still operate them). I guess somewhere in the code the addon is connecting directly to itself, being unaware of the address I wish it to use.
I'm using a Digi-Key Xstick. I've managed to get a single Osram lightbulb paired in the past, but after a reinstall when trying to pair some other devices unsuccessfully (a Xiaomi motion sensor and Ikea bulb) I now can't get anything to pair, at least not as far as the UI is concerned.
From the debugging output it seems that maybe the code just isn't communicating with the UI. Below is what happens when the gateway is started, followed by a reset of the bulb while trying to pair again. Any idea what's wrong? I've tried resetting everything and deleting the zb-.json file, all to no avail. The json file even shows my Ikea bulb, though I've never successfully paired it.
Bulb reset and pairing attempted:
Here's the zb-0013a200415872b1.json file.