Philips Hue Dimmer Switch - ghost reports

i hope/guess so…
if im not mistaken there were 2 threads that were merged, and solved.
is there a way to implament the “fix” any sooner?

my dimmer is the “old” generation, without the “hue” logo on the front.
you have the newer version, and all i have described is not relevant for it anymore?

i took a snapshot to better explain what i see onscreen:

That’s still correct for the V2 version. It just doesn’t seem to work (yet?) :roll_eyes:

weird.
did you came across others with similar problem on the v2 dimmer switch? is that a well known vast problem with this device, or its just weird thing that is on your end only?

I’m probably just confused by all the random switching on and off - I’ll test again when that’s fixed. The fix is in the next update, apparently:

you need to remember that with the ha configuration, there is no “off” anymore. just two different triggers- “button released after short, or, long press”
meaning:

  1. “press and release”,
  2. “press, hold *, and release”
  • (hold for about 2 sec - you can release after the small led on the deimmer blinked for the second time)

“dimm up”, “dimm down”, “on” and “off” are just “buttons” in a row for HA. each can preform whatever 2 tasks you like (‘short’ press and ‘2 sec’ press)

hope this is clear enough and helpful

cheers

This issue intrigued me so I created an automation to detect hue_event and report it as a persistent_notification. So far, the only events that have been reported are the real ones produced when I operate the dimmer-switch and no “ghost” events. Tested with 2021.7.2 and first model of Philips Hue Dimmer Switch.

- alias: Monitor Hue Dimmer Switch Events
  id: monitor_hue_dimmer_switch_events
  trigger:
  - platform: event
    event_type: hue_event
  action:
  - service: notify.persistent_notification
    data:
      title: 'Hue Event {{ now().timestamp() | timestamp_local }}'
      message: >
        {% set buttons = {1:'ON', 2:'INCREASE', 3:'DECREASE', 4:'OFF'} %}
        {% set events = {0:'press', 1:'hold', 2:'release', 3:'hold_release'} %}
        {% set event = trigger.event.data.event | int %}
        {% set b = event // 1000 %}
        {% set e = event % 1000 %}
        id: {{ trigger.event.data.id }},
        button: {{ buttons[b] if b in buttons.keys() else 'UNKNOWN' }},
        event: {{ events[e] if e in events.keys() else 'unknown'}} ({{ event }})
  mode: queued

Sample output after pressing ON then OFF.

1 Like

Using your excellent code (how do you knock it out so fast? :wink:) I get similar results:

However, only the top two were the result of a button press. The kitchen dimmer switch event appears to have been triggered by a motion sensor detecting movement.

The practical effect is that the bathroom light goes on and off every 10 minutes or so.

image

The implication is that the Hue integration may be misreporting the motion-sensor event as a switch-button event?

Unfortunately, I can’t test that scenario because I don’t have a Hue motion sensor.

I think so. I’ve been out of the house for the last half hour (walking the dog :roll_eyes:) and there are now a couple more:

image

The kitchen one is me coming back in, but I’ve no idea where the bathroom one comes from. The light is now off.

@tennbaum Do you have motion sensors?

i do.
3 of them.
the light sensor became very unresponsive (could take up to 2m to update), but motion and temp works good.

Looks like that’s it.

If movement in view of a motion sensor is reported as a button-action event then that’s obviously incorrect.

My automation doesn’t report all of the event data that’s available, only what I believed to be most important namely id (the device’s name) and event (a four-digit number). Maybe there’s something else in the event’s data (although I doubt it) that is also included when the event is produced by the motion sensor (versus the dimmer-switch).

To be certain, I suggest you use Developer Tools > Events to inspect the actual hue_event messages generated when the motion sensor reports motion.

Screenshot from 2021-07-31 13-46-21

Click ‘Start Listening’ and then move in front of the motion sensor. The event data will be displayed in JSON format. I predict the data will look exactly the same as what a button-action produces, which means there’s a bug in the integration.

hey man

was trying to help, but for some strange reason the motion sensors do not registar as “hue_event”.
just to check, i tried the dimmer switch - and it does.

i put * and got you the reporting of the sensor:
{
“event_type”: “state_changed”,
“data”: {
“entity_id”: “sensor.hue_motion_sensor_1_light_level”,
“old_state”: {
“entity_id”: “sensor.hue_motion_sensor_1_light_level”,
“state”: “13.0”,
“attributes”: {
“state_class”: “measurement”,
“battery_level”: 100,
“lightlevel”: 11142,
“daylight”: false,
“dark”: true,
“threshold_dark”: 26768,
“threshold_offset”: 7000,
“unit_of_measurement”: “lx”,
“friendly_name”: “kitchen light level”,
“device_class”: “illuminance”
},
“last_changed”: “2021-07-31T18:28:48.028454+00:00”,
“last_updated”: “2021-07-31T18:28:48.028454+00:00”,
“context”: {
“id”: “8c3bad55a592417750c30da93dae9e58”,
“parent_id”: null,
“user_id”: null
}
},
“new_state”: {
“entity_id”: “sensor.hue_motion_sensor_1_light_level”,
“state”: “22.92”,
“attributes”: {
“state_class”: “measurement”,
“battery_level”: 100,
“lightlevel”: 13604,
“daylight”: false,
“dark”: true,
“threshold_dark”: 26768,
“threshold_offset”: 7000,
“unit_of_measurement”: “lx”,
“friendly_name”: “kitchen light level”,
“device_class”: “illuminance”
},
“last_changed”: “2021-07-31T18:28:53.019733+00:00”,
“last_updated”: “2021-07-31T18:28:53.019733+00:00”,
“context”: {
“id”: “90cfb82bc234878dbbc28d7a771457ba”,
“parent_id”: null,
“user_id”: null
}
}
},
“origin”: “LOCAL”,
“time_fired”: “2021-07-31T18:28:53.019733+00:00”,
“context”: {
“id”: “90cfb82bc234878dbbc28d7a771457ba”,
“parent_id”: null,
“user_id”: null
}
}

defiantly not registering as the dimmer switch - hope this help

Sorry. No events when I move in front of a motion sensor, although on my floorplan I can see their state-icons firing. When I press the button on the dimmer switch I get:

Also the notifications:

image

Same here.
that’s also my outcome for a dimmer switch press

OK, if no one gets a hue_event generated when motion occurs then that’s a good thing.

Now the challenge is to correlate the ‘ghost’ hue_event with something (if anything) that occurs at the same time. You could refer to logger or even inspect the database for anything that happened at the exact same time (within a second or so) as the ‘ghost’ event.

If nothing else occurs at the same time then it becomes a bit more mysterious and might be due to something unusual like a misbehaving dimmer-switch. I’ll keep an eye on my system and let you know if it reports any ‘ghost’ events.

Same problem here… not only with a dimmer switch (started some weeks ago) - last night also with a Hue Button (which is our doorbell… got woken up 2 times - wifey was not happy)

Nothing in the logs 3min+ before the event…

This PR confirms the presence of the problem and corrects it.

It was allegedly included in 2021.8.0.

Since a few days I do not get any hue_events anymore. Anyone else can confirm this? WHen listening to hue_event not a single event comes along when I press a button on a hue dimmer switch.