Inspired by Netflix's "The Switch" aka the netflix and chill button as well as Brody Berson (@brody_berson's) and Ted Benson's (@edwardbenson) posts on messing with the Amazon Dash button, I created a quick node app that turns down the Phillips Hue lights and fires up Netflix.
It uses a couple (great) libraries that do most of the heavy lifting:
- node-dash-button - for interacting with the Amazon Dash button
- node-hue-api - for interacting with hue lights
0.0.1
You're going to need an OS X system with Chrome installed, Philips Hue Lights and an Amazon Dash button.
I used an env file to house my variables, but you can just hardcode them in. An example can be found in the root of the project. You need:
- CHROME_PATH - The location of your Chrome.app. It usually looks like "/Applications/Google Chrome.app". This app opens Chrome in kiosk mode (aka full screen).
- DASH_MAC_ADDRESS - The MAC address of your dash button. There are a few ways of finding this, I used wireshark since I already had it installed. The aforementioned articles also have tips on finding this address.
- HUE_IP - The IP address of your hue bridge. Similar to finding the Dash MAC address. You probably want to assign your bridge a static IP.
- HUE_USERNAME - The username you receive after registering a new app to your hue bridge via the hue API. The node-hue-api library has the ability to do this, or you can use the hue api directly.
- MEDIA_LOCATION - The URL of the site (e.g. netflix.com) you want to open.
node app.js
MIT