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!

Some help please

Same problem! I can’t understand why. I tried both to change usb cable and check with MQTT explorer but nothing, i cant understand why i didnt get information from the device

Hello !

Can someone please tel me which values for QPIRI and QPIWS ?
Thanks !

root@ced214cde071:/opt/inverter-cli/bin# ./inverter_poller -d -1
Thu Nov 23 14:39:45 2023 INVERTER: Debug set
Thu Nov 23 14:39:45 2023 INVERTER: Current CRC: 49 C1
Thu Nov 23 14:39:45 2023 INVERTER: QMOD reply size (5 bytes)
Thu Nov 23 14:39:45 2023 INVERTER: QMOD: 5 bytes read: (L
Thu Nov 23 14:39:45 2023 INVERTER: QMOD query finished
Thu Nov 23 14:39:45 2023 INVERTER: Current CRC: B7 A9
Thu Nov 23 14:39:48 2023 INVERTER: QPIGS read timeout
Thu Nov 23 14:39:48 2023 INVERTER: QPIGS reply too short (0 bytes)
Thu Nov 23 14:39:48 2023 INVERTER: Current CRC: F8 54
Thu Nov 23 14:39:48 2023 INVERTER: QPIRI reply size (98 bytes)
Thu Nov 23 14:39:48 2023 INVERTER: QPIRI: 98 bytes read: (230.0 13.9 230.0 50.0 13.9 3200 3000 24.0 23.0 22.0 29.0 29.0 2 20 020 1 0 2 6 01 0 0 27.0 0 1
Thu Nov 23 14:39:48 2023 INVERTER: QPIRI query finished
Thu Nov 23 14:39:48 2023 INVERTER: Current CRC: B4 DA
Thu Nov 23 14:39:51 2023 INVERTER: QPIWS read timeout
Thu Nov 23 14:39:51 2023 INVERTER: QPIWS reply too short (0 bytes)
Thu Nov 23 14:39:56 2023 INVERTER: Current CRC: B7 A9
Thu Nov 23 14:39:56 2023 INVERTER: QPIGS reply size (110 bytes)
Thu Nov 23 14:39:56 2023 INVERTER: QPIGS: 110 bytes read: (240.0 49.9 240.0 49.9 0167 0049 005 457 29.00 001 100 0023 0000 000.0 00.00 00000 00010101 00 00 00001 110
Thu Nov 23 14:39:56 2023 INVERTER: QPIGS query finished
Thu Nov 23 14:39:56 2023 INVERTER: Current CRC: B4 DA
INVERTER: ampfactor from config is 1.00
INVERTER: wattfactor from config is 1.01
Thu Nov 23 14:39:56 2023 INVERTER: All queries complete, exiting loop.

with this :

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

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

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

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

I’ve been experimenting with this over the last few days. It seems on my inverter (Conversol Max 11kW) the QPIGS command only interrogates one MPPT, the one for PV1. I believe there may be a “QPIGS2” command for polling the inverter for MPPT2 from some other documentation I’ve read with updates on the protocol. I had a shot at forking and modifying the repo to see additional data, but didn’t have any joy. I added quite a lot into the C++ files but none of it seems to be executing. I’m not a programming expert and haven’t used C++ using classes etc before, so I don’t really have the technical skills to finish this. You can see also from the image that PV1 voltage and PV1 current are actually from the solar array not the battery and that PV1 watts are reported as a value. Hopefully it’s helpful to some other poor soul that’s more skilled than I am! Inverter main cpu version is 57.04.

I tried it and having an issue. This was exactly what I was looking for only it isn’t getting the results I expected. I just get (NAKss for a reply. I even tried adding a checksum like others suggested. I’m trying this project, GitHub - dj-nitehawk/Hybrid-Inverter-Monitor: Monitoring application for hybrid inverters using the Voltronic communication protocol & JK BMS via USB port., and it gets values from my inverter, a Vevor 3kv hybrid, but some of the values are wrong or missing. I was hoping to use your script to figure out the problem as I’m not familiar with .NET. Any suggestion on how to get a response?

My python script is only to test the serial port or if needed to enable it.
i never tryed the tool that you metioned.

The com port is working. I’m just trying to find out the command structure. I think I need to add a crc to the commands.

I got it working. Here is what I did in case anyone else needs it.

import serial
from struct import pack
from crc16 import crc16xmodem

serialport = serial.Serial("/dev/ttyUSB0", 2400, timeout=0.5)

text = "QPIGS"
value = '' 
encoded_cmd = text.encode() + value.encode()
checksum = crc16xmodem(encoded_cmd)
cmd = encoded_cmd + pack('>H', checksum) + b'\r'


response = serialport.readlines(None)

I use a simple python script that polls the inverter, extract data and send them to an mqtt broker.

See my repo:

Hello. I have a solar inverter of the brand Effekta ax-p1. It has a usb 2.0 type b communication port: here is a picture:

How do I integrate it into esphome (and Home assitant) and what do I need for it. Thanks for every reply. (inverter works with WachPower app.)

For those who need it Inverter- Mecer Axpert 5.6K MKS IV 5600VA / 5600W 48V Pure Sine Wave MPPT Inverter charger:
via USB
qmod =5

Got this up and running after 3 weeks of tinkering and playing around with it. Installing docker was the most annoying thing. HA amazing and must say working well. Just a few things if anyone can help. Looked through the thread and not sure where to go from here. My battery re discharge voltage is fooked. See below: If anyone can give some guidance on where to begin debugging this it would be great.

Does anyone have Welion hybrid inverter Eco series (4200w & 6200w)? I just got one and would like to get it into HA.
Welion hybrid inverter

It appears also to be the same as Anern hybrid inverter Evo series (4200w & 6200w). If you have integrated this also kindly post your config.

Both inverters have RJ45 rs232 and I am hoping a USB to RJ45 console cable will work. If you have a better way kindly let me know also.

Hi, I’m setting up this docker images for me. And I can get data from inverter and push it to mqtt by executing docker exec -it voltronic-mqtt bash -c '/opt/inverter-mqtt/'

But I can’t make it to work automatically every 30 sec according to update interval. What I can be doing wrong?
Both docker images are running


Back after a few years as I’ve changed environments and just wanted to share what I had to do to get this working again.

Moved off Rpi4 onto a more powerful x86 ProxMox environment and also moved away from USB>RS233 adaptor to straight Micro USB as my MPP7248 supports that.

Now on Debian 12 VM, latest docker/portainer but had to change inverter.conf to;



For other people having issues, run the poller in debug mode with docker exec -it voltronic-mqtt bash -c '/opt/inverter-cli/bin/inverter_poller -d -1 and watch what the output is, if you’re getting reply too short or incorrect stop/start bits then keep reducing the buffer size of the query and run it again, you do not have to restart the container, the buffer changes are instant.

My original config for qpiri, for example, was 108 bytes, and I kept being told reply too short until I worked back by 1 - on USB it’s only 98. This is the same inverter so just test yours. If you are getting zero bytes the port is in use elsewhere or not communicating at all.

If you are using USB>RS232 then I would suggest using screen or minicom to open the port specirfically at 2400 or 9600 baud and sending a QPIGS and seeing if there’s any response. On my old Debian 11 box, the port speed/options were being reset and I had to run a script at boot time to set them each time.

That said, it’s much faster on USB, though stability remains to be seen, only been up a day. I didn’t realise the BMS USB port on the inverter control module could be used this way, I thought it was just for receiving data from a BMS (I use Bluetooth straight into HassOS for the BMS). I also need to test today if I can still push commands (I often change the max AC charging input for example).

The point of all this was;

  • Get the voltronic container/portainer away from HA so HA is fully supported, full HassOS deployment, and will update more easily.
  • Hopefully improve stability of HA as I’ve had issues with that on the Rpi4, HA drops, then Debian would refuse SSH until it was rebooted.
  • Allow me to run some other cool VMs (pi hole, plex etc).

Useful commands;

To confirm your USB/RS232 adaptor has been seen by the host.
dmesg | grep ttyUSB

To poll in debug mode.
docker exec -it voltronic-mqtt bash -c ‘/opt/inverter-cli/bin/inverter_poller -d -1’

To check USB/RS232 port settings
stty < /dev/ttyUSB0

To change port speed of USB/RS232
stty -F /dev/ttyUSB0 9600

To watch the port output, set the port speed, and attempt to send commands
screen /dev/ttyUSB -b 9600

To see what else might be using your USB/RS232 port so you can kill those processes
lsof /dev/ttyUSB0

Hope this helps someone.



Further to the above, I no longer appear to be able to send commands to the inverters, I have some buttons setup that publish to the parent topic that used to work fine so I know the commands are good it’s clearly an MQTT issue, but I’m unsure how to troubleshoot it, assistant appreciated.