Open StancuFlorin opened 7 years ago
Sometimes i get 123. I didn't was able to find why. I run the same test again and again.
$ samsungctl --host 192.168.100.4 KEY_1 KEY_2 KEY_3 KEY_ENTER
have the same behavior
Tested on Samsung UE49K5502
Try to add a small sleep between sending the keys... 0.1 or 0.2 seconds should be enough
Samsungctl already waits a bit between the keys, but the current time might not be long enough in some cases. Try to tweak one of these values (depending on if you use legacy or websocket):
https://github.com/Ape/samsungctl/blob/master/samsungctl/remote_legacy.py#L59 https://github.com/Ape/samsungctl/blob/master/samsungctl/remote_websocket.py#L59
We can commit the correct value for everybody if it helped. Or we can make this parameter configurable if there is any need for that.
I have created the pull request: https://github.com/Ape/samsungctl/pull/43
Are you saying that it actually helps to reduce the value? Does this fix your problem consistently? What is the lowest value that works for you?
Yes. It is weird, but this configuration is working.
Is there not a way to do like an async / await type of logic on the requests? Is it the TV that is not fulfilling the remote requests?
I have something like this
with samsungctl.Remote(configremote) as remote: for digit in channel: remote.control("KEY" + digit) remote.control("KEY_ENTER") print 'The channel was changed to ', channel
but the problem is that each time the second command is not sent
If channel is "123" on my TV i get only 13.