Open iCarl opened 1 year ago
Thx for your request! I don't think, that it will work fine, because wled is no part of Moonraker or Klipper. It's a third-party software. But I have to double-check it.
WLED offers an JSON API to controll it. With that it is possible to implement a color picker. The real question is if its a use case for mainsail.
We actually want to have only one api between Mainsail and Host (Moonraker). So it would be nice if it could connect with Moonraker.
That's reason I said to question the usecase for mainsail. The moonraker wled api offers just basic control of wled. Which doesn't include the possibility for a colorpicker. The moonraker docs even recommend to use the wled json api for more low level control.
Ok, thanks
@rackrick ohhh... i missed this option. maybe i should check the moonraker integration of WLED and check what is possible in the GUI with it.
@iCarl i will reopen this ticket as a reminder to check this component.
@meteyou hmm... just checked the moonraker repo. there is even an function to set the wled colors set_wled in moonraker. But this function is not exposed as an api endpoint... just as remote method for gcode calls? remote methods for GCODE.
Guess you have a better undstanding of moonraker then i have. May have a look there. If it's possible to expose that method as endpoint. Implmenting the color picker could be quite easy.
@rackrick mainsail only sends G-Codes for the klipper LEDs. So it would fit, but Moonraker must also manage the current state and update it via Websocket to the clients. This is what I have to check.
@meteyou moonraker returns just an ok result... not the actuall state of the leds. Thats what you meant right?
@rackrick thats normal for gcode. you should get a notify back with the new state.
@meteyou the notify_status_update contains pretty much everything else. but no wled information. If I compare it to the klipper led function. The next status_update contains the colors per channel... etc
notify_status_update
should only send klipper data. so it should be a own notify_xx
for WLED. Maybe this is missing right now in Moonraker.
ahh.. find right now the docs for it: https://moonraker.readthedocs.io/en/latest/web_api/#get-strips. there are own API commands for it.
there are... but they don't contain any color channel information. which we would need for the colorpicker 😅
Oh right. Only presets, brightness and on/off
guess the "problem" is the possibilty of having each led in a different state.
LED 1 -> red
LED 2 -> green
LED 3 -> blue
what do you want to display in the colorpicker then?
moonraker keeps track of the color states in the array _chain_data
which could be probably added in the return of the status endpoint.
This would fit. It's the same as klipper returns for Neopixel. And then we also need an API point to send new color commands. Atm moonraker only supports on/off from presets.
@rackrick mainsail only sends G-Codes for the klipper LEDs. So it would fit, but Moonraker must also manage the current state and update it via Websocket to the clients. This is what I have to check.
We could use the gcode method for that or would you prefer an extra http endpoint for that?
Because you get the update states via Moonraker directly, I would also prefer to send the commands via Moonraker with separate API points (Websocket/http).
Any updates on this request ?
Currently using gcodes to control WLED at the moment. Would love to see my WLED light pop up in the misc bar some day ;)
+1
Requested feature:
Could it possible to have a color picker in a similar fashon to the neopixel support in Mainsail ( #1050 )?
Solves the following problem:
No response
Additional information:
No response