Deconz Xiamo switch not intergrated on Home Assistant

Hello every body,

It’s my firts post here (I think not the last) :

I install Deconz (Conbee2) and in the Phoscon Gateway I can see the Xiaomi switch (switch WXKG01LM) pairing but when click Integration on Home Assistant I just have the Gateway and a sensor light but not my device.

I try reboot, delete and integrate again but I always the same issue.

Any idea ?

Thx

Vincent

Hi Vincent

What is your hardware platform and how is HA setup, ie. are you using Hassio etc.

I use rpi 3b with Hassio.
I use the hassos image 32bit recommended

Thanks Vincent

I have found that sometimes that HA starts up before the deconz module.

To test this from Configuration>>General restart Hassio instead of the whole pi.

Does this help?

I don’t understand !

@meremortal no it’s the same with hass.io reboot.

But I have the other devices (sensor) visible

Switches do not show up as entities inside of HA, they trigger events.

If you go to the event page (looks like this, or like this in newer versions), on the right side you should see “Available Events” and under that heading there should be an event named “deconz_event”. If not, click the button on the switch to make the event occur at least once.

At the bottom of the page should be a place to to type an event to subscribe to, and a button to “start listening”. Enter “deconz_event” in the text box and click start listening. Then press the button. There are separate events for single, double, tripple, long clicks, etc. All possible events are listed here. Everything you need to use them in an automation is shown in the event that gets triggered.

To use them in automations, you do something like this:

  trigger:
    - platform: event
      event_type: deconz_event
      event_data:
        id: laundry_room_switch
        event: 1004
7 Likes

Perfect !

It’s works :smiley:

1 Like

I now have the switch running, great, thanks!

But how can I make automations on the Aqara cube because it has lots of states according to the phoscon app?

Hope someone can help

Different automations for different states

I added the event types via this forum post!

Is there a way to add the rotate functionality within Deconz I cannot seem to find a solution for that.

Thanks.

If you can share debug logs on how it looks I will be sure to add support for it

These are my working automations for all other events on the cube:

  ### Aqara cube
- alias: Cube event flip180
  trigger:
    platform: event
    event_type: deconz_event
    event_data:
      id: cube
  condition:
    condition: template
    value_template: >
      {% set valid_events = [1006, 6001, 2005, 5002, 3004, 4003] %}
      {{ trigger.event.data.event in valid_events }}
  action:
    service: light.turn_off
    entity_id: light.bloom_keuken, light.bloom_kast

- alias: Cube event flip90
  ...
  condition:
    condition: template
    value_template: >
      {% set valid_events = [1002, 1003, 1004, 1005, 2001, 2003, 2004, 2006, 3001, 3002, 3005, 3006, 4001, 4002, 4005, 4006, 5001, 5003, 5004, 5006, 6002, 6003, 6004, 6005] %}
      {{ trigger.event.data.event in valid_events }}
  ...

- alias: Cube event tap_twice
  ...
  condition:
    condition: template
    value_template: >
      {% set valid_events = [1001, 2002, 3003, 4004, 5005, 6006] %}
      {{ trigger.event.data.event in valid_events }}
  ...

- alias: Cube event shake_air
  ...
  condition:
    condition: template
    value_template: >
      {% set valid_events = [7007] %}
      {{ trigger.event.data.event in valid_events }}
  ...

- alias: Cube event move
    ...
  condition:
    condition: template
    value_template: >
      {% set valid_events = [1000, 2000, 3000, 4000, 5000, 6000] %}
      {{ trigger.event.data.event in valid_events }}
  ...

Don’t know what debug logs I can send you to make the rotate event work?

How to enable debug is documented in deconz integration documentation.

But are there other rotation events than those you already cover?

Unfortunately I cannot seem to find the debug log for Deconz. There are a lot of states in the cube but there is only one rotate event I can use. If I know how to call the ‘rotate’ event it should work just fine.