Skip to main content

Posts

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...

Last sensors readings in Power BI

If you want to show all sensors and only their last reading value on a Power Bi dashboard then you're reading the right page. It is not as trivial as it looks to be. So lets imagine we have a streaming dataset with our IoT sensor data. The data structure is as follows by this example data coming from IoT sensors { "Id": "sensor1", "Val": 11, "DateTime": "2020-05-06 10:11:05.222} { "Id": "sensor2", "Val": 5,   "DateTime": "2020-05-06 10:11:05.111} { "Id": "sensor1", "Val": 10.5, "DateTime": "2020-05-06 10:01:05.333} { "Id": "sensor2", "Val": 4.5,   "DateTime": "2020-05-06 10:01:06.334} { "Id": "sensor1", "Val": 10, "DateTime": "2020-05-05 10:11:05.122} { "Id": "sensor2", "Val": 4,   "DateTime": "2020-05-05 10:1...

Symlinks in github repo on Windows

Git client is able to also store symlinks in the repository. This works well on Mac but unfortunately on Windows it is not (at least not by default). So to make it work on Windows 10 you need 

Installing Cordova and resolving setup issues on Windows 10

There are many ways you can develop mobile applications. Naturally you may have native applications written especially for Android and iOS. On the other hand you may create a multiplatform application that can be compiled to work on both mobile platforms. The two main multiplatform mobile development frameworks are Xamarin and Apache Cordova . You may find that Apache Cordova is equivalent to PhoneGap that also has additional commercial services. Also one of the popular frameworks based on Angular is Ionic that is an kind of wrapper on top of Cordova to speed up writing mobile apps with Angular and also has additional services. In this post I will cover installation of Apache Cordova together with all tools required to run a Hello World application in an Android emulator. So let's start. I'm assuming you have a bare metal Windows 10 installed and you're ready to rock.