probonopd / ESP8266HueEmulator

Emulate a Philips Hue bridge running on an ESP8266 using the Arduino IDE.
MIT License
411 stars 93 forks source link

Ajson #13

Open sticilface opened 8 years ago

sticilface commented 8 years ago

Can I ask why you switched from arduinojson to ajson?

I'm looking at integrating this project now so trying to get to grips with it.

Looking at the json string I thing you limit of 8 lights is to do with you json print buffer size. I can do 10 actually. But it breaks once my strong goes over 4096 chars.

The original hue strip light I think can only be one colour at a time. Just looking at their promo video. So one solution would be to set how many hue lights u want to a max of 8, then dividing the strip up by that number?

I'm going to try and use spiffs to store the led state so that u can name the lights, add groups etc.

sticilface commented 8 years ago

Just seen this in the API docs

" Starts a search for new lights. As of 1.3 will also find switches (e.g. "tap")

The bridge will search for 1 minute and will add a maximum of 15 new lights. To add further lights, the command needs to be sent again after the search has completed. If a search is already active, it will be aborted and a new search will start. "

probonopd commented 8 years ago

At the time I tried wrapping my head around ArduinoJson, but found it cumbersome to use (I am not a fluid C/C++ programmer).

Your idea to "set how many hue lights u want to a max of 8, then dividing the strip up by that number" sounds good to me, actually I had been thinking of the same some time ago, but didn't really want to acknowledge that the ESP8266 might not be capable of doing more.

spiffs is also a cool idea, didn't exist at the time when I was writing the current code.

probonopd commented 7 years ago

@sticilface still interested in implementing this?