This program sends information from the Solis Power Inverter to MQTT. It reaches out to the local wifi dongle and extracts information. Then it sends the values to an MQTT topic
It gets the status.html web page from the solis inverter.
It will use the credentials provided in the application.properties
Then it extracts:
Settings in the application.properties
solis.inverterUrl=http://[IP-ADDRESS]/status.html
solis.inverterUserName=admin
solis.inverterPassword=admin
It will send the data which it could extract to an MQTT topic
Settings in the application.properties
solis.mqttAddress=[IP-ADDRESS]
solis.mqttPort=1883
solis.mqttTopic=tele/solis/SENSOR
solis.mqttIdentifier=solis2mqtt
It will send a json message like:
{"power":123,"today":1.3,"total":33.4}
Maven will build the docker container automatically.
For the manual steps:
docker build -t solis2mqtt:0.0.1-SNAPSHOT .
docker run -v c:/temp:/logs -e "SOLIS_INVERTERURL=http://solisinverter/status.html" -e "SOLIS_MQTTADDRESS=127.0.0.1" com.homeautomation/solis2mqtt:0.0.1-SNAPSHOT
docker stop solis2mqtt:0.0.1-SNAPSHOT
docker save -o c:\temp\solis2mqtt.tar solis2mqtt:0.0.1-SNAPSHOT
docker load -i solis2mqtt.tar
version: '2'
services:
solis2mqtt:
container_name: Solis2mqtt
image: com.homeautomation/solis2mqtt:0.0.1-SNAPSHOT
user: "1000:1000"
environment:
- SOLIS_INVERTERURL=http://192.168.1.253/status.html
- SOLIS_MQTTADDRESS=192.168.1.252
volumes:
- /home/nuc/solis2mqtt:/logs
restart: always