GithubHelp home page GithubHelp logo

halloween's Introduction

Halloween

Setup

Install Dependencies

You need to have the following things installed to run:

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

Get a Ring refresh token

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 secrets/secrets.json File

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

How To Run

You need to run the server, prior to starting off the client

Starting the Server

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.

Example

./run-server -r -b -p 5425

Help

./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

Starting the Client

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

Example

./run-client -p 5426 -o localhost -x 5425 -s get_light

Help

./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

Find the IP of a Hue bridge

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/

halloween's People

Contributors

jmattfong avatar roryj-vendia avatar roryj avatar dependabot[bot] avatar tsaodown avatar

Stargazers

 avatar

Watchers

 avatar James Cloos avatar  avatar  avatar  avatar

halloween's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.