studioimaginaire / phue

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

Create flicker.py #198

Closed pauljones0 closed 2 years ago

pauljones0 commented 2 years ago

This is a simple simulation of a candle flicker. Timings could be improved somewhat, but I think it's a nice addition to the example set.

alpert1 commented 1 year ago

This example doesn't check which id's are actually given to the connected lights and therefore returns following errors:

ERROR: resource, /lights/2/state, not available for light 2
ERROR: resource, /lights/1/state, not available for light 1
ERROR: resource, /lights/2/state, not available for light 2
...
natcl commented 1 year ago

Does any other example work for you ? Did you pair your bridge first ?

alpert1 commented 1 year ago

Does any other example work for you ?

I haven't tried any other example.

Did you pair your bridge first ?

Yes. The issue is that the example doesn't check which id's are actually given to the connected lights and assumes that they start with 1. In my case I only have three lights connected with the id's 10, 11 and 12. Therefore, the example will return an error when trying to control lights with the id's 1-3, which don't exist.