studioimaginaire / phue

A Python library for the Philips Hue system
Other
1.52k stars 267 forks source link

get_api() output not consistent #124

Open testerbb opened 6 years ago

testerbb commented 6 years ago

Hi everybody

Calling twice the get_api()-function prints twice different results. Furthermore, non of the python outputs corresponds to the hue output which can be retrieved by the hue/html api. It seems the problem is related to some buffering because the python-outputs are extracts from the hue-output. Does anybody have experience with this problem? thanks in advance for the help

Best regards

natcl commented 6 years ago

Can you send example prints ?

testerbb commented 6 years ago

This is the HTML response from hue-api

hue api 2018-01-02_18-17-49

And these are screenshots from the python output. The code is very short and simple. Nevertheless, the output is not the same.

2018-01-02-181833_1824x984_scrot 2018-01-02-182926_1824x984_scrot 2018-01-02-183053_1824x984_scrot

natcl commented 6 years ago

Are you sure it's different ? The output of get_api() is not "pretty printed" by default. That's probably the only difference...

testerbb commented 6 years ago

Yes, the starting is not always the same. Once the output starts with "schedules", once "light" and another time with "config"

natcl commented 6 years ago

This is normal, there is not guarantee of order in JSON/Python dictionaries. As long as all the data is there it is fine.

2018-01-02 13:52 GMT-05:00 testerbb notifications@github.com:

Yes, the starting is not always the same. Once the output starts with "schedules", once "light" and another time with "config"

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/studioimaginaire/phue/issues/124#issuecomment-354845821, or mute the thread https://github.com/notifications/unsubscribe-auth/AAEu9CGBzC2g3AmkwApN_RLSPixWgTSJks5tGnrrgaJpZM4RQnPB .

testerbb commented 6 years ago

Thanks for the hint. Nevertheless, on hue html api the structure is always the same, but probably its written in java and not in python. I will check the structures and come back to it

Thanks