Philips Android TV component


In configuration.yaml you have to put:


  • platform: philips_2016
    name: Philips TV
    host: (your TV Ip address)
    username: username (to get this, pair your TV with HomeAssistant using the python script mentioned above)
    password: password (to get this, pair your TV with HomeAssistant using the python script mentioned above)

After that, you have to copy the file to:


(if you don’t have media_player folder, create it, make sure that you are on homeassistant user if you are running Hassbian)

For my 55PUS6561/12 i have modified the script to retrieve the TV state and to show the turn on button when TV is OFF, but i cannot upload because i am a new user and i am not allowed to do it. If someone is interested, please reply and i will find a way.

Thanks :slight_smile:


How to get the username/password from the python script??


Running the linked script from above will create / display username and password (as mentioned in the first posting, step #2).


Copy from here on your Raspberrry Pi in a folder (i did it while i was logged with homeassistant user)
Run the script
A code will appear on the TV, write it in the console
After that, username and password will be displayed in the console


I’ll do that tonight…
Do I need first to make the script executable?


No, .py extension is from a python script. Just copy the file to the raspberry pi and run the following command (make sure that before running the command you are in the same location where you put the file):

python --host 192.168.xx.xx pair

(change your ip address with your TV IP address)

You will see a 4digit code on your TV, insert it in the console and after that you should see the username and password


Awesome that people are working on it. I started on a component, but got frustrated the with the API.
It’s such a bummer that it apparently has less functionality and no documentation at all.

Starting apps is possible judging from the Android TV remote app.
GET activities/current
{‘component’: {‘className’: ‘’, ‘packageName’: ‘’}}

POST activities/launch
That payload needs to be send to the TV.
The TV should then execute the following code:
intent.setComponent(new ComponentName(pkgName, classPathToActivity)
So exactly the same thing the get is returning.

But I get a Bad Request 400, when posting it like this.


Thanks @an20dei. It’s working now, but it this all it provides out of the box?


Can it be enhanced / customized somehow?


yeah its pretty limit what you can pull out with the current knowlegde of the API.
lets hope someone are skilled enough to find fix a proper working component :wink:


Hi guys,

Is there anyone who managed to make any progress here?
I manage to pair 55POS9002 and set up the component. It can change the volume and mute/unmute the tv.
However, my biggest disappointment is that it’s not even possible to get correct on/off state of the tv. Does anyone know if it’s possible to at least fix the state?
I read in the manual that it’s possible to request API from the manufacturer. Would someone here be able to implement it?


I will put tonight my file (i have modified it a little even i don t know python at all). What is improved:

  • state is retrieved correctly
  • turn off / turn on (because in the initial script if the tv was off there was no button to turn it on)


Such good news! Where will be possible to find your fIle? Will you post here?


Very good news, so i am also interested in the update Python file … Because the current Philips support in HA isn’t working well with my TV.


Seconding the @Molodax with the same question… Would you be so kind as to share the location you’re going to post / you’e posted your version? Thanks in advance!


Sorry guys,

I was busy and i didn t have time to upload it till now. You can find the file attached, please modify the extension of the file from .xml to .py (i am not able to upload directly .py files here).

This is how it looks for me:



philips_2016.xml (7.8 KB)


thanks, Andrei!


you are welcome, hope it works for all (i have 55PUS6561 model). I don t have python knowledge, but i think that it can be improved by someone who knows, there are more APIs available in the Philips TV that can be used, i think …


Hi to all! I’ve good news…no very good news, but good news :slight_smile:

After try and retry to pair my android tv (philips 49pus7100/12) with the tools of suborb without success. I’download the iOS app “PhilipsTVRemote” and in the help section, said the uses: JSON: 5.

I’ve modified the suborb python:

r =“https://” + config[‘address’] + “:1926/6/pair/request”, json=data, verify=False)


r =“https://” + config[‘address’] + “:1926/5/pair/request”, json=data, verify=False)

and when I try to pair, the code appear in the TV!!! :slight_smile:

But when I type the code, the pair process ended with the error:

air:philips_android_tv-master kulo4$ python3 --host pair
Starting pairing request
Enter onscreen passcode: 5611
Attempting to pair
Traceback (most recent call last):
File “”, line 123, in
File “”, line 90, in main
File “”, line 60, in pair
File “/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/requests/”, line 885, in json
return complexjson.loads(self.text, **kwargs)
File “/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/json/”, line 319, in loads
return _default_decoder.decode(s)
File “/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/json/”, line 339, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File “/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/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)

Any help? Thanks!!!


I’ve change too:

r =“https://” + config[‘address’] +":1926/6/pair/grant", json=grant_request, verify=False,auth=HTTPDigestAuth(config[‘device_id’], config[‘auth_key’]))


r =“https://” + config[‘address’] +":1926/5/pair/grant", json=grant_request, verify=False,auth=HTTPDigestAuth(config[‘device_id’], config[‘auth_key’]))

and now it’s works!!! I can pair the TV!!! :slight_smile:

I’ve my usr and pass to use it with hass/plugin!!


I needed to change int

BASE_URL = ‘https://{0}:1926/6/{1}’


BASE_URL = ‘https://{0}:1926/5/{1}’

and it’s working in hass!! I can power on and power off the tv and volume up and down.47

Any possibility to add BASE_URL as a configurarle variable in thanks!