This is just for development for now. But anyway, the device does indeed show up in the Home Assistant page. I have a bit of debugging to do regarding the on-off switch. But otherwise, brightness works fine. However, I have no effect options and no RGB color selection, both of which will be necessary to continue developing. Is there something wrong in my yaml, or should I start checking elsewhere?
If you have problem with the ON/OFF I imagine you mean that the status is not reported correctly in Hass.
That could be your problem, you can only access effect and RGB setup if the device is ON.
As long as your lamp appears as OFF in hass you can only access ON/OFF switch and the brightness shortcut.
When your light will appear as ON, you’ll be able to click on it and setup the effect/RGB color.
Excellent. I didn’t realize these relied on the ON/OFF state being available. So in that case, I will shift focus to that area.
I just integrated my secrets.h so I could push to github, if you would like to take a look. It isn’t finished, but the important part will be the section “START SEND STATE”
For whatever reason, BRUH’s code was able to create an array using a non-static variable. I had to use
“new” and “delete” to create a new pointer to the buffer.
The problem was that sizeof(buffer) was returning the size of the pointer rather than the whole buffer. I updated the code to fix this, and everything seems to be working! Thanks, guys!
Well I don’t have as many effects as he does quite yet, but I wanted to change the fundamental structure.
His code used basically a giant bunch of if statements which each took total control of the color of the lights.
In my case, I have a separate background layer and a foreground layer with different per-pixel blending options, such as add, multiply, and alpha. The foreground and background are function pointers. So you create a new function to set the foreground or background array colors. Then the final pass blends the two.
It may seem less efficient, but the idea is that you can create a simple toolbox of effects and combine them in various ways using various colors. What I would like to do is actually be able to control all these parameters with HA, but that seems a ways off.