imbrianj / switchBoard

Control of Internet connected devices within a given network via web interface.
MIT License
201 stars 53 forks source link
home-automation javascript machine-learning raspberry-pi switchboard

Chat on IRC Build Status Dependencies Status Dev Dependencies Status npm version Known Vulnerabilities

SwitchBoard

SwitchBoard is a node.js based application intended to run on a device within a local network - preferably a dedicated server (such as a Raspberry Pi). It allows all web capable devices within that same network to issue commands to any other configured device. You may use your phone, tablet, desktop or laptop browser to interact with any controllable device - or issue simple GET commands programmatically. It's able to (optionally) log actions for machine learning to determine usage patterns and automate some tasks.

Follow along development in the SwitchBoard blog.

Video demonstration:

Demonstration of SwitchBoard

Or you may browse through a static version.

Setup

Easy

Advanced

Download the source, edit config/config.js to reflect your node server IP, desired port to hit when you visit the remote and web mac address of the server (used for authenticating against Samsung TVs). If you don't have a specific device, just comment out or remove the configuration for it. If you do have a device you'd like to control, just populate the given fields - they should all be pretty obvious in their use. Run node app.js then visit your node page. Run a command from the remote and Allow access on your TV.

Supported Devices/Services

Name Status Notes
ActiveBuilding Stable Checks for arrived packages to be picked up from your concierge
Air Quality Stable Checks local air quality values from OpenAQ.org
Belkin Wemo Stable
Chromecast Testing Limited functionality. Determines if TV is on and allows sending of YouTube IDs
Client MP3 Stable Sends an mp3 playback command to all Websocket connected clients
Client Notify Stable Sends a Desktop Notification to all Websocket connected clients
Client Screen Saver Development For use with OLED display fixtures - blacks out screen when not in use
Client Speech Stable Sends text to be speech synthesized to all Websocket connected clients
Client Vibrate Stable Sends a command to vibrate all Websocket connected clients (phones, tablets, etc)
Enviro+ Testing Uses a remote Raspberry Pi with the Pimoroni Enviro+ HAT with a python script to report air quality measurements
Debug Stable Display basic system information (memory, cpu, uptime)
Denon Stable New controller and still in testing
DLinkCamera Stable Controls DLink MJPEG pan/tilt cameras
Foscam Stable Works with MPEG versions such as FI8910W. H.264 models are not supported. Arm, Disarm, Go to presets, etc. INSECURE Exposes camera credentials to users
Geiger Stable Uses switchboard-phpServer to track radition with a GQ brand geiger counter
Gerty Stable A simple interface for all devices that reacts to natural inputs
GitHub Testing Poll for commits to a given repository. For Switchboard, can tell you if you should update
have i been pwned? Stable Query haveibeenpwned.com to see if your username has been part of a data breach
LG TVs Development Still need work on authentication
Location Stable Uses switchboard-phpServer and Tasker to track your GPS position
MonoPrice 3d Printer Stable Probably works with other brands and models, but tested on Mini Select v2
MP3 Stable Works on *nix with mpg123 or OSX with afplay. Win not supported
Neato Developing Control for Neato Botvac vacuum cleaner
Nest Stable Works with Nest thermostat and Protect smoke / CO detectors
Octoprint Testing Displays basic stats - completion percentage, temperatures
Panasonic Stable Text input and basic controls
Pi-Hole Stable Display stats from Pi-Hole dashboard
PowerView Stable Hunter Douglas PowerView blinds control
Pioneer Testing Reportedly works, but unable to test
PS3 Stable Uses GIMX to emulate PS3 controller (see below). OSX not supported
Pushover Stable Requires purchased app and token / user key
Raspberry Remote Stable Uses Raspberry Remote to control lighting. Only Linux is supported
Roku Stable Launch apps directly, text input and basic controls
RSS Stable Simple RSS and Atom reader
Samsung SmartTV Stable Text input and basic controls
SmartThings Stable Control devices and monitor real-time states. Requires companion app
SMS Stable Uses Twilio. Requires ID and token
Speech Stable Uses espeak for *nix, say on OSX. Win not supported
Sports Stable Pull sports scores from ESPN (please don't hammer this endpoint)
TCL SmartTV Stable Uses the Roku controller, but it's own template with additional controls
Traffic Cams Stable View multiple traffic webcams
Travis CI Stable
Twitter Stable Present mentions of your Twitter handle or subscribe to a user's feed
Weather Stable Uses Dark Sky API
Website Stable Simple controller to load an external site as an iframe
XBMC Stable Basic controls work

How to Contribute

I'm always looking to add devices and services. Even if you're not a developer, you can help by testing, doing documentation, translating or even just expressing interest in something to help guide the effort. Join ##switchboard on irc.freenode.net If you'd like to reach out. If you work for a device manufacturer - let me know if I can beg, borrow or steal a device from you to integrate!

Controlling your PS3 -- General instructions

Overview: You'll need to have your SwitchBoard device (computer, raspberry pi, etc.) pretend to be a PS3 controller (aka Sixaxis Controller) that communicates with the PS3 via Bluetooth.

Controlling your PS3 -- via a Raspberry Pi set up as a persistent server

More Device Installation Info

For details about each device's specific requirements for installation, refer to the well commented config.js for any given device.

Credit

Thank you to Matlo from GIMX for his huge help in getting the PS3 control working. If you use the PS3 functionality and enjoy it, consider a donation to his project.

Nearly every controller was inspired by hard work from others. Trolling forums and seeing people's proof of concept code made many of them possible. For each controller file, a relevant link to the given forum/blog/post/article/page is available in a comment at the top.

MP3 sounds were taken from freesound.org. Specific attributions for each file are in the attribution.txt.

Also thanks to purecss.io and fontawesome.io for their assets.

Contact

If you have questions, comments or want to complain, email me at brian@bevey.org

If you require more immediate assistance, you can join ##switchboard on irc.freenode.net

FAQ