Hi. I just started using JoyfullHouse's WLED driver and connected it to a HE scene switch with which I can turn it on and off with a click, and cycle through presets forth and back with a turn left or right. For that to work I created some hub variables where I enter the number of presets define on the WLED instance, the number of the preset that the WLED instance activates at boot, and some other things like incrementing an integer for each double tap to switch "modes" that should tell HE what to do when turning the dial (presets at the moment). I would like to cycle through palettes, effects, and brightness as well. Right now, I'm stuck on palettes. Does anyone know how to determine which palette (index) is active, and how to change only the palette to a different index?
I'm also wondering if there is a way to do away with the variables for the number of presets and the number of the preset that the WLED instance activates at boot. Ideally there's a "presets.count" that shows the number of presets in the array and a "presets.current" that show the currently active preset index that could be implemented. (The same will be the case with effects and palettes. Brightness is 0-255 so that's not an issue.) Can anyone help me out here?
But the FP paramater is not supposed to be supported for incrementing and decrementing. It works great incrementing and goes back to palette 1 after "palette.max". decrementing goes down to 1 ("palette.min"), but does not go to "palette.max" after that. PL and FX work as expected.
Of course they recommend the JSON API, but I don't know how to use it. Can anyone give me an idea how to do with JSON what I did with the HTTP post?
LOL. I guess that I don't actually need JoyfullHouse's driver, if I'm controlling everything via WLED's API, and can simply double tap to change what is being adjusted and then turn the dial to make the change. I don't think that I'll be adding more than presets, palettes, effects, and brightness, so that should be sufficient.
So, other than the JSON question, I think I'm done.
If you are looking at implementing some of the JSON stuff yourself I would assume JoyfullHouse's WLED driver has some examples in it's code.
Another source of examples could be the WLED integration I made for Hypercubes. It has stuff for checking the general info (refresh) and sending commands to it, which almost all pass strings of JSON to the "PostCommand" function.
@snell Yes, I did use the hypercube driver as well, but there was no way to cycle through presets. Other than that, I liked it better... I tried to fumble some of Joyfullhouse's code into yours, but had no luck, and didn't find any documentation that could get me started, so I went for the HTTP API. Actually I figured out how to do the http post with JSON, but WLED didn't react the wat it should have (at least as far as my understanding...), so I decided to be happy with what I have.
If anyone is interested, this is working for me as I hoped (except for the palettes not starting at "palette.max" after going under "palette.min"). This is how it works
A single tap resets the button's mode and turns it on or off:
A double tap sets the mode to either presets (0), palettes (1), effects (2), or brightness (3). I should mention here that I have 3 segments, and blink one or the other or none to visually see which mode selection is active. Thats the win&SS=...:
Unfortunately I will not be at a computer until next week so I cannot really check code, but I will add it to my list to see if I can try it on the hypercube and let you know.
Thank you @snell. I appreciate you being willing to look into it! Honestly, I'd like to be able to be more self-sufficient. Are there any good resources around to learn how to program drivers and apps? I don't know groovy, but I do have a fair amount of experience with C#.
When I get back I will send you a message with some things I have found. But I have not had any really learning on it. My last programming class was a very long time ago.
These are my hex lights. The 3D design was taken from printable or thingiverse, but I can't find the original site to give the author credit, but the original file name is "WallArtAgonBaseV2.stl". Sorry...
AWESOME!!! My latest WLED project wasn't quite so complicated. I created a DIY version of Govee's Floor Lamp that's 7'-11" tall (I have 8ft ceilings) instead of the 50-something inches of the Govee.
It's two LED strips wired in parallel on an 8ft aluminum angle iron pointing toward wall controlled by a dig-uno. That's not its final resting place. Currently, I am brainstorming the best way to create a dashboard that will allow me to control features of each of my three WLED projects from same dashboard. It is probably easier just to put a dashboard link to the WLED GUI though.
@Daro66 I challenge you to make those LEDs screen-reactive to TV!!!