We have launched a lightweight sensor network management package. It is open-source and compatible with Platform of Trust. Anyone can set it up themselves, the codes can be found on Github. We will continue to develop the package and your contributions are welcomed.
Lightweight sensor network management package
The package is open-source package that is compatible with Platform of Trust. With the package, you can manage IoT sensors locally to generate data flow of measurements which can be accessed via Platform of Trust standard APIs. The data flow is naturally harmonized and compatible with Platform of Trust ontology standard.
Background of the project
In February 2020 we were thinking about how to engage wider scope of developers with the platform. We had already a significant amount of experience with so-called enterprise developers working full-time in companies. Due to Jarkko’s background in hackerspaces (founder of Tampere Hacklab), we had the idea to work together with one of the numerous local hacklabs in Finland.
Based on research, people in hacklabs have diverse backgrounds and thus offer often new fresh viewpoints to technical solutions. Diversity comes from principles of not accepting bogus criteria such as age, gender, or education when accepting new members. Instead, hacklabs are open for all. Hacklabs are also communities in which help is around all the time which enables experimentation and learning among members. In short, hacklab community offered a completely different ground for technical development and cooperation. Diversity in experiences helps us to better our solution further and offer a better developer experience for a wider audience.
Aimed results and gains for participants
People in Mikkeli Hacklab will create startups and DIY people-focused open-source package to setup a simple local sensor group with the low-cost device to act as a hub. Setup will stay alive at Mikkeli hacklab, they find a way to get valuable information from it. If this works, we offer this to all hacklabs in Finland to continue improving and extending the package together with partners for example around sensors.
The mentioned package had the following requirements:
- Lightweight hub software running on development board (such as RaspBerryPI).
- Capable of managing sensors (basic measurements) and acting as a translator to harmonize data payloads.
- Has REST API from which data can be retrieved to the platform.
- Has required auth and hashing mechanism required by Platform of Trust.
- Open source - code in Github licensed under permissive open source license.
- Documentation in Github on how to build and deploy
- Documentation includes a description of the package, capabilities and limitations.
Hacklab members gain the opportunity to learn new techniques and build something for a purpose. Hacklab is also compensated for the work and they can use the money for rents, devices, or other things their local community needs. We gain new data product schemas (more support for data products in the ontology). We gain access to innovators (hackers) and get feedback. We test our non-slack driven feedback mechanism for developers. We get a developer community-oriented story to tell.
Hacklab and the development process
Hacklab Mikkeli is an open working space and community in Mikkeli. We have some basic devices for working with electronics, wood 3d-printing, etc. Basic principles in the community consist of learning and doing while creating new knowledge. Community is open for everyone, more about Hacklab Mikkeli can be found from its website https://hacklabmikkeli.fi/ and about hacklabs in general from https://hacklab.fi/
This project was quite straight forward but interesting, first system architecture was designed, then we had to decide what kind of sensors we would like to use with the system, first we decided that we will use RuuviTags for simplicity but afterward we also wanted to add some DIY sensors like esp32 based radiation sensor. Why? Because of course, you need a radiation sensor at hacklab.
MQTT was chosen as a communication channel for sensors since it is well supported with many platforms and many open-source broker implementations exist.
The system consists of a couple of components. The main component is DIY Hub API which stores information about connected sensors to sqlite database, hosts rest api for managing connected sensors, stores readings received from mqtt broker to influxDB and hosts PoT compatible translator.
The system supports different kinds of sensors. The first type is esp32 based “DIY” sensors where the user is responsible for creating firmware that communicates directly with mqtt broker and posts readings to DIY hub. Another supported sensor is RuuviTag, since RuuviTags communicate using Bluetooth, the system contains a Bluetooth mqtt bridge designed to relay readings from RuuviTag to mqtt broker.
There is also a web UI for managing connected sensors which are developed with React.
We are about to launch the service and data in the Platform of Trust sandbox environment for all to fiddle with. Stay tuned! We are also eager to continue DIY package development with open source-oriented companies and organizations.
If you are interested to expand and enhance the package, make a pull request via Github, and if you need some sensors or such for development purposes, contact us!