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!

i have my inverex solar integrated to Hassio but sensor values i get does not have device class energy and even if i set it in developer tools it gets erased in next refresh and i cant integrate that data into energy dash board…
can some one guide how do i get the program send device class as well with mqtt data

Hello,
I have an Axpert MAX 7.2kW converter which has 2 PV inputs.
However, after running the “DEBUG” command, it does not list the voltage, current or power for the PV2 input, only for PV1. How to add this input? In WatchPower after connecting the inverter via USB voltage to PV2 I see correctly see the attached pictures. Thank you in advance.


In my case, it’s unknown when the baud rate of the USB/Serial adaptor is wrong.

I proved this by opening minicomm on the adaptor with a 9600 baud rate specifically and then sending QPIGS command and watching for input, then when I run the inverter poller after that all my values are correct.

HOWEVER, when this is the problem, I also get timeouts on the inverter poller command where as it looks like yours are completing correctly.

The other issue I’ve had is the inverter instance in portainer not logging in to MQTT correctly, I’ve found that my environment comes up in the wrong order so inverter instance starts trying to authenticate against the MQTT in HA that isn’t there, once HA is actually up, I restart the inverter instance and it authenticates against MQTT properly and away we go.

Hope that helps maybe?

There’s a few of us in this same boat (I have the MPP 7.2 also) and I get no PV data to the front end of HA at all but my data for PV1 voltage/current is gathered by the inverter poller.
I’ve read some people just do the math, Voltage x Amps = Wattage but I’m not sure where they are adding that code and how they get it to come forward in HA.

Have a look here where some others are discussing similar.

Issues · ned-kelly/docker-voltronic-homeassistant · GitHub

yes PV input in Watts didn’t work for me either and I modified the code. Specifically, it was a “main.cpp” file stored in /sources/inverter.cli/main.pp
just edit the line in it:
pv_input_watts = (scc_voltage * pv_input_current) * wattfactor;
edit to
pv_input_watts = (pv_input_voltage * pv_input_current) * wattfactor;

how to do it:
open a terminal and log in to raspberryPi
write the commands one by one:
cd /opt/ha-inverter-mqtt-agent/sources/inverter-cli/

sudo nano main.cpp

edit line

press control+O to overwrite
press control+X to exit the editor

sudo nano reboot

done :slight_smile:

2 Likes

Hello,
I own an Easun SV4 (Easun Igrid SV IV). I had no luck with it till now. I tried different settings and I get only the following error:

