Skip to content

peterlee0127/homekit-neopixel-rpi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

homekit-neopixel-rpi

homekit-neopixel-rpi

Demo Video

You need

Hardware:

Raspberry Pi Neopixel strip

Software

homebridge on Raspberry Pi python3 nodejs

Install

sudo npm install -g pm2 homebridge homebridge-neopixel --unsafe-perm

setting

# .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"
        }
  }

Start the homebridge

pm2 start homebridge

Start the server

sudo FLASK_APP=server.py flask run

homebridge neopixel RPi neipixel