This software module connects an E3/DC home power station, requests data cyclically and makes it available via a REST server.
The tool consists of two modules:
- rscp2p communicates with the home power station and has a similar functionality as rscp2mqtt
- a web server based on Node.js and Express gets the data via interprocess communication by rscp2p
Please use the Docker image for Linux platforms at Docker Hub.
docker run --rm -d -e TZ=Europe/Berlin -e E3DC_IP=<ip address> -e E3DC_USER=<user> -e E3DC_PASSWORD=<password> -e E3DC_AES_PASSWORD=<rscp aes password> -p3300:3300 pvtom/rscp2rest:latest
# Set program parameters with -e, supported are:
# mandatory
E3DC_IP
E3DC_PORT (default: 5033)
E3DC_USER
E3DC_PASSWORD
E3DC_AES_PASSWORD
# optional
PREFIX
INTERVAL
RAW_MODE
WALLBOX
PVI_TRACKER
BATTERY_STRINGS
HISTORY_START_YEAR
USE_HTTPS
Or start the container with an existing .config file
docker run --rm -d -e TZ=Europe/Berlin -v /path/to/your/.config:/opt/rscp2p/.config -p3300:3300 pvtom/rscp2rest:latest
Please follow the README of rscp2mqtt to create a .config file and take a look at the template.
docker run --rm -d -e TZ=Europe/Berlin -e E3DC_IP=<ip address> -e E3DC_USER=<user> -e E3DC_PASSWORD=<password> -e E3DC_AES_PASSWORD=<rscp aes password> -e USE_HTTPS=true -v /path/to/your/server.key:/opt/rscp2rest/server.key -v /path/to/your/server.crt:/opt/rscp2rest/server.crt -p3300:3300 pvtom/rscp2rest:latest
Take a look at the overview of the available keys that can be queried or set.
GET retrieves all or individual data records, consisting of the key, the value, the unit and the timestamp of the last change in JSON or raw format.
curl http://<your server>:3300/data
curl http://<your server>:3300/data/<key>
curl http://<your server>:3300/data/<key>/raw
If the server is running under https, you can use the option -k when calling curl, e.g. curl -k https://<your server>:3300/data
Examples:
# JSON
curl http://<your server>:3300/data/pvi_frequency
{
"pvi_frequency": {
"value": "50.00",
"unit": "Hz",
"timestamp": "2024-09-12T22:08:00+02:00"
}
}
# RAW
curl http://<your server>:3300/data/pvi_frequency/raw
50.00
POST can be used to send commands to the home power station, analogous to the "set" commands of rscp2mqtt.
curl -X POST -H "Content-Type: application/json" -d '{"key":"<key>","value":"<value>"}' http://<your server>:3300/data
Example:
curl -X POST -H "Content-Type: application/json" -d '{"key":"ems_weather_regulation","value":"true"}' http://<your server>:3300/data
DELETE removes data records from the cache. This can be useful for deleting old error messages.
curl -X DELETE http://<your server>:3300/data/<key>
To get an overview of the data, a small website is available at http://<your server>:3300
- The RSCP example application comes from E3/DC. According to E3/DC it can be distributed under the following conditions:
The authors or copyright holders, and in special E3/DC can not be held responsible for any damage caused by the software. Usage of the software is at your own risk. It may not be issued in copyright terms as a separate work.
- License of AES is included in the AES code files
- Node.js License at https://github.com/nodejs/node/blob/main/LICENSE