A Virtual Raspberry Pi for Azure


I am trying out Azure IoT Hub – once the hub resource is created there should be a way to add a mock device to see some data, but it doesn’t appear to offer one. In fact, if you follow the steps in the learn.microsoft resource it skips adding a device and assumes you somehow already have some.

One of several gotchas with Azure IoT Hub instructions

Between this missing detail and some very inconsistent support for using IoT Hub in VSCode, I started getting frustrated with the entire environment. But there has to be a way! Dig deep! Google!

Thanks Google. I found a tutorial describing how to register a virtual Raspberry Pi to IoT Hub. This is an impressive resource, consisting of a web app that executes an editable NodeJS script that mimics a particular configuration of a Raspberry Pi, including an LED that lights up.

I was able to follow the steps in the tutorial and get the LED to blink. This meant that messages were successfully sent to and received by my IoT Hub. What didn’t happen was the appearance of a device registered to IoT Hub. It’s not the same thing.

Be careful to limit how long you let the “imitation Raspberry” run – it will load up your message quota pretty quickly if you are in a lower tier.

Connected Simulated Raspberry

Note that one connected device is shown during the time it was communicating with IoT Hub. But it is not registered, and is not displayed in the VSCode UI for IoT Hub.

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *

Captcha loading...

This site uses Akismet to reduce spam. Learn how your comment data is processed.