Fri Feb 25 15:10:23 2022 INVERTER: Current CRC: B7 A9
Fri Feb 25 15:10:26 2022 INVERTER: QPIGS read timeout
Fri Feb 25 15:10:26 2022 INVERTER: QPIGS reply too short (8 bytes)
Fri Feb 25 15:10:26 2022 INVERTER: Current CRC: F8 54
Fri Feb 25 15:10:29 2022 INVERTER: QPIRI read timeout
Fri Feb 25 15:10:29 2022 INVERTER: QPIRI reply too short (8 bytes)
Fri Feb 25 15:10:29 2022 INVERTER: Current CRC: B4 DA
Fri Feb 25 15:10:32 2022 INVERTER: QPIWS read timeout
Fri Feb 25 15:10:32 2022 INVERTER: QPIWS reply too short (8 bytes)
Fri Feb 25 15:10:37 2022 INVERTER: Current CRC: 49 C1
Fri Feb 25 15:10:37 2022 INVERTER: QMOD reply size (5 bytes)
Fri Feb 25 15:10:37 2022 INVERTER: QMOD: incorrect start/stop bytes.  Buffer: (NAKs▒
Fri Feb 25 15:10:37 2022 INVERTER: Current CRC: B7 A9
Fri Feb 25 15:10:40 2022 INVERTER: QPIGS read timeout
Fri Feb 25 15:10:40 2022 INVERTER: QPIGS reply too short (8 bytes)
Fri Feb 25 15:10:40 2022 INVERTER: Current CRC: F8 54
Fri Feb 25 15:10:43 2022 INVERTER: QPIRI read timeout
Fri Feb 25 15:10:43 2022 INVERTER: QPIRI reply too short (8 bytes)
Fri Feb 25 15:10:43 2022 INVERTER: Current CRC: B4 DA
Fri Feb 25 15:10:46 2022 INVERTER: QPIWS read timeout
Fri Feb 25 15:10:46 2022 INVERTER: QPIWS reply too short (24 bytes)
Fri Feb 25 15:10:51 2022 INVERTER: Current CRC: 49 C1
Fri Feb 25 15:10:51 2022 INVERTER: QMOD reply size (5 bytes)
Fri Feb 25 15:10:51 2022 INVERTER: QMOD: incorrect start/stop bytes.  Buffer: (NAKs▒

Also rebooted the inverter.
Any advice what to try next? Maybe someone has a similar invertor? Seems that this invertor is sold under different names.

So, running the inverterpoller, i’m getting this outpout:

device=/dev/hidraw0

# How many times per hour is the program going to run...
# This is used to calculate the PV & Load Watt Hours between runs...
# If unsure, leave as default - it will run every minute...

# (120 = every 30 seconds)...
run_interval=120

# This allows you to modify the amperage in case the inverter is giving an incorrect
# reading compared to measurement tools.  Normally this will remain '1'
amperage_factor=1.0

# This allos you to modify the wattage in case the inverter is giving an incorrect
# reading compared to measurement tools.  Normally this will remain '1'
watt_factor=1.01

qpiri=102
Thu Mar  3 19:43:41 2022 INVERTER: Current CRC: F8 54
Thu Mar  3 19:43:44 2022 INVERTER: QPIRI read timeout
Thu Mar  3 19:43:44 2022 INVERTER: QPIRI reply too short (96 bytes)
Thu Mar  3 19:43:44 2022 INVERTER: Current CRC: B4 DA
Thu Mar  3 19:43:44 2022 INVERTER: QPIWS reply size (0 bytes)
Thu Mar  3 19:43:44 2022 INVERTER: QPIWS: incorrect start/stop bytes.  Buffer: QPIWS▒▒
Thu Mar  3 19:43:49 2022 INVERTER: Current CRC: 49 C1
Thu Mar  3 19:43:49 2022 INVERTER: QMOD reply size (0 bytes)
Thu Mar  3 19:43:49 2022 INVERTER: QMOD: incorrect start/stop bytes.  Buffer: QMODI▒
Thu Mar  3 19:43:49 2022 INVERTER: Current CRC: B7 A9
Thu Mar  3 19:43:49 2022 INVERTER: QPIGS reply size (0 bytes)
Thu Mar  3 19:43:49 2022 INVERTER: QPIGS: incorrect start/stop bytes.  Buffer: QPIGS▒▒
Thu Mar  3 19:43:49 2022 INVERTER: Current CRC: F8 54
Thu Mar  3 19:43:52 2022 INVERTER: QPIRI read timeout
Thu Mar  3 19:43:52 2022 INVERTER: QPIRI reply too short (96 bytes)
Thu Mar  3 19:43:52 2022 INVERTER: Current CRC: B4 DA
Thu Mar  3 19:43:52 2022 INVERTER: QPIWS reply size (0 bytes)
Thu Mar  3 19:43:52 2022 INVERTER: QPIWS: incorrect start/stop bytes.  Buffer: QPIWS▒▒

Anyone can give me any advice on what to check?

So I tried this, made the edits, restarted the image in portainer but still no PV in watts, though I can see PV voltage and current (for 1 array at least).

Though I note that when I jump back into the console within the image in portainer, go to open main.cpp it says I’m already editing it, implying the docker image restart has not really restarted the OS within?

Yet when I attempt to restart the OS within (listed as Debian 9) there ae nor commands that seem to be able to reboot it.

did you find solution about this meine is same

Hey guys, would anyone be able to assist me with this?

I am using an Axpert VM III Inverter, I am currently plugged in to a Raspberry Pi 3b+ using a RJ45->USB using a RS232 Adapter. Plugged into the RS232 monitoring port on the Inverter.

When Running

./inverter_poller -d -1

I get the following output… Never any response what so ever.

Thu Mar 17 09:36:19 2022 INVERTER: Debug set
Thu Mar 17 09:36:19 2022 INVERTER: Current CRC: 49 C1
Thu Mar 17 09:36:22 2022 INVERTER: QMOD read timeout
Thu Mar 17 09:36:23 2022 INVERTER: QMOD reply too short (0 bytes)
Thu Mar 17 09:36:23 2022 INVERTER: Current CRC: B7 A9
Thu Mar 17 09:36:26 2022 INVERTER: QPIGS read timeout
Thu Mar 17 09:36:27 2022 INVERTER: QPIGS reply too short (0 bytes)
Thu Mar 17 09:36:27 2022 INVERTER: Current CRC: F8 54
Thu Mar 17 09:36:30 2022 INVERTER: QPIRI read timeout
Thu Mar 17 09:36:31 2022 INVERTER: QPIRI reply too short (0 bytes)
Thu Mar 17 09:36:31 2022 INVERTER: Current CRC: B4 DA
Thu Mar 17 09:36:34 2022 INVERTER: QPIWS read timeout
Thu Mar 17 09:36:35 2022 INVERTER: QPIWS reply too short (0 bytes)
Thu Mar 17 09:36:40 2022 INVERTER: Current CRC: 49 C1

Any help would be hugely appreciated.

Hi, sorry to bother specially on such a old post like this, but can you explain with more details how you managed to get it to work? i have also a pi1, everythings working i can read data from the sensors on the terminal but the sensors doesnt show up on the HA (mqtt is already configured on both sides) thanks

hi guys how to do i make my own docker image from fork of main project… as the changes i made doesnt work if i compose from default docker compose.yml

ciao ragazzi ho un voltroni MKS IV 6KW e finalmente ho trovato i valori corretti in: vi config/inverter.conf che vi lascio cosi possono servire a qualcuno.

qpiri=103
qpiws=40
qmod=5
gpigs=110

1 Like

hi, i’m not good and i can’t do this step " 3.copy inverter.conf da opt/ha-inverter-mqtt-agent/config a
opt/ha-inverter-mqtt-agent/sources/ inverter-cli e sovrascrivere inverter.conf già esistente nella directory inverter-cli.".
could you tell me more precisely what to do? thank you

Hi
I have a inverter using protocol 18 (^P00 commands & not Q commands). I have uploaded two weekends project using ESP8266 that connects directly to the serial port drawing power from the inverter alone.

Using ESP8266 and following HA MQTT sensor, this is currently in use for monitoring inverter online.
https://github.com/amishv/voltronic_ESP8266_MQTT
The MQTT was used to display a real time dashboard on another Raspberrypi
https://github.com/amishv/MQTT-Based-Dashboard-for-Solar-Inverter

I have also created initial version using ESPHome; this was in use before I decided to switch to MQTT to run a separate dashboard. I have created a PR for ESPhome.

These are weekend project generally developed in an single weekend sitting, so might be crude. Hope this might be useful to Solar enthusiasts like me.

1 Like

Hey! I made a PCB For this if anyone is interisted.

A PCB for what?

it is identical to mine. But at that time, I didn’t found the correct settings, so I give up. I bought the solar assistant software that worked out of the box.
Even so, I will test your settings. thank you for posting them.

Interfacing with the Axpert COM Port(The RJ45) It does the TTL to RS232 conversion and makes it so you only need a convenient LAN cable.

1 Like

Hi,

i have the Axpert MKS IV 6KW and i used these value:

# This allows you to modify the buffersize for the qpiri command
qpiri=103

# This allows you to modify the buffersize for the qpiws command
qpiws=56

# This allows you to modify the buffersize for the qmod command
qmod=5

# This allows you to modify the buffersize for the qpigs command
qpigs=110

I don’t know if your is the same as mine

but if you have this inverter, to read the PV watt produced you must patch the docker with these indication:

and use the V2 file indicated here: