deCONZ - Official thread

Thanks! I’ll be happy to give them more info if they need anything. Have you heard or seen anything from them about this issue so far?

Is it possible to downgrade the deconz version without having to reset all devices? Which version are you using?

As far as I can tell, I get state updates from all my deConz devices and I have no indications of incomplete pairing. However, since a couple of days back (after upgrading HA?), I keep getting these messages in the log:

Logger: websocket
Source: /usr/local/lib/python3.10/site-packages/websocket/_logging.py:66
First occurred: 12:13:03 AM (1 occurrences)
Last logged: 12:13:03 AM
websocket connected

and this:

Logger: websocket
Source: /usr/local/lib/python3.10/site-packages/websocket/_logging.py:62
First occurred: 1:37:33 AM (2 occurrences)
Last logged: 1:37:34 AM

Connection to remote host was lost. - goodbye
error from callback <bound method Listener.on_close of <PushBulletNotificationProvider(Thread-2, started daemon 140516877663024)>>: Listener.on_close() takes 2 positional arguments but 4 were given

I have no idea whether or not these log entries are relevant.
To test the deConz API, I created a couple of sensors using the REST Platform, and it works just fine. Then I used them as event triggers for some experimental automations, and that too works just fine. So why listening to deconz_event fails 100% beats me.

Hmm, what device are you expecting deconz_event from?

I just restarted my HA and then i lost connection to all devices.
I had to repair them all once again. i have attached a pastebin of my log before and under repair

Well, anything would be much better than nothing.
I’d expect my motion sensors, humidifiers, Air purifiers and definitely my Aqara Cube to generate events.

deconz_events are for when you typically don’t get entities, like remote controls or the cube. Those other ones should be represented by entities.

Sorry but I know nothing about reading the deconz logs, I only work on the integration side of things.

okay i will try the Deconz Discord

Hello all!

Another month and another release of Home Assistant so here comes another release log on Phoscon forum for the HA deCONZ integration

Here are the changes coming with Home Assistant 2023.1.0

My focus is still on reworking the UniFi integration and the progress has been a bit slow this month. I see a lot of good possibilities to put back into deCONZ integration that will help continue refining the integration.

I’ve gotten requests to buy me a coffee, I’m on Github Sponsors if you appreciate my work.

Cheers!

/Robban


For feature requests of the integration post an issue at pydeconz github

Exactly! And the strange thing is that even though I cannot see any deconz_event when listening for them, my automations based on deconz_event triggers still work, so obviously these events are coming in.
It would be great to be able to see them in the listener as well in order to examine parameter settings etc.

Hey Guys,

so I am currently migrating my HAOS RPI to a Ubuntu Machine (needed a bit more power for some addons). I have more or less managed everything but my whole Zigbee Network. I used to be running a Conbee 2 directly put into the USB Slot. Now I am doing the same with the stick put into the USB Port (no USB extension like the manual says or similar).
I havent exactly managed to get Deconz to run (it always said Password Wrong and resetting the password didnt work (also the delight pw)).
What seemed to initally work was the ZHA Integration, so I just went with this. ZHA also initially recognized all devices and I was able to control most of them (it hasnt connected to every Device but I guess thats just resetting those devices). After like one day the Integration seemed to stop working all together, after restarting HA I get the following error code:

2022-12-29 11:10:00.420 WARNING (MainThread) [homeassistant.components.zha.core.gateway] Couldn't start deCONZ = dresden elektronik deCONZ protocol: ConBee I/II, RaspBee I/II coordinator (attempt 1 of 3)

File "/usr/src/homeassistant/homeassistant/components/zha/core/gateway.py", line 172, in async_initialize

2022-12-29 11:10:12.091 WARNING (MainThread) [homeassistant.components.zha.core.gateway] Couldn't start deCONZ = dresden elektronik deCONZ protocol: ConBee I/II, RaspBee I/II coordinator (attempt 2 of 3)

