Skip to content

This repository shows the implementation of an energy dashboard on the WAGO CC100 using several Docker containers (Node RED, InfluxDB and Grafana)

Notifications You must be signed in to change notification settings

WAGO/cc100-energy-dashboard

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 

Repository files navigation

cc100-energy-dashboard

This repository shows the implementation of an energy dashboard on the WAGO CC100 using several Docker containers (Node-RED, InfluxDB and Grafana). The WAGO energy meter (MID) is used as an example source for the energy data.

Grafana Energy Dashboard

Prerequisites

  • WAGO CC100 (751-9301)
  • WAGO Energy Meter (MID) (e.g. 879-3000)
  • for firmware download or update see cc100-firmware
  • PC with preinstalled SSH Client (e.g. PuTTY)
  • Web browser of your choice. (e.g. chrome)

Follow the cc100-serial-communication repository for better understanding

Setup

The idea is to use the CC100 to read energy data from the MID via Modbus RTU and display it on a Grafana dashboard. For this purpose, containers with Node-RED, InfluxDB and Grafana are set up on the CC100. For higher performance, the containers with InfluxDB and Grafana can be outsourced to an edge computer.

Concept

Connect the terminals X11.1 and X11.2 of the CC100 with the terminals 7 and 8 of the MID

Connection of the CC100 with the MID

CC100 Login

Start SSH Client e.g. Putty

login as 'root'
password 'wago'

Check docker installation

docker info
docker ps           # lists all running containers (no container should run)
docker images       # lists all preinstalled images

Create Network

docker network create monitoring
docker network ls        # lists all networks

Start containers

  1. Node-RED
docker run -d \
--name node-red \
--restart always \
--privileged=true \
--user=root \
-p 1880:1880 \
-v node_red_user_data:/data \
-v /dev/ttySTM1:/dev/serial \
nodered/node-red
  1. InfluxDB
docker run --rm \
-e INFLUXDB_DB=homedb \
-e INFLUXDB_ADMIN_ENABLED=true \
-e INFLUXDB_ADMIN_USER=admin \
-e INFLUXDB_ADMIN_PASSWORD=wago1951 \
-e INFLUXDB_USER=home \
-e INFLUXDB_USER_PASSWORD=wago1951 \
-v influxdb-storage:/var/lib/influxdb \
influxdb:1.8.4 /init-influxdb.sh


!!! Wait for Container finish to make sure InfluxDB was created !!!

docker run -d \
--name influxdb \
--restart always \
--network monitoring \
-p 8086:8086 \
-v influxdb-storage:/var/lib/influxdb \
influxdb:1.8.4
  1. Grafana
docker run -d \
--name grafana \
--restart always \
--network monitoring \
-p 3000:3000 \
-v grafana-storage:/var/lib/grafana \
grafana/grafana:8.4.4

Import Node-RED flow

  1. Open Node-RED by typing <ip of your PFC>:1880 into your browser
  2. Install the node-red-contrib-modbus lib and node-red-contrib-buffer-parser lib (burger menu - Manage palette - Install)
  3. Import the flow Store MID Data

Node-RED Flow Store MID Data

Node-RED Subflow Read MID Data

  1. Edit the Server of the influxdb nodes to contain the IP address of your CC100

Edit Server of InfluxDB Node

  1. Deploy the flow
  2. Click on the injection node to read the MID data and save it to the database

You can adapt the flow to your needs by reading other registers as well. The addresses of all registers that can be read can be found in the data sheet of the MID. Please note that the addresses for the Modbus read nodes must be specified as decimal values.

Import Grafana dashboard

  1. Open Grafana by typing <ip of your PFC>:3000 into your browser and log in by creating a new user
  2. Implement InfluxDB as datasource (Configuration - Add datasource - InfluxDB) as follows

Configure InfluxDB as datasource

Configure InfluxDB as datasource

wago1951 is the standard password of the database homedb

  1. Import the dashboard Energy Dashboard

Further CC100 projects

Sources

About

This repository shows the implementation of an energy dashboard on the WAGO CC100 using several Docker containers (Node RED, InfluxDB and Grafana)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published