You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Apr 28, 2022. It is now read-only.
extending the API is easy and could be done directly in McLighting.ino.
But set_switch is only a shortcut for alerdy existing API endpoints, I think:
/set_switch=1 is equal to /set_brightness?c=255
and
/set_switch=0 is equal to /set_brightness?c=0
Isn't it possible to use these API calls in OpenHAB?
Got it working with the settings below. It will dimm also the LEDs :)
rules/mqtt.rules
rule "Neopixel Lights"
when
Item NeoPixel received command
then
switch(receivedCommand) {
case ON : sendHttpGetRequest("http://192.168.xxx.xxx/set_brightness?p=100")
case OFF : sendHttpGetRequest("http://192.168.xxx.xxx/set_brightness?p=0")
}
end
Will get SK6812 LEDs because they have a second LED in Warmwhite or Coldwhite but your Code does not support it. I am not a programmer but I found here the Post of @semaf where Adafruit Neopixel supports SK6812. Is it hard to combine it with your Code?
I don't have any SK6812 available here, so I don't know what exaclty to do, to make them work. If the neopixel library natively supports them, it could be sufficient to enhance the API endpoints with an additional parameter to control the warm white led, But I'm not sure.
Thanks for the great Tutorial!
Is it possible that you add some more options to HTTP Rest API? I am using OpenHAB 2 and could run just the /set_brightness of the API.
Therefore /set_switch would be interesting to switch on and off. Its possible to bring the brightness to 0 but this is not possible by buttons.
The text was updated successfully, but these errors were encountered: