eslavnov / pylips

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

[BUG] I get wrong response for api discovery #91

Closed Ganime422 closed 3 years ago

Ganime422 commented 3 years ago

Describe the bug Hi thanks for this lib! Wen I'm trying to find the api version, the lib sends request to: http://192.168.43.178:1925/1/system and I get this response:

{
    "menulanguage": "English",
    "name": "Philips TV",
    "country": "Slovakia",
    "serialnumber": "ZH1B1215001232",
    "softwareversion": "Q554E-0.97.0.0",
    "model": "46PFL5527H/12"
}

and then I get an exception when the lib tries to get the api version from the response in here: https://github.com/eslavnov/pylips/blob/master/pylips.py#L152

Is there a way to support my model as well or it's not possible?

eslavnov commented 3 years ago

Hi @Ganime422,

As far as I can tell, this a 2012 model, so it's not really supported. You can try to set the host (TV's ip address), port (1925), protocol (http) and apiv (1) in the settings.ini and some of the commands might still work for you, but no promises. Please share here how it works for you!

I will also fix the exception in the next version.