Skip to content

Commit 89bbf20

Browse files
committed
v1.0
1 parent 7761090 commit 89bbf20

9 files changed

+3628
-192
lines changed

.github/workflows/ci.yml

+55
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
name: docker
2+
3+
on:
4+
push:
5+
tags:
6+
- "*"
7+
jobs:
8+
build:
9+
runs-on: ubuntu-latest
10+
permissions:
11+
contents: read
12+
packages: write
13+
steps:
14+
-
15+
name: Checkout
16+
uses: actions/checkout@v4
17+
-
18+
name: Docker meta
19+
id: meta
20+
uses: docker/metadata-action@v4
21+
with:
22+
# list of Docker images to use as base name for tags
23+
images: |
24+
${{ github.repository }}
25+
ghcr.io/${{ github.repository }}
26+
-
27+
name: Set up QEMU
28+
uses: docker/setup-qemu-action@v2
29+
-
30+
name: Set up Docker Buildx
31+
uses: docker/setup-buildx-action@v3
32+
-
33+
name: Login to Docker Hub
34+
if: github.event_name != 'pull_request'
35+
uses: docker/login-action@v3
36+
with:
37+
username: ${{ github.actor }}
38+
password: ${{ secrets.DOCKERHUB_TOKEN }}
39+
-
40+
name: Login to Github Container Registry
41+
if: github.event_name != 'pull_request'
42+
uses: docker/login-action@v3
43+
with:
44+
registry: ghcr.io
45+
username: ${{ github.actor }}
46+
password: ${{ secrets.GITHUB_TOKEN }}
47+
-
48+
name: Build and push
49+
uses: docker/build-push-action@v5
50+
with:
51+
context: .
52+
platforms: linux/amd64,linux/arm64,linux/arm
53+
push: ${{ github.event_name != 'pull_request' }}
54+
tags: ${{ steps.meta.outputs.tags }}
55+
labels: ${{ steps.meta.outputs.labels }}

DOCKER.md

+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
## Docker
2+
3+
A Docker image is available at https://hub.docker.com/r/pvtom/rscp2mqtt-dashboard
4+
5+
### Start the docker container
6+
7+
```
8+
sudo docker run --rm -e MQTT_BROKER=localhost -e MQTT_PORT=1883 -p:1880:1880 pvtom/rscp2mqtt-dashboard:latest
9+
```
10+
11+
Please adjust the MQTT broker and the port. Parameters can be set with the -e argument.
12+
13+
### Configuration
14+
15+
These parameters are available to configure MQTT settings:
16+
17+
- MQTT_BROKER
18+
- MQTT_PORT
19+
- MQTT_CLIENT_ID
20+
- MQTT_USER
21+
- MQTT_PASSWORD
22+
- TOPIC_PREFIX
23+
24+
Value ranges can be adjusted with the following parameters:
25+
26+
- MAX_SOLAR_POWER
27+
- MAX_HOME_POWER
28+
- MAX_GRID_POWER
29+
- MAX_BATTERY_POWER
30+
- MAX_STRING_POWER
31+
- MAX_PHASE_POWER
32+
- MAX_BATTERY_RESERVE

Dockerfile

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
FROM nodered/node-red
2+
3+
RUN npm install node-red-contrib-aggregator node-red-dashboard
4+
5+
COPY prepare.sh .
6+
COPY settings.js /data/settings.js
7+
COPY flows.json.template /data/flows.json
8+
9+
RUN sed -i '/#!\/bin\/bash/a source prepare.sh /data/flows.json' entrypoint.sh

README.md

