deCONZ - Official thread

Try running the remove orphaned devices service if they have not been removed

After replacing my ConBee with ConBee II my Deconz has two gateways. How do I remove the old one?
image

My integration shows only one GW
image

I have tried to delete the Deconz integration, reinstalled, restarted the Pi, still two GWs.

Same here. Running the latest marthoc/deconz docker container on my Synology and the latest Conbee2 firmware. Even a complete fresh reinstall did not help.

Can anyone help understanding deconz and entities integration into HA?

I deleted some senors (a v1 of the sensor which had stopped reporting) and replaced it with a new sensor.

I called the new sensor the same name in deconz…

The new sensor however appears as sensor_2 in home assistant entities (after reboot)

the old sensors was also still present in the entities and there is no way to delete it…

This is driving me nuts…

Delete the integration, then re-add it that will clear up those old entries

there is also a service you can call to remove orphaned entries before adding others with same name
image

1 Like

Remove Orphaned Entries is the right answer here.

Removing the integration will create problems if you have renamed the entity names of devices. You would have to do all of those over again. And with deconz integration there is a feature to remove them. Unfortunately HA itself does not care much for removing devices and does not provide the developers of integrations a common UI to delete devices. And I repeat Devices! You can remove entities if and only if they are not owned by a device. But there is no feature to remove devices. Each integration has to invent their own ways to delete devices. Some still cannot do it at all. Others do their best like deconz. But it is well hidden. You may also sometimes have to restart HA after you run the removal service. I have seen that

That’s why i name them in deconz, i get the same if i need to remove the integration to clear up anything.

I use customise.yaml for all other device/entities i want to change name for, that way remove a device and as long as they get the same entity id as before they are the same. only a couple of times have i had to change the entity name to fix that up. used this way for last 4 years or so

I do the same. But we cannot assume all knows how to do it and how the names are converted to entity names (spaces, upper case, non alphanum characters). So the advice to remove the integration should be mentioned as the last option to try if nothing else works.

Updated to 2021.7 and the electricity usage stopped working on the Xiaomi wall switches.
I get the following in the logs:

2021-07-07 15:36:22 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/home/hass/homeassistant/lib/python3.8/site-packages/pydeconz/gateway.py", line 128, in session_handler
    self.event_handler(self.websocket.data)  # type: ignore
  File "/home/hass/homeassistant/lib/python3.8/site-packages/pydeconz/gateway.py", line 169, in event_handler
    device_class.process_raw({device_id: event})
  File "/home/hass/homeassistant/lib/python3.8/site-packages/pydeconz/api.py", line 40, in process_raw
    obj.update(raw_item)
  File "/home/hass/homeassistant/lib/python3.8/site-packages/pydeconz/api.py", line 126, in update
    async_signal_update()
  File "/home/hass/homeassistant/lib/python3.8/site-packages/homeassistant/components/deconz/sensor.py", line 166, in async_update_callback
    super().async_update_callback(force_update=force_update)
  File "/home/hass/homeassistant/lib/python3.8/site-packages/homeassistant/components/deconz/deconz_device.py", line 92, in async_update_callback
    self.async_write_ha_state()
  File "/home/hass/homeassistant/lib/python3.8/site-packages/homeassistant/helpers/entity.py", line 419, in async_write_ha_state
    self._async_write_ha_state()
  File "/home/hass/homeassistant/lib/python3.8/site-packages/homeassistant/helpers/entity.py", line 456, in _async_write_ha_state
    extra_state_attributes = self.extra_state_attributes
  File "/home/hass/homeassistant/lib/python3.8/site-packages/homeassistant/components/deconz/sensor.py", line 199, in extra_state_attributes
    attr[ATTR_CURRENT] = self._device.current
  File "/home/hass/homeassistant/lib/python3.8/site-packages/pydeconz/sensor.py", line 546, in current
    return self.raw["state"]["current"]
KeyError: 'current'

I could be barking at the wrong tree here but just want to understand what’s going on.

1 Like

It’s been reported here Phoscon/deCONZ no longer getting current from Aqara smart plugs · Issue #52481 · home-assistant/core · GitHub

I’ll try to fix it tomorrow evening

2 Likes

Tseven, saved me heaps of time! Thanks for the post. Last time spent hours rebuilding everything not knowing this solution…

1 Like

Does anyone knows how to set the attributes through the addons for the Hue bulbs not to be on after every electricity outage ?

I am running HAOS on a Raspberry Pi 4 using ZHA with a ConBee II. I had the issue where deCONZ would not start since the upgrade to 2021.7.0 or 7.1 All my zigbee devices were showing as unavailable. Role back to 6.6 all working fine again.

2021-07-12 14:13:59 ERROR (MainThread) [zigpy.application] Couldn’t start application

2021-07-12 14:13:59 ERROR (MainThread) [homeassistant.components.zha.core.gateway] Couldn’t start deCONZ = dresden elektronik deCONZ protocol: ConBee I/II, RaspBee I/II coordinator

The upgrade to 2021.7.2 seems to have fixed this, although I can’t see anything in the release notes specific to my issue.

The errors you’re posting is ZHA related and not deconz.

Hi all,

I’m trying to run the update script but i get this error:

Anyone knows what this means?

Trying again :slight_smile:

@lbouriez You have to click the second circle in the lights’ bar in deConz (bottom right in my screenshot), and then a menu pops out. (the thing with ‘Light Link’ at the top, just below the lights’ bar).
In that menu, click on ‘on/off’.

Next; make sure you’ve got the Cluster Attributes panel or sidebar enabled (your previous screenshot shows the Node Info panel, that is not the one you need). There you will see a ‘PowerOn OnOff’ line. Doubleclick on the value for that line, and in the popup that appears; click ‘read’. It now reads the setting of of the device. Select your preferred setting and hit ‘write’. if everything went correctly, after clicking ‘read’ again, it will show the new value.

2 Likes

@duncank , Thousands of thanks, it’s perfect, I set it up everywhere, I will do some tests later.

1 Like

Is it also possible to change the power on behaviour of lights using this method? I have a combination of Hue and Innr GU10 bulbs.

When the Hue bulbs are powered on the fade in, but the Innr bulbs will seem to wait for as long as the Hue bulbs took to reach full illumination and then they would instantly power on (no fade). The same behaviour happens when powering off (only in reverse).

Is this something that can be configured, or is it a limitation of the Innr GU10 bulbs perhaps?

I believe you can set the transition time with the onTime value in my screenshot. If that is not it; I’ve seen the word ‘transition’ somewhere in these settings, so you’ve probably got to look for that. :slight_smile:

1 Like