You need to have the following things installed to run:
- nodejs
- Global dependencies:
npm install -g typescript
npm install -g ts-node
npm install -g --unsafe-perm homebridge homebridge-config-ui-x
- Raspberry Pi setup:
sudo apt-get install libavahi-compat-libdnssd-dev
- npm dependencies:
npm install
Also see https://github.com/dgreif/ring/wiki/Refresh-Tokens
npm i -g --unsafe-perm homebridge-ring
- Run the ring-auth-cli command to be prompted for your Ring username and password. You will then receive a text message or email from Ring with the two-factor-auth (2fa) code. Enter it into the prompt to generate a refreshToken.
ring-auth-cli
Create a file located at secrets/secrets.json
with a refreshToken generated by following the instructions above. This file must also contain credentials for accessing Phillips Hue.
{
"refreshToken": "...",
"hueUsername": "...",
"huePassword": "..."
}
You need to run the server, prior to starting off the client
When you turn on the server, it needs to be listening on an open port. Also, you can conditionally turn on the ring and hue listener code.
./run-server -r -b -p 5425
./run-server -h
Halloween Spooktacular Main Server
Get ready to spook and be spooked. This is the main server that runs the
show. All sensors are connected from this server, which sends all
notifications to the connected clients
Options
-r, --startRingListener Whether to start the ring listener
-b, --startHueListener Whether to start the hue listener
-p, --port number The port to listen for requests on
-d, --debug Turn on debug logging
-h, --help Prints this usage guide
Once the server is running, you can start the clients! The clients can be started on as many different hosts as you want (or the same host as long as they have different listening ports).
By passing the -s
flag, you can specify which scenes that a client is in charge of. You also will need to supply the clients both the IP and port where the orchestrator (server) is running
./run-client -p 5426 -o localhost -x 5425 -s get_light
./run-client -h
Halloween Spooktacular
Get ready to spook and be spooked
Options
-s, --scene string[] The scene to run. Choose from:
list,get_light,find_bulb,front_light_flicker,welcome_inside,photobooth_thunder,creepy_clown_shower,halloween_hallway,werewolf_door_jiggle,look_its_waffles,guest_bathroom,portal_to_hell
-p, --webserverPort number The port to run the webserver on. Defaults to (800)
-o, --orchestratorIp string The ip where the orchestrator runs
-x, --orchestratorPort number The port where the orchestrator is listening for requests on
-d, --debug Turn on debug logging
-h, --help Prints this usage guide
This can be necessary if you are rate limited by the discovery API
See https://developers.meethue.com/develop/application-design-guidance/hue-bridge-discovery/ See https://developers.meethue.com/develop/get-started-2/