Software
DGP (Distributed Graphic Planner)

The term IoT (Internet of Things) is used to refer a collective network of connected devices together with the technology that facilitates communication between those devices.
The leading open source protocol for connecting internet of things (IoT) and industrial IoT (IIoT) is MQTT. MQTT (Message Queuing Telemetry Transport) is a messaging protocol for low-bandwidth networks and extremely high-latency IoT devices.
We have developed a Distributed Graphic Planner (DGP) over MQTT that allow the rapid task planning, debugging and logging. DGP uses
hierarchical interpreted binary Petri nets to coordinate the
activity of the devices connected via MQTT. Tasks are described using an
interpreted Petri net editor and saved in a xml file. A
dispatcher loads these files and executes the different tasks
under user requests. A monitor that shows the state of all the
running nets has proven to be very useful for debugging and tracing purposes.
DGT uses the Paho Java library to develop the MQTT client that runs on all Java compatible platforms including Android.
- Requirements
Java 17+
- Download
You can download the latest version here
- Install
To install RoboGraphMQTT you should:- Create the DGP workspace directory (example ~/dgp_ws)
- Uncompress the downloaded file (DGP-1.0.tar.gz) in the DGP workspace directory
- Set the DGP workspace directory. This directory can be set in two different ways:
- 1.- Passed by parameter when starting the applicacion (-w ~/dgp_ws/DGP/)
- 2.- Setting the environment variable DGP_PATH (for example in bash will be: "export DGP_PATH=$HOME/dgp_ws/DGP/")
- By default if none of the above is set the DGP working directory is ~/DGP/
- Running
After instlling the system as described in the previous section, running scripts will be available in the bin directory (In our example~/dgp_ws/DGP/bin). The main programs are:- RoboGraph dispatch to run tasks (petri nets):
~/dgp_ws/DGP/bin$ ./mqttDgpDispatch -w ~/dgp_ws/DGP/
- RobGraph GUI to edit tasks and monitor their execution.
~/dgp_ws/DGP/bin$ ./mqttDgpGui -w ~/dgp_ws/DGP/
- RoboGraph dispatch to run tasks (petri nets):
- Examples
In order to show the basics of DGP here, we use a couple of examples to control the temperature of a building. We have used mosquitto as the broker.
In the first video we explain the layout of the MQTT network.
The second video shows one example that includes two client devices connected to MQTT:- Temperature sensor that publishes the "temperature" topic with two possible messages "ok" or "hot"
- Cooler that receives the "cooler" topic with values "on" or "off" to start or stop the heater respectivelly
The third video shows a second example where we included the following changes:- Added the heater client that receives the "heater" topic with values on or off to start or stop the heater respectivelly
- The temperature sensor now publishes every second a message with topic "temperature" and value the temperature as an integer
The project for this second example can be downloaded here