I’m making this project to control the WSITEM-100149 (‘18-inch fancy 2x4 lamp’ made in 2019) and any future, similar light fixtures:
- A strip of individually-addressed LEDs (WS2812B?), which has some kind of animation going
- A single-color LED light strip that can be turned on or off
Could get fancier (RGBW, more animation options), but for now I just want:
- To be able to control the lights via MQTT:
- Solid-color light states: off, on
- WS2812 strip states: off, solid color, animated
Thinking ‘solid color’ could just be a special case of animated, depending how it’s defined. Currently thinking parameters would just be numeric multipliers for:
- Movement-across-strip speed
- The speed of a set of oscillators
- R, G, B multipliers for each oscillator to give the next value
Is it worth doing ‘anti-aliasing’? Whatever; for now I should just try to get the thing working basically.
Basing this project on PowerCube because I wrote some nice C++ classes for these Arduino projects in there, but I plan to remove most of it.
This may turn into yet another unused project cluttering up my proj/
folder.
If there is no new devlog entry by 2022, it’s probably safe to delete.
I haven’t been able to find any documentation on WSITEM-100149 and attached boards. Is this thing even running PowerCube? I’m not sure! But grepping for “FastLED” hasn’t turned up anything else.
One reason I was making the ‘PowerCube’ project was that sharing libraries between projects when using Arduino IDE seemed difficult. They have to be installed globally. Haven’t messed with PlatformIO enough to know if it’s any better. But I keep rewriting things like WiFi and MQTT connection maintenance, command parsing, etc. Would be nice to have a template project that has my usual stuff in it, and have the stuff be shared libraries.
But I am thinking too much. Just try to make the lights work.
This stuff should be pretty standard. It seems like homie keeps changing their ideas about ‘online’/’disconnected’/etc, though I could be misremembering.
read ..devicename.../status online|offline write ..devicename.../solid1/state/set on ; turn solid white LED strip on write ..devicename.../solid1/state/set off ; turn solid white LED strip off write ..devicename.../anim1/state/set animating ; turn on the animated lights in animated mode write ..devicename.../anim1/state/set #rrggbb ; turn on the animated lights and set them to a specific static color write ..devicename.../anim1/state/set off ; turn off the animated lights ...various animation controls tb
The …state/set topics might in the future be shorthand for changing more complex sets of variables, in which case there will be no single ‘state’ topics to read.
Ha ha! By dumping that PowerCube baggage, This project is already more advanced!
Oscillator parameters are reset on reboot.
I don’t necessarily want to stick with this oscillator model, and it would be cool to be able to control things remotely, but until then, this works, I guess.