Bulk import of IoTHub devices

This blog post is for the hardcore IoTHub users. It’s even a bit boring, at first.

The Azure IoTHub does not accept anonymous telemetry. Telemetry has to be presented by devices which are enabled. So you need to have a list of all your devices. You have to manage it.

In this post, we start diving into registering a single device and we will end updating multiple devices in bulk.

Continue reading “Bulk import of IoTHub devices”

Turning a console app into a long-running Azure WebJob

A few days ago I created a continuous running Azure service using an Azure WorkerRole. Although this service is running stable and it just does what it has to do, I was not completely ok with it. The Azure WorkerRole is a great way of using Azure for long-running logic but it feels a bit deprecated. WorkerRoles are hanging around from the start of Azure. For a few year now we have a second mechanism called WebJobs.

So I decided to look into this functionality.

Continue reading “Turning a console app into a long-running Azure WebJob”

PowerBI knows how to map devices in a chart

PowerBI is my favorite tool for simple visualizations of telemetry. It’s pretty easy, fast and it integrates so well with StreamAnalytics.

Next to a lot of chart types, it also supports maps. There are actually two kinds op maps:

  1. Map (Location, Legend, Latitude, Longitude, Size, Color Saturation, Tooltips)
  2. Filled Map (Location, Legend, Latitude, Longitude, Color Saturation, Tooltips)

The first chart shows a map with devices represented as circles, big and small ones, depending on a value passed. The second one is more into coloring parts on the map: a state, a country, a city.

The first map supports using latitude/longitude or showing the location using geocoding (passing a Location like ‘Eindhoven’). The second chart only supports geocoding.

In this blog, we will pass a latitude and longitude.

Continue reading “PowerBI knows how to map devices in a chart”

Access The Things Network Lora telemetry using C# M2Mqtt

Somewhere in December 2015, I was made aware of this Lora initiative called The Things Network. Since then, as an IoT enthusiast, I am researching how to implement this platform in my other IoT projects.

Update 8-11-2016: this blog gives an introduction to MQTT and accessing the TTN network. A full implementation of a C# TTN->Azure bridge is available at GitHub. More details are available here.

Lora stands for Long Range and it fills a gap between Wifi and GMS, thinking about wireless connectivity for IoT sensor boards:


At the moment there are two serious implementations of Lora in The Netherlands. KPN is offering a commercial solution so it’s reliable but it does not come free. And then there’s The Things Network, a Kickstarter solution. It offers free connectivity :-).


What they ‘sell’ are gateways. These come fairly cheap (starting at ~ 250 euros) but with their gateway, you can connect up to 5 kilometers (keep on dreaming about 10 :-)) around your house with Arduino’s, ESPs, RaspberryPi etc. And with a couple of these gateways, you can cover your village or city. So get your friend involved!

The telemetry of the nodes (say twenty bytes of date every minute) are received by the gateways and forwarded to the TTN backend. But you have to do ‘something’ yourself to get the data from the backend. I will tell you how to do that using C# all the way.

Continue reading “Access The Things Network Lora telemetry using C# M2Mqtt”

Add more flexibility to StreamAnalytics with reference data

I started this series about IoT Hub communication to show how easy it is to get a long way. But we reached a point where simple telemetry communication is not the issue anymore, we want to make it stable, production ready and configurable.

In the previous blogs we used some fixed values in StreamAnalytics, just to generate some extra values (baselumen). Now we want to make this configurable.

Continue reading “Add more flexibility to StreamAnalytics with reference data”