Home automation and ambient lighting using NodeMCU. Control up to 4 devices and neopixel strips.
- Device 1 => GPIO 5 => D1
- Device 2 => GPIO 4 => D2
- Device 3 => GPIO 14 => D5
- Device 4 => GPIO 12 => D6
GET /plugs
[
{
"plug": 1,
"status": 0
},
{
"plug": 2,
"status": 1
},
{
"plug": 3,
"status": 1
},
{
"plug": 4,
"status": 0
}
]
GET /plugs?plug=1&status=1
{
"plug": 1,
"status": 1
}
GET /plugs?plug=2&status=0
{
"plug": 2,
"status": 0
}
GET /strip?r=150&g=50&b=200
{
"msg": "Enjoy the colors"
}
GET /strip?r=150&g=50&b=200&type=roll
{
"msg": "Enjoy the colors"
}
- roll
- snake
- rainbow