Automata

A pluggable framework to tie together independently created devices

How it works

When the app is started it looks in a directory for plugins. These plugins are how Automata does everything. They are designed to be api end points that communicate with your devices. A plugin exports these endpoints via an Expressjs router, the loader then attaches these endpoints to /api. The plugin writer then creates a UI that will be displayed on the homepage. In my case I wrote 4 plugins. A spark broker, a lights module, a relay module, and a weaved module. The spark broker handles all the communication between the lights and relay modules and the Spark cloud, as it requires a login, that way each module doesn't have to maintain a login with the server. The weaved plugin communicates with a url, in my case, bypassing the weaved infrastructure, talking directly to the api on the weaved device.

What I really like about this is that each person can write their own plugins or remix a plugin and adapt it to the hardware they have designed or to hardware that exists on the market. As long as the other device is accessible on the internet, Automata can talk to it.

Plugin API

Plugins should export the following methods:

  • load(options)
  • initilize()
  • loadRoutes()
  • registerStaticFolders(pluginDir) (Optional)
  • registerStyles(pluginDir) (optional)
  • registerScripts(pluginDir) (optional)

The pluginDir above will likely be optimized out in a later release

The idea is that all internal methods will be accessable via an express router and exported via loadRoutes

Plugins not ready for prime-time can be disabled by appending '.disabled' to the end of the folder

Plugin list

A list of plugins designed to work with Automata:

  • pirelay - Controller for a RasPi based relay board (currently not implemented)
  • Spark - An interface for communicating with Spark {core, photon, electron} devices
  • RGB Spark - A Spark based RGB lamp
  • Spark relay - A spark controlled relay outlet, similar to the Weaved
  • Weaved - A basic controller for the Weaved IoT device

History

I started the RBG spark light at HACKUMBC in the Fall of 2014. I designed a very basic API to control the device and get functionality working. My blog post about the hack. Christmas of 2014 I built the second device, my relay board. At this point I still don't have a UI, I am controlling everything from my phone via the Tinker app. Shortly there after I started working on the web UI. I began finishing up college and the project fell by the wayside. Spring 2015 I spent some time at Bitcamp working on making the backend pluggable. During this IoT hackathon I worked on building out the plugin loader, 3 device plugins and all of the UI and associated functionality. I started to add websockets support but struggled to get all those moving pieces together. The site has basic-auth support via Passport.js, and could support many different auth methods. I have 2 pieces of 'custom' hardware, spark/photon devices with custom firmware and a weaved IoT device controllable from the UI.

I have lots of plans for this framework. My RBG lamp is coming along nicely, the LED's are mounted, I need to mount the electronics and add wall mounting hardware. I'm really happy with my relay board, and am thinking I should build a few more. The Weaved device is really cool. I'm using in a very basic way but I have some future plans for it. I have a weather station project in the wings and also a garage control project on hold as well.

Normally there is a username and password on the website. To facilitate judging, I am going to remove the authentication.

Built With

Share this project:

Updates

posted an update

Unfortunately, for judging, the project really can't be appreciated without being able to see everything working. I'm happy to demo things via video conference (Google hangouts, skype, etc) if you would like to see everything working.

Log in or sign up for Devpost to join the conversation.