File "/usr/src/homeassistant/homeassistant/components/zha/core/gateway.py", line 172, in async_initialize

2022-12-29 11:10:37.845 WARNING (MainThread) [homeassistant.components.zha.core.gateway] Couldn't start deCONZ = dresden elektronik deCONZ protocol: ConBee I/II, RaspBee I/II coordinator (attempt 3 of 3)

File "/usr/src/homeassistant/homeassistant/components/zha/core/gateway.py", line 172, in async_initialize

2022-12-29 11:10:37.847 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry ConBee II, s/n: DE2436686 - dresden elektronik ingenieurtechnik GmbH for zha

File "/usr/src/homeassistant/homeassistant/components/zha/__init__.py", line 111, in async_setup_entry

await zha_gateway.async_initialize()

File "/usr/src/homeassistant/homeassistant/components/zha/core/gateway.py", line 185, in async_initialize

File "/usr/src/homeassistant/homeassistant/components/zha/core/gateway.py", line 172, in async_initialize

Does anybody have a clue what the reason herefor is? Obviously I havent changed anything in the Python Scripts referenced.

You are asking questions about ZHA now. This is the thread for Deconz.

You say you run without extension cable for the dongle even though you know you should. There is a really good radio interference reason why the documentation says to use one. I am a professionel radio engineer and I understand why and can confirm that you limit the range severely if you place the dongle near a device that produce RF noise. There is nothing that produce noise like a computer. Broadband noise that goes up to several GHz. A 1-2 meter extension cable between a radio dongle and the computer is a must if you want a reliable system. And the USB dongle should not be placed on some other electronic device. Think of the dongle as an antenna and place it like you will place an antenna.

Same situation and workaround here.
Addon is restarted twice a day using an automation. But sometimes it hangs up in between.
I tried repairing devices, updating devices’ firmware but nothing helps. Hopefully the next release will do.

The developers are running an internal beta which looks really promising. Let’s hope the new year comes with increased stability :slight_smile:

Happy new years everyone!

2 Likes

Happy New Year to everyone - and to @Robban in particular who struggles continuously to help us all in every possible and impossible situations. Thank you for your never-ending support :blush::musical_note::boom:

4 Likes

Same issue here, but I have ConBee 1, the older version and on an Intel NUC.
Worked for many years without a hitch, started to do this allmost daily on November or December.
Restarting or replugging the dongle helps.

HI Guys,

can anyone help me with this:

Thank You

Strange problem I just face; for one of my ceiling lights (IKEA G10 bulb) I want to add separate switch (also IKEA) to turn it on/off and make it dimmable separate from all scenes I use in living room. Purpose is to use it as separate reading light. I tried to use prooven @KennethLavrsen solution for this, that works perfectly fine for many other lights. Here is the code I use (exact copy paste from other automation, with only entities id changed):

- alias: 'Increase reading light brightness'
  initial_state: true
  trigger:
    platform: event
    event_type: deconz_event
    event_data:
      id: reading_light_on_off_switch
      event: 1001
  action:
    - service: deconz.configure
      data:
        entity: light.ceiling_11
        field: "/action"
        data: {"bri_inc":254, "transitiontime":35}

- alias: 'Decrease reading light brightness'
  initial_state: true
  trigger:
    platform: event
    event_type: deconz_event
    event_data:
      id: reading_light_on_off_switch
      event: 2001
  action:
    - service: deconz.configure
      data:
        entity: light.ceiling_11
        field: "/action"
        data: {"bri_inc":-254, "transitiontime":35}

- alias: 'Stop brightness changes reading light'
  initial_state: true
  trigger:
    - platform: event
      event_type: deconz_event
      event_data:
        id: reading_light_on_off_switch
        event: 1003
    - platform: event
      event_type: deconz_event
      event_data:
        id: reading_light_on_off_switch
        event: 2003
  action:
    - service: deconz.configure
      data:
        entity: light.ceiling_11
        field: "/action"
        data: {"bri_inc":0}

