LoraWAN and IOTA: Proof of Concept of storing data in real time in the Tangle

My wish for 2019 was to create a proof of concept around LoraWAN with IOTA. The obvious thing to do is to store data sent by a LoraWAN device directly into the Tangle. This would be awesome, so… I did!

The process is super easy. You send a message using LoraWAN and The Things Network, listen to a specific application using MQTT, receive the message and send it to the Tangle using powsrv.io for lightning fast speeds.

I used The Things Network as free backend for receiving the messages. Although you don’t need to run your own gateway at The Things Network to use the network, at ElaadNL we run one.

The gateway at the ElaadNL premises The data received from the LoraWAN device in The Things Network dashboard

This a visualization of how the message is received, parsed and sent to the Tangle in real time. We use, obviously, NodeJS to connect to the MQTT server of The Things Network and forward the message to the IOTA Tangle.

What does a transaction like that look like when you forward the full JSON message received via MQTT? Like this:

This use case allows for real time data storage in the Tangle, which gives the user an immutable way of data storage. Think about cooling trucks, which have to prove that a certain good is kept below a certain temperature all the time. LoraWAN devices could be used to send the data, the Tangle could be used to store that data in an immutable and secure way. Let me know what kind of use cases you think about in the comments!

Keep in mind that this proof of concept doesn’t cover full end to end integrity of the data. Adding an additionaldigital signatureat the LoraWAN devices to the message would solve that part. Making use ofMasked Authenticated Messaging (MAM)would even make it better and secure!