github repo for the arduino code:
https://github.com/Br3nda/thing-restful-rgb-lamp/blob/master/thing_wifi_lamp.ino
To make the experience fit your profile, pick a username and tell us what interests you.
We found and based on your interests.
github repo for the arduino code:
https://github.com/Br3nda/thing-restful-rgb-lamp/blob/master/thing_wifi_lamp.ino



Not automated yet, but it's acting on commands from openHAB over http.
Works from across the room. Next to wire up buttons in OpenHAB



got the neopixel working on the ESP8266. Next the REST server.
gutted lamp, pulled out board with white leds on it.
cut black board same shape as the board i pulled out
soldered 2 neopixel rings together, glued to black board
threaded the 3 wires (gnd, 5v, signal) through the lamp stem.
OpenHAB items:
Switch Lamp_Switch "Lamp" String Lamp_Red "Lamp Red" String Lamp_Green "Lamp Green" String Lamp_Blue "Lamp Blue" String Lamp_Brightness "Lamp Brightness"
OpenHAB Rules
rule "Turn Lamp off"
when
Item Lamp_Switch received command OFF
then
sendHttpGetRequest("http://10.1.1.83/lamp/OFF")
end
rule "Turn Lamp on"
when
Item Lamp_Switch received command ON
then
sendHttpGetRequest("http://10.1.1.83/lamp/ON")
end
rule "Change lamp brightness"
when
Item Lamp_Brightness received command
then
sendHttpGetRequest("http://10.1.1.83/lamp/brightness/" + receivedCommand)
postUpdate(Lamp_Brightness, "")
end
rule "Change lamp red level"
when
Item Lamp_Red received command
then
sendHttpGetRequest("http://10.1.1.83/lamp/red/" + receivedCommand)
postUpdate(Lamp_Red, "")
end
rule "Change lamp green level"
when
Item Lamp_Green received command
then
sendHttpGetRequest("http://10.1.1.83/lamp/green/" + receivedCommand)
postUpdate(Lamp_Green, "")
end
rule "Change lamp blue level"
when
Item Lamp_Blue received command
then
sendHttpGetRequest("http://10.1.1.83/lamp/blue/" + receivedCommand)
postUpdate(Lamp_Blue, "")
end
OpenHAB Sitemap
sitemap lamp label="Lamp"
{
Frame label="Lamp controls" icon="lamp" {
Switch item=Lamp_Switch
Switch item=Lamp_Brightness mappings=["DOWN"='-', "UP"='+']
Switch item=Lamp_Red mappings=["DOWN"='-', "UP"='+']
Switch item=Lamp_Green mappings=["DOWN"='-', "UP"='+']
Switch item=Lamp_Blue mappings=["DOWN"='-', "UP"='+']
}
}
Create an account to leave a comment. Already have an account? Log In.
Become a member to follow this project and never miss any updates