Unfortunatelly it does not work. In log file I can see some errors associated with these automation (here is sample from trying to increase the brightness):

2023-01-14 16:26:47.669 ERROR (MainThread) [homeassistant.components.automation.increase_reading_light_brightness] Increase reading light brightness: Error executing script. Unexpected error for call_service at pos 1: 4 /lights/67/action method, PUT, not available for resource, /lights/67/action
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 451, in _async_step
    await getattr(self, handler)()
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 684, in _async_call_service_step
    await service_task
  File "/usr/src/homeassistant/homeassistant/core.py", line 1755, in async_call
    task.result()
  File "/usr/src/homeassistant/homeassistant/core.py", line 1792, in _execute_service
    await cast(Callable[[ServiceCall], Awaitable[None]], handler.job.target)(
  File "/usr/src/homeassistant/homeassistant/components/deconz/services.py", line 89, in async_call_deconz_service
    await async_configure_service(gateway, service_data)
  File "/usr/src/homeassistant/homeassistant/components/deconz/services.py", line 140, in async_configure_service
    await gateway.api.request("put", field, json=data)
  File "/usr/local/lib/python3.10/site-packages/pydeconz/gateway.py", line 167, in request
    response: dict[str, Any] = await self._request(
  File "/usr/local/lib/python3.10/site-packages/pydeconz/gateway.py", line 194, in _request
    _raise_on_error(response)
  File "/usr/local/lib/python3.10/site-packages/pydeconz/gateway.py", line 225, in _raise_on_error
    raise_error(data["error"])
  File "/usr/local/lib/python3.10/site-packages/pydeconz/errors.py", line 73, in raise_error
    raise cls(
pydeconz.errors.RequestError: 4 /lights/67/action method, PUT, not available for resource, /lights/67/action
2023-01-14 16:26:47.670 ERROR (MainThread) [homeassistant.components.automation.increase_reading_light_brightness] While executing automation automation.increase_reading_light_brightness
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/automation/__init__.py", line 546, in async_trigger
    await self.action_script.async_run(
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 1524, in async_run
    await asyncio.shield(run.async_run())
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 409, in async_run
    await self._async_step(log_exceptions=False)
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 453, in _async_step
    self._handle_exception(
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 476, in _handle_exception
    raise exception
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 451, in _async_step
    await getattr(self, handler)()
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 684, in _async_call_service_step
    await service_task
  File "/usr/src/homeassistant/homeassistant/core.py", line 1755, in async_call
    task.result()
  File "/usr/src/homeassistant/homeassistant/core.py", line 1792, in _execute_service
    await cast(Callable[[ServiceCall], Awaitable[None]], handler.job.target)(
  File "/usr/src/homeassistant/homeassistant/components/deconz/services.py", line 89, in async_call_deconz_service
    await async_configure_service(gateway, service_data)
  File "/usr/src/homeassistant/homeassistant/components/deconz/services.py", line 140, in async_configure_service
    await gateway.api.request("put", field, json=data)
  File "/usr/local/lib/python3.10/site-packages/pydeconz/gateway.py", line 167, in request
    response: dict[str, Any] = await self._request(
  File "/usr/local/lib/python3.10/site-packages/pydeconz/gateway.py", line 194, in _request
    _raise_on_error(response)
  File "/usr/local/lib/python3.10/site-packages/pydeconz/gateway.py", line 225, in _raise_on_error
    raise_error(data["error"])
  File "/usr/local/lib/python3.10/site-packages/pydeconz/errors.py", line 73, in raise_error
    raise cls(
pydeconz.errors.RequestError: 4 /lights/67/action method, PUT, not available for resource, /lights/67/action
2023-01-14 16:26:49.633 ERROR (MainThread) [homeassistant.components.automation.stop_brightness_reading_light] Stop brightness reading light: Error executing script. Unexpected error for call_service at pos 1: 4 /lights/67/action method, PUT, not available for resource, /lights/67/action
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 451, in _async_step
    await getattr(self, handler)()
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 684, in _async_call_service_step
    await service_task
  File "/usr/src/homeassistant/homeassistant/core.py", line 1755, in async_call
    task.result()
  File "/usr/src/homeassistant/homeassistant/core.py", line 1792, in _execute_service
    await cast(Callable[[ServiceCall], Awaitable[None]], handler.job.target)(
  File "/usr/src/homeassistant/homeassistant/components/deconz/services.py", line 89, in async_call_deconz_service
    await async_configure_service(gateway, service_data)
  File "/usr/src/homeassistant/homeassistant/components/deconz/services.py", line 140, in async_configure_service
    await gateway.api.request("put", field, json=data)
  File "/usr/local/lib/python3.10/site-packages/pydeconz/gateway.py", line 167, in request
    response: dict[str, Any] = await self._request(
  File "/usr/local/lib/python3.10/site-packages/pydeconz/gateway.py", line 194, in _request
    _raise_on_error(response)
  File "/usr/local/lib/python3.10/site-packages/pydeconz/gateway.py", line 225, in _raise_on_error
    raise_error(data["error"])
  File "/usr/local/lib/python3.10/site-packages/pydeconz/errors.py", line 73, in raise_error
    raise cls(
pydeconz.errors.RequestError: 4 /lights/67/action method, PUT, not available for resource, /lights/67/action
2023-01-14 16:26:49.634 ERROR (MainThread) [homeassistant.components.automation.stop_brightness_reading_light] While executing automation automation.stop_brightness_reading_light
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/automation/__init__.py", line 546, in async_trigger
    await self.action_script.async_run(
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 1524, in async_run
    await asyncio.shield(run.async_run())
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 409, in async_run
    await self._async_step(log_exceptions=False)
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 453, in _async_step
    self._handle_exception(
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 476, in _handle_exception
    raise exception
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 451, in _async_step
    await getattr(self, handler)()
  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 684, in _async_call_service_step
    await service_task
  File "/usr/src/homeassistant/homeassistant/core.py", line 1755, in async_call
    task.result()
  File "/usr/src/homeassistant/homeassistant/core.py", line 1792, in _execute_service
    await cast(Callable[[ServiceCall], Awaitable[None]], handler.job.target)(
  File "/usr/src/homeassistant/homeassistant/components/deconz/services.py", line 89, in async_call_deconz_service
    await async_configure_service(gateway, service_data)
  File "/usr/src/homeassistant/homeassistant/components/deconz/services.py", line 140, in async_configure_service
    await gateway.api.request("put", field, json=data)
  File "/usr/local/lib/python3.10/site-packages/pydeconz/gateway.py", line 167, in request
    response: dict[str, Any] = await self._request(
  File "/usr/local/lib/python3.10/site-packages/pydeconz/gateway.py", line 194, in _request
    _raise_on_error(response)
  File "/usr/local/lib/python3.10/site-packages/pydeconz/gateway.py", line 225, in _raise_on_error
    raise_error(data["error"])
  File "/usr/local/lib/python3.10/site-packages/pydeconz/errors.py", line 73, in raise_error
    raise cls(
pydeconz.errors.RequestError: 4 /lights/67/action method, PUT, not available for resource, /lights/67/action

What is wrong here? Any idea?

Replying to myself, as I found the problem; this procdeure works only on deconz lights group, not on individual lights. So I created single bulb group and everything works fine now.
I’m not sure if this is intended or is ti bug, but at least there is very easy solution :slight_smile:

The reason it did not work with a single light is that for some odd reason you have to use field: “/state” when it is a single light and field: “/action” when it is a group.

Here is the link to my post. I am happy so many found it useful

1 Like