homekit-neopixel-rpi
Hardware:
Raspberry Pi Neopixel strip
Software
homebridge on Raspberry Pi python3 nodejs
sudo npm install -g pm2 homebridge homebridge-neopixel --unsafe-perm
# .homebridge/config.json
# see config.json for full example
# add these lines in accessories
{ "accessory": "HTTP-NEO",
"name": "Neo Lamp",
"switch": {
"status": "http://localhost:5000/status",
"powerOn": "http://localhost:5000/on",
"powerOff": "http://localhost:5000/off"
},
"color": {
"status": "http://localhost:5000/color",
"url": "http://localhost:5000/set/%s"
},
"brightness": {
"status": "http://localhost:5000/bright",
"url": "http://localhost:5000/set/%s"
}
},
{
"accessory": "HTTP-NEO",
"name": "Neo Rainbow",
"switch": {
"status": "http://localhost:5000/status",
"powerOn": "http://localhost:5000/rainbow",
"powerOff": "http://localhost:5000/off"
},
"color": {
"status": "http://localhost:5000/color",
"url": "http://localhost:5000/set/%s"
},
"brightness": {
"status": "http://localhost:5000/bright",
"url": "http://localhost:5000/set/%s"
}
}
pm2 start homebridge
sudo FLASK_APP=server.py flask run