Microsoft Azure IoT Edge – preview

Microsoft Azure IoT Edge – preview

Some weeks ago, the preview version of the Azure IoT Edge is made available. This software of Microsoft runs on Edge devices, like Linux or Windows. It brings some power of cloud computing to local Edge devices.

Why do you need an Edge Device ?

  1. Can be regulations that data cannot leave the country
  2. You need analytics near the device; for example when you have a Machine Learning model that predicts when a machine will be broken, you need to act fast. If you do this via the cloud, this can take too much time
  3. Internet; if you don’t have a good internet connection. For example slow connection on boring- or oil platforms. Then you can use the power of your Edge device at the plant and sync X time per day with the cloud.
  4. Do local things; for example you need to enable lights in a building, you don’t want to do this via the cloud, but want to have a direct connection to the light (also when the internet is down)
  5. ….

I have working for a year now with the (preview) IoT Edge software of Microsoft and this new version is really a huge step in the right direction:

Management from the Azure Portal!

You can now manage some things of the IoT Edge directly from the Azure portal.

iotedgemanagement

Within the Azure IoT Hub you have now an IoT Edge(preview) button Here you can create (just like a sensor) new IoT Edge devices. You can create just one, or deploy several Edge Devices in once (IoT Edge deployment). You can manage here your modules of every Edge device and see how the runtime status is.

Modules

This concept was already in the first version, but the management of modules is totally different now. You can now manage them directly from the Azure portal. You can just upload your modules in de portal and it will directly deployed to the edge device:

modulesedge.png

Pricing

The core of the Edge is free (and management of the Edge), you just need to have an Azure IoT Hub. You have the pay for the modules you use, like Stream Analytics, ML etc.:

 

Things I am missing or can’t find

  • Triggers when a device is down; I want to use the standard Azure alerts to trigger if an Edge device if offline for example. Yes you can program this in the Edge itself, but it would be great if I can use these Azure alerts.
  • Remote management; could be great when I complety get access to my Edge device (Windows or Linux) from Azure. Then I will have one entrance for the management of my IoT Edge devices
  • Start and stop a module on a Edge device in the Azure Portal.
Advertisements

The preview release of Microsoft IoT Central

The preview release of Microsoft IoT Central

Yesterday Microsoft released IoT Central in public preview. A SaaS based solutions for IoT projects. This blog post will explain how to set up a trial IoT central and how you can create  new devices in the platform with rules. IoT central is still in preview, so a lot of functions are coming soon.

Some first thoughts of the service

These thoughts are based on the public preview release of december 2017:

1. Important thing I a missing or cannot found. Lot of our clients are using Sigfox or LORA protocol for device communication to Azure. I looks now this is not supported at the moment. Only developed devices with the Azure IoT SDK or other SDK (so that you can send clear (JSON)data) are supported. It would be great if we can connect Sigfox or Lora protocol devices to the platform and translate the message directly in IoT central. This will give a lot of opportunities for this platform.

2. Lot of functions are still in ‘coming soon’. Actions with e-mail for example is not really a scenario I can use in my current projects. I hope coming soon is really soon ūüôā

3. I would love to have some Power BI integration in the future, so clients can create their own reports based on the data.

4. But… This SaaS solution can¬† be great for a lot of IoT projects. Costs are relative low for companies, it’s a managed service, so you don’t need to maintain IoT hub, Stream Analytics or other Azure services. And with a lot of device templates IoT projects could be start really fast within a day.

How do I create my own trial?

First of all you can create a free trial for 30 days. After the trial you will pay 500 dollars per month with 100 devices. Every additional device will cost 50 dollar cents per month. You will get a trial up and running in some minutes. If you go to the create a free trial page, you need to enter your application name, URL and Azure subscription.

createiotcentral
Create application

After that you can select three templates:

1. Custom App; it’s totally blank and you can create the app from scratch

2. Sample application (I use this one)

3. Sample Devkits; I own a MXchip Devkit, so I will test this later.

