[APP][Pro] Philips TV Testing

I’ve managed to grab and decompile the sources of the Jointspace apk so I might finally be able to shed some light on the pairing issues! Fingers crossed :crossed_fingers:

2 Likes

Did you take a look at this as well?

It is a phyton api based on Jointspace api, you can download the code from github and maybe find out what your problem is.

Yes, I’ve discussed many issues about the Jointspace API with Evgeny.

The Homey app has the exact same pairing implementation as the Pylips app. My guess so far has been that the pairing issues are related to platform specific (node) encoding issues in the signing part of the digest auth.

a ok, i run my self the pylips code on my nas and call it using homey.
So when harmony switches input homey notice this and triggers the pylips code on my nas which then triggers my TV… Pairing is not really a problem, i just noticed when something is rebooted then you often have to repair…

I do also have an other tip regarding the hdmi input, you should add a back function call after 1 or 2 seconds when input source hdmi1/2/3/4 is chosen and executed using the api.
Why… i regularly noticed that the google assistant bar on TV popups up an you see the command (hdmi1) in the assistant info bar but sometimes this google info bar does not go away and it stays in the picture. You then have to press the back button on the (original) remote to cancel the assistant info bar on the TV.

In my api i do after every hdmi source always a back call after 2 seconds so the assistant info bar on TV always disappears, maybe you could do a similar trick.

An other trick you could add is: Watch Live(cable) TV (does not exist)

  • do the command LIST first, wait 3 seconds and then do OK

Is there anyone here with an Android TV who’s able to connect to it via adb and willing to help me out?

I’m looking for different versions of Jointspace apk than 6.1.0 (check this at http://192.168.1.123:1925/{version}/system) OR a version that doesn’t use digest auth paring (pin code pairing). So far I’ve found two places where the vdex file can be located:

  • /system/priv-app/xtv/oat/arm/xtv.vdex
  • /system/app/xtv/oat/arm/xtv.vdex

If anyone could send me their xtv.vdex file you’d help me out greatly (lucasvdhave@gmail.com). You can grab the file with adb pull /system/app/xtv/oat/arm/xtv.vdex.

Hi @B3rt,

Is the repairing bug an issue you’re experiencing with the Homey app?

Doesn’t it work if you send the back button key to your TV via the Homey app? If this does work and you’re experiencing this issue you could just add an extra flow action to your homey flow to send this key after changing the input.

Are you talking about sending Google Assistent search queries to your TV? I’m planning on adding a flow action so you can send custom search queries.

No i do not have any problem with pairing between homey app and the TV, i do have them between my nas and the TV using my own api.

yes it does, but it would be nice it was done automaticly, therefore i did do the back call after 3 seconds automaticly after each hdmi (source) call so it stays never on the screen.

No just default api calls, there is no app or command in the tv itself to go directly to live tv channels. I discovered when you press list (on right side your channel list opens) and then OK (select) then it switches to live TV.
There is no command in the list (also not using harmony) to switch directly to live (cable) TV. You can use Watch TV command but this switches back to the last used TV mode.
So if your watching TV using a setop/cable box (hdmi1 input) and you would like to go to cable signal then you can use this trick to switch from hdmi to coax input.

  • something different: did you discover a TV reboot command? Sometimes a reboot (not powerdown) resolves the problem, rebooting the TV seems not that easy, the reboot command is very hidden in the menu and i did not find any option to reboot the TV using any api command.

If I press back button on an HDMI source on my TV it takes me back to the home screen so I don’t think this would be something to implement in the app.

If this turns out to be a reliable way to switch sources on every Philips TV I’ll consider implementing it. But I foresee a lot of edge-cases, so I wouldn’t get my hopes up.

At the moment the only way to reboot your TV is via adb or maybe an app if you’ve rooted yours. This is because the Jointspace API only provides an option to set configurable menu items and no option to trigger menu items that are an action.

i did found something else using my own API, maybe this info helps:

Sometimes the Philips TV stops responding and the API gives an error back: api not responding
When you try the http connection at http://ip.of.your.tv:1925 then it works but using https://ip.of.your.tv:1926 then it does NOT work!
Also getting system info on https does not work on http is does!

I noticed this behavior of the TV the last few days several times, i implemented here a fix, when on the second try it fails then switch to (using an other config) http connection and until now this works fine. Ofcourse you could should to use always the http connection instead.

The Homey app already uses port 1925 and http to fetch the system endpoint. This is only used during pairing though.

Hi Lucas,
Thanks for all the effort, the app is improving!
When do you think the app will be updated with the possibility to use ambi / hue in a flow?
I want to turn the ambi on / off based on time and or brightness in my living room.

@RGU you should be able to turn on or off the AmbiHue function via a flow card action in the latest test version v0.5.1: https://homey.app/a/codes.lucasvdh.philips-jointspace/test

image

Great!!! Thanks :blush:

Dear Lucas, thank you for all the effort you make to make Philips TV’s compatible with Homey. Although I am trying quit a while now to connect my Philips TV through your app with Homey, I didn’t succeed yet. I have type 49PUS7809/12 from 2014. The response I get from http://192.168.0.128:1925 is: “Forbidden”. However if I connect to http://192.168.0.128:1925/1/system I get following respons:
{
“menulanguage”: “Dutch”,
“name”: “PHILIPS TV”,
“country”: “Netherlands”,
“serialnumber_encrypted”: “K2kseVsmQFgkd15gKkJ+agnRxfobJfPcGler+xVrI+g=”,
“softwareversion_encrypted”: “K2kseVsmQFgkd15gKkJ+at2sfvuXu9yzKlDMoVPpPs63mv0CvyDJ0YItrFurQ3nf”,
“model_encrypted”: “K2kseVsmQFgkd15gKkJ+aj36svdMjVRKXqbs5klhQTo=”,
“deviceid_encrypted”: “K2kseVsmQFgkd15gKkJ+ahIt2KLV32R7aRGOuoGFZGg=”,
“nettvversion”: “4.4.1”,
“epgsource”: “broadcast”
}
So I might think that my API version is 1, however connecting through this IP and Jointspace version 1 is not working. What am I doing wrong, or is my type just not compatible? Would be great to know otherwise I keep digging in the dark.

Hi @Noel_Nijsten,

A few questions:

  1. Are you able to add the device to your Homey or does something fail during the pairing process?

  2. Do you receive any errors during pairing/adding of the device?

  3. To verify that your TV supports the JointSpace protocol I would suggest that you install the Philips TV Android app and check if that works. (If the Android app doesn’t work, the Homey app won’t work either). I’m not sure if there’s an iphone app.
    https://play.google.com/store/apps/details?id=com.tpvision.philipstvapp2

Alternatively, if you know how to run a command line Node.js script, you can debug your issue with the pairing test script tests/pairing.js which you can find at https://github.com/lucasvdh/codes.lucasvdh.philips-jointspace. This outputs a debug log, that you can send to me, to give me a better insight into the issue.

Dear Lucas, in answer to your questions:

  1. No I am not able to add the device in Homey, after saving IP-adress and Jointspace Version, the page of pairing instructions show up again.
  2. No I don’t recieve any error messages.
  3. The Philips TV Android app works!

Altough I am not familiar with a command line Node.js script, I am going to find out how it works and try to sent you the debug log.

Thank’s in advance!

I have a problem/question…

I received a new TV but the API does not work on the new TV, changed the IP in the device settings.
I reinstalled the APP and restarted the pairing proces and the APP worked.

But the next day the APP stopped working again, no idea why (ip of tv is unchanged).

Is there anyway to debug this?

Is there an option to restart the pairing proces manually in the app (i cannot find it) itself?

extra info:
when i try to add a new (second) TV then the apps keeps loading when trying to connect to the TV, it does not connect to the TV…
When i use a browser to connect to the API url (ip:1925)of the TV i get responce back, but this is from my laptop, but when i try to connect to https://ip.tv:1926 it does not connect also.
So it looks like that the API does not respond on port 1926 (https).

Is it possible to add or set the APP to only use http on 1925 instead op https on 1926, i think this wil solve connection problems.
Auto connect / switch is not working (if build in) or you should try 1925 first and if that does not connect then 1926…

Can you invite me for the test version @lucasvdh send you an dm

With the app now in the App Store the loading screen is loading and can’t add my tv

1 Like

Hey @lucasvdh ,
When I try to send a button via a flow. I get a error after a while with [Object object].
I also send you a diagnostic report. diag id: 8849c284-f79f-4191-af39-1c2ac716f9ba

It used to work with the previous app version.

flow: Gedeelde Flow | Homey

Use case: when the red button on the remote is pressed it starts the chromecast daydream. I like to have this when I play music via the soundbar :slight_smile: