Philips Android TV component

I meant the official android app. It has ability to act as an remote.

The play pause stuff is messy. They map to invalid keys inside the tv. I send a space key " " in the media player component to toggle play state instead, which is somewhat more reliable on Android at least.

Not sure I added support for that in the remote component.

ah I see.

so the Android app seems to be in general the fastest after the physical remote imo. Just sometimes it takes an additional second to register the input. But it’s clearly faster than the remote component.

Is it slow if you run in using a script inside home assistant directly? That way maybe i can reproduce.

Yes I tried it running a script inside HA.

Is it possible to stop the screensaver of the tv somehow? It seems like no internal input or change of source removes the screensaver but only an input from the physical remote control.

Hi There,
I have a Philips 70PUS8535/12 witch I added to my Home Assistant thru the integration. !
It shows one device and two entities. (media_player and remote)
After providing the PIN code the media_player’s state is shown, but for some reason it dissapears after a while.
The two entities are still visable, there’s no error but they just don’t work.
Before I used Pylips from Eslanov and it worked fine.
Now my automations (witch are based on the state of the media_player) don’t work anymore.
Does someone know what can be the issue here ?

the integration is still buggy sometimes and just loses the connection to the TV without reconnecting again. @elupus can maybe confirm that?

I have a Philips 55PUS7304. First I had connection issues aswell, however after I set andriod develop option ‘on’ I have no more issues:

I works for about a week now, include turn on/off! Let me know if works for you too! I’m curious.

Same here, after a while the entities of TVs (55OLED805/12 and 65OLED854/12) do not work.

I have a 70PUS7304/12 with the same troubles. Initially, the integration works but after switching off the TV it looses the connection which is only re-established when the TV has been rebooted. Tried Android dev mode, enabled Chromecast and Amazon Alexa skill which are working fine when the TV is in standby but by no chance it did not resolve the problem. Also, there don’t appear any log messages.

Well integration is not that buggy. The TV on the other hand is :slight_smile:

I may have found a solution here: Make Philips TV notify service optional by elupus · Pull Request #50691 · home-assistant/core · GitHub

It might reduce likelyhood of the tv crashing, at the cost of slower reaction. I think it mostly crashes when in standby.

Best way to fix this is to sideload the Wakelock app - you can set the TV to keep things running even when switched off. When using a previous ambilight integration this was the only way to keep it working when the TV was switched off.

See here for info: GitHub - jomwells/ambilights: Custom Home Assistant (Light) Component for Ambilight LED's on Philips Android TV's

Thank you that you’ve mentioned the Wakelock app. Indeed, I haven’t installed that one.

Anyway, my observation is that the JointSpace API on my model is up & running during standby. The TV is now off for about 16 hours and the integration lost already the connection about a hour after going to standby but at least this URL is working and provides proper response in JSON:
http://xxx.xxx.xxx.xxx:1925/system

Might be because I have already enabled everything during standby that the settings offer me (Alexa skill, Android Dev mode on, build-in Chromecast during standby, …).

I am not sure if I am still missing a significant part because that URL is obviously not HTTPS enabled and might be a different part of the API utilized in the integration.

As I am not that familiar with Python stuff:
If I replace the current files in my HA installation with the changed files from the mentioned pull request from GitHub, does that work for testing purpose? Will they later on be overwritten when HA 2021.6.1 is out so that I am again in-sync with the releases?

I’m gone keep an eye on how this develops. I’m also having this problem.

My 43PUS7303 is having this problem. Generaly after turning it off it loses connection after a day or so, but seems random.

My 43PUS8535 also has the problem, but strangly not as frequent.

Both TV’s are running sideloaded wake-lock as well as developer settings for chromecast. The chromecast remains reachable, the Phillips part (JointSpace) does not.

@elupus:
The problem seems to be resolved. I downloaded your branch and have setup your PR as custom component. The integration never worked longer than a hour after switching to standby before. Now, regardless of having Wakelock not installed, the TV is still connected to the integration after several hours. If tomorrow morning the situation doesn’t change / the TV once switched on can be again connected to the component without reboot, I will add a comment to the PR pointing out that this is the solution. Thank you so much for your great work! Really appreciate it!

Unfortunately this approach to select HDMI channel is not working on my TV. In the logs I see a 401 Bad request. I have a 55PUS7101 model, which is running android 8.0 Oreo. Could this be android version related and just a limitation of my TV? Unfortunately there are no new updates for the TV to upgrade to a more recent version of Android TV.

A 401 would indicate the endpoint for intent is not there. Can you start any application from the media browser?

Yes I can start for example YouTube app from the media browser without any problem. Also play store etc no issues at all.

Sorry. 401 is unauthorized. Where did you get that number? Is it in home assistant logs? Or did you just try it manually with curl?

I am sorry meant 400 bad request.
Also see my post from some time ago, which did not get any response. Here are some more details.

I also tried with curl getting the same response