Skip to content

Starter scripts to help you get started using EdgeIQ

License

Notifications You must be signed in to change notification settings

mhengl/evaluation_kit

 
 

Repository files navigation

EdgeIQ Evaluation Kit

This directory contains a few scripts that show how EdgeIQ can be configured to manage an edge gateway device with a connected Modbus sensor. The sensor data will be forwarded to an HTTP listener. The httpprint.py is an example of such a listener that will print out all HTTP messages that it receives.

Included are two different ways to configure EdgeIQ to manage devices.

These scripts source in setenv.sh to make it easier to set your environment variables once.

These scripts will create a cleanup-poc-<timestamp>.sh file that contains API commands to delete EdgeIQ artifacts created by the create script. The cleanup scripts will delete themselves upon successful completion.

Warning: these test scripts do not currently protect against creating duplicate artifacts, nor do they detect if devices are present with the same target Unique ID. EdgeIQ will prevent you from creating duplicate devices with the same unique ID (which is good), however this may cause issues with the correct configuration by the scripts.

There is a helper script list_entities.sh that will display all the various EdgeIQ objects you have access to within your account.

Requirements to run these scripts:

These scripts were tested against the free diagslave Modbus simulator, e.g. diagslave -m tcp.

To use the included httpprint.py, you need to have a recent version of Python 3 installed. e.g. python3 httpprint.py

The Modbus sensor/simulator and the HTTP Listener should be running BEFORE running these scripts.

To install EdgeIQ local service on a Raspberry Pi 3 or 4 running Linux, execute the following command

wget --quiet --output-document='install.sh' \
  'https://machineshopapi.com/api/v1/platform/installers/install.sh' \
  && sudo /bin/bash install.sh --company '<your EdgeIQ account ID>' \
  --make 'rpf' --model 'rpi' \
  --url 'https://machineshopapi.com/api/v1/platform/installers/rpf/rpi/edge-2.6.1.run'

The EdgeIQ local service is installed as a systemd managed service called edge.service so for example you can stop it using this command, sudo systemctl stop edge. The EdgeIQ local service is installed into /opt/edge and log files are located in a day time stamped file, e.g. /opt/edge/log/edge.log.2020-05-18.

About

Starter scripts to help you get started using EdgeIQ

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Shell 93.1%
  • Python 6.9%