Close

Introducing: IOData Agents

A project log for Switchboard: Distributed Automation made Easy

A small Python framework for the tinkerer to make distributed automation as simple as possible

josefschneiderjosefschneider 05/06/2017 at 17:360 Comments

IoT is not only about controlling but also about measuring. Since Switchboard provides a means to connect many devices in a centralised manner, it would be a shame not to provide some interface through which we can collect the device data and do things with it, such as storing it or displaying it.

To this end I have just added a component to Switchboard called IOData. At every polling cycle IOData receives an update of all the device states. IOData then proceeds to determine what the value differences are between the current and the previous cycles and encodes those differences as an array of updates.

This is where IOData Agents come in. An agent is an app that subscribes to the IOData update stream. What it does with this data is entirely up to the agent. Switchboard currently comes with two agents out of the box:

To launch the Dashboard agent enter the following command:

launchapp swb_dashboard
after which you will be prompted for the port on which to run the server. All agent settings are automatically stored in the config file.

Discussions