Skip to main content

Posts

Showing posts from September, 2020

Modbus data conversion to different data types

Recently I was writing code to read Int64 numbers from Modbus devices in dotnet C#. The data coming from Modbus was all in array of bytes. But how to decode it and transform that to some meaningful numbers? 

One line command to instal chocolatey on Windows 10 command line

One line command to install choco on Windows 10 using the command line.

Azure IoT Edge device data on the Power BI dashboard

I wanted to present the IoT sensor data on the Power BI dashboard as near real time as possible. And it was not as easy as I thought initially. I will compare two methods of doing this with Azure and how that affects the latency. I'm using Azure IoT Hub and Azure SaaS as much as possible with as little bespoke code as possible. So I would like to show the sensor status on the Power BI dashboard as close to real time as it could be done. In my scenario I have a bespoke IoT Edge module that collects data from a custom built motion sensor. The data then is sent to the $upstream and available in IoT Hub. The structure of the data is simple it either sends information that there is motion detected or that there is no motion detected - the val field. And the time when it happened. { "val": 1, timeCreated:"2020/03/31 19:20"} Two methods I've found two methods to do it. One with Stream Analytics and another one with Azure Function and Power BI da