After hitting the ok button, the application will be enabled (within minutes). You will  enter the start page of your application.

startpageiotcentral
Startpage IoT Central

Because I have selected the sample Contoso application. I have directly a homepage with some elements on it. As a administrator I can set up my own homepage with own blocks.

On the left you can navigate in your application:

menuiotcentral
Menu IoT Central

From there you can create your own IoT devices. Click on device explorer and select New Real devices:

createdevice
Create a device

After you create a device, you can add one or more measurements to the device. Currently only Telemetry is supported.

createmeasurement
Create telemetry

You can create for example a temperature measurement like below

measurementfull
Create measurements

From the device you can also create rules based on the telemetry data from a device. From the device you can create currently only telemetry, the rest is coming soon.

rule1
Create telemetry rule

In the rule you can configure, that when the temperature is above 50 degrees an action need to be started. Currently only e-mail is supported.

rule2.png
Rules and actions

The other services are once again in coming soon mode, but they are very interesting.

I think this will be a great service if the blocks of ‘Coming Soon’ are gone and integration of LORA/Sigfox device protocol (HEX) would be great to start projects really fast. Else I have to create a service in front, that will translate the message and send that to IoT Central…

Blog: Update for Microsoft Azure Stream Analytics – IoT

Blog: Update for Microsoft Azure Stream Analytics – IoT

Last week Microsoft finally updated Microsoft Azure Stream Analytics with great new features. In this blogpost I explain some new features I use in our projects now.

Using custom code in your Microsoft Stream Analytics Query

In our projects we have sometimes challenges with the data we are receiving in Stream Analytics for the Microsoft Azure IoT Hub (finally the sensor off course…). For example we sometimes work with the Sigfox IoT network. With this network a device can sent small datapackages to the Azure IoT Hub, most of the times this is sent via a HEX format. Normally you want to transform this HEX data to a integer. (Yes, you can do it afterwards, but I want to do this directly in Stream Analytics query). One of the new functions just launched is support for Custom Code with JavaScript user defined functions. This is great, because I can great a function in Stream Analytics and transform my Hex to an INT just in the query. Here is how you do this:

  1. First of all you go to your Microsoft Stream Analytics job and select ‘Function’ and add a new one:
azuresafunction
Add a function in Azure Stream Analytics

2. After that you will get a window to create your javascript. In this example you see a hex to int function:

azuresaudf
Create UDF Javascript in Stream Analytics – Hex2Int sample

3. Now you can use your Javascript function in your query of Stream Analytics. Just type udf. than your function name and you can transform your HEX to an integer.

azuresausingfunction
Using UDF Javascript in your query of Stream Analytics

 

Visual Studio integration for Azure Stream Analytics

One challenge I have with creating queries in Azure Stream Analytics (yes, I am not the best with SQL..) is testing my queries with the data input. I was costing me a lot of time. I was the last weeks part of a private preview of the integration of Azure Stream Analytics in Visual Studio. That is now in public preview(download here). With this add-in you can export (or import) your Microsoft Stream Analytics projects in Visual Studio and test everything locally! Currently only Visual Studio 2015 is supported.

  1. First or all go to your Server Explorer and navigate to Stream Analytics and hit the export button.
vssaintegration
Export in Visual Studio a Stream Analytics project

2. Then your complete stream analytics project is exported to Visual Studio 2015. Here you get some great functionalities

vssaintegration2
Exported Azure Stream Analytics project in Visual Studio

Functionalities:

  • Syntax Highlighting in your queries
  • You can write your query and test it directly to testdata! Just hit F5!
  • You can write your custom Javascript code
  • You have off course directly integration with TFS / source control
vssaintegration3
Using local data to test your new queries

Low-latency dashboards in Power BI

Another new update is low latency support in your Microsoft Power BI output of Azure Stream Analytics. (Power BI streaming sets). The latency is now much better then some weeks ago. So you get faster insights in your data!

