#AzureIoT – ☁ Azure IoT Edge 1.1.0 release is now GA, experiences upgrading #RaspberryPi OS

Buy Me A Coffee

Hi !

There is a new version of the Azure IoT Edge module: 1.1.0 (see references). So, I decided to upgrade my 2 test devices and maybe share some lessons learned in the process.

Upgrade on Raspberry Pi OS

As usual I’ll start with a full update

# Update
sudo -- sh -c 'apt-get update; apt-get upgrade -y; apt-get dist-upgrade -y; apt-get autoremove -y; apt-get autoclean -y'

And I found a nice surprise on the update log.

Setting up iotedge (1.1.0-1) ...
===============================================================================

                              Azure IoT Edge

  IMPORTANT: Please update the configuration file located at:

    /etc/iotedge/config.yaml

  with your device's provisioning information. You will need to restart the
  'iotedge' service for these changes to take effect.

  To restart the 'iotedge' service, use:

    'systemctl restart iotedge'

    - OR -

    /etc/init.d/iotedge restart

  These commands may need to be run with sudo depending on your environment.

===============================================================================

So, the module is updated. However I need to setup the device provisioning information again and restart the service. In the references section I shared the officials docs for these steps.

Let’s edit the provisioning information

# Update provisioning information (if necessary)
sudo nano /etc/iotedge/config.yaml

My file still have all the valid information

No changes here, let’s restart IoT Edge

# restart iotedge service
systemctl restart iotedge

Important, authentication is required in this step

So, I may missed something here. I run the update command for the module, and it’s already on the 1.1 version. However the iotedge list of modules is still using the 1.0

Update runtime settings on Azure IoT Portal

I now I can fix this in the Azure IoT Portal. In the device definition, I need to update the Runtime settings to use the version 1.1.

A couple of seconds later, everything works as expected !

Recap

So, the steps to update were these commands

# Update
sudo -- sh -c 'apt-get update; apt-get upgrade -y; apt-get dist-upgrade -y; apt-get autoremove -y; apt-get autoclean -y'

# Update provisioning information (if necessary)
sudo nano /etc/iotedge/config.yaml

# restart iotedge service
systemctl restart iotedge

Then update the Runtime Settings on the Azure IoT Portal.

And restart iotedge one more time !

I’ll test this on Ubuntu and share my experiences also there.

Happy coding!

Greetings

El Bruno


References

My posts on Raspberry Pi ⚡🐲⚡

Dev posts for Raspberry Pi
Tools and Apps for Raspberry Pi
Setup the device
Hardware


¿Con ganas de ponerte al día?

En Lemoncode te ofrecemos formación online impartida por profesionales que se baten el cobre en consultoría:

#AzureIoT – ☁ Azure IoT Explorer, in preview and awesome

Buy Me A Coffee

Hi !

I found this tool sometime ago, and it was a great moment. The Azure IoT explorer is a graphical tool for interacting with and devices connected to your IoT hub. You can check references for the official installation process.

And just in case, here is a small preview of the tool showing the live telemetry events on a specific device. At the right there is a console app sending messages to a Azure IoT Device. The device processes the messages and send some specific telemetry.

The app is very straight forward. First, just add an IoTHub using a Connection String.

Once connected, we can inspect the devices on the Hub

And in each device we have some actions available. During my current days, Telemetry and Direct method are the 2 most useful ones !

Again, it was a great surprise find this tool. !

Bonus: supports dark theme !

Happy coding!

Greetings

El Bruno


References


¿Con ganas de ponerte al día?

En Lemoncode te ofrecemos formación online impartida por profesionales que se baten el cobre en consultoría: