Philips Android TV component


Well like it says:

“<!DOCTYPE html>” Should not be there, this comes from download http sites instead of the .py file


Did you try the original Phtilips TV component? There is an official component, maybe that works better for you.

Also I had some problems with http requests using Postman. It just stopped working after a while.

This and your problem could be related to HTTP long polling which the API is using:


Strange. I have uploaded file which was downloaded from your Github page. I will try original component tonight. Thanks!


@nstrelow The script is working fine! Thanks a lot… you are a genius, the only part that won’t work is the turn on tv button. Do you have any idea how to fix this?


I have the same problem. Suspect the TV reacts to WakeOnLan packets, and is only then controllable.


Thanks for the great work! :smiley:
I got it working with my 55POS9002. I don’t have cable/flow tv, only use Apps and HDMI. I got a Intel NUC connected to my Denon X1000 receiver and I would like to detect when it’s active on HDMI. The receiver is connected to HDMI 2 and HA can’t detect that source.


Current activities shows

curl -X GET --digest --insecure -u user:pwd


I tried lots of variants of sources, current sources. Any ideas?
I’m running lasted version of and a Raspberry Pi3 Hassbian image, HA version 0.82.1.



It is working for me. Takes a while until it starts.
Make sure to have Wake on WLAN WoWLAN, enabled, it’s in the network settings of the TV


I do not think I found a possibility to switch between hdmi devices.
Sources are only channels and apps. TV is one app and you can start it, but that will just display the last hdmi channel used I think.

I use it to switch between hdmi devices. You have to have your HA devices (e.g. RPI) attached to the tv via hdmi


I got it working. Instead of downloading component directly from GitHub, I have downloaded raw version. And it worked like a charm. Thanks!


Look on a media_player.philips_js component and a patched ha-philipsjs. It should work with allcab/allsat as well.



i tried to set up the philips_2016 and ambilights component. Both devices (mediaplayer and light) are unknown or not availbale.

I have a 9002.

For the mediaplayer component I get this error (it looks very similar to the one I get from the ambilight component):

Update for fails
Traceback (most recent call last):
File “/usr/local/lib/python3.6/site-packages/homeassistant/helpers/”, line 221, in async_update_ha_state
await self.async_device_update()
File “/usr/local/lib/python3.6/site-packages/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/local/lib/python3.6/site-packages/homeassistant/util/”, line 324, in wrapper
result = method(*args, **kwargs)
File “/config/custom_components/media_player/”, line 235, in update
File “/config/custom_components/media_player/”, line 314, in update
File “/config/custom_components/media_player/”, line 381, in getState
r = self._getReq(‘powerstate’)
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)



I have an 55PUS7272/12 and are new to this and want to connect it to HAIO.

Have tried different ways but not seems to get it to work.

Could anyone tell me step by step how to connect my PH TV to HAIO?

Thanks very much for helps :slight_smile:


Hey guys,

Thank you everyone for contributing to this component!

The one thing that I really hated about my Philips TV is that I had to go deep into the menu to turn on/off ‘Ambilight + hue’ (the one that syncs hue lights and TV’s ambilight), which made it almost impossible to automate. While Philips mobile apps can toggle this setting, I’ve never seen anybody successfully changing this setting through the exposed API.

So, I’ve decided to sniff the traffic between the mobile app and the TV using a simple man-in-the-middle attack and BINGO, now I can actually get the status and toggle ‘Ambilight + hue’. I need to run some more tests, but it definitely works!

I have 2 questions for the community:
1) Is this ‘Ambilight + hue’ setting useful for anyone besides me?
I can add it to the component, but I want to make sure that this would not be a useless change.
2) Is there any other functionality in the iOS/Android app that has not been discovered in the API yet?
I can sniff the traffic and hopefully add the missing functions.

Cheers guys!


This is very usefull. I almost never use Ambilight because of the hidden menu.


@Nutti85 Thanks for the reply, glad to hear I am not the only one who hates this menu… Which TV model do you have? Would you be willing to test the updated component if I prepare one? (it works on my TV, but I want to test it on other models before making it public…)

@nstrelow Would you be open to accepting a Pull Request with “Ambilight + hue” toggle added? If yes, I’ll prepare one once everything is tested and ready to go.


This looks like it is not working for your TV model OR your username password or some other setting is wrong.


I think it becomes very clear that I need a good Readme in my Github repo.
I will try to add one soon and link it back here.


Not sure, I did go through all know APIs and the app itself, and I don’t think there is something especially useful not already discovered in an API. A way to switch between HDMI devices, that would be awesome.

I am super happy to get PRs. But I am unsure if this fits into this media component.

Actually there is an Ambilight component Philips Android TV Ambilights (Light) component

Check that out, it supports a lot of different modes. Maybe your change is already built in or it fits better there.

Ideally we should built a python module for the Philips TV. It should support everything from media player, app switching and amiblight stuff, so everything the API supports.
This python module should then be used for both Ambilight and media player.


Very much appreciated

Thank you


Thanks, that’s a good idea, I’ll give it a go.

Not sure if there is a way through API (I’ll check), but it’s super easy through ADB: you can send any keypresses through it and function keys (F1, F2, etc) switch input on my Philips TV.