Closed edent closed 5 years ago
Hello!
I believe that you are doing everything right but our TV sets might have some differences. I had to reverse engineer functionality of my TV so it might not be the best approach or work with other TV models.
I used Websocket connection to get some status information from tv. For example turning TV off or opening media library causes TV to send some information through this websocket connection. TCP connection is used to retrieve some information not available through websocket connection (for example volume levels and mute state).
What you could try:
Unfortunately it seems that you have to do some reverse engineering also as our TVs seem to use a bit different messages indicating TV on status (your tv sends xml formatted <event>tv_status:1</event>
and my sends just tv_status:1
). You can use this library as starting point but some tweaking is needed. Hopefully this helps you on right track :)
Best Regards, Teemu
Thank you for this. It would be too easy if Vestel provided documentation, eh?!
I couldn't telnet in on 1986, and nmap found no open ports.
So I'm decompiling the Android remote to see if that will help.
Thanks for providing this library, it has been useful :-)
Hmmm, but did nmap find websocket port open? I mean that if you didn't find that, then you might have to check nmap parameters.
I would be excited, if you can find an approach which is generalizes better than mine :)
Cheers, Teemu
I'll have to play around with nmap - I can connect to the websocket in JavaScript using
var myWebSocket = new WebSocket("ws://192.168.0.85:7681/)
myWebSocket.onmessage = function (event) { console.log(event.data); }
Looking through the APK, it appears that the TCP port is on 2000.
Aha!
2870/tcp open unknown 4660/tcp open mosmig 4661/tcp open unknown 4725/tcp open unknown 7681/tcp open unknown 56789/tcp open unknown 56790/tcp open unknown 57707/tcp open unknown
If I telnet into 4660
and then send 1012
I can toggle the TV on and off! The GETMUTE
command didn't return anything, but did make the TV's screen flash...
Thank you for your work on this library. I'm trying to use this on a Toshiba branded 49V6863DB.
When I run
python3 tv_on_off.py
with the TV already turned on and connected to Ethernet, I get this error.So the WebSocket connects successfully, but not the TCP?
When I turn the TV off using the remote, the script picks it up:
So, it is getting some messages!
Is this something I'm doing wrong?