Binding to Philips 49PUS7101/12 android TV

Hi All,

Hope somebody can help me.
I tryiing to connect to my new model 2016 philips TV 49PUS7101/12 but can;t make it word.

In the early models from philips the protocol clearspace on port 1925 does the trick.
But when i try this on my tv i getting a 404 not found error
There is something running on port 1925 but does not do the trick.

I have also opened a topic on the philips forum and a have some respone.

  1. in latest model clearspace is no longer available
    i think this is strange because why getting a response on port 1925.

  2. i need using the Tv remote App(tp vision), this is working on my android device.
    did a wireshark trace and this app connects on port 1925 and trace tcp/udp i can;t read.
    think is property protocol.

3/ they also sugest i can use the Android TV Remote App from Google.
this is also working, and with some research i found out that this app is using the anymote protocol.

So lots of questions.
Does anybody has a working setup with clearspace with latest philips tv models with android on it?
if yes what are the commands.

Does anybody has another wat that it works and can please send some information.

Is there a binding for anymote?
There is a Github with some java examples? https://github.com/entertailion/Anymote-for-Java
If no can somebody create it?

Please help me out with this annoying issue.

Thanks in advance
Mickel

Hi, did you get response or found a different solution. I have the same problem. The anymote java code would be a good start point to create a command line utility or a binding. I tried to build it, but ist fails to connect to the TV. Any ideas?
Beat regards, Markus

HI Markus,

No i did not getting any respone, also not on the Philips Forum. unfortunately.
I have no experience building a binding so can’t help you.

What i notice if a use the default google anymote app on android that when i try to connect for the first time the tv displays a code (4 digits) that i need to enter in de anymote app. Maybe that your problem.

I can test and look at your binding if you send it to me.

Br MIckel

Hi, i have a update.

I found on website https://github.com/suborb/philips_android_tv some python code.
With this code the control works :slight_smile:.

First you need to us the command pair to pair the TV with the server, when you do this the TV generates a code that you need to enter on the server.
When that is done, a new user and pass is shown and with this user and pass you can conrol you TV.

Some notes from site
The API is roughly the same as JointSpace (http://jointspace.sourceforge.net/) with the following differences:

-Uses HTTPS over port 1926
-Uses /6/ instead of /1/ as the API path
-All calls have to have digest auth to be successful
-An initial pairing to determine the user/pass is required
-Channel and Source methods aren’t available
-Channel status and changes are performed using a different protocol that isn’t described here.

The tool here will do the initial pairing. The credentials can then be used in a standard way (digest) in other tools

Now it would be very nice if the JointSpace Binding from openhab can be adjusted so that it also works in openhab?

Or are there other way to excuste the python script and getting (and reading) the response messages?

Br Mickel

Hi @mickelluiten: That’s great news.
Question: What do you mean with server?

You could create a script for each action and run it from openHAB with the exec command.
A result/response could be forward to OH by the REST API.

Does that makes sense?

Hi @mickelluiten,

after installing the python modules acc. to requests.txt and running the pairing

sudo python philips.py pair --host 192.168.x.y

I get the following error

Starting pairing request
/usr/local/lib/python2.7/dist-packages/requests/packages/urllib3/connectionpool.py:852: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings
  InsecureRequestWarning)
Traceback (most recent call last):
  File "philips.py", line 118, in <module>
    main()
  File "philips.py", line 85, in main
    pair(config)
  File "philips.py", line 37, in pair
    response = r.json()
  File "/usr/local/lib/python2.7/dist-packages/requests/models.py", line 866, in json
    return complexjson.loads(self.text, **kwargs)
  File "/usr/lib/python2.7/json/__init__.py", line 338, in loads
    return _default_decoder.decode(s)
  File "/usr/lib/python2.7/json/decoder.py", line 366, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/usr/lib/python2.7/json/decoder.py", line 384, in raw_decode
    raise ValueError("No JSON object could be decoded")
ValueError: No JSON object could be decoded

Any idea? Anything to install beside the python modules listed in requests.txt? Any special mode to setup on the TV? I just turned it on and run the script using the IP address the TV displays under network settings.
Cheers, Markus

using the URL from the browser/curl I get

pi@raspi /usr/share/openhab2/bin $ curl -k -X POST https://192.168.x.y:1926/6/pair/request
<html>
<head>
   <title>Status page</title>
</head>
<body style="font-family: sans-serif;">
<p style="font-size: 1.2em;font-weight: bold;margin: 1em 0px;">Not Found</p>
<p>The server has not found anything matching the request URI</p>
<p>You can get technical details <a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.5">here</a>.<br>
Please continue your visit at our <a href="/">home page</a>.
</p>
</body>
</html>
pi@raspi /usr/share/openhab2/bin $ 

it seems like jointSpace is not supported anymore on series 7000 TVs :frowning:

I couldn’t understand that no-one wants to control an android TV from openHAB - hmm.

HI Markus,

Don’t know what wrong, just run the command sudo python philips.py pair --host 192.168.x.y
Then script ask for code that is presented on the TV.
After that you get a new user / pass that can be used to send the command

I have a philips 49pus7101/12 , as far as i can see its from March 2016
Br Mickel

Hi Mickel,

I suppose my f* 65PUK7120/12 does not have jointSpace support. :slight_smile:
Did you enabled something (like is was on old TVs where you have to enter joint space on the remote)?

Once you have access to the TV you could use scripts and the OH REST interface to integrate. I want expect that someone maintains the joint space binding anymore. At the end: only the result counts :slight_smile:

Best regards, Markus

@mickelluiten I found an interesting thread here
http://www.supportforum.philips.com/en/archive/index.php/t-18281.html

I tried the various jointSpace URLs without success. However, the :49154 calls work. Hmm, needs some more work to discover the magic. I downloaded the Goggle TV Remote App for iOS and will do some Wireshark. I couldn’t understand why the anymore sample doesn’t find the TV. Android TV is not Google TV, but both platforms should support this protocol.

Please let me know if you make progress.

see here for a solution based on ADB:

I’ve got my PUS6412 working with the script. Important: Use Python2.7!
I’ve replaced the parameters inside the script to my settings, this saves from passing the parameters each time.

Old Docu shows commands from old JointSpace, not all working anymore.

Biggest drawback is latency because of the python init.
Request takes around 200ms, init about 500ms.

Would be really great to have a binding. Maybe I’ll take the quest

I wrote a binding and would appreciate feedback: Philips TV (2016+) Binding :slight_smile:

Cheers