Philips Android TV component


So I’m going to post a noob question here, maybe someone can point me in the right direction. I’ve been trying to make this work in the field below the IDE in Home Assist via the browser.

This looks like it’s working but I can’t get past this. I tried python as wel but it doesn’t seem to run Python3 for some reason

   philips_android_tv git:(master) ✗ python2 --host> pair
Traceback (most recent call last):
  File "", line 6, in <module>
    import requests
ImportError: No module named requests

Am I doing it all wrong? I tried to install Python 3.7 on my Windows laptop but it does’t make any sense to me (none of the commands work, it just sticks with >>> in the commandline).


Look at step 2

means it is in python shell mode


You need to install the “requests” pithon module (“pip3 install requests” or equivalent on Windows)


I finally got it working. I had to install PyCrypto (to be honest, I asked someone else to do it for me in the end). I have one small issue.

Changing the volume on the TV works perfectly when the soundbar (via HDMI CEC, so it turns on when the TV turns on) is off. But when the soundbar is on, it will only change up or down by one point, no matter what I tell it to do.

This is the same when I ask Google Home to set the volume to a certian level. It works when the soundbar is off, but not when it is on. So it isn’t a flaw in this component, but I think it might be the best place to ask this question.

Does anyone know a way to fix the volume problem when the soundbar is on via CEC?


Just installed this component to control my 55PUS7303 and it works great. Thank you for this component.


Hi, thanks for making Philips TV support better to Home Assistant.

Is there any way to make EPG working in Home Assistant? Then I could ditch the remote. :sweat_smile:


Hi there, maybe can anyone help me out.

I used the pair-script, with success, on my Linux desktop. So I have an user/password.

I tried to get it working on a Docker Home Assistant install with no success.

EDIT 1: Got these error messages:

Traceback (most recent call last):
File “/usr/src/app/homeassistant/helpers/”, line 221, in async_update_ha_state
await self.async_device_update()
File “/usr/src/app/homeassistant/helpers/”, line 349, in async_device_update
await self.hass.async_add_executor_job(self.update)
File “/usr/local/lib/python3.6/concurrent/futures/”, line 56, in run
result = self.fn(*self.args, **self.kwargs)
File “/usr/src/app/homeassistant/util/”, line 315, in wrapper
result = method(*args, **kwargs)
File “/config/custom_components/media_player/”, line 235, in update
File “/config/custom_components/media_player/”, line 316, in update
File “/config/custom_components/media_player/”, line 359, in getChannels
r = self._getReq(‘channeldb/tv/channelLists/all’)
File “/config/custom_components/media_player/”, line 291, in _getReq
return json.loads(resp.text)
File “/usr/local/lib/python3.6/json/”, line 354, in loads
return _default_decoder.decode(s)
File “/usr/local/lib/python3.6/json/”, line 339, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File “/usr/local/lib/python3.6/json/”, line 357, in raw_decode
raise JSONDecodeError(“Expecting value”, s, err.value) from None > json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

Question, is a Home Assistant setup using a Docker (on a Synology NAS) supported?

I could imagine the requirements are different. Because I used the pairing script on my local computer, so do I need to execute the pip3 install -r requirements.txt script on my Docker install?

Does anyone got this working on a Home Assistant (Synology NAS) Docker configuration?

EDIT 2: FYI, I noticed the media_player component in my HA front-page, with an empty source selection, but powering off worked.
EDIT 3: FYI, also a __pycache__ directory is made in the custom_components/media_player directory containing a philips_2016.cpython-36.pyc file.


For anyone interested in automating the Ambilight+Hue setting, I have put together a Switch component using most of the code from my Ambilight Light component, this adds support for Ambilight+Hue status (while the tv is available) and switching on/off from Home Assistant. Note, there is a bit of a lag between HA sending the on/off request, and registering it change, therefore it is advised to decrease the scan_interval in your configuration.yaml


Is there a way to switch to a certain HDMI input? Like HDMI 1


No, Use hdmi-cec


And there is no workarround for this? Because there is an option “Source”.

Maybe something like pressing source and then 4 times down?
Is there a up, down, left, right command?


You can build your own script doing this with key input. The the repository with the component in this thread Source is meant for channel and app only.


Thanks, but that might be out of my programming skills.


Most of the times I try to turn on the TV with component it fails. Like 3 of 4 tries fail.

When I turn it on manually the component connects. I have WoWLAN enabled and I read that it not a 100% reliable.

When it fails I also tried to ping my TV with a failing result. So it looks like that’s not an issue of the component but one of the TV, because it’S offline.

Do you also experience this? I also use the ambilights component and I have a similiar experice here. The Ambilight-Light only works in manual mode for about 5 mins after I turn the TV to standby. After that it will go unavailbale (also no ping).


It is the same for me. But it should be possible to make the component more reliable.
The steps to turn on the TV using wake on lan (or WoWLAN) has 2 steps:

  1. Send a WOL/WoWLAN packet to the TV. This wakes up the TV API
  2. Send a Power: On command to the TV

To make it more reliable, we would need a function which waits until the API of the TV is online and then sends the command. Currently we send the WOL, and then try a few times to turn it in. This would need to be better.


@nstrelow Do you use the ambilight component as well?

Maybe you coudl share you experience with that as well,



Only works when TV is on. The light goes out, when the TV goes to sleep, so the API is not accessible anymore


Everyone should check out the ADB addon and the custom component made for it.

This can potentially do much more than just pause and play inside Apps, but show content of the Apps.
I will try it out myself soon.


Keep us updated.


You can use ADB for this:

UPD: the API itself does not support this AFAIK. Button combos like “source => down => down…” worked terribly for me (constantly selected wrong inputs or you have to add a delay between sending keys, but then it’s SLOW)