ConBee ZigBee Stick and HA, will this work together?

I got some answers on deconz github about groups. There is no upstream solution. So I know a couple of
Ways of how to solve this

Fixed your two previous issues, the group rgb support was a stupid err from my side

Speaking of which, o think the event logging is under home assistant core? What’s the easiest way to enable only logging of events for deconz? To find/verify event ID and name of the “thing”. I saw the events of I returned logging to default but there’s way too much in there, why easy to filter out. Normally I’d check states and what not but obviously we don’t have switches and buttons on there. (Possibly not a deconz component problem but wondered if you knew)

Check here https://home-assistant.io/components/logger/

Oh logging of events? They are printed normally on the buss as INFO

2017-11-19 19:22:34 INFO (MainThread) [homeassistant.core] Bus:Handling <Event deconz_event[R]: id=tradfri_wireless_dimmer_, event=1002>

Also: I added the event_id in the battery sensor for the device.

  1. Reloading does indeed update the icon.
  2. ikea motion sensor is now working as expected for me (switch back to inactiv after 60s) dont know if it was a deconz update or just a temporary glitch…

Another observation:

I’m receiving “ghost” button events from my ikea remote control every 1-2 hours without touching it…

ghost event:

DEBUG (MainThread) [pydeconz.websocket] Websocket data: b'\x81~\x00\x84{"config":{"alert":"none","battery":47,"group":"33770","on":true,"reachable":true},"e":"changed","id":"1","r":"sensors","t":"event"}'
DEBUG (MainThread) [pydeconz.deconzdevice] Update {}
DEBUG (MainThread) [pydeconz.deconzdevice] Update {'reachable': True, 'group': '33770', 'battery': 47, 'on': True, 'alert': 'none'}
INFO (MainThread) [homeassistant.core] Bus:Handling <Event deconz_event[R]: event=1002, id=remote_control_1>

real button press event:

DEBUG (MainThread) [pydeconz.websocket] Websocket data: b'\x81s{"e":"changed","id":"1","r":"sensors","state":{"buttonevent":1002,"lastupdated":"2017-11-19T18:45:29"},"t":"event"}'
DEBUG (MainThread) [pydeconz.deconzdevice] Update {'lastupdated': '2017-11-19T18:45:29', 'buttonevent': 1002}
DEBUG (MainThread) [pydeconz.deconzdevice] Update {}
INFO (MainThread) [homeassistant.core] Bus:Handling <Event deconz_event[R]: event=1002, id=remote_control_1>

Great feedback!

  1. If you have the latest firmware of the motion detector you should be able to configure through API to change the time to go back to inactive.

Aah, of course! I forgot about config, it will of course trigger a new event. Will need to fix that.

Thanks!

The event is now as attribute in the battery sensor but the colors are still not available on the group i mention earlier, i now get an effect choice but still only color temperature.

Been away all weekend but thought i’d test my Xiaomi button. It comes through fine as an event I can see in the logs but it doesn’t seem to trigger the automation, will do some more testing. This is no doubt a config issue on my part.

- alias: 'Toggle Home Override'
  initial_state: 'on'
  trigger:
    platform: event
    event_type: deconz_event
    event_data:
      id: lumisensor_switchaq2_3
      event_data: 1002
  action:
    service: input_boolean.toggle
    entity_id: input_boolean.home_override

and obviously input_boolean.home_override works if i trigger the service.toggle manually in web UI.

Damnit! Works for me…

This qualifies as a group that gets color for me

‘1’: {‘devicemembership’: [], ‘lightsequence’: [], ‘multideviceids’: [], ‘scenes’: [], ‘lights’: [‘1’, ‘2’], ‘class’: ‘Other’, ‘hidden’: False, ‘etag’: ‘f9d3fb54cc291b138026a712645a4168’, ‘type’: ‘LightGroup’, ‘id’: ‘1’, ‘action’: {‘sat’: 127, ‘hue’: 0, ‘ct’: 443, ‘effect’: ‘none’, ‘colormode’: ‘ct’, ‘xy’: [0, 0], ‘on’: False, ‘bri’: 204}, ‘name’: ‘All lights’, ‘state’: {‘any_on’: True}}

Enable debug and it will be part of the 4th post after 2017-11-19 21:25:48 INFO (MainThread) [homeassistant.setup] Setting up deconz

Did a small change in how it evaluates when to enable features for lights, try it out and get back to me.

Been playing with the automations tonight. It took me a while to get my head around it, I wonder if it’s worth adding something more specific to the examples? I ended up with setting up the dimmer (which I guess would be fairly typical):

- alias: 'Toggle lamp from dimmer'
  initial_state: 'on'
  trigger:
    platform: event
    event_type: deconz_event
    event_data:
      id: remote_control_1
      event: 1002
  action:
    service: light.toggle
    entity_id: light.lamp

- alias: 'Increase brightness of lamp from dimmer'
  initial_state: 'on'
  trigger:
    platform: event
    event_type: deconz_event
    event_data:
      id: remote_control_1
      event: 2002
  action:
    - service: light.turn_on
      data_template:
        entity_id: light.lamp
        brightness: >
          {% set bri = states.light.lamp.attributes.brightness | int %}
          {{ [bri+30, 249] | min }}

- alias: 'Decrease brightness of lamp from dimmer'
  initial_state: 'on'
  trigger:
    platform: event
    event_type: deconz_event
    event_data:
      id: remote_control_1
      event: 3002
  action:
    - service: light.turn_on
      data_template:
        entity_id: light.lamp
        brightness: >
          {% set bri = states.light.lamp.attributes.brightness | int %}
          {{ [bri-30, 0] | max }}

I guess the 30 value is subjective. I haven’t worked out how to replicate the holding of the button down yet. Will have another mess about with this tomorrow! It’s great stuff so far.

Sure I can add these examples just as they are.

I don’t know about all buttons, but at least the Philips Hue Dimmer sends a code when the button is held for a longer period of time.

Strangely, also getting ghost events on a schedule. The dimmer has triggered 1002 just as @dkmh found. As I set up automations I can see it’s bounced on and off all night every 0.77 hours according to the usage graph on the IKEA light in Hass.

Yup that solve it. Colors on groups there is :wink:

I don’t have any outstanding issues at the moment but i am keeping an eye on the discussion you have with @simonporter007 and @dkmh on the ghost events since that is really important to be 100% stable

1 Like

This is probably since config events over websockets triggers an update. I should probably give the origin of the update as well, then I can filter out unwanted triggers. Just need to talk to upstream how to update attributes such as batteries for sensors without triggering a state updated signal

Yeah i figured, i had some similar problems.

It’s great that we catch all this now. Instead of after release

Do you have debug enabled so it’s possible to get some logs to verify that it is config events from Deconz?

I’ve just restarted it with these settings, in case you’d like something else set. Will see if it happens again.

default: info
logs:
      homeassistant.core: debug
      homeassistant.components.automation: debug
      homeassistant.components.device_tracker: warn
      homeassistant.components.discovery: warn
      homeassistant.components.http: warn
      homeassistant.components.deconz: info
      homeassistant.helpers.script: info
      homeassistant.exceptions: info
      py.warnings: error
      root: warn