Programmatically read data from your Solar Inverter (Voltronic, Axpert, Mppsolar PIP, Voltacon, Effekta etc) and interface with Home Assistant via MQTT - Works with RS232 & USB!

Nov 2020 UPDATE:

It’s amazing to see how many people are using this and how many Pulls now on Docker hub - Thanks everyone who’s contributed to this project over time… Refer to change log at bottom of this post for updates over time.


TLDR:

Docker Image: bushrangers/ha-voltronic-mqtt:latest (Read Github Readme File 1st)

Sources + Config: https://github.com/ned-kelly/docker-voltronic-homeassistant

Docker Pulls buildx

The following other projects may also be run on the same SBC (using the same style docker architecture/setup as this) to give you a solution that can also integrate CT (Current Clamps) in your setup + EPever MPPT’s:


Original Post:

Hi all, just thought I’d share this one incase it’s useful for someone else out there…

For anyone who’s picked up one of those cheap Voltronic, Axpert, Mppsolar, PIP, Voltacon, Effekta, and other branded OEM Inverters I’ve got a Docker based solution that can be run on a lightweight & cheap SBC (Such as an Orange or Raspberry PI) allowing you to interface with them finally with ease (the bundled Java app they give you “Watchpower” is a pile of S$$T and unreliable at the best of times)…

voltronic-incerter
For those unsure, this is what the Inverters look like, there are loads on Ebay for cheap

It works by both pull monitoring data (Via the RS232 or USB port on the Inverter) and sending to Home Assistant via MQTT, as well as actually programatically receiving commands (again via MQTT) to change the configuration of the Inverter on the fly - Depending on various automations you might setup (such as ‘only charge batteries off solar during the day’, then ‘charge batteries off the grid’ at night time after midnight when the price of power is cheaper) etc…


Mar 2020: The project now finally supports multiple architectures on Docker Hub, so users should not need to manually build the image, and can just run a docker pull for most common devices (such as arm7/8, x86_64 etc).

NB Please read the readme, you may need to change your config/inverter.conf & mqtt.json files to suit your environment.


Jul 2020: Two more projects which use the same architecture as this been created, allowing you to run (on the same SBC) integrations for Current Clamps and Epever MPPT Charge Controllers in your setup.


Nov 2020: Several PR’s merged from the community (awesome!) - Project now supports direct writing to Influx DB for users wanting to display read-only data on Grafana on a separate device independent of Home Assistant. (HA still required to change inverter config, etc)


Hopefully this makes someone else’s life a bit easier also :slight_smile:

Screenshots:

17 Likes

How do i use this with Mosquitto broker that needs a user name and password.

Very good question. The code on GitHub doesn’t seem to allow for mqtt username or password. Easily fixed I think.

Code has now been updated to include MQTT username/password - Just set these values in your mqtt.conf file

Damn, I was going to submit a PR as it seemed a fix I could probably have achieved.

1 Like

Haha, We need a PR for better ‘formatting’ of the error codes/states and what they mean if you’re up for that - Even if it’s something that happens in the shell script wrapper and not the C application :wink:

Hi everyone, I performed the described procedure with a raspberri pi 3+ but I can’t see anything on home assistant.
how can I prove that the raspberry is well configured with the MQTT and that it sends the data correctly?

CIao, dopo varie prove sono riuscito a vedere i sensori voltronic su hassio ma non mi da i valori, mi scrive SCONOSCIUTOCattura

Best you check through the the Github issues as there seems to be different response size (bytes) for different model inverters - but essensially you can check for a response by running the binary in ‘debug’ mode like so…

docker exec -it voltronic-mqtt bash -c '/opt/inverter-cli/bin/inverter_poller -d -1'

Also make sure you set the serial/usb port’s rate like so:

stty -F /dev/ttyUSB0 2400 raw
1 Like

thank you very much, I was wrong to modify the inverter.conf file, I didn’t see the hidraw0 port, it was all right thanks to the command you sent me I discovered that there was always ttyUSB.

thank you very much

1 Like

Hi Ned-Kelly,

I have Voltronic 5KVA Inverter. I don’t have programming skills but wants to monitor/change parameter remotely for inverter. Would you please assist me from beginning steps, which device (Raspberry Pi) I need to buy & how to load image in raspberry Pi. Currently I am using watch power program for monitoring, which is running on PC all the times.

Thank-you.

Hi Amansingh,

I’m afraid you’re going to need to have some tech skills to get the project running…

Basically in a nutshell:

  • Grab yourself a raspberr/orange pi & SD Card (I just use a orange pi zero because they are pretty cheap)
  • Load Raspbian / Armbian onto the device
  • Install Docker, Docker Compose & Git
  • Follow the Configuration & Standing Up part of the documentation.

Note you may need to get a USB to Serial adapter if your inverter is not the variant with the UBB port … I ended up getting this one, as some of the cheaper ones I’ve used previously seem to drop packets.

Once you’ve got the project up and running, you can send commands to/from the device via MQTT (such as changing power modes, charge/discharge levels etc).

Cheers,

1 Like

Hi Ned-Kelly,
I am very happy to see your response.
I have completed suggested steps.

  1. Installed docker, docker compose & git.
    Completed below steps under Configuration & Standing Up

  2. Cloned down sources on the host

  3. Configured the inverter.conf file as my inverter support usb

  4. I have installed hass .io home assistant on same raspberry pi & able to open a web page by entering IP address of raspberry Pi (192.168.1.5:8123/).

  5. I have edited config/mqtt.json file & put the details of hass .io (i.e IP address,Port,username,password).
    Kindly let me know what steps remains now because I can’t see any dashboard there under Hass .io webpage.
    Please note: I haven’t connected the USB cable between Voltronic inverter & raspberry Pi.

Please advise further.

Thank-you

Hi Ned Kelly,

Please help to assist me further.

I am not able to get Voltronic inverter data at Hass.io home assistant page.

Kindly advise further. I have installed Home assistant on same raspberry where I have cloned downed the codes.
Thanks

Hi amansingh,

The inverter won’t just automatically show up in your HA dashboard, you’ll need to configure Lovelace and add the sensor values in to create your own dashboard… I’ve also included sample code (based on the screenshots) in the git repo.

Also, you need to configure homeassistant to run with a MQTT server or use the in-built MQTT server provided by HA if you have not already set this up.

Cheers,

2 Likes

I’ve successfully setup this and its working fine, however I can’t seem to get the “Warnings” topic/entity to appear on HA. I can see the MQTT topic being published on MQTT but it never appears on HA

Below is my HA entities snapshot
image

and the MQTT message received (as seen from MQTT.fx)
image

Am I missing something? I would like to receive the fault codes or messages from the inverter

1 Like

Hi Vicom,
Can you please help me to set it up.
Would appreciate if share step by step.

Thanks,
Aman

what are you waiting for??.. connect so the data can be read and sent via MQTT to HA…
check that you receive MQTT messages from the inverter first

Hi,

I have connected the cable but how to configure sensor data in Lovelace. I have shared the screenshot above. Do I need to paste the code in any yaml file ?

Thanks

Difficult to explain… please watch the videos on how to setup Lovelace also look at the Lovelace example that is provided on the Github

entities to add will begin with

sensor.voltronic_xxxxxxxx

1 Like