Deconz loosing switches on reboot

Hello,

Have been pulling my hair out trying to fix this issue over the past few days.

Every time I reboot my server, Home Assistant is no longer getting passed any Deconz_events

I can see Deconz passing the events out and have tested restarting Deconz, the switches still work.

As soon as I reboot home assistant its no longer getting the deconz_events.

Wondering if anyone is having similar issue.

Deconz:
Product ConBee
Version 2.05.59 / 14/02/2019
Firmware 262F0500

HomeAssistant:
Docker
Version: 0.88.0b2

If you say that it stops working on reboot. When does it start working?

One possible issue could be that you areusinh an docker internal adress. Try changing IP for integration to the host adress

To rule out the IP as an issue I’ve been trying deconz installed in different ways. Its not working either via docker or a normal service on ubuntu directly.

To get a device to start working again I’m having to remove it from Deconz, remove the integration, add the integration and then add the device to deconz. After a restart it’ll again not work (Deconz_event) isn’t being generated in Home Assistant.

Just installed everything flat without the use of docker and still seeing this issue.

It has got to be either HA or Deconz.

Deconz does seem to be putting out the events etc.

Looks like I’m suffering from this:
https://github.com/dresden-elektronik/deconz-rest-plugin/issues/1185

Unfortunately only just got the deconz and when setting stuff up I have to test to ensure it goes past a power down / out, so likely I’ve seen an issue others may not.

If you haven’t added an extension cord to conbee i suggest trying that first.

You can also enable debug per component documentation instructions and look at the logs to see what you get from deconz

@Robban the extension cable keeps it away from interference coming from the box?

It is a combination of interference and timing sensitivity I believe

Coming back here to update what I did and results got.

Changed Deconz so it ran with debugging:
/usr/bin/deCONZ -platform minimal --http-port=8080 --dbg-aps=2 --dbg-zcl=1 --dbg-info=1

Checked the status with the following command:
journalctl --unit=deconz.service -n 100 --no-pager > /root/button.txt

(This gave me a good amount of data to review)

Within /root/button.txt found entries such as:
Feb 20 18:58:22 HomeAssistant deCONZ[3315]: 18:58:21:853 APS-DATA.indication srcAddr: 0x00158d0002b8b9ae, srcEp: 0x01 dstAddrMode: 2, profile: 0x0104, cluster: 0x0006,$
Feb 20 18:58:22 HomeAssistant deCONZ[3315]: 18:58:21:853 asdu: 181b0a00001001
Feb 20 18:58:22 HomeAssistant deCONZ[3315]: 18:58:21:853 button 1002 Normal release

Next step was to check the API, to do this I went into my .storage/core.config_entries and grabbed the deconz API Key (Shows next to “api_key”: in the deconz section).

Put into the web browser:
http://192.168.1.5:8080/api/021439ATTT/
(021439ATTT would be replaced by the api key)

The browser displays the buttons and their status:
{“battery”:100,“on”:true,“reachable”:true},“ep”:1,“etag”:“3654b973fd0f2eb3bde6991b96b0bec7”,“manufacturername”:“LUMI”,“mode”:1,“modelid”:“lumi.sensor_switch”,“name”:“Smart Switch Test”,“state”:{“buttonevent”:1002,“lastupdated”:“2019-02-20T18:53:46”},“type”:“ZHASwitch”,“uniqueid”:“00:15:8d:00:02:c7:ed:95-01-0006”}}}

When you click a button the button event will update (if a different event and also the lastupdated will update to the time you pressed the button).

This API is the same that Home Assistant looks at and therefore if anything doesn’t update here or isn’t present Home Assistant wont see it.

Looking at my issues I found two / did two things that may have led to it working:

  1. Changed the time zone on my armbian box to GMT, ensured computer was on GMT and do a reset of the gateway. My conbee was running on EST as my computer is set to that and the Armbian was set to UTC (I believe this was the main part causing the deconz event to not trigger and leading me to believe they were lost)
  2. Add a switch, check its working. reboot, Add another, check, reboot etc.

All now working even after reboot.

Although this issue has been painful I’m glad I’ve had it as its allowed me to get to grips with how deconz works and how deconz / home assistant interact with each other. Hopefully the write-up can help others in the future!

1 Like

Thanks form your post!
I’ve been trying to find out why my Deconz Ikea switch events from a RaspBee II stop working. The info on finding the API key and requesting the status from Deconz is useful - thanks.

What finally fixed my problem was resetting the time-zone in the Home Assistant ‘General Configuration’ page. Somehow it was set to UTC, whereas my Deconz is set to Zurich, CST. Setting to Zurich to match Deconz fixed the problem.

What I can’t understand, is why the switches were working before. Maybe the latest OS security update changed the time-zone to UTC.