samsungctl
samsungctl copied to clipboard
"ms.channel.unauthorized" While trying to connect to TV
I'm using samsungctl library with the following code to try to control samsung smart tv `config = { "name": "Samsung TV", "description": "PC", "id": "", "host": "192.168.178.45", "port": 8001, "method": "websocket", "timeout": 0, }
remote = RemoteWebsocket(config)`
And it gives "ms.channel.unauthorized" error I went to setting and set the "Access notification" to be "Always on" and got no notification on the TV
I also wrote the following code `payload = json.dumps({ "method": "ms.remote.control", "params": { "Cmd": "Click", "DataOfCmd": "KEY_VOLUP", "Option": "false", "TypeOfRemote": "SendRemoteKey" } }) url = "ws://192.168.178.45:8001/api/v3/channels/samsung.remote.control?name=UmVtb3RlIENvbnRyb2w="
connection = websocket.create_connection(url, None)
response = connection.recv()
connection.send(payload)`
the main point here that, I changed the url to use v3 instead of v2 and got the notification on the TV and after allowing it connected successfully but sending the Key is not working I even tried several times but not working
Any idea what should I do ?
Note: The tv I'm using is GU32T5379CU
You solved it?