dresden-elektronik / deconz-rest-plugin

deCONZ REST-API plugin to control ZigBee devices
BSD 3-Clause "New" or "Revised" License
1.9k stars 498 forks source link

False signals from Tradfri remotes? #472

Closed FezVrasta closed 5 years ago

FezVrasta commented 6 years ago

Sometimes my lights will turn on by themselves and I suspect it's because the Tradfri remotes are triggering signals without me pressing any button.

My setup is:

I'd like to know if there's any logging I can inspect to understand if what I suspect is true?

svenove commented 6 years ago

I experience the same each time deCONZ is restarted. It seems the last button on the remote is treated as if it was re-pressed. I'm using Homeseer and JowiHue-plugin.

Could this be what you are experiencing?

manup commented 6 years ago

From deCONZ view it seems to be correct, since just the last known state is reported in the REST-API also after a deCONZ restart.

I'm not sure how HA and JowiHue process the events but if the state.lastupdated is taken into account there should be no ghost events.

Kane610 commented 6 years ago

@manup HA doesn't care for that right now, is that recommended to get rid of false positives when restarting deconz?

wvuyk commented 6 years ago

@manup JowiHue does take lastupdated into account for certain sensors, but not all. For several remotes a new lastupdated time is send, even with reports without real updates, so these are quite hard to ignore? Especially when you need to enable double presses and such. If lastupdated would be set to report the real last update time it would be a lot easier to ignore these.

manup commented 6 years ago

@manup HA doesn't care for that right now, is that recommended to get rid of false positives when restarting deconz?

It depends how events in HA are triggered, after restart deCONZ won't trigger an button press event but there might be websocket events for config.reachable and config.battery which should not trigger any button press logic.

For remotes the state.lastupdated is only refreshed if a button was pressed (also the same button again) and it should be safe to use. If state.lastupdated is changed without a button being pressed when were would be an issue in deCONZ which needs to be fixed.

manup commented 6 years ago

@manup JowiHue does take lastupdated into account for certain sensors, but not all.

For several remotes a new lastupdated time is send, even with reports without real updates, so these are quite hard to ignore?

That shouldn't happen, see above the state.lastupdated is (should) happen for state.buttonevent only. Do you know which switches have this issue?

Especially when you need to enable double presses and such. If lastupdated would be set to report the real last update time it would be a lot easier to ignore these.

Hmm I don't understand, this is exactly what they do, if not we need to figure out which switches have this problem or which other attributes may interfere.

Kane610 commented 6 years ago

@FezVrasta you can enable debug with logger component in hass, then you can check the logs when your spontaneous trigger happens and we should be able to pinpoint if there is something in hass that ghost-fires an event

FezVrasta commented 6 years ago

The thing is that it's difficult to understand who triggered a light toggle, I can't seem to find a log of the automations, which would be very useful because my buttons are linked to automations to control the lights.

stale[bot] commented 5 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] commented 5 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.