DeCONZ, ZHA and Zigbee components and compatible hardware

Yes, it’s the correct id:

2018-07-20 12:10:29 DEBUG (MainThread) [pydeconz.deconzdevice] lumi.sensor_switch: update buttonevent with 1004
2018-07-20 12:10:29 DEBUG (MainThread) [pydeconz.deconzdevice] lumi.sensor_switch: update lastupdated with 2018-07-20T11:10:29
2018-07-20 12:10:29 DEBUG (MainThread) [pydeconz.websocket] Websocket data: {"e":"changed","id":"4","r":"sensors","state":{"buttonevent":1004,"lastupdated":"2018-07-20T11:10:29"},"t":"event"}

It’s just weird as it works just fine with the other switches, the only difference is that this one is the round one and my others are square.

So if I understand this correctly, deconz sends the events to pydeconz who updates the state, but no event inside Hass is visible in the logs or sent ?

That’s the thing, this is the full log with debug:

2018-07-20 14:27:55 DEBUG (MainThread) [pydeconz.deconzdevice] lumi.sensor_switch: update buttonevent with 1004
2018-07-20 14:27:55 DEBUG (MainThread) [pydeconz.deconzdevice] lumi.sensor_switch: update lastupdated with 2018-07-20T13:27:55
2018-07-20 14:27:55 INFO (MainThread) [homeassistant.core] Bus:Handling <Event deconz_event[R]: id=lumisensor_switch, event=1004>
2018-07-20 14:27:55 DEBUG (MainThread) [pydeconz.websocket] Websocket data: {"e":"changed","id":"4","r":"sensors","state":{"buttonevent":1004,"lastupdated":"2018-07-20T13:27:55"},"t":"event"}

Shouldn’t I have this lumi.sensor_switch also on HA states (HA-host/dev-state)?
It’s not there at all, even though it shows up when HA starts (listing every sensor):

   '4': {'config': {'battery': None,
                      'on': True,
                      'reachable': True,
                      'temperature': None},
           'ep': 1,
           'etag': '13b0bcd0024ad90548fa3c6124118b84',
           'manufacturername': 'LUMI',
           'mode': 1,
           'modelid': 'lumi.sensor_switch',
           'name': 'lumi.sensor_switch',
           'state': {'buttonevent': 1004,
                     'lastupdated': '2018-07-20T13:25:01'},
           'type': 'ZHASwitch',
           'uniqueid': '00:15:8d:00:02:24:49:cc-01-0006'},

The error is as suspected. You have written lumi.sensor_switch, whereas the I’d is lumisensor_switch
At the moment hass doesn’t list this kind of event in the gui yet

Hi Robban,

Thanks for that but where did you see it’s lumisensor_switch? The id coming from DeCONZ is lumi.sensor_switch.
For the sake of it, I tested with lumisensor_switch and it also didn’t work

Edit: I stand corrected, just switched the lumisensor_switch and it worked but the question is. How come it’s lumisensor if the id coming is lumi.sensor? I haven’t noticed that before but the water leak sensor has also lumisensor (altogether).

The id is slugified version of the deconz name. Since events has a limited amount of characters supported.

I will make sure to update the documentation to be clearer about this.

It can be read in the event itself 2018-07-20 14:27:55 INFO (MainThread) [homeassistant.core] Bus:Handling <Event deconz_event[R]: id=lumisensor_switch, event=1004>

1 Like

Man, I didn’t see it heh
I ran the full debug so I could see everything and you spotted!
I actually tend to use what is on the 5th field so that’s why.
Anyway, thanks again for the help!

You’re welcome. It is good with this troubleshooting, helps improve the documentation

1 Like

Hi!

I’m running the deCONZ plugin in Hassio to control a few Trådfri lamps - works great. Now I just bought a Trådfri remote, and it seems I need to update the firmware to get it to work (?).

Is that possible to do with my setup?

Thanks,
Ville

To upgrade remotes and similar devices it is needed to use the desktop software for some reason

Hey @Robban, just installed the desktop SW on a windows PC but I cannot get it to connect to the RaspPI with Hass.IO and DECONZ installed. Is there some steps to set this up?

It would be great if it worked like that. But unfortunately you need to have the hardware running on the same machine s the desktop software

Bummer … :slight_smile:

How can I see the Zigbee mesh when running a hat on RaspberryPI with Deconz?

You need to run a second sd card with a full desktop environment and have a copy of the deConz folder

Ok understand. So no RestAPI or anything similar… that is a shame. :slight_smile: Well, it works well in any case but the nerd in me wants to see more!

I hear you!

Hi guys,

I’ve two Xiaomi Switches that stopped working after the last deconz add-on update.

One is an aqara smart switch.

download

It’s showing only the battery.

41

The second is a Wireless Double Switch:


And its showing like that:
46

Any help?

Don’t spam by posting the same question in multiple threads. You need to have a bit of patience :+1:

Hi @Robban, i have 2 Xiaomi wireless switches, the round one, and in deconz on Hassio they are configured
as lumi.sensor_switch and lumi.sensor_switch (2) as you can se in the log

2018-12-01 12:16:44 DEBUG (MainThread) [pydeconz.deconzdevice] lumi.sensor_switch (2): update buttonevent with 1000
2018-12-01 12:16:44 DEBUG (MainThread) [pydeconz.deconzdevice] lumi.sensor_switch (2): update lastupdated with 2018-12-01T11:16:44
2018-12-01 12:16:44 DEBUG (MainThread) [pydeconz.websocket] Websocket data: {"e":"changed","id":"11","r":"sensors","state":{"buttonevent":1000,"lastupdated":"2018-12-01T11:16:44"},"t":"event","uniqueid":"00:15:8d:00:02:14:ed:9f-01-0006"}
2018-12-01 12:17:05 DEBUG (MainThread) [pydeconz.deconzdevice] lumi.sensor_switch: update buttonevent with 1000
2018-12-01 12:17:05 DEBUG (MainThread) [pydeconz.deconzdevice] lumi.sensor_switch: update lastupdated with 2018-12-01T11:17:05
2018-12-01 12:17:05 DEBUG (MainThread) [pydeconz.websocket] Websocket data: {"e":"changed","id":"5","r":"sensors","state":{"buttonevent":1000,"lastupdated":"2018-12-01T11:17:05"},"t":"event","uniqueid":"00:15:8d:00:01:e7:32:6c-01-0006"}

and automations like these:

- alias: 'Accendi luce Marco'
  trigger:
    platform: event
    event_type: deconz_event
    event_data:
      name: 'lumi.sensor_switch'
      event: 1000
  condition: 
    - condition: state
      entity_id: 'light.marco'
      state: 'off'   
    - condition: state
      entity_id: 'light.dimmable_light_1'
      state: 'off'       
  action:
    service: light.turn_on
    data:
      entity_id: light.marco   
      brightness_pct: 30
      rgb_color: ['255', '153', '51']


- alias: 'Accendi luce Silvia'
  trigger:
    platform: event
    event_type: deconz_event
    event_data:
      name: 'lumi.sensor_switch (2)'
      event: 1000
  condition: 
    condition: state
    entity_id: 'light.silvia'
    state: 'off'
  action:
    service: light.turn_on
    data:
      entity_id: light.silvia   
      brightness_pct: 30
      rgb_color: ['255', '153', '51']

but if I press one switch both are triggered. How can I change the switch name since I do not see them on phoscon app?

There is an example on how to change names or devices using the hass deconz service. You will still need to enable debug to get the proper device if from Deconz first though