deCONZ - Official thread

Hi guys,

so now I had the situation again (deCONZ - Official thread - #3553 by jnc).
Pressing the button on the dimmer switch does not trigger anything in HA core but when listening to deconz_event in developer tools it indeed comes from the Add-On

de_conz log shows no errors and also in core there is just nothing de_conz related. Restarting HA core fixes the issue.

Worth mentioning is that this time (unlike before) it happened after power outage to the HA so my wild guess is that when HA started de_conz was not ready or the other way round. On the other hand if this was a fundamental communication issue between the containers we would not see the events fired and other de_conz devices would also not work.

Any ideas?

You were not clear in your answer to me when I asked if your automations uses device id or classic events. I hate the device id way with a passion. I know the event trigger is reliable and names predictable

Here is a complete automation for handling a 4 button Philips dimmer in my HA

- id: 'Bedroom_Dimmer'
  alias: 'Bedroom Dimmer'
  initial_state: 'on'
  mode: queued
  max_exceeded: silent
  trigger:
    platform: event
    event_type: deconz_event
    event_data:
      id: bedroom_switch
  action:
    - choose:
      # Normal ON dimmed
      - conditions:
          - condition: template
            value_template: "{{ trigger.event.data.event == 1002 }}"
        sequence:
          - service: light.turn_on
            data:
              entity_id:
                - light.bedroom
              brightness_pct: 50
      # Long press full brightness
      - conditions:
          - condition: template
            value_template: "{{ trigger.event.data.event == 1001 }}"
        sequence:
            - service: light.turn_on
              data:
                entity_id:
                  - light.bedroom
                  - light.bedroom_desk
                  - light.background
                brightness_pct: 100
      # Increase
      - conditions:
          - condition: template
            value_template: "{{ trigger.event.data.event == 2001 }}"
        sequence:
          - service: deconz.configure
            data:
              entity: light.bedroom
              field: "/action"
              data: {"bri_inc":254, "transitiontime":50}
      # Decrease
      - conditions:
          - condition: template
            value_template: "{{ trigger.event.data.event == 3001 }}"
        sequence:
          - service: deconz.configure
            data:
              entity: light.bedroom
              field: "/action"
              data: {"bri_inc":-254, "transitiontime":50}
      # Stop increase/decrease 
      - conditions:
          - condition: template
            value_template: "{{ trigger.event.data.event in ( 2003, 3003 ) }}"
        sequence:
          - service: deconz.configure
            data:
              entity: light.bedroom
              field: "/action"
              data: {"bri_inc":0}
      # Off
      - conditions:
          - condition: template
            value_template: "{{ trigger.event.data.event == 4002 }}"
        sequence:
          - service: light.turn_off
            data:
              entity_id:
                - light.bedroom
      # Off long press
      - conditions:
          - condition: template
            value_template: "{{ trigger.event.data.event == 4001 }}"
        sequence:
          - service: light.turn_off
            data:
              entity_id:
                - light.bedroom
                - light.bedroom_desk
                - light.background

      #default:

Note that the service call like this assumes deconz GROUP. Syntax differs for single lights for increase and decrease and stop

Sorry for not being clear -

I am using device id. I understand your point with them being random hex number but unless the device changes (which pretty much does not happen in years) they stay so I don’t care.

device_id: fd2cda60688bbce3d1e7c009b616bb2a
domain: deconz
platform: device
type: remote_button_short_press
subtype: turn_on
id: "on"

I had the same issue. After a reboot of the machine where HA is on, the Philips switch using device_id (generated by the visual editor) did not work. Only after restarting HA core the switch was working as expected. Now I changed to deconz_event (and pyscript) and that is working much better. My event handler:

@event_trigger("deconz_event", "id==soverom")
def sw_sytse_handler(event=None, **kwargs):
    # log.warning(f"sw soverom: {event}")
    if event == 1000:
        light.turn_on(entity_id=Lampen.sytse, transition=switch_on_time)
    if event == 2000:  # up
        light.turn_on(entity_id=Lampen.sytse, brightness_step=10)
    if event == 3000:  # down
        light.turn_on(entity_id=Lampen.sytse, brightness_step=-10)
    if event == 4000:
        light.turn_off(entity_id=Lampen.sytse, transition=switch_off_time)

I use the x000 event, as I assume that is the press button, and x002 is the release?

Hello all!

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

Just a small PR that fixes a change in deCONZ API, Air quality sensor PM reporting was broken out to its own type.

Here are the changes coming with


Home Assistant 2023.12.1


Home Assistant 2023.12.0

Cheers!

/Robban


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

I’m on Github Sponsors if you appreciate my work.

It is very nice to have these updates, but why does not my deCONZ update? I still have 2.22.02 with my Conbee II and my Home Assistant is 2023.12.0. I ordered Conbee III, because the migration should be easy. Unfortunately, the easy migration process requires 2.24, which I do not have. How can I update my deCONZ?

3 Likes

Dear Community!

After the need to set up the deconz integration new, I wondered why it only found 5 devices on the first attempt (there are much more).

Then I clicked again to add a hub, kept the phoscon device’s IP (a Raspberry Pi 2 with ConBee 2 HAT) and was happy to see that more devices were found. However, these now appear under a separate hub (despite it is the same device/IP). Well, I added the same hub again - and guess what? Yet some further devices were found; however, of course again under a separate (but actually the same) hub.

Maybe I did something wrong, but shouldn’t the integration find all devices all together in one attempt?

You cannot see this, but the 5 devices (5 Geräte) are all the same. Why the last shows 1 entity (1 Entität) but the previous last three do not, I have no clue. Some of the 5 devices are among the 15 devices (15 Geräte) shown in the second row, none of them are among the 42 devices (42 Geräte) in the first row.

Is there a way to merge these? If yes, how?

Or is merging in the end not necessary at all? Well, I would like to have it “clean” but if it is just “cosmetics”, maybe I should not bother.

Anyway, thanks a lot for sharing your thoughts on this. :+1:

.

when does deconz update to the new version, where we can use conbee3?

1 Like

Not sure what you mean with setting up deconz new. If you just removed the integration from HA then all the devices you see in Phoscon also show up in HA

So I assume you started all over with factory reset Conbee or Rasbee

You should only add the hub once in HA. What happens is that you keep on creating a new hub connection with a new key. Delete them all and only add it once inside Home Assistant. Make sure to restart home assistant after you removed the last hub before you add it again.

To pair devices you need to Add New Lights or Add New Plug etc from the Phoscon app. Devices need to be in pairing mode. You need to find out how as the procedure is very different. If you did not unpair the device before then they need to be factory reset to pair again. Usually by long presssing the button. Philips Hue bulbs are reset by using a Philips 4 button remote and holding it really close to the light bulb and press on and off simultaneously for a long time until the bulb flashes.

If for some reason not all devices in Phoscon are loaded into HA try to restart HA. That often solves things.

2 Likes

see this post :

smoltron

11d

It is very nice to have these updates, but why does not my deCONZ update? I still have 2.22.02 with my Conbee II and my Home Assistant is 2023.12.0. I ordered Conbee III, because the migration should be easy. Unfortunately, the easy migration process requires 2.24, which I do not have. How can I update my deCONZ?

1 Like

@KennethLavrsen

Sorry that my post was a bit unclear. I had no problems with the devices (lights, switches, plugs) on the phoscon/deconz side, but many of my devices were not caught within HA when adding the deconz integration.

But your reply helped me, as I then understood that the multiple instances of the (deconz) hub are due to each getting a new key, which is of course not what I want. The essential hint from you was to “restart home assistant after you removed the last hub before you add it again” - thank you! :blush:

1 Like

I have given up hope with deCONZ updates. Also, ZHA seems to be much nicer and it works with Conbee III.

1 Like

yeah, but with 100+ devices I dont want to start over. I will wait a little. Its christmas time so… maybe:-)

1 Like

That depends on how you run deconz.

Hi guys, looking for advice: I am thinking about moving my deCONZ from HA Addon to external device (docker on RPi) to decouple deCONZ from my HA. I tested now and the migration worked flawless, deCONZ is now running outside of HA and all entities are available. However some of my automations are based on events and it seems the these are now not fired. When I go to Developer tools - Events and want to listen to events there is no deCONZ available.
Am I missing something?

Do you mean deconz_event?

Yes, deconz_event seems to be missing.

On another note: the deconz_event question I have is based on an issue I have on my system which I am trying to migrate from RPi to VM on Proxmox.

After restore of backup the add-on starts, can see the Conbee stick but I cannot access the Phoscon app - when I click on it nothing happens. Tried three different browsers, cleared cache but just nothing works. Even when I reinstall the Addon it is the same. deCONZ VNC access works just fine.

This was the basic trigger to migrate to external deCONZ, maybe some hints on this one? :slight_smile:

You shouldn’t see the deconz_event on the event page you should just subscribe to it, do you get state updates for your other entities?

Unfortunately not - I just type deconz_event in the listen to field, Start listening but nothing appears then (I am testing with Hue motion sensor). The state of the entity changes however.