tavicu / homebridge-samsung-tizen

Homebridge plugin for Samsung TV's with Tizen OS
MIT License
638 stars 86 forks source link

Command runs incorrectly first time after TV is on #592

Open chadjmorgan opened 1 year ago

chadjmorgan commented 1 year ago

I scanned through the closed issues and haven't found anyone else having this strange problem...

I setup two separate inputs to run two different commands, one to turn ECO mode on and one to turn ECO mode off:

"inputs": [
   {"name": "Eco Mode Off", "type": "command", "value": "KEY_MENU,KEY_DOWN*4,KEY_RIGHT,KEY_DOWN*3,KEY_ENTER*3,KEY_UP,KEY_ENTER,KEY_MENU*2"},
   {"name": "Eco Mode On", "type": "command", "value": "KEY_MENU,KEY_DOWN*4,KEY_RIGHT,KEY_DOWN*3,KEY_ENTER*3,KEY_DOWN,KEY_ENTER,KEY_MENU*2"}
]

The first time I run this once the TV is turned on, it seems to only do the first KEY_DOWN command 3 times instead of 4. If I run it again, it works perfectly and continues to work perfectly until I turn the TV off and on again. Then the same thing happens. Won't work correctly first time, but then all times after that first time, it works perfectly.

Has anyone came across this issue and able to fix it?

Thanks for an awesome plugin!

dabvid commented 9 months ago

I seem to get somewhat more reliable input by long tapping each key for 1 second so could be worth trying KEY_UP*1s etc. for each key press. Using a sequense to restart the art mode slideshow every week and has worked for a while now.