g30r93g / homebridge-panasonic

A Homebridge plugin for Panasonic Viera TV's. Written to support the new Homekit TV accessory.
MIT License
21 stars 3 forks source link

TV will turn on, if sensor detects no one is at home #19

Open albi opened 5 years ago

albi commented 5 years ago

I have the people plugin running in homebridge that detects if someone, or no one is at home. I've setup a scene to turn off all kind of things at home when the sensor detects that no one is at home. Until now, and another panasonic plugin running, even the TV would turn off.

But now with this plugin, the TV would even turn on when the scene is called. I think the plugin does not check the current status and just switches to the other state. So in my case, the TV is off, I leave the house, the plugin turns on the TV.

Currently I have the TV removed from the scene, just to be sure the TV does not turn on when I leave.

g30r93g commented 5 years ago

Hi! I don't really know why this is happening. The automations check the states of all selected devices before, and this is the same as you loading your HomeKit client and having all devices refresh and update. If you have another plugin for Panasonic TV's, it may clash with this one, causing two requests to the tv to change power state.

albi commented 5 years ago

There is only this plugin running for the TV. Maybe you toggle the power state, like when it's off it turns on and vice versa. So if I leave home, the powered off TV will turn on. But if the TV is already running it will turn off when I leave.

albi commented 4 years ago

Still having this issues. It is like a toggle that is switched each time the plugin is called. When the TV is off and my scene "Turn everything off" is running the TV will turn on. If I call the scene a second time, the TV is switched off. I think the command from the plugin changes the state on/off but does not recognize if the TV is already off.

g30r93g commented 4 years ago

Hi @albi. I'll have a good look into this and get this working for you. I have improved the stability of the TV's power state in 6.3.0 but I don't think it'll have much of an effect on this issue. Could you update anyway and please let me know if this still happens. Thanks in advance :)

albi commented 4 years ago

@g30r93g what should I say? THANK YOU! It is working as expected!

albi commented 4 years ago

False alarm. It still turns on the TV even if I have "deactivate" in my automation. It changes the state to the other one. If the TV is on, it turns the TV off. But if the TV is already off, it turns the TV on. :(

g30r93g commented 4 years ago

I have a feeling this and the TV remote situation are linked so solving one will also solve the other. I'll be working hard on this to try and get this sorted.