Philips Android TV component

So my 55POS9002 supports Alexa and is able to switch to HDMI sources. Can I use this somehow to make HA to switch to HDMI sources?

2 Likes

Also interessted in this

1 Like

I also have a 9002. It seems like for being able to connect it to alexa, the alexa app should appear on the tv. I did not find this. TV is up to date.
Could you confirm there should be an app on the tv and maybe explain how to find it?

1 Like

it’s just a normal app in the apps section on my tv. maybe it’s not available in your country? I’m from germany.

1 Like

You are probably right, I’m in Austria. Can’t see any alexa related app on the TV.
Did it just appear on your screen or did you have to install it?

Edit: The app appeared after several restarts.

1 Like

This is now possible with https://www.home-assistant.io/integrations/androidtv/ . I installed the ADB hassio addon (https://github.com/hassio-addons/addon-adb) and know i can sent a command to have my TV switched to HDMI or back to TV

  - service: androidtv.adb_command
    data:
      entity_id: media_player.philips_android_tv
      command: "input keyevent KEYCODE_F1"
  - service: androidtv.adb_command
    data:
      entity_id: media_player.philips_android_tv
      command: "input keyevent KEYCODE_TV
2 Likes

I’m having a lot of issues with my TV’s jointspace API being unreachable or a while, then sometimes it comes back. Does this happen to anyone ? The [ip]:1926 api just refuses connection, and it makes anything on Home Assistant from Ambilight switch to media player unusable.

My TV Model is the 2019 OLED804

1 Like

Hi all,

I’m trying to pair my TV (58PUS7304/12 with Android TV), but the script throws an exception every time i launch it. Ports 1925, 1926 are closed on my TV. Any idea on how to open those ports, or check what port should I use?

Thank you!

UPDATE: There was an update pending. I applied it and now those ports are open. Connection works, but it is intermitent. Any idea on how to get a more stable connection?

2 Likes

Sorry, I think this only shows favorite channels and not the other channels.

But it will always show all the apps, currently there is no way of having favorite apps.

I will think about adding an option to filter them.
Tracked in issue: https://github.com/nstrelow/ha_philips_android_tv/issues/26

Currently no way to turn this off. Maybe I’ll change the logging of this one to debug.

Tracked: https://github.com/nstrelow/ha_philips_android_tv/issues/27

1 Like

The jointspace API or however it is called cannot do this.

Basically this addon could do everything the Philips app does. And the philips app does not support changing HDMI sources which sucks IMHO.

Refer to the Android TV ADB guide which @EnsconcE mentioned: Philips Android TV component

EDIT: I cannot reply more so:
Uhhhhhhh cool Alexa is supported? I wonder if my model will also support it.
Will definitely see if a new addon or so can be build to use that. :smiley:

Cannot do anything to improve the connection I think, the API is not super responsive.
This component can be made to work better though.

I will be back to my Philips Android TV in April sometime, so until then I can only comment a bit here and there and program things without testing them.

yeah you can natively turn on and off the tv, change volume, change channels & sources, turn ambilight on and off, etc.

Hello everyone.
Been using the component for well somewhat near a year now. And i love it.

But i’ve been willing to make the following (if even possible).

I want to make my 2 year old daughter (yeah i know… dont mention) a custonm lovelace view for on her tablet with pictures (buttons) to press which will play the related playlist in the youtube app on my tv.

Anyone have any suggestions? Would be greatly appreciated :slight_smile:
Thanks in advance.

I’m using something like this but haven’t figured out how to use it with playlists:

script:
  alias: youtube
  sequence:
  - data:
      entity_id: media_player.55pos9002
      media_content_id: https://youtu.be/shortlink
      media_content_type: video
    service: media_extractor.play_media

The media player entity is the chromecast on my Android TV.

Thanks for sharing!
I’ve found a way that also works.
Using Joaoapps Join to send notifications to the tv (installed join apk i put on a external hdd). on the TV and set it up like i did on all my other devices.
Seems my Philips TV (49PUS6561) automatically opens the youtube links in the youtube app. Also working with playlists,

Now onto next problem… Making a button to be able to skip to next video in playlist… (going to try and find possibl options… ADB, Broadlink IR, not sure yet).

Somebody has found a new (?) way to power on the TV via a chromecast command, which works for me instantly and even if the TV is in deep sleep. Works much better than the WoL approach, the details are here: https://github.com/eslavnov/pylips/issues/52#issuecomment-568311342 and https://github.com/eslavnov/pylips/issues/52#issuecomment-569831450

@nstrelow, maybe you can implement this in your component?

Dear all,

I use the Philips Andoid TV component with a Philips PUS7304. Nearly everything works smoothly except detection of the ON and OFF state of the TV. While the TV is actually OFF, this is detected properly in Home Assistant.

However, when the TV is ON, there is some fluctuation between ON and OFF - see screenshot - even though the TV is ON continuously.

image

Moreover, it seems that whenever the TV state erroneously is detected as OFF there is also an error in the log file - see below.

2020-01-30 21:35:54 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/helpers/entity.py", line 284, in async_update_ha_state
    self._async_write_ha_state()
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/helpers/entity.py", line 327, in _async_write_ha_state
    attr.update(self.state_attributes or {})
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/components/media_player/__init__.py", line 811, in state_attributes
    for attr in ATTR_TO_PROPERTY
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/components/media_player/__init__.py", line 812, in <dictcomp>
    if getattr(self, attr) is not None
  File "/home/homeassistant/.homeassistant/custom_components/philips_android_tv/media_player.py", line 125, in volume_level
    return self._volume / self._max_volume
TypeError: unsupported operand type(s) for /: 'NoneType' and 'NoneType'type or paste code here

One of the things I want to do by including the TV into Home Assistant is an automation that automatically dims the room when the TV is playing, i.e. ON, and returns the room to regular brightness when the TV is switched OFF. With the intermittent ON and OFF states my Lights continuously change their brightness level.

Any advice is much appreciated.

With regards,
Airhead

@gyrga Awesome find. Will try to integrate this better method of powering on the TV. In the future please add such suggestions to the Github page, helps me keeping track.

@Airhead1234 There are definitly some errors here, which shouldn’t happen. Please also add this to the Github issues in the future.
Also funny my bad programming makes your lights go crazy :see_no_evil: Sorry for that

Also, in April I will be back and be able to try stuff out with my philips TV again.
Until then please bear with no updates (or make changes yourself!)

3 Likes

Since a few weeks my wake on lan isnt working anymore it is enabled on the tv but still get the error:
2020-02-07 08:37:03 WARNING (SyncWorker_2) [custom_components.philips_android_tv.media_player] TV WakeOnLan is not working. Check mac address and make sure TV WakeOnLan is activated. If running inside docker, make sure to use host network.

any idea how to fix this?

Nevermind apprently i changed from WIFI to LAN a few weeks ago. and i didnt change my mac adres in my configuration…