IoT Prototyping in Azure with Particle & Grove

Introduction

Today’s post will be on how I see the smoothest way to do prototyping & hobby projects in regards to IoT. What is my main principle in deciding this? I only want to spend time on “business logic” and not waste time on the nuts & bolts of the engine.

Architecture

So what’s the architecture we’ll be using for this?

  1. Device : Particle Photon + Grove Expansion Board + Grove Sensors (Temperature & Air Quality )
  2. Particle Platform : Used for the development
  3. Azure IoT Hub : Basically a 1:1 link with Particle, which will take over once we go to a production grade setup.
  4. Azure Stream Analytics : Streaming the ingest data from our IoT Hub towards our various landing zones.
  5. Azure CosmosDB : For storing the data we’ll use in our reports.
  6. Azure Storage Account : Cheap storage where we keep all the data we collected, and which we could use for our analytics.
  7. PowerBI : The make nice reports of the data we collected. ๐Ÿ˜‰

Now let’s delve into these parts one by one!

Continue reading “IoT Prototyping in Azure with Particle & Grove”

Azure IoT Hub – Generating & using SAS tokens for a device

Introduction

Today we’ll talk about two connection flows you can do with an IoT setup when using keys. An alternative might be to use certificates, but I won’t cover that one today.


When talking about keys, there are two common patterns ;

  • one where the IoT device has a symmetric key (used to generate SAS tokens)
  • another where the IoT device is only provided with the SAS token (which is generated by another service)

Continue reading “Azure IoT Hub – Generating & using SAS tokens for a device”

Azure IoT : From RaspberryPi with Sensor to Azure Storage Table by using a serverless architecture

Introduction

A few days ago my connectors arrived for my latest PoC on Azure. So today I’m writing about my experience in using a RaspberryPi with a temperature & humidity sensor and to save the telemetry data in Azure. For this we’ll be using Azure Event Hub as an ingress mechanism, and Azure Functions to storage the events towards an Azure Storage Account. My next venture will be to use this data to create reports and maybe (on the long run) do some machine learning. For the latter, I’m pondering about linking this system to my ebus system of my heating system. That way I could correlate the data from the various censors (RPi, Thermostat & outside sensor) in combination with the heater information & heating schedules. Basically… creating my own ย Google Nest. ๐Ÿ™‚

ย 

Sensor : Physical Connection (I2C)

The guys from ThingTank had a spare sensor lying around, which they lend to me for my PoC… This was a “Grove – Temperature&Humidity Sensor (High-Accuracy & Mini)“. As you can see in the picture, underneath, this one has an I2C connector. We see four connections ; GND, VCC, SDA & SCL.

grove-tem-hum-accuracy-mini_01

Continue reading “Azure IoT : From RaspberryPi with Sensor to Azure Storage Table by using a serverless architecture”

Installing Windows IoT Core on the Raspberry Pi

How to install Windows IoT core on a RaspberryPi?

Browse to the following page ; https://ms-iot.github.io/content/en-US/GetStarted.htm
Download the “Windows 10 IoT Core Dashboard”, install it & run it.

Now go to “Set up a new device” and press the nice button.
2016-03-02 19_17_30-IoT Dashboard

You will be prompted with some options, like the device type, the drive containing the sd card, etc. We choose “Raspberry Pi 2” and select the “Windows 10 IoT Core” distribution. We also choose the correct sd card and press “Download and install”.

2016-03-02 19_18_08-IoT Dashboard

 

Next up you’ll see that the image is being downloaded…

2016-03-02 19_18_40-Microsoft Edge

And afterwards the “Deployment Image Servicing and Management tool” will kick in.

2016-03-02 19_24_41-Board Comparison - Windows IoT

Now the waiting has started… Go get yourself some coffee/tea/whatever. ๐Ÿ™‚

2016-03-02 19_35_59-Taakbeheer

And afterwards the installation will be finished and your sd card will look like this…

2016-03-02 19_40_41-EFIESP (E_)

Now have fun with it!

 

Sidenote

With this tutorial I overlooked one major aspect for my testing… I have various RaspberryPi devices at home. Though when booting up the image, I always got the basic RaspberryPi debug screen.

Debug-screen

So then it hit me… The Windows 10 IoT core has a set of compliant devices, though the v1 RaspberryPi is not supported. By doing these steps I learned that the flashing for a Windows 10 IoT core differs from a traditional raspbian, noobs, openelec, … distribution. But in all honesty, this system is very user friendly. Though I must assume that all went well, as I lack the labo (at this point) to fully test it. ๐Ÿ™‚