kkapitan / homebridge-homesung

A Homebridge plugin for Samsung SmartTV H and J models with the pairing protocol
MIT License
30 stars 5 forks source link

Delay in array #3

Closed Maimbe closed 6 years ago

Maimbe commented 6 years ago

I'm having trouble making an array, for example:

        {"name": "Open Netflix", "command": ["KEY_CONTENTS", "KEY_LEFT", "2 * KEY_ENTER", "KEY_RIGHT", "2 * KEY_ENTER"

I could not find a way to include 1 delay in the array.

kkapitan commented 6 years ago

Hi @maimbe, thanks for using this plugin!

Currently there is no way to include a delay between commands via config file. However this is a great feature request! I'll try to include the option to specify a global delay between commands per switch and also, as you've mentioned, per specific commands in the array. Will it solve your problem?

Maimbe commented 6 years ago

I WOULD LIKE IT, your plugin is the only one that worked on my TV, although at times the TV stops responding or gets a bit slow together with SIRI from the Iphone.

Thank you for developing it!

kkapitan commented 6 years ago

Hi, small update from me - my RPI arrived so I can finally work on turn on feature.

The thing is I've got a little emergency this weekend that needs to be addressed, so the next version should be released on Monday or Tuesday.

kkapitan commented 6 years ago

Version 0.2.0 is out! It should now be possible to include delay between the given keys. See commands for a detailed description of how to do it.

Feel free to test it and tell me what you think :)

The 0.2.0 contains also experimental way to power on the TV via hdmi-cec. See power for an instruction of how to set it up!

Maimbe commented 6 years ago

It worked very well, thank you.

About HDMI CEC I could not test because I do not have 1 HDMI cable from my PC to the Television

Maimbe commented 6 years ago

The problem I'm having is with the "KEY_POWEROFF" button, it works the first time, but after turning on the TV with the control, the "power off switch" on my homekit will not turn on again, causing me to have to talk for "siri":

Please turn on the TV so it understands and forces the new request to "power off"

kkapitan commented 6 years ago

I understand, I'll see what I can do, but in general the WIFI-based power option is less accurate than hdmi-cec one. I'll try to implement some kind of a ping to periodically check if TV is on.

Maimbe commented 6 years ago

Work fine a Delay!! Thx !!!!