You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It seems that if only one keycode is given it gets ignored. Debugging this time.sleep(delay) doesn't get called so the websocket disconnects as soon as it has sent the command, which seems to mean my TV ignores the request. Making the time.sleep run on every key solves this for me.
The text was updated successfully, but these errors were encountered:
While True:
message = yield from websocket.recv()
parsed = json.loads(message)
if (parsed['event'] == 'ms.channel.connect'):
k = 0
for key in _keys:
k = k + 1
cmd = '{"method":"ms.remote.control","params":{"Cmd":"Click","DataOfCmd":"%s","Option":"false","TypeOfRemote":"SendRemoteKey"}}' % key
yield from websocket.send(cmd)
if k != len(_keys):
time.sleep(delay)
break
time.sleep(delay)
finally:
yield from websocket.close()
It seems that if only one keycode is given it gets ignored. Debugging this time.sleep(delay) doesn't get called so the websocket disconnects as soon as it has sent the command, which seems to mean my TV ignores the request. Making the time.sleep run on every key solves this for me.
The text was updated successfully, but these errors were encountered: