[APP][Pro] Philips TV Testing

is it possible to add the app: NLziet to the flow card open app?

I was expecting that if i install the app on TV it would automaticly show up, but it doesn’t…
The app is installed on the TV and working, but not in the list of available apps.

Hope this can be added…

update/edit:
i restarted the app in Homey and suddenly the NLziet app was available in the flow card, so for me problem solved for now.

Feature request (if possible)…

My Philips TV is an OLED TV and these oled TV’s have 1 BIG disadvantage to normal led/lcd tv’s, when the TV is turned ON for a longer time it will give a popup after a while to turn OFF the TV for screen renewal (or something).

On this popup you have the option to do this or cancel it (can only be canceled twice).

The request would be if it is possible when this popup occurs it triggers a flow.
Something like:
IF: oled popup appears
AND/THEN: home stuff

In my case this would be that it simulates the the button presses to cancel this renewal.

Hi, I recently bought a new Philips TV: an OLED856. It is similar to the OLED706 and OLED806 series. It uses Android 10.

I can successfully add a device. I’ve given the tv a static IP address. I have entered the 4 digit PIN code displayed on the tv. I can control various aspects of the tv via the device, like ambilight, sound, …
WoWLAN is enabled on the tv.
JointSpace API version is version 6.1.

It seems that http://IP:1925/ and http://IP:1926 don’t give any sensible output.
http://IP:1925/system and http://IP:1926/6/system however displays JSON output.

It seems the newly added device doesn’t detect if the tv is turned on or off.
Question: should it self-detect that on/off status of the tv? In my household most times the tv is turned on via a remote, not via Homey.

https://192.168.1.9:1926/6/powerstate pops up a login prompt for username and password… :expressionless:

Without knowing the current power state, it is hard to check (for example) if the tv was left turned on when I’m away.

Hello.

Everything works except switching on when the tv is in standby mode. WOL is set on in the menu and TV does this with the philps app on the phone. But it can’t be done by homey.

It is a 2020 tv 43pus7855/12 working on api version 6.

{ “menulanguage”: “Dutch”, “name”: “slaapkamer tv”, “country”: “Netherlands”, “serialnumber_encrypted”: “K2kseVsmQFgkd15gKkJ+asQ7g9HYXwP2NvK1PGrcoRc=”, “softwareversion_encrypted”: “K2kseVsmQFgkd15gKkJ+avHZ7mOh2CrjkYSBkUtkvmhby6K4uB2NK3o+vX35m2Mx”, “model_encrypted”: “K2kseVsmQFgkd15gKkJ+asxwDdRHYNGz2OftYgg5EDU=”, “deviceid_encrypted”: “K2kseVsmQFgkd15gKkJ+au19JOBLxd9LdhfyvmEwP98=”, “nettvversion”: “4.6.0.1”, “epgsource”: “no_epg”, “api_version”: { “Major”: 6, “Minor”: 1, “Patch”: 0 }, “featuring”: { “jsonfeatures”: { “recordings”: [ “List”, “Schedule”, “Manage” ], “ambilight”: [ “Hue”, “HueStreaming”, “Ambilight” ], “textentry”: [ “context_based”, “initial_string_available” ], “inputkey”: [ “key”, “unicode” ], “pointer”: [ “context_based” ], “activities”: [ “browser” ] }, “systemfeatures”: { “tvtype”: “consumer”, “content”: [ “dmr” ], “pairing_type”: “none”, “os_type”: “Linux” } } }

Hello there,
i can’t connect my TV via the APP i tried it with the alpha and beta but I can’t pair my device.

My PhilipsTV with Jointspace API-Version: 1

{
	"menulanguage": "German",
	"name": "Philips-TV",
	"country": "Austria",
	"serialnumber": "FZ1A1402004138",
	"softwareversion": "QF2EU-0.173.67.0",
	"model": "47PFL6008K/12"
}

Also i tried to pair it with your pairing.js and this Error came back:

? What's your TV's IP? 192.168.0.65
? What's your API version? (1 to 6) 1
? What port number should be used? Either 1925 or 1926 1925
Updating _client config
Sending system info call
[ 'GET [http://192.168.0.65:1925/1/system]',
  'with:',
  {},
  'requested securely?',
  false ]
[ 'GET [http://192.168.0.65:1925/1/system]',
  'with:',
  {},
  'requested securely?',
  false ]
[ 'user regular _client' ]
[ 'user regular _client' ]

I experienced the same problem and as far as I can read from the source, the app doesn’t try WOL. I can confirm that WOL works correctly when I send the request from my router. I even pulled a UTP cable to be able to wake up my TV :stuck_out_tongue: I’ll just use the WOL app for now.

@lucasvdh Is the source as listed in Hithub outdated or am I correct that the WOL function has been removed?

Also I noticed that source changes are send to the TV through the Google Assistant Search.
This won’t work when a user changes the names of the source inputs (found that out the hard way) and works slow at best. At least in the V6 API, you should be able to do a POST to the ‘sources/current’ route to perform that action.

Edit: Scratch that. It’s only for API V1, looks like I might need to mess with ADB to be able to reliably switch input.

Are you still developing the app and/or accept pull requests? I’m willing and able to make the changes myself if you’re open to that but I hate to write code that doesn’t get distributed.

Otherwise, I’ll implement it manually with a ‘request’ flowcard and write down how others can set it up.

2 Likes

Is this app still being developed and/or supported?

Found this script and ran it on my Windows system via WSL2:

The script let’s you pair with your tv returning the username and password required to read for example the powerstate. I guess your app does something similar, but was good to manually do this and know it could work on my new tv.

Any idea why this doesn’t work in the app to read the current powerstate?

I installed the app and connected successfully my new Philips 65PUS8506. Thanks for the app… I only have one issue, it keeps continuously sending (67 times in 2 hours) on off notifications.

Any suggestions what to do?

I have a 2021 model TV (55OLED856/12) and it says it has API version 6.1. After initial pairing with pin it works, but after a while it looses connection to the tv and the app thinks the tv is off, while it’s still on. After a while it finds the tv again and then looses it and doesn’t find it anymore. Anybody have a clue on how to fix this?

I’ve installed a homebridge plugin that works well, I can do stuff with homekit that I want to move to homey!

1 Like

I’m having the same problem with the OLED806.

Is there a solutions to this?

I haven’t seen a solution… pity…

Some recent posts in this topic have asked if the app is still being developed… I haven’t seen a response from the developer as far as I can see.

I have enabled preliminary Homekit support so my Homey devices are now also available in Homekit, I then setup homebridge in a Docker container and I’m running the Philips TV plugin that works well. I’ve setup rules in Homekit to set the lights when I watch TV. I wish Homey had support for homebridge, so all the love that went into Homebridge could come to Homey, so I wouldn’t have to maintain all these systems

The TV often doesn’t respond to http (API) requests in a correct way and the app assumes; no response = tv off. So the status requests failing and succeeding make the app toggle the on/off capability a lot.

This seems to fix it as a workaround but I think there are more fundamental problems. I’m currently trying to debug those :slight_smile:
Also tried to fix the WOL support but that’s a bit hard to test because the TV is used as my computer monitor :stuck_out_tongue:
When I’ve gotten to the bottom of the issue, I’ll send a pull request of my changes to the app author.

2 Likes

I’ve found the problem. Fixing it requires a bunch of changes to the way the app gets it’s information from the tv though.

Every 10 seconds, a request is done to the ‘/notifychange’ endpoint of the API. The way the API implements it is like this:

  1. Send the current state of the TV as you know it to the TV
  2. If the state the TV knows is different from what you send, you get a reply immediately
  3. Otherwise, the request will hang until either something in the TV state changed or a timeout is reached

This useful for getting state changes immediately from the TV but the app implement it wrong. It tries to use the /notifychange endpoint as a source of information and tries to poll it every 10 seconds. When the TV state doesn’t change, the request reaches a timeout and the app assumes the TV is turned off.

I can fix this but I’ll have to split the real-time /notifychange requests to a separate thread and change the polling methods to request their information in another way.

2 Likes

@Joolee thank you for your work, I’m looking forward to testing your changes on my setup :+1:

@Jolee thank you so much! Can you edit an existing app in-place with development tools? If that’s possible I’d like to try your patch

[edit] I’ve installed your patched version. Unfortunately it’s still not usable for me. The most interesting usecase for me is to know that someone turned on the tv, so Homey can run my theater flow, but it’s not correctly detecting if the TV is on.

That is possible. As soon as I have something stable, I’ll push it to Github and place a howto in this topic.

2 Likes

This seems to work quite stable I’m curious how it works for you guys:

Changes

  • Fixed Wake on Lan feature (Allows to turn the TV on when it has been off for >10 minutes)
  • Made app ~75% smaller by removing or substituting big dependencies (Makes development faster, reduces memory (by ~33%) and CPU usage and greatly reduces possible vulnerabilities)
  • Added English/Dutch translations for remote button names (in the action card)
  • Stop polling the TV when you remove it from Homey (Might fix some crashes)
  • Split notifyChange and device polling into separate threads (should stop on/off flickering)

How to install

Or install using WSL / Linux

I can recommend using WSL(2) with Debian or Ubuntu if you’re comfortable with that. All commands you need to run should be:

sudo apt update
sudo apt install git npm
mkdir ~/git
cd ~/git
git clone https://github.com/Joolee/codes.lucasvdh.philips-jointspace.git
cd codes.lucasvdh.philips-jointspace
sudo npm install --global --no-optional homey
npm install
homey login
homey select
homey app run

And then

It should not be needed to remove and re-add the TV to Homey.

If you run into any problems, please run the app with homey app run and send a copy of the crash or other applicable (error) messages.

2 Likes

Pairing problem
I got two Philips TV running after some struggle with pairing.
I can not find a straight instruction on how to pair a new device in the Philips TV app
I tested the GUI and configured the TV IP but got CONNREFUSED all the time.
It´s a brand new Philips Android 55PUS7906, it also don´t respond on http://IP:1925

Any hints, any workarounds?