+57-10
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,71 @@
1-
# Dashboard for displaying the values of an E3/DC S10 home power station
1+
# Dashboard for an E3/DC Home Power Station
2+
[![GitHub sourcecode](https://img.shields.io/badge/Source-GitHub-green)](https://github.com/pvtom/rscp2mqtt-dashboard/)
3+
[![GitHub release (latest by date)](https://img.shields.io/github/v/release/pvtom/rscp2mqtt-dashboard)](https://github.com/pvtom/rscp2mqtt-dashboard/releases/latest)
4+
[![GitHub last commit](https://img.shields.io/github/last-commit/pvtom/rscp2mqtt-dashboard)](https://github.com/pvtom/rscp2mqtt-dashboard/commits)
5+
[![GitHub issues](https://img.shields.io/github/issues/pvtom/rscp2mqtt-dashboard)](https://github.com/pvtom/rscp2mqtt-dashboard/issues)
6+
[![GitHub pull requests](https://img.shields.io/github/issues-pr/pvtom/rscp2mqtt-dashboard)](https://github.com/pvtom/rscp2mqtt-dashboard/pulls)
7+
[![GitHub](https://img.shields.io/github/license/pvtom/rscp2mqtt-dashboard)](https://github.com/pvtom/rscp2mqtt-dashboard/blob/main/LICENSE)
28

3-
Based on Node-RED this dashboard was realized. It displays the data of the house power plant that the tool RSCP2MQTT publishes via the MQTT broker.
9+
The dashboard visualizes data from a home power station by subscribing to MQTT topics published by [rscp2mqtt](https://github.com/pvtom/rscp2mqtt).
410

511
![Dashboard](dashboard.png)
612

13+
## Docker
14+
15+
Instead of installing the package, you can simply use an existing [Docker image](DOCKER.md).
16+
717
## Prerequisites
818

9-
- a running rscp2mqtt instance (https://github.com/pvtom/rscp2mqtt)
19+
- a running rscp2mqtt instance (https://github.com/pvtom/rscp2mqtt), v3.8 or higher
20+
- an existing MQTT broker
1021
- an installation of Node-RED (https://nodered.org)
11-
including the modules "node-red-dashboard" and "node-red-contrib-aggregator"
22+
including the modules "node-red-dashboard" and "node-red-contrib-aggregator" or
23+
- a Docker environment on your system
1224

13-
## Installation
25+
## Installation of the package
1426

1527
Please follow the installation steps on the Node-RED homepage.
1628

17-
Import the dashboard.flow
29+
## Load the flow
30+
31+
Import the file dashboard_flow.json, adjust the broker settings in one of the mqtt nodes and deploy the changes
32+
33+
or
34+
35+
set the parameters as environment variables and start the prepare script (i.e. with bash):
36+
37+
```
38+
export MQTT_BROKER="localhost"
39+
export TOPIC_PREFIX="e3dc"
40+
41+
cp -a flows.json.template flows.json
42+
43+
./prepare.sh flows.json
44+
```
45+
46+
afterwards import flows.json into NODE-RED.
47+
48+
These parameters are available to configure MQTT settings:
49+
50+
- MQTT_BROKER
51+
- MQTT_PORT
52+
- MQTT_CLIENT_ID
53+
- MQTT_USER
54+
- MQTT_PASSWORD
55+
- TOPIC_PREFIX
56+
57+
Value ranges can be adjusted with the following parameters:
58+
59+
- MAX_SOLAR_POWER
60+
- MAX_HOME_POWER
61+
- MAX_GRID_POWER
62+
- MAX_BATTERY_POWER
63+
- MAX_STRING_POWER
64+
- MAX_PHASE_POWER
65+
- MAX_BATTERY_RESERVE
1866

19-
Adjust the settings in the mqtt in and out nodes.
67+
## Access the dashboard
2068

21-
Deploy the changes and press the inject button of the "init" node to load the data.
22-
The data in the charts will be populated over the next 24 hours.
69+
The dashboard will be accessible at http://<your_node_red_host>:1880/ui
2370

24-
Dashboard URL: http://<your_node_red_host>:1880/ui/
71+
The chart data is collected over the next 24 hours.

dashboard.png

16.5 KB
Loading

0 commit comments

Comments
 (0)