A place users can post their projects. If you have a small project and would like your own dedicated place to post and have others chat about it then this is your spot.

User avatar
By Willem S
#78922
eqsOne wrote:Hey Willem,

so you added a color fade, tried your code and although I have no issues with changing color or brightness once it runs, I noticed the esp resets after loading up the sketch.
If I set an initial color, it does show up with a fade-in but like a bit off. If you try a ‚080100‘ for example, green has to go to its lowest ‚01‘ value - now with your sketch green just stays off.
So yes, seems you have it on a way but it quite needs some more debugging indeed.


Hi!

So i got everything working right now. The problem was the config file in homebridge, i had to change it like this:

"brightness": {
"status": "http://xxx.xxx.x.xx:xx/bright",
"url": "http://xxx.xxx.x.xx:xx/set/bright/%s"
},
"color": {
"status": "http://xxx.xxx.x.xx:xx/set",
"url": "http://xxx.xxx.x.xx:xx/set/%s",
"brightness": true
}

Right now i still have one problem. When I re-open the Home app the LEDstrip turns off so i have to set the brigtness and color all over again.

Grz,

Willem
User avatar
By eqsOne
#78950
Willem S wrote:(...) When I re-open the Home app the LEDstrip turns off so i have to set the brigtness and color all over again. (...)


Have you tried my color-fade Sketch posted here? Should work as expected.

If you want to stick with your own sketch, uncomment the serial debug output within it and have a look at your console to what HomeKit asks for and gets in response when opening the App. This way you'll probably get an idea of what's going wrong.

Generally, when you open the App, HomeKit looks for devices and asks for their current state. If it gets wrong information in response, it will show wrong slider settings or colors but does not switch the device to a different state.

I might be wrong but could it be your esp is just freezing and restarting as soon as you open the HomeKit App?! Your code is blocking due to its 'for' loop, so the esp can't handle HomeKit requests and do color-fades at the same time without issues.