Azure IoTEdge GA module which generates a constant heartbeat. (1.0 version was for Public Preview)
1.7K
Azure IoTEdge GA Version module which generates a constant heartbeat.
Version 1.0 is generated for IoT Edge Public Preview (This PP version is not supported anymore).
Version 2.2.3 was for runtime 1.0.4;
This is a C# .Net Standard module, written for Azure IoTEdge version GA.
This module can be used to generate a constant heartbeat coming from the IoT Edge module or IoT Edge devices which host this module.
A version generated for Docker Linux can be found at https://hub.docker.com/r/svelde/iot-edge-heartbeat/
You can pull it with docker pull svelde/iot-edge-heartbeat but I suggest to use svelde/iot-edge-heartbeat:2.3.0-amd64 when you deploy it using the Azure portal.
This module supports one 'desired' property in the module twin:
This alters the interval of the heartbeat in milliseconds. The default value is 5000.
After reading this value, the module will report the value back.
This module has no logic attached to the routing input.
The messages created are sent using output output1
The output message uses this format:
private class HeartbeatMessageBody
{
public string deviceId {get; set;}
public int counter {get; set;}
public DateTime timeStamp { get; set; }
}
The DateTime is set in UTC format (DateTime.UtcNow).
The message is sent with the following message property:
This module was based on an Public Preview example shown here
With the introduction of General Available, some breaking changes are introduced. A new ModuleClient is introduced to replace the DeviceClient.
I have updated the code. Due to structural changes in the project structure, the project structure is changed a lot.
This logic is licenced under the MIT license.
Want to contribute? Throw me a pull request....
Want to know more about me? Check out my blog
Content type
Image
Digest
Size
74.5 MB
Last updated
about 6 years ago
docker pull svelde/iot-edge-heartbeat:3.0.0-amd64