Motivation
With existing offerings such as openHAB, Home Assistant and Vera, do we need yet another automation hub/framework/solution? Depends on your needs. Switchboard has a combination of features that make it unique and very powerful if you mostly want to automate and not just remote control your devices on a local network:
- Low-key solution that is small, simple and extremely easy to setup and configure
- Fine-grain control over devices
- All the data stays on your local network (unless you serve it to the outside world)
- No reliance on a stable internet connection (I live in Australia)
- Perfect for the tinkerer: easy to create and debug your devices
- No complex rules that are hard to configure. Just inputs, outputs, and the full power of the Python programming language to do whatever you want
- Automate pretty much anything, not just your home (e.g., automated flower-watering system)
Downsides: at this early stage there aren't 1000 libraries to connect to a 1000 commercially available devices, a mobile app etc. (yet), A certain amount of programming skill is required.
Technical Details
Switchboard functionality and features:
- the Switchboard framework runs on a base station (x86 computer or Raspberry Pi)
- polls Switchboard clients via a simple HTTP REST Api
- input and output devices can be directly read from and written to by a Switchboard module, which is effectively a function with a decorator
- writing a Switchboard module is DEAD EASY: 1) specify a decorator with the desired inputs and outputs, 2) specify arguments to match the inputs and the outputs and 3) write your logic, knowing that all the connectivity is taken care of
- Python and C++ ESP8266 Switchboard client libraries (maybe also Arduino with an Ethershield if I get round to it)
- resilient to network outage (outputs are set to given 'error state' value)
- easy to use command line prompt for dynamic Switchboard configuration: adding, updating or removing a piece of functionality is performed without affecting unrelated devices and modules
Switchboard Modules
Switchboard modules are evaluated/executed at every cycle (set by the polling period) unless one of the module IOs reports an error. In case of error, all the outputs are set to their error state as specified in the module decorator. An output signal can only be driven by one single module. In order to keep the modules self-contained decorators can specify static variables.
Or, in FPGA jargon: a Switchboard module is much like a synchronous HW entity on an FPGA, where the clock is defined by the polling period and the static variables are the registers.
License
Licensed under the MIT License