Last weekend we held the c-base IoT hack weekend, focused on the Flowhub IoT platform. This was continuation from the workshop we organized at the Bitraf makerspace a week earlier. Same tools and technologies, but slightly different focus areas.
Just like at Bitraf, the workshop aimed to add new IoT capabilities to c-base, as well as to increase the number of members who know how to make the station’s setup do new things. For this, we used three primary tools:
- msgflo-arduino and ESP8266 microcontrollers for connected devices
- Raspberry Pis and Ansible for info screens
- Flowhub IDE and msgflo-python for “business logic”
The workshop started in Friday evening after a lecture on nuclear pulse propulsion ended in the main hall. We continued all the way to late Sunday evening with some sleep breaks in between. There is something about c-base that makes you want to work there at night.
By Sunday evening, we had built and deployed 15 connected IoT devices, with five additional ones pretty far in development. You can find the source code in the c-flo repository.
Quite a lot of c-base was already instrumented when we started the workshop. We had details on electricity consumption, internet traffic, and more. But one thing we didn’t have was information on the physical environment at the station. To solve this, we decided to build a set of sensor boxes that we could deploy in different areas of the hackerspace.
The capabilities shared by all the sensor boxes we deployed were:
- Motion (via passive infrared)
For some areas of interest we provided some additional sensors:
- Sound level (for the workshop)
- Light level (for c-lab)
- Carbon dioxide
- Door open/closed
We found a set of nice little electrical boxes that provided a convenient housing for these sensor boxes. This way we were able to mount them in proper places quickly. This should also protect them from dust and other elements to some degree.
The Big Switch
The lights of the c-base main hall are controllable via MsgFlo, and we have a system called farbgeber to produce pleasing color schemes for any given time.
However, when there are events we need to enable manual control of all lights and sound. To make this “MsgFlo vs. IP lounge” control question clearer, we built a Big Switch to decide which controls the lights:
The switch is an old electric mains switch from an office building. It makes a satisfying sound when you turn it, and is big enough that you can see which way the setting is from across the room.
To complement the Big Switch we also added a “c-boom” button to trigger the disco mode in the main hall:
One part of the IoT setup was to make statistics and announcements about c-base visible in different areas of the station. We did this by rolling out a set of displays with Raspberry Pi 3s connected to the MsgFlo MQTT environment.
The announcements shown on the screens range from mission critical information like station power consumption or whether the bar is open, to more fictional ones like the NoFlo-powered space station announcements.
We also built an Android version of the info display software, which enabled deploying screens using some old donated tablets.
This was another successful workshop. Participants got to do new things, and we got lots of new IoT infrastructure installed around c-base. The Flowhub graph is definitely starting to look populated:
We also deployed NASA OpenMCT so that we get a nice overview on the station status. Our telemetry server provides MsgFlo participants that receive data via MQTT, store it in InfluxDB, and then visualize it on the dashboard:
All the c-base IoT software is available on Github:
- c-flo — the MsgFlo setup for c-base
- cbeam-telemetry-server — the OpenMCT setup for c-base
- mqttwebview — Linux info screen implementation
- c-beam-viewer — Android info screen implementation
If you’d like to have a similar IoT workshop at your company, we’re happy to organize one. Get in touch!