Adding local persisted state to IoT Edge modules using Module twin

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.

Doorgaan met het lezen van “Adding local persisted state to IoT Edge modules using Module twin”

Shine a light on IoT Edge, connect Ikea Tradfri lights

Being a developer gives you some privileges.

For example, if you are a carpenter, you basically can make everything out of wood. If you are a welder, the world of iron construction is all yours.

As a software developer, you can program a solution for any problem which can be solved by software.

And being an IoT Developer, you can connect the whole world!

This is a story about my journey in connecting my Ikea lights to the cloud. It’s based on my presentation for the Global Azure Bootcamp, Canada edition in Toronto.

Doorgaan met het lezen van “Shine a light on IoT Edge, connect Ikea Tradfri lights”

Microsoft Certified: Azure IoT Developer specialty AZ 220

Everybody working with technology from Microsoft knows about their certification programs.

These exams have a solid value during your IT career and can even be a prerequisite to get a certain job.

Microsoft recently introduced the new Microsoft Certified: Azure IoT Developer specialty exam, AZ-220. It is brand new, the first batch of a few hundred developers just got their results.

Let’s check out how you can pass.

Doorgaan met het lezen van “Microsoft Certified: Azure IoT Developer specialty AZ 220”

Learn all about Azure IoT, the easy way

whether you are a beginner willing to learn about Azure IoT or you are interested in the broader application of Azure IoT, Microsoft offers everything you need.

Master core concepts at your speed and on your schedule. Whether you’ve got 15 minutes or an hour, you can develop practical skills through interactive modules and paths.

With the new Microsoft Learn portal, Microsoft offers:

  1. Learning paths, learn on your own schedule
  2. Certification, become Microsoft certified
  3. Documentation, get the details

And on top of that, also code samples and Q&A are offered.

Let’s check out what is offered for learning Azure IoT.

Doorgaan met het lezen van “Learn all about Azure IoT, the easy way”