CrateDB is a distributed SQL database built on a NoSQL foundation. It is familiar to use, simple to scale, and versatile for handling any type of structured or unstructured data with real-time query performance.
It’s always nice being able to choose from several services like databases. So I checked out how to develop a simple application and Azure IoT Edge module against Crate if running in a container.
In this blog, we see how we can use the CrateDB in Azure IoT Edge.
Since 2016, I have been involved in the world of LoraWan.
The combination of low powered devices together with long-range communication makes this protocol ideal for sending short messages from remote locations. It even supports two-way communication.
One of the most famous players in this knowledge area is The Things Network. They provide a set of open tools and a global, open network to build your next IoT application at low cost, featuring maximum security and ready to scale with LoraWan.
Its community is thriving on both enthusiastic makers, starters, and companies which are building their IoT solution on that backend.
This is not just an update. This is a completely new stack, built from the ground up and the team invests into a clean, portable, open-sourced backend. This new stack is standards-compliant by default and it will support the Lora 1.1 specification too. The V3 backend is designed for scale, for ‘N’ as they say (N customers, N regions, N devices, N versions):
We see the devices and gateways on the left, the V3 stack in the middle, and the third-party cloud integrations (eg. AWS, Azure) on the right.
In this blog, we look at registering a gateway and a device in the new TTN V3 Stack portal. And we integrate cloud connectivity.
In the past, I wrote an article on how to get Azure service tags. Back then, I was not able to access the Rest API provided.
A service tag represents a group of IP address prefixes from a given Azure service.
This week I revisited the API and dived a little deeper into this call.
In this blog, I show you how to read service tags using the Azure Rest API and we learn how to cope with the bearer token if we want to access the Access API. I show it both in Postman and using C# code.
Microsoft supports a Modbus module for Azure IoT Edge. This module handles both Modbus TCP (over the local network) and Modbus RTU (over serial ports).
In the past, I have already blogged about using serial ports on Linux with this module. But I did not check out Windows support until recently. Why? The documentation stated, “RTU is currently not available in Windows environment, please use Linux host + Linux container to play with RTU mode”.
And if something is documented in the readme, it’s true, isn’t it?
This is not entirely correct, though. It is possible to use this module on devices running Windows 10!
During the last The Thing Conference back in January in Amsterdam, The Netherlands, I spoke with the team of Tektelic. I got this smart room sensor from them to experiment with:
This sensor works with Lora and has some neat features. The sensor reads eg. temperature and humidity of the room it is placed in, but it also has a few other sensors. One of these is a magnetic switch.
It’s this sensor I am interested in. I want to see if a door is left open (and maybe putting a big, loud horn next to it…):
In the last couple of months, I have fallen in love with Blazor. I can almost shout out: “imma firin mahBlazor!”
Blazor is a web framework based on Asp.Net core:
Blazor apps are composed of reusable web UI components implemented using C#, HTML, and CSS
In the past, I have already shown how to deploy a Blazor app as a container using the Azure IoT Edge deployment mechanism. This makes it possible to deploy and run a Blazor app on the Edge. There is no interaction with the Azure IoT Edge routing mechanism, though.
Wouldn’t it be nice if a Blazor app could actually receive IoT Edge messages or even could send IoT Edge messages to the cloud using that same routing mechanism?
Each Azure IoT Edge module, deployed to a device, has its own Module twin.
A Module twin is the same concept as a Device twin for an Azure IoT Device, it stores state information including metadata, configurations, and conditions.
A Module twin is essentially a JSON document which lives both in the cloud (in the IoT Hub) and on the device and is kept in sync when communication between device and cloud is possible:
In the IoT Hub, the tags are writable and readable. These can be used to identify a specific device with an alternative key and/or to filter subsets of devices.
Also in the cloud, the desired properties can be written with updated values. These (updated) values (eg. properties or settings) are picked up by the device when it is connected. So it could take days or weeks for the updated desired property to be picked up because the device is offline in the meanwhile.
But the desired properties are patient…
Once the updated values of changed desired properties are arriving at a device, a notification method on the device is triggered to handle them.
As a good citizen, an IoT Edge module should report back to the cloud how it is updated by the desired properties. This is done using the reported properties in the Module twin.
This closes the loop for the administrator. I can publish a desired property change for one or more devices. And after a while, the reported properties can be checked to see which devices have picked them up and which devices need some attention.
Do you notice that it’s also possible to read reported properties, on the module side?
Write data, read data… that is enough to persist data on the edge, isn’t it?
Let’s see how we can use this for persisting local state.