diff --git a/.DS_Store b/.DS_Store index 5b11eb2..1f3c622 100644 Binary files a/.DS_Store and b/.DS_Store differ diff --git a/README.md b/README.md index 249dc4b..4db2a6c 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -## A Docker based Home Assistant interface for Voltronic Solar Inverters +# A Docker based Home Assistant interface for Voltronic Solar Inverters This project [was derived](https://github.com/leithhobson/skymax-demo-Original) from the 'skymax' [C based monitoring application](https://skyboo.net/2017/03/monitoring-voltronic-power-axpert-mex-inverter-under-linux/) designed to take the monitoring data from Voltronic, Axpert, Mppsolar PIP, Voltacon, Effekta, and other branded OEM Inverters and send it to a Home Assistant MQTT server for ingestion... @@ -10,4 +10,71 @@ The program is designed to be run in a Docker Container, and can be deployed on ---- +**Docker Hub:** [`bushrangers/ha-voltronic-mqtt`](https://hub.docker.com/r/bushrangers/ha-voltronic-mqtt/) +![License](https://img.shields.io/github/license/ned-kelly/ha-monitor-api.svg) ![Docker Pulls](https://img.shields.io/docker/pulls/bushrangers/ha-monitor-api.png) + +## Prerequisites + +- Docker +- Docker-compose +- [Voltronic](https://www.ebay.com.au/sch/i.html?_from=R40&_trksid=p2334524.m570.l1313.TR11.TRC1.A0.H0.Xaxpert+inverter.TRS0&_nkw=axpert+inverter&_sacat=0&LH_TitleDesc=0&LH_PrefLoc=2&_osacat=0&_odkw=solar+inverter&LH_TitleDesc=0) based inverter that you want to monitor +- Home Assistant [running with a MQTT Server](https://www.home-assistant.io/components/mqtt/) + + +## Configuration & Standing Up + +It's pretty straightforward, just clone down the sources and set the configuration files in the `config/` directory: + +```bash +# Clone down sources on the host you want to monitor... +git clone https://github.com/ned-kelly/docker-voltronic-homeassistant.git /opt/ha-voltronic-mqtt +cd /opt/ha-voltronic-mqtt + +# Configure the 'device=' directive (in skymax.conf) to suit for RS232 or USB..  +vi config/skymax.conf + +# Configure your MQTT server host, port, Home Assistant topic, and name of the Inverter that you want displayed in Home Assistant. +vi config/mqtt.json +``` + +Then, plug in your Serial or USB cable to the Inverter & stand up the container: + +```bash +docker-compose up -d + +``` + +_Note if you have issues standing up the image on your Linux distribution, you may need to manually build the image - This can be done by uncommenting the build flag in your docker-compose.yml file._ + +## Integrating into Home Assistant. + +Providing you have setup [MQTT](https://www.home-assistant.io/components/mqtt/) with Home Assistant, the device will automatically register in your Home Assistant when the container starts for the first time -- You do not need to manually define any sensors. + +From here you can setup [Graphs](https://www.home-assistant.io/lovelace/history-graph/) to display sensor data, and optionally change state of the inverter by "[publishing](https://www.home-assistant.io/docs/mqtt/service/)" a string to the inverter's primary topic like so: + +![Example, Changing the Charge Priority](images/mqtt-publish-packet.png "Example, Changing the Charge Priority") +_Example: Changing the Charge Priority of the Inverter_ + +**COMMON COMMANDS THAT CAN BE SENT TO THE INVERTER** + +_(see [protocol manual](http://forums.aeva.asn.au/uploads/293/HS_MS_MSX_RS232_Protocol_20140822_after_current_upgrade.pdf) for complete list of supported commands)_ + + + +``` +Set output source priority POP00 (Utility first) + POP01 (Solar first) + POP02 (SBU) + +Set charger priority PCP00 (Utility first) + PCP01 (Solar first) + PCP02 (Solar and utility) + PCP03 (Solar only) + +Set other commands PEa / PDa (Enable/disable buzzer) + PEb / PDb (Enable/disable overload bypass) + PEj / PDj (Enable/disable power saving) + PEu / PDu (Enable/disable overload restart); + PEx / PDx (Enable/disable backlight) +``` \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml index 5f6f0ee..5b64a1b 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -3,7 +3,9 @@ version: '2' services: voltronic-mqtt: - build: . + #build: . + image: bushrangers/ha-voltronic-mqtt + container_name: voltronic-mqtt privileged: true diff --git a/images/mqtt-publish-packet.png b/images/mqtt-publish-packet.png new file mode 100644 index 0000000..38162a3 Binary files /dev/null and b/images/mqtt-publish-packet.png differ