tavicu / homebridge-samsung-tizen

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

[SWITCHS] Commands not sent - 5.2.7 #689

Open JasonGoldenDDT opened 1 month ago

JasonGoldenDDT commented 1 month ago

Attempting to create a switch that toggles Hue Sync app on/off.

Created this switch { "name": "Hue Sync", "power": true, "app": "3202205027312", "command": [ "KEY_EXT*3", "KEY_ENTER" ] }

I get this result in debug:

[7/25/2024, 10:14:18 AM] [Samsung TV] [DEBUG] { method: 'ms.remote.control', params: { Cmd: 'Click', DataOfCmd: 'KEY_EXT', Option: false, TypeOfRemote: 'SendRemoteKey' } }

The Samsung NQ90C TV using API opens the Hue Sync App as expected, however it only sends one key. It seems to ignore "#s" and "#" modifiers.

I am attempting to toggle the sync service on and off by sending the "KEY_ENTER" but I need a delay while the app loads. I attempted to use "PAUSE*0.5S" as noted in other threads on this similar topic, however that did not work. The switch would only send the first command.

I do not know if this is a new behavior, I have a switch for Multi-View that works fine and looks like this:

{ "name": "Multi-View", "power": true, "command": [ "KEY_MORE", "KEY_ENTER*2" ] },

The only difference there isn't an app associated with the commands.

I want this switch to open Hue Sync and toggle the service, then return to the previous input.

LMK what additional information I can provide to assist.

Homebridge: 1.8.4 (running on Mac) UI: 4.56.4 Plugin: 5.2.7 Node: 20.16.0 MacOS: 14.5

tavicu commented 1 month ago

You are asking too much from the Samsung API ... and even from the TV :)

Try a bigger pause time

JasonGoldenDDT commented 1 month ago

I've gotten it to activate mult-view 70% of the time, and it will launch the Hue Sync app but doesn't receive the "play" click.

I've tried incorporating a "pause" but so far I haven't found the right mix to improve its accuracy/response.

It's odd that this workflow is "too much" as it seems well within the use case for this plug-in.

tavicu commented 1 month ago

"too much" for TV. That's Samsung :)

Sometimes after a command the TV will not respond to another one.