-
Notifications
You must be signed in to change notification settings - Fork 4.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature request, LED state via json #2303
Comments
How about using the backlog command to set some more leds at once keeping in mind the max number of backlog commands (15) and the payload length (255 characters). This works:
|
Just changed max number of commands from 15 to 30. The max payload length is only valid for serial and web console but is not a problem for mqtt. |
5.12.0i * Add multiple color entry support for command Led like Led2 120000.001200.000012 setting led2 as Red, Led3 as Green and Led4 as Blue (#2303)
The latest version now supports multiple colors for subsequent leds separated by a dot. The command
Will set led 2 to Red, led3 to Green and led4 to blue.
Should also work |
Nice, will try to implement in nodered! but you do much stuff with json (timer, ds18x20...), why now this new approach? anyway, will save me a lot of mqtt messages! tnx. |
5.12.0i * Add multiple color entry support for command Led like Led2 120000 001200 000012 setting led2 as Red, Led3 as Green and Led4 as Blue (#2303)
Attention: Just change the separator from dot to space to keep in sync with other commands and possible future changes. I indeed reply with JSON status messages but I find it a lot easier to supply simple commands not using JSON. The advantage is also that the payload string can be used to it's full potential. |
Just trying it out, and I have some strange behaviour; have set the Pixels to 3 as I have 3 WS8212 led's on a test-bed, then following happens; Command: Color 12 (all lights to white) works OK Dimmer is at 100 and the command HsBColor returns: {"POWER":"ON","Dimmer":100,"Color":"FFFFFF","HSBColor":"0,0,100","Channel":[100,100,100]} Any idea what this could be? Am I missing a setting here? See attached picture for Led1 000000 Led2 000000 Led3 000000 PS. Toggling the power ON/OFF with color 12 gives the same color scheme as in the picture. Led's will not go OFF when you select power OFF |
not enough voltage, bad soldering ... |
Can’t be. Its on a 1A external 12v power with only 3 Leds, so that would be max 0.2A ? |
you are kidding? 12v for WS2812? sorry, you bricked it ... :-( |
Ehm @MatzeJoerling , No obviously not.. the Wemos D1 R2 is running from a 12v power supply not the WS2812. Further more If I would command #000000 for the color's they should be 'off' so I can't really understand this is a power issue? As mentioned and seen on the picture, its only a 3 LED test, which cannot consume moren then 0,2 Amps can it? |
bad color with ws2812, in my case, was alwas some issue with voltage. sorry, no idea anymore. |
Since there are only 3leds I used the 5v from the wemos board. I will try an external 5v supply. But as mentioned the commands Color 2, Color 5 etc work fine. It is just when I use the option to set individual leds it goes wrong. Also the Toggle off/on give the same color issues where as I boot it up fresh it works fine until I used the individual led commands. I am not able to work on it this week so will try some more next week. Thanks. |
Hi MatzeJoerling, small update. Used another power supply, and now it seems to work fine. Thanks again for the help. |
5.12.0i * Add multiple color entry support for command Led like Led2 120000.001200.000012 setting led2 as Red, Led3 as Green and Led4 as Blue (arendst#2303)
5.12.0i * Add multiple color entry support for command Led like Led2 120000 001200 000012 setting led2 as Red, Led3 as Green and Led4 as Blue (arendst#2303)
Hi,
wrote some node red stuff that steers my 60 Pixel LED WS2812 Ring with a Power Gauge ( Solar Power vs. used Power is shown). In a bad case i have to send 60 mqtt messages to set all LED to there right color.
It would be nice to send only a json with all information to set led color! I know all LEDs with RGB Information will extend the max mqtt message size, but then i would split the json to 3 or 4 messages, better than 40 or more ...
regards M.
The text was updated successfully, but these errors were encountered: