Hi,
Ive been looking at trying to create a samsung plugin, without luck so far. It looks like the TVs work over websocket and the structure looks quite straightforward, although im not getting a connection at the moment. I saw a basic python ws script
import websocket
import json
import time
KEY_INTERVAL = 0.2
def send_key(key, repeat=1):
for n in range(repeat):
url = ‘ws://TV IP:TV PORT/api/v2/channels/samsung.remote.control’
connection = websocket.create_connection(url)
payload = json.dumps({
‘method’: ‘ms.remote.control’,
‘params’: {
‘Cmd’: ‘Click’,
‘DataOfCmd’: key,
‘Option’: ‘false’,
‘TypeOfRemote’: ‘SendRemoteKey’
}
})
connection.send(payload)
time.sleep(KEY_INTERVAL)
send_key(“KEY_MUTE”)
Can anyone think of a way of converting to the home remote?
John