powerbilowlatency
Low latency in Power BI as output in Stream Analytics

Others

Other new functionalities:

  • Native support for Geospatial functions; now you can define geographical areas in your Azure Streaming job.
  • Job Diagnostics logs; there is now an integration with Azure Monitoring to better monitor your Stream Analytics Jobs!

 

 

 

 

 

 

Power BI app update with Q&A on your dataset!

Power BI app update with Q&A on your dataset!

Today I received again a new update of the Power BI app on my iPhone. I was really happy with the release notes:

  • Q&A support / ask your data in Preview

When you open a report in Power BI, you see now at the button a chat button (beside the favorite button):

screen3

When you click on the button, you get a Q&A window:

screen2

Here you can ask the question. The great thing is that Power BI is already providing you sample question about the dataset. Below an example I asked the data, I get a report with a graph!

screen1

New Windows 10 IoT Core insider build

New Windows 10 IoT Core insider build

Today Microsoft released a new build for Windows 10 IoT Core. Great new feature is that Cortana is enabled! Here the full list with new functionality / fixes:

New this build:

  • Cortana feature has been enabled.
  • The Dragonboard BSP in the provided FFU has been updated to the new build.
  • The Windows Device Portal (WDP/Web Management) has been extended to add a quick run portal for IoT Samples.
  • A fix was made to the Class Extensions for Hardware Notification (hwnclx) and USB Function (usbfnclx) packages so that they would be included in the default IoT Core images.
  • Changes were made to IoTShell to enable waiting for PPKG provisioned package installation to complete.
  • Updates were made to the GPIO Interrupt Buffer API.
  • Changes were made to Applyupdate.exe to add the blockrebooton/blockrebootoff flags.
  • A fix was made to the power state API to ensure the wakeup timer is cancelled upon exiting from connected standby.
  • Universal Write Filter (UWF) has been added as an option to the Windows Imaging and Configuration Designer (ICD).
  • The BluetoothLE stack has been updated to address the issues seen when calling GattDeviceService.GetCharacteristics.
  • Issues with NanoRDP connecting have been addressed.

Known Issues:

  • The package version for some inbox applications may not match the installed version.
  • Store applications are not being serviced when in use or set as the default application.
  • NanoRDP does not render correctly on some platforms.
  • When multiple audio devices are present on the board audio routing changes may not persist across boots.
  • The MinnowBoard Max firmware 0.93 has a known issue which can lead to network connectivity failure.

 

How to use the Particle Photon with the Microsoft Azure IoT Hub

How to use the Particle Photon with the Microsoft Azure IoT Hub

I use the Particle¬†Photon devices a lot in prototype project. It’s a small WiFi board¬†(like the ESP 8X series).

photon_vector2_600

I used several libraries on the particle cloud to use the Azure IoT hub. These libraries were build based on the Azure IoT SDK. But since several weeks Particle released an Azure IoT Connector on the Particle cloud. It’s still a beta function. But as a user you can send the data from the Particle Photon to the Particle Cloud. When the data has a specific name, the Particle Cloud will sent this data to the Azure IoT Hub.

Take the following steps to get this working.

1. Login to the Particle Cloud

2. Click on the integration button (the latest button) and select ‘New Integration’

particlecloudazureiothub.png

3. Select the Azure IoT Hub

selectazureiothub

4. Configure the settings of your hub

saveandonctinuazureiothub.png

5. Save and continu and the Particle Cloud is connected to the Microsoft Azure IoT Hub. Now you can create your code on the Particle Photon to sent data to the Azure IoT Hub.

Below the example you can add in your Particle Photon device.

      
void loop() {
  // Get some data
  String data = String(10);
  // Trigger the integration
  Particle.publish("datafield", data, PRIVATE);
  // Wait 60 seconds
  delay(60000);
}

Run the code and the messages will flow from the Particle Cloud:

dataflow

and then to the Microsoft Azure IoT Hub! How simple is this!