Philips Android TV component

So for all those like me who do not know Python etc and don’t understand the minimal explanation that the techies are giving for getting the pairing codes, here is what I ended up doing. Anyone please correct me if I’m wrong as it took me days to figure out and I didn’t document it…
The pairing does not need to be done on the Pi (I actually ruined a Hassio installation), but can be done in Windows. Commands are all run from the normal Windows command prompt (which I ran as Administrator, but I’m not sure that’s necessary)

  1. Download and install Microsoft Visual C++ Compiler for Python 2.7 from https://www.microsoft.com/en-us/download/details.aspx?id=44266; it will be required for the pip installation later on
  2. Download Python 2.716 (I used this version as dziugasp mentions in his comment) https://www.python.org/downloads/release/python-2716/
  3. Install Python, in the installation wizard click the Advanced button and tick:
    Compile .py files to byte code after installation.
  4. Read this: https://github.com/BurntSushi/nfldb/wiki/Python-&-pip-Windows-installation
  5. Do the verification and the full pip install as described in doc above. Note that all commands are in the normal Windows command line and you need to cd to the directory that either python.exe or pip (in scripts folder) are installed in
  6. From https://github.com/suborb/philips_android_tv copy [requirements.txt] to the pip folder and run the command pip install -r requirements.txt from the command prompt. It should run without errors (no red text or error descriptions) and install ‘pycrypto’ and ‘requests’. It had errors for me before I installed the MS Visual C++ compiler.
  7. Turn on the TV
  8. From https://github.com/suborb/philips_android_tv copy [philips.py] to the python folder and run python philips.py --host <IP of TV> pair from the command prompt
  9. You should then get the 4 number password on the TV to enter into the prompt which should give you the username and password.
    Hopefully this helps many others of you and save you days of pulling out hairs and swearing at your computer! And thanks to the techies for developing this awesome component, keep up the good work!
    Windows 10, HASSIO, Philips 43PUS7202
7 Likes