Skip to content

This repository contains instructions for building and starting a Microsoft Edge Runtime Container on WAGO devices. (e.g. PFC200 G2 or Wago Touch Panel)

License

Notifications You must be signed in to change notification settings

WAGO/azure-iot-edge

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

58 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Statistics Docker Hub

DockerHub stars DockerHub pulls

Statistics Git Hub

GitHub issues GitHub stars

How to setup Azure Iot Edge on Wago Device

Prerequisites for tutorial

Create an Iot-Hub, add iot edge device and deviceDeploy your first IoT Edge Module:

https://docs.microsoft.com/en-us/azure/iot-edge/quickstart-linux

Please go through the following points:

  • Create an IoT Hub.
  • Register an IoT Edge device to your IoT hub.
  • The section "Configure your IoT Edge device" can be completely ignored.
  • Remotely deploy a SimulatedTemperatureSensor module to an IoT Edge device.

Attention: To prevent port "443" clashing of "edgeHub" container and of Wago Webserver, it is absolutely necessary to change the "HostBindings". You can use any free host ports. Navigate to Azure Portal-> Your Edge Device-> Set modules on device->Runtime Settings


AdvanceEdgeSettings

Configuration and start of azure iot edge runtime container.

The configuration of azure-iot-edge-runtime container is done via the config.yaml file. This file is generated by the command below into the empty mounted folder.

  docker run --rm -v /config:/config wagoautomation/azure-iot-edge init

Attention: The file is read-only and must be made temporary writable for the current user.

chmod 644 
or
chmod 666

Note:
Attention there is a discrepancy between the default configuration of azureiotedge-agent in the cloud (currently v1.4) and the configuration in the device. (v1.1).
If you are not careful, two images are downloaded, which leads to "no space on device" problems. The workaround is to keep the configurations the same. e.g. after the

docker run --rm -v /config:/config wagoautomation/azure-iot-edge init

, synchronize the configuration manually.

Finally, provisioning configurations can be made by editing the corresponding sections in config.yaml (e.g. manual provisioning using connection string or X.509 certificate) For more details see: https://docs.microsoft.com/en-us/azure/iot-edge/how-to-manual-provision-symmetric-key?tabs=azure-portal%2Clinux

 docker run -d --name azure-iot-edge-runtime \
   --restart=unless-stopped \
   -v /var/run/docker.sock:/var/run/docker.sock \
   -v /config:/config:ro \
   wagoautomation/azure-iot-edge

After the container start, all deployments defined in Microsoft Azure are automatically downloaded and started.
This may take a few minutes.
With the Docker commands you can track the provisioning process.

docker images 
docker ps
docker logs 

After all containers have been started, the following Docker command should return the following:

docker ps --format "table {{.Image}}\t {{.Status}}\t{{.Names}}"

docker_ps_format

The "SimulatedTemperatureSensor" module sends "500" simulation messages to your Iot Hub. The telemetry data can be displayed e.g. with a Visual Studio Code extension. (see: https://marketplace.visualstudio.com/items?itemName=vsciot-vscode.azure-iot-toolkit)


Finally, Wago device is ready for azure iot edge module deployment!

Happy IoTing!

Azure IoT Edge Modbus Module

You need a running Modbus Slave (Server) e.g. Wago Device or Modbus slave Simulator

How to deploy microsoft modbus ingestion module see here:

Develop a C# IoT Edge module

How to develop your own azure iot edge module see here: https://docs.microsoft.com/en-us/azure/iot-edge/tutorial-csharp-module

About

This repository contains instructions for building and starting a Microsoft Edge Runtime Container on WAGO devices. (e.g. PFC200 G2 or Wago Touch Panel)

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published