eslavnov / pylips

Control Philips TVs (2015+) and Ambilight (+ Hue) through their reverse-engineered API (+ MQTT support!)
MIT License
348 stars 59 forks source link

[BUG] return print('Error', r.json()) #5

Closed jdschuitemaker closed 5 years ago

jdschuitemaker commented 5 years ago

Describe the bug I am seeing the error below when I try to run a pylips command

File "pylips.py", line 48 return print('Error', r.json())

I notice that that in line 44 there is a request to an ip address (172.168.201.11) that is not responding. Shouldn't this be the ip address of your TV instead?

To Reproduce Steps to reproduce the behavior: run the following command: python pylips.py --host <ip address> --user <user code> --pass <pass code> --command powerstate

Expected behavior JSON reflecting the result of the powerstate command

jdschuitemaker commented 5 years ago

It seems that the following command is not supported in Python (?). I am using version 2.7.13

return print("some text")

After removing the "return" from that line, it starts working. I remove that from all lines containing that type of return commands.

eslavnov commented 5 years ago

I notice that that in line 44 there is a request to an ip address (172.168.201.11) that is not responding. Shouldn't this be the ip address of your TV instead?

Fixed, thank you!

It seems that the following command is not supported in Python (?). I am using version 2.7.13

You should be using Python 3 as stated in the "Prerequisites" section in the readme.