Skip to content

Linux-RISC/FreeDS-SCADA

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

46 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Buy Me A Coffee

Last update: 2024/02/01

  • Python script removed, all the logic is implemented using Node-RED
  • MQTT data is stored InfluxDB
  • Grafana can be used to display trends
  • minor fixes and improvements

FreeDS-SCADA

FreeDS SCADA developed using Node-RED

Project objectives

This project implements a SCADA for FreeDS, developing these functions:

  • shows information about FreeDS status
  • allows enabling/disabling PWM and switching between modes AUT<-->MAN
  • implements two set points in order to switch to MAN mode when the temperature is <= Low_temperature_set_point and switches to AUTO mode when the temperature is >= Low_temperature_set_point+Temperature_increase_set_point

Requeriments

  1. A PC or Raspberry Pi, I'm using a Raspberry Pi 2 and a 16 GB SD card
  2. Debian or Raspberry Pi OS administration skills
  3. Install and configure Mosquito MQTT broker and required utilities:
    https://randomnerdtutorials.com/how-to-install-mosquitto-broker-on-raspberry-pi/
sudo apt install mosquitto mosquitto-clients influxdb influxdb-client

Edit /etc/mosquitto/mosquitto.conf and add at the end:

allow_anonymous true
listener 1883 0.0.0.0

Enable and restart Mosquitto:

sudo systemctl enable mosquitto.service
sudo service mosquitto restart
  1. Install Node-RED:
    https://nodered.org/docs/getting-started/raspberrypi
bash <(curl -sL https://raw.githubusercontent.com/node-red/linux-installers/master/deb/update-nodejs-and-nodered) 
sudo systemctl enable nodered.service
sudo service nodered restart

Access to Node-RED from a Internet browser:
http://raspberry-pi-IP:1880
http://raspberry-pi-IP:1880/ui (runtime)

  1. Create FreeDS database on InfluxDB:
$ influx
> create database FreeDS
> quit 
  1. Optional but recommendable:
  • download MQTT explorer in order to debug MQTT broker: http://mqtt-explorer.com/
  • configure your timezone and enable time synchronization:
    raspi-config --> Localisation Options --> Timezone
sudo raspi-config
sudo systemctl enable systemd-timesyncd
  1. Log into Node-RED using http://raspberry-pi-IP:1880 and install node-red-dashboard and node-red-contrib-influxdb:
    Menu-->Manage Palete-->Install and search node-red-dashboard/node-red-contrib-influxdb, select it for installation and accept

  2. Download FreeDS-SCADA.json, import it into Node-RED and enjoy !