Philips Android TV component

Hi,

I have pairied succesfully my Philips 55pus7503 tv, but have this problems

2019-6-9 22:01:19] [PhilipsTV] getAmbilightState - Got non JSON answer - not updating state: ’

getPowerState - Got non JSON answer - not updating state:

The same with volume state, basically with all states

I have icons in Home app. but their is sign NO RESPONSE
Any ideas?

Time for some quality of life updates. Less crashes! Better errors!

As I cannot test, I need some testers which can confirm everything is working
If I you guys green light it, I will make the update available through custom_updater for the rest.

Update media_player.py in custom_components/philips_android_tv.

Previously when the TV would return a non json repsonse, the component would just miserably die, forcing you to restart HA, if you still wanted it working.

Now a non json response (mostly html) of the will print a warning in the log. It will contain the API, which returned a non json response and what this response was.

This should make it possible to better understand errors and maybe make changes to avoid them. And make a compatability chart of which TV is compatible with which program.

I have updated the philips_android_tv component with our latest code and it is starting as it should and I can control the TV :slight_smile: Is there anything special you would like me to test? I am using a 55PUS8303/12 model.

1 Like

Thank you, if it works and nothing unforseen happens, then this is enough.

Just bumped the custom_updater version number.

Problem with favorite_channels: Fixed!

Hi!

As custom_updater is deprecated now, can you add HACS support?
Thanks!

1 Like

Very very awesome. Thanks for telling me!

I will look into how to migrate to it :grin:

1 Like

HI,

i have a 55pus8503 and I was able to connect it to home assistant. but I only get the media player button. I am not able to get anything else.

What I am really searching for is a way to determine if the tv is powered on.
Is there a easy way to get this done?

i am not able to find it here.

Thanks!

try pressing on the 3 vertical dots icon on the right hand side of the media player card

Yes that works, any way to just get the powerstate? I want it in an automation.

its just the state attribute so:
{{states("media_player.livingroom_tv")}}
works for me and returns ‘on’

You might be better off doing a negative check for ‘off’ - I need to confirm, but I think at times, if I’m chrome casting, or in smart tv, the state might not be ‘on’ but something else. I need to test/confirm this though so I can raise an accurate issue if that is the case

e.g.

{% if is_state("media_player.livingroom_tv","off") -%}
off
{%- else -%}
on
{%- endif %}

Thanks it worked,

I am still testing but for now it got the following states back:
TV on = On
Tv off = Off
Tv in apps = idle

i need to further test to see what other status i get back, if i have done this i will share it here.

1 Like

Is your TV also connected via LAN or WLAN? If so: you could check the online status that way.

Its connected through wlan, but want to get the real status. not a reply from a ping. i am making an automation that sends me a message on the TV when its on and a certain motion sensors goes off when my child is in bed.

Migrated to HACS! (Replacement for custom_updater)

Also changed the repository name to ha_philips_android_tv.

You can find it now under:

3 Likes

Just a small info for everyone using this great component and also wants to have the new input option for TV source for homekit ( Homekit new options TV Source ):
it seems like the custom icons :iphone: and :tv: for apps and tv channels are not recognized by iOS and the list of sources will be empty. Removing them or replacing with some standard characters does the trick and you can have a nice shortcut for switching between different apps / channel directly from iOS control center.

Hia!
This is a Great job !!!
Just to let you know that the latest version gets HASS stuck(tested in docker and hassbian).

Tested several apps and the status stays idle.

So the 3 options we got here is as mentioned above.

TV on = On
Tv off = Off
Tv in apps = idle

Great work @nstrelow !!!, just installed it here, after installing a debian server just to get the user / pass pulled :slight_smile:
I’m just dabbling with it so far, but the source list refreshes all the time, so I can’t scroll down through it.
I have an older 2016 Philips tv (40PFT5500/12) in the bedroom, so it would be nice to have that properly integrated.
One of the annoying things about my TV is that you can’t select the HDMI / TV input directly, but have to scroll through list of inputs, I was hoping it could be solved with this, but that doesn’t seem to be the case.

Glad it mostly works for you.

but the source list refreshes all the time, so I can’t scroll down through it.

Hmm, the function the refresh the source list is executed quite often, but the last time I used it, it did not refresh the list UI. Sadly I my TV is at a friends place, as I am away for a year. Will be back with my TV probably in March sometime. Sorry for that.

One of the annoying things about my TV is that you can’t select the HDMI / TV input directly

That is something I would have loved too, but I think not even the app can do it.
Best way to do it for me, is to hook up a device (a RPI with homeassitant running on it in my case), which supports HDMI-CEC. The HDMI-CEC component is a bit buggy, but often it works when switching.
(The RPI sends a HDMI-CEC request trough HDMI and tells it to switch to HDMI 3 for example)