Upgrading your Azure IoT Edge device remotely to the latest release

Last week, the Microsoft Ignite event was hosted in Orlando. As with every Microsoft Event, a lot of new stuff is released by the Microsoft product teams.

The same goes for the IoT Edge runtime, the portal and the logic running on IoT Edge.

The IoT Edge runtime bumped up to version 1.0.2 and there are lots of new features introduced like extended offline operation and proxy support.

And there a lot of bugfixes which is always good 🙂

But the documentation considering the update of your gateways is a bit limited.

If I follow the update procedure, I have to update it on the machine itself.

Let’s check out how we update our runtime remotely.

Continue reading “Upgrading your Azure IoT Edge device remotely to the latest release”

Advertenties

Prototype an IoT Dashboard with Adafruit IO

Last week I built this great demo with an Azure IoT Edge running on Industrial hardware, reading temperature, humidity, fan activity and led activity. But there was something missing…

I needed a simple dashboard to represent the values which were ingested by my Azure IoTHub and sent to an Azure Function.

Normally I build a basic website myself or I use tooling like PowerBI. It’s not that hard to get something sufficiently running for a demo.

But the last couple of weeks I was looking around for generic, off-the-shelf IoT Dashboards. And I had a couple of questions about their capabilities. What is on the market? What connectivity do they use? How many messages can I Ingest per time window? How do I configure the visual components? Etc.

I have reviewed a number of them and then I was checking out Adafruit IO.

This is what they see about themselves:

“Our simple client libraries work with the most popular devices such as the Adafruit Feather Huzzah, ESP8266, Raspberry Pi, Arduino, and more.”

I was triggered by the ‘more’ part. Does it also work with non-Adafruit devices? Because I know Adafruit from their DIY electronics shop, I was interested in what they are offering. And I was pleasantly surprised.

Let’s take a look at how we can integrate Adafruit IO in a generic demo with industrial hardware.

Continue reading “Prototype an IoT Dashboard with Adafruit IO”

Modbus RTU on Azure IoT Edge

Microsoft is serious about IoT Edge. Azure IoT Edge is now GA for a few months and just last week the version was bumped up to 1.0.1.

The same effort is put into Edge modules. Microsoft provides several modules for different protocols like OPC-UA and Modbus.

In the past I already wrote a couple of times about Modbus TCP in IoT Edge. It’s easy to use and reliable. The Microsoft Modbus module is already available in GA. And I even noticed a reference to “docker pull mcr.microsoft.com/azureiotedge/modbus:1.0”.

If you look deeper into the documentation, you can see that the module supports Modbus RTU too!

It’s always good to learn about other protocols so I arranged some hardware and started a journey.

Let’s see what we need to get started with Modbus RTU. Continue reading “Modbus RTU on Azure IoT Edge”

Azure IoT Client SDK now supports IoT device modules

Silently, Microsoft introduced modules in IoT Devices.

No, I’m not talking about IoT Edge modules, these are modules for IoT Devices which can connect to the IoT Hub directly.

Before, we used the device client to communicate with clients and the IoTHub. And we used the Device Twin to configure the device with desired properties.

This approach is still valid. But in addition, we can also separate the client logic in multiple modules. And each module can send messages and receive a Module Twin configuration.

Let’s see how this works.

Continue reading “Azure IoT Client SDK now supports IoT device modules”

Testing Azure IoTHub Manual failover

The Azure IoTHub is the center of all the IoT efforts of Microsoft. Over the last couple of years (or even months) we see a lot of innovations from that side.

The latest addition is the Manual failover which is now in preview.

This makes it possible to move a complete IoTHub (with eg. all of its devices and routes) to the ‘sister region’. For example, an IoTHub living in West US 2 will move to West Central US. And you can move it back too.

The manual failover is a good starting point for having a more resilient IoTHub. It’s not perfect, there is a chance that unread messages or data is lost. Failover is hard:

But it’s a perfect way to test the ‘automatic’ failover which Microsoft provides when something happens with the region your IoTHub is living in.

I wanted to test this failover. And I wanted to build a client-side solution so I would not lose any messages.

Let’s see how it can be tested.

Continue reading “Testing Azure IoTHub Manual failover”

Add cloud logging to Azure IoT Edge

Azure IoT Edge is an interesting platform for Edge computing. It opens up a lot of new scenarios for local computing as an extension of the Azure cloud. And the combination is both secure and flexible due to the usage of open (security) standards.

But it’s still in Public Preview so once in a while things go sour. Either no messages arrive at in the cloud or local logic is not executed. So this means you have to log into your Edge device (remember to always have a backup plan) and check out the local logging.

But what if I could check out the logging right within Azure?

I came across this Github gem to make Azure IoT Edge local logs available in Azure! And it only takes 15 minutes or less.

“This repository provides an Azure IoT Edge module that can be used to send container logs from other modules on the edge device, including the edge runtime, securely to Azure Log Analytics in the cloud. “

Continue reading “Add cloud logging to Azure IoT Edge”

How to tag your IoT Hub Devices

Until now, device twin tags were a bit lame.

Yes, desired and reported properties were much more fun to play with.

But those of you who administer thousands of Azure IoT devices, you really appreciate tags. It’s the only way to control that large amount of devices without losing your head.

Why? Because you first query your devices and then execute jobs on these subsets.

And Microsoft is making use of this feature a lot. You will have to use tags if you want to execute IoT Edge deployments (still in preview) or if you want to use the recently added Automatic Device Management (even newer):

But how do you actually add or alter tags of devices? What tooling is Microsoft providing?

Let’s check out a number of ways to tag and start querying your devices.

Continue reading “How to tag your IoT Hub Devices”