-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
3,628 additions
and
192 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
name: docker | ||
|
||
on: | ||
push: | ||
tags: | ||
- "*" | ||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: read | ||
packages: write | ||
steps: | ||
- | ||
name: Checkout | ||
uses: actions/checkout@v4 | ||
- | ||
name: Docker meta | ||
id: meta | ||
uses: docker/metadata-action@v4 | ||
with: | ||
# list of Docker images to use as base name for tags | ||
images: | | ||
${{ github.repository }} | ||
ghcr.io/${{ github.repository }} | ||
- | ||
name: Set up QEMU | ||
uses: docker/setup-qemu-action@v2 | ||
- | ||
name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v3 | ||
- | ||
name: Login to Docker Hub | ||
if: github.event_name != 'pull_request' | ||
uses: docker/login-action@v3 | ||
with: | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
- | ||
name: Login to Github Container Registry | ||
if: github.event_name != 'pull_request' | ||
uses: docker/login-action@v3 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
- | ||
name: Build and push | ||
uses: docker/build-push-action@v5 | ||
with: | ||
context: . | ||
platforms: linux/amd64,linux/arm64,linux/arm | ||
push: ${{ github.event_name != 'pull_request' }} | ||
tags: ${{ steps.meta.outputs.tags }} | ||
labels: ${{ steps.meta.outputs.labels }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
## Docker | ||
|
||
A Docker image is available at https://hub.docker.com/r/pvtom/rscp2mqtt-dashboard | ||
|
||
### Start the docker container | ||
|
||
``` | ||
sudo docker run --rm -e MQTT_BROKER=localhost -e MQTT_PORT=1883 -p:1880:1880 pvtom/rscp2mqtt-dashboard:latest | ||
``` | ||
|
||
Please adjust the MQTT broker and the port. Parameters can be set with the -e argument. | ||
|
||
### Configuration | ||
|
||
These parameters are available to configure MQTT settings: | ||
|
||
- MQTT_BROKER | ||
- MQTT_PORT | ||
- MQTT_CLIENT_ID | ||
- MQTT_USER | ||
- MQTT_PASSWORD | ||
- TOPIC_PREFIX | ||
|
||
Value ranges can be adjusted with the following parameters: | ||
|
||
- MAX_SOLAR_POWER | ||
- MAX_HOME_POWER | ||
- MAX_GRID_POWER | ||
- MAX_BATTERY_POWER | ||
- MAX_STRING_POWER | ||
- MAX_PHASE_POWER | ||
- MAX_BATTERY_RESERVE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
FROM nodered/node-red | ||
|
||
RUN npm install node-red-contrib-aggregator node-red-dashboard | ||
|
||
COPY prepare.sh . | ||
COPY settings.js /data/settings.js | ||
COPY flows.json.template /data/flows.json | ||
|
||
RUN sed -i '/#!\/bin\/bash/a source prepare.sh /data/flows.json' entrypoint.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,71 @@ | ||
# Dashboard for displaying the values of an E3/DC S10 home power station | ||
# Dashboard for an E3/DC Home Power Station | ||
[![GitHub sourcecode](https://img.shields.io/badge/Source-GitHub-green)](https://github.com/pvtom/rscp2mqtt-dashboard/) | ||
[![GitHub release (latest by date)](https://img.shields.io/github/v/release/pvtom/rscp2mqtt-dashboard)](https://github.com/pvtom/rscp2mqtt-dashboard/releases/latest) | ||
[![GitHub last commit](https://img.shields.io/github/last-commit/pvtom/rscp2mqtt-dashboard)](https://github.com/pvtom/rscp2mqtt-dashboard/commits) | ||
[![GitHub issues](https://img.shields.io/github/issues/pvtom/rscp2mqtt-dashboard)](https://github.com/pvtom/rscp2mqtt-dashboard/issues) | ||
[![GitHub pull requests](https://img.shields.io/github/issues-pr/pvtom/rscp2mqtt-dashboard)](https://github.com/pvtom/rscp2mqtt-dashboard/pulls) | ||
[![GitHub](https://img.shields.io/github/license/pvtom/rscp2mqtt-dashboard)](https://github.com/pvtom/rscp2mqtt-dashboard/blob/main/LICENSE) | ||
|
||
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. | ||
The dashboard visualizes data from a home power station by subscribing to MQTT topics published by [rscp2mqtt](https://github.com/pvtom/rscp2mqtt). | ||
|
||
![Dashboard](dashboard.png) | ||
|
||
## Docker | ||
|
||
Instead of installing the package, you can simply use an existing [Docker image](DOCKER.md). | ||
|
||
## Prerequisites | ||
|
||
- a running rscp2mqtt instance (https://github.com/pvtom/rscp2mqtt) | ||
- a running rscp2mqtt instance (https://github.com/pvtom/rscp2mqtt), v3.8 or higher | ||
- an existing MQTT broker | ||
- an installation of Node-RED (https://nodered.org) | ||
including the modules "node-red-dashboard" and "node-red-contrib-aggregator" | ||
including the modules "node-red-dashboard" and "node-red-contrib-aggregator" or | ||
- a Docker environment on your system | ||
|
||
## Installation | ||
## Installation of the package | ||
|
||
Please follow the installation steps on the Node-RED homepage. | ||
|
||
Import the dashboard.flow | ||
## Load the flow | ||
|
||
Import the file dashboard_flow.json, adjust the broker settings in one of the mqtt nodes and deploy the changes | ||
|
||
or | ||
|
||
set the parameters as environment variables and start the prepare script (i.e. with bash): | ||
|
||
``` | ||
export MQTT_BROKER="localhost" | ||
export TOPIC_PREFIX="e3dc" | ||
cp -a flows.json.template flows.json | ||
./prepare.sh flows.json | ||
``` | ||
|
||
afterwards import flows.json into NODE-RED. | ||
|
||
These parameters are available to configure MQTT settings: | ||
|
||
- MQTT_BROKER | ||
- MQTT_PORT | ||
- MQTT_CLIENT_ID | ||
- MQTT_USER | ||
- MQTT_PASSWORD | ||
- TOPIC_PREFIX | ||
|
||
Value ranges can be adjusted with the following parameters: | ||
|
||
- MAX_SOLAR_POWER | ||
- MAX_HOME_POWER | ||
- MAX_GRID_POWER | ||
- MAX_BATTERY_POWER | ||
- MAX_STRING_POWER | ||
- MAX_PHASE_POWER | ||
- MAX_BATTERY_RESERVE | ||
|
||
Adjust the settings in the mqtt in and out nodes. | ||
## Access the dashboard | ||
|
||
Deploy the changes and press the inject button of the "init" node to load the data. | ||
The data in the charts will be populated over the next 24 hours. | ||
The dashboard will be accessible at http://<your_node_red_host>:1880/ui | ||
|
||
Dashboard URL: http://<your_node_red_host>:1880/ui/ | ||
The chart data is collected over the next 24 hours. |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.