Closed uronito closed 3 years ago
I presume you interrupted whilst it was hanging?
Obvious question, but was the TV on at the time you were trying?
If you load a browser and go to https://[address]:1926 do you get anything - you'll have to accept the certificate.
The Tv is On,
i 've load a browser and go https://[address]:1926 and dont obtain nothing.
yes, i have interrupted the script.
Regards
Starting pairing request
/usr/lib/python3/dist-packages/urllib3/connectionpool.py:732: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.org/en/latest/security.html (This warning will only appear once by default.)
InsecureRequestWarning)
Starting pairing request
/usr/lib/python3/dist-packages/urllib3/connectionpool.py:732: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.org/en/latest/security.html (This warning will only appear once by default.)
InsecureRequestWarning)
Enter onscreen passcode: 2514
Traceback (most recent call last):
File "./philips.py", line 119, in <module>
main()
File "./philips.py", line 86, in main
pair(config)
File "./philips.py", line 48, in pair
auth['auth_signature'] = create_signature(b64decode(secret_key), str(auth_Timestamp) + str(pin))
File "./philips.py", line 21, in create_signature
sign = HMAC.new(secret_key, to_sign, SHA)
File "/usr/local/lib/python3.4/dist-packages/Crypto/Hash/HMAC.py", line 211, in new
return HMAC(key, msg, digestmod)
File "/usr/local/lib/python3.4/dist-packages/Crypto/Hash/HMAC.py", line 129, in __init__
self.update(msg)
File "/usr/local/lib/python3.4/dist-packages/Crypto/Hash/HMAC.py", line 148, in update
self.inner.update(msg)
File "/usr/local/lib/python3.4/dist-packages/Crypto/Hash/hashalgo.py", line 69, in update
return self._hash.update(data)
TypeError: Unicode-objects must be encoded before hashing
yeahhhhh!!!!!
Works Perfectly!!!!!!!
Thanks!!!!!!!!!
What change did you make?
Python 2.7 insted of python 3.4
Regards!!!!!
Related to issue #2 I think.
I got same problem, and I ran the command python ../philips.py --host 192.168.0.XX pair
with 2.7 it worked well (instead of 3.5).
I had to install pycrypto
in the venv as well (since I'm using a venv installation, not a Pi or someting).
Anyone an idea? I have python 2.7.9 on my pi3
pi@raspberrypi:~ $ curl -O https://raw.githubusercontent.com/suborb/philips_android_tv/master/philips.py
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 4428 100 4428 0 0 16077 0 --:--:-- --:--:-- --:--:-- 16160
pi@raspberrypi:~ $ python ./philips.py --host 192.168.178.48 pair
Traceback (most recent call last):
File "./philips.py", line 9, in
@monza258 you can try my implementation this library https://github.com/arzzen/philips-tv
In a 2017 model,
Whaen I try to pair, appears "start pairing" and error: