The Digitalisation AIO (All-In-One) Package is a comprehensive Docker-based stack that integrates tools for automation, data management, and visualisation. It is designed to facilitate efficient workflows, seamless communication, and insightful analysis.
⚠️ IMPORTANT: This repository has two major versions with different OpenPLC implementations.
| Version | OpenPLC Runtime | Control Method | Branch | Status |
|---|---|---|---|---|
| v2.x | Runtime v4 (headless) | OpenPLC Editor via REST API | main |
✅ Current |
| v1.x | Runtime v3 (web UI) | Web browser at :8080 | v1 |
🔧 Maintenance |
Key Features:
- ✅ OpenPLC Runtime v4 (headless)
- ✅ Controlled via OpenPLC Editor desktop application
- ✅ REST API interface (port 8443)
- ✅ No web interface - program upload via Editor only
- ✅ Modern architecture
- Node-RED: Automates workflows and orchestrates communication.
- PostgreSQL: Manages and stores time-series data.
- Mosquitto: Enables MQTT-based messaging between services.
- Grafana: Provides data visualisation and analytics.
- OpenPLC Runtime: For running PLC programs (Modbus TCP/IP Enabled) - OpenPLC Editor needed to be downloaded and installed separately https://autonomylogic.com/.
- Pre-configured Mosquitto broker with secure authentication.
- Node-RED flows demonstrating:
- MQTT communication.
- PostgreSQL integration for database creation and data management.
- Ready-to-use Grafana dashboard template for visualising time-series data.
Windowsusers: Docker Desktop with WSL2 (Ubuntu). Docker Desktop should be linked (integrated) to your WSL2 instance.Macusers: Docker Desktop and Xcode installed.
- Clone this repository, and update ownership.
git clone https://github.com/ctch3ng/Digitalisation-AIO-Package.git🚨 For Windows users, run the following.
Rationale: On most Linux (Ubuntu included) systems, UID 1000 and GID 1000 typically refer to the first regular user account created and the primary group associated with the first non-system user account, respectively. You can use the command id -u and id -g to find your UID and GID, respectively.
sudo chown -R 1000:1000 Digitalisation-AIO-Package/🚨 For Mac users, run the following instead.
Rationale: On MacOS systems, UID 501 and GID 20 typically refer to the first regular user account created and the primary group associated with the first non-system user account, respectively. You can use the command id -u and id -g to find your UID and GID, respectively
sudo chown -R 501:20 Digitalisation-AIO-Package/🚨For both Mac and Windows users, run the following.
Rationale: In Node-Red, installing packages via the Manage palette could remove the customised DHT and Button emulators that come with this package. The following is to make a copy of them to the folder Temp, such that we can reapply them later when needed.
sudo cp -r ./Digitalisation-AIO-Package/nodered-data/node_modules/ ./Digitalisation-AIO-Package/temp- Configure the
.envfile with your preferred credentials. (You can skip this if you just want to give it a test drive)
- Set your PostgreSQL password.
- The default password is
05JD£AEBW2'f.
- The default password is
- Define Grafana admin credentials.
- The default username and password are
adminand0m{-}>7nP8)C, respectively.
- The default username and password are
- Launch the stack:
cd Digitalisation-AIO-Package/sudo docker compose up -d🚨 If step 3 above ends up with permission issues, you may need to further run the following as well to provide adequate access rights.
sudo chmod -R 777 ./Digitalisation-AIO-Package/- Access the services:
- Node-RED: http://localhost:1880
- Grafana: http://localhost:3000
- OpenPLC Runtime: Access via OpenPLC Editor desktop applicaiton. Download and install separately.
Under Manage palette, search and install the following modules.
node-red-contrib-postgresqlnode-red-dashboardnode-red-contrib-modbusnode-red-contrib-lfo
Under Configuration nodes, expand digitalisation-aio-package-mosquitto-1. Enter the following information under Security
- Username:
mqtt_user1 - Password:
P71X95tQ!]tm
🚨🚨Return to your Ubuntu or Terminal, and run the following to install the DHT and button emulators. In the future, if the emulators are removed due to the installation of other modules, you can run this again and reinstall them.
Assuming you are inside the directory (folder) Digitalisation-AIO-Package
cp -r ./temp/* ./nodered-data/node_modules/
sudo docker compose stop
sudo docker compose start- Under
Data sources, add PostgreSQL with the following information.- Host URL:
digitalisation-aio-package-postgres-1:5432 - Database name:
postgres - Username:
postgres - Password:
05JD£AEBW2'f - TLS/SSL Mode:
disable - TimescaleDB:
enable
- Host URL:
- Import the
Dashboard Demo.jsonfrom thegrafana-data/directory into Grafana via Dashboards -> Import. - Edit
Sensor 1andSensor 2panels. Selectgrafana-postgresql-datasourceas the source.
Note: Docker containers can reach out to each other via their container names; by default, they are
- NodeRed:
digitalisation-aio-package-nodered-1 - PostgreSQL:
digitalisation-aio-package-postgres-1 - Mosquitto:
digitalisation-aio-package-mosquitto-1 - Grafana:
digitalisation-aio-package-grafana-1 - OpenPLC Runtime:
digitalisation-aio-package-openplc-runtime-1
[Optional] Updating Mosquitto's credentials (Again, you can skip this if you just want to give it a test drive)
- Enter the Mosquitto container:
docker exec -it digitalisation-aio-mosquitto sh-
(Use
docker psto confirm the container name. Here, the name in the example isdigitalisation-aio-mosquitto) -
Navigate to the password file directory:
cd /mosquitto/config- Update the password file (Here, the default username and password are
mqtt_user1andP71X95tQ!]tm, respectively):
rm passwordfile
echo "mqtt_user1:P71X95tQ!]tm" > passwordfile
chmod 0700 passwordfile- Hash the password file:
mosquitto_passwd -U passwordfile- Exit the container:
exit