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 will change my setup, I order a rs232 module to use with a ESPboard and ESPhome.

@catalinbordan Meanwhile if you found a solution, please let me know

1 Like

How can I refresh quickly inverter parameters in Home Assistant?
Now all inverter sensors are refreshed every 20/30sec…
Thank you :blush:

Hi,
I did not have time for this now, but… :grin:
Mean while in this mornings I was playing with WiFi app, trying to see why my Inverter is charging the battery even if I set to charge only from solar… I set the Inverter from Ups to appliance and then HA started to receive data from rpi… Strange.
I don’t like the new Inverter battery less or bad firmware. I must find new firmware, but from where?
I also considered project from esphome, but I don’t have adapter. Can you share the link for adapter?
On rpi I also have a Bluetooth phyton script to monitor the ant bms for battery, if I can move both on them on HA it will be great.
I also seen on FB people who installed serial to tcp/wifi adapter or directly flashed tasmota on WiFi chip card.

Hi,
In order to have faster response time, you need to change a lot of code to make optimisations. You can look/try my fork to see this changes. I have a 7-8 seconds time interval

Hello @catalinbordan,

Thanks for the tip, it actually also works for me, I just changed a parameter in the App and it start immediately to receive data from the inverter.

I’m also struggling with the inverter from starting to charge the battery from the grid after the Battery Cut-Off Voltage is reached, what I did was to limit the Max. AC Charging Current to 2.0A.
Another situation that I have is when the Back to Grid Voltage is reached, there is a little drain of 2A continuously from the battery.

You can find firmware information here

I have 2 invertes one Hybrid V 4kw (gren mmpsolar ) the second Hybrid V2 5kw (yellow mmpsolar) both P18 protocol

I bought this two adapters:

Great!
“I’m also struggling with the inverter from starting to charge the battery from the grid after the Battery Cut-Off Voltage is reached” - why you would like to charge from grid? ideally for me it is do nothing(turn of and no drain from battery) because I was having an China ATS( now defective) to switch automatically on grid. Now I’m thinking of an contactor 2NC +2NO.
“Another situation that I have is when the Back to Grid Voltage is reached, there is a little drain of 2A continuously from the battery.” This also drive me nuts, because my new inverter PIP 6048MT do not want to charge to 2A on appliance/ups mode when it see voltage on PV, or it charge from grid even if I say to not do that. Yesterday I put it in UPS mode and back to grid 51Volts and 52 V back to battery as a temporary solution until I will put contactor to switch to grid and turn off inverter.
On that forum I did not find my model 6048MT, probably I will send an email to MPP solar to provide it, if they want.

I think I did not express myself in the best way, what I intended to say was when the battery reached the Battery Cut-Off Voltage the inverter it starts to charge from the grid, and this is the behavior that I don’t want.

I will ask in the foruns (AEVA and diysolarforum) if that continuous little drain from the battery if it is normal.

Hi, can you tell me how you managed to read the POWMR?
Thank you

1 Like

hi, what procedure did you follow to get all the inverter data?
Thank you

Hi everyone,
Regarding the problem of sending commands larger than 8 bytes, is there any modification to install to solve it?
I’ve seen that each has made their own modifications or implemented separate code…, but with the current integration it doesn’t work. Or maybe I haven’t seen it. Thanks.

1 Like

Hi Dan.
I have the same issue as you, before the new cable. I bought a serial Rj45 ->USB cable from AliExpress and I get zero bytes from the inverter.

Which cable did you get eventually?
Do you happen to have a link?

Debug below, in case you spot anything I missed.
Many thanks!

inverter_poller -d 1
Fri Jan 20 14:32:15 2023 INVERTER: Debug set
Fri Jan 20 14:32:15 2023 INVERTER: Current CRC: 49 C1
Fri Jan 20 14:32:18 2023 INVERTER: QMOD read timeout
Fri Jan 20 14:32:50 2023 INVERTER: QMOD reply too short (0 bytes)
Fri Jan 20 14:32:50 2023 INVERTER: Current CRC: B7 A9
Fri Jan 20 14:32:53 2023 INVERTER: QPIGS read timeout
Fri Jan 20 14:33:25 2023 INVERTER: QPIGS reply too short (0 bytes)
Fri Jan 20 14:33:25 2023 INVERTER: Current CRC: F8 54
Fri Jan 20 14:33:28 2023 INVERTER: QPIRI read timeout
Fri Jan 20 14:34:00 2023 INVERTER: QPIRI reply too short (0 bytes)
Fri Jan 20 14:34:00 2023 INVERTER: Current CRC: B4 DA
Fri Jan 20 14:34:03 2023 INVERTER: QPIWS read timeout
Fri Jan 20 14:34:35 2023 INVERTER: QPIWS reply too short (0 bytes)
Fri Jan 20 14:34:40 2023 INVERTER: Current CRC: 49 C1

Which integration in home assistant is used with Inverex inverters?

Hi I have the ESPhome connected and working, i can see the comms between ESPhome and the inverter, i get good responses on the QPIRI commands, but the QPIGS command times out as per logs here:

[12:25:59][D][pipsolar:838]: Sending polling command : QPIGS with length 5
[12:26:04][D][pipsolar:755]: timeout command to poll: QPIGS
[12:26:04][D][pipsolar:838]: Sending polling command : QMOD with length 4
[12:26:04][D][pipsolar:772]: checking crc on incoming message
[12:26:04][D][pipsolar:775]: CRC OK
[12:26:04][D][pipsolar:471]: Decode QMOD
[12:26:04][V][text_sensor:016]: 'pipsolar device_mode': Received new state B
[12:26:04][D][text_sensor:067]: 'pipsolar device_mode': Sending state 'B'
[12:26:05][D][pipsolar:838]: Sending polling command : QFLAG with length 5
[12:26:05][D][pipsolar:772]: checking crc on incoming message
[12:26:05][D][pipsolar:775]: CRC OK
[12:26:05][D][pipsolar:479]: Decode QFLAG
[12:26:06][D][pipsolar:838]: Sending polling command : QPIRI with length 5
[12:26:07][D][pipsolar:772]: checking crc on incoming message
[12:26:07][D][pipsolar:775]: CRC OK
[12:26:07][D][pipsolar:429]: Decode QPIRI
[12:26:07][V][sensor:076]: 'pipsolar battery_recharge_voltage': Received new state 46.000000
[12:26:07][D][sensor:127]: 'pipsolar battery_recharge_voltage': Sending state 46.00000 V with 1 decimals of accuracy
[12:26:07][V][sensor:076]: 'pipsolar battery_under_voltage': Received new state 42.000000
[12:26:07][D][sensor:127]: 'pipsolar battery_under_voltage': Sending state 42.00000 V with 1 decimals of accuracy
[12:26:07][V][sensor:076]: 'pipsolar battery_bulk_voltage': Received new state 58.400002
[12:26:07][D][sensor:127]: 'pipsolar battery_bulk_voltage': Sending state 58.40000 V with 1 decimals of accuracy
[12:26:07][V][sensor:076]: 'pipsolar battery_float_voltage': Received new state 58.400002
[12:26:07][D][sensor:127]: 'pipsolar battery_float_voltage': Sending state 58.40000 V with 1 decimals of accuracy
[12:26:07][V][sensor:076]: 'pipsolar battery_type': Received new state 2.000000
[12:26:07][D][sensor:127]: 'pipsolar battery_type': Sending state 2.00000  with 1 decimals of accuracy
[12:26:07][V][sensor:076]: 'pipsolar current_max_ac_charging_current': Received new state 10.000000
[12:26:07][D][sensor:127]: 'pipsolar current_max_ac_charging_current': Sending state 10.00000 A with 1 decimals of accuracy
[12:26:07][V][sensor:076]: 'pipsolar current_max_charging_current': Received new state 80.000000
[12:26:07][D][sensor:127]: 'pipsolar current_max_charging_current': Sending state 80.00000 A with 1 decimals of accuracy
[12:26:07][V][sensor:076]: 'pipsolar topology': Received new state 0.000000
[12:26:07][D][sensor:127]: 'pipsolar topology': Sending state 0.00000  with 1 decimals of accuracy
[12:26:07][V][sensor:076]: 'pipsolar output_mode': Received new state 1.000000
[12:26:07][D][sensor:127]: 'pipsolar output_mode': Sending state 1.00000  with 1 decimals of accuracy
[12:26:07][V][sensor:076]: 'pipsolar pv_ok_condition_for_parallel': Received new state 0.000000
[12:26:07][D][sensor:127]: 'pipsolar pv_ok_condition_for_parallel': Sending state 0.00000  with 1 decimals of accuracy
[12:26:07][V][sensor:076]: 'pipsolar pv_power_balance': Received new state 1.000000
[12:26:07][D][sensor:127]: 'pipsolar pv_power_balance': Sending state 1.00000  with 1 decimals of accuracy
[12:26:07][V][component:200]: Component esphome.coroutine took a long time for an operation (0.20 s).
[12:26:07][V][component:201]: Components should block for at most 20-30ms.
[12:26:07][D][pipsolar:838]: Sending polling command : QPIGS with length 5
[12:26:12][D][pipsolar:755]: timeout command to poll: QPIGS

I read in one of the MPP solar manuals that 48v versions use the QPIGS2 command, I have tried to modify my copy of pipsolar.cpp and pipsolar.h and added the “2” after every QPIGS statement in there, but when I send the code to the ESPhome using the install feature, it compiles the files and still no change, when i go back and check my files, they all say QPIGS not QPIGS2, how can i modify to test this command please?

If someone have issue with 2 serial adapter that switch from ttyUSB0 and ttyUSB1 at boot i made a script to fix it automatically
If you use two usb2serial adapters on your raspberry it sometimes happens that on reboot the two devices are inverted between USB0 and USB1, this script launched at boot checks the links created according to the procedure described below and replaces the inverter.conf file with the correct device.

Hi all, I’ve been trying to make my Courtois inverter working with this docker, without success. If I plug the RX-TX-GDN pins (1, 2 and 8 on the RJ45 COMM plug), the inverter fallback in alert mode (red led), the LCD screen goes of, and if it doesn’t the values are incoherent (0V, etc.).

On the terminal I receive a few bits per seconds, but it doesn’t seem to make sense.

$ sudo stty -F /dev/ttyUSB0 sane
$ sudo stty -F /dev/ttyUSB0 2400 raw -echo
$ cat /dev/ttyUSB0
�c����V�e����V�e����V�e����V^C
$ docker-compose up -d
voltronic-mqtt is up-to-date
Recreating watchtower ... done
$ docker exec -it voltronic-mqtt bash -c '/opt/inverter-cli/bin/inverter_poller -d -1'
Mon Feb  6 22:22:08 2023 INVERTER: Debug set
Mon Feb  6 22:22:08 2023 INVERTER: Current CRC: 49 C1
Mon Feb  6 22:22:09 2023 INVERTER: QMOD reply size (5 bytes)
Mon Feb  6 22:22:09 2023 INVERTER: QMOD: incorrect start/stop bytes.  Buffer: �
Mon Feb  6 22:22:09 2023 INVERTER: Current CRC: B7 A9
Mon Feb  6 22:22:12 2023 INVERTER: QPIGS read timeout
Mon Feb  6 22:22:12 2023 INVERTER: QPIGS reply too short (17 bytes)
Mon Feb  6 22:22:12 2023 INVERTER: Current CRC: F8 54
Mon Feb  6 22:22:15 2023 INVERTER: QPIRI read timeout
Mon Feb  6 22:22:15 2023 INVERTER: QPIRI reply too short (24 bytes)
Mon Feb  6 22:22:15 2023 INVERTER: Current CRC: B4 DA
Mon Feb  6 22:22:18 2023 INVERTER: QPIWS read timeout
Mon Feb  6 22:22:18 2023 INVERTER: QPIWS reply too short (24 bytes)
Mon Feb  6 22:22:23 2023 INVERTER: Current CRC: 49 C1
Mon Feb  6 22:22:23 2023 INVERTER: QMOD reply size (5 bytes)
Mon Feb  6 22:22:23 2023 INVERTER: QMOD: incorrect start/stop bytes.  Buffer: �
Mon Feb  6 22:22:23 2023 INVERTER: Current CRC: B7 A9
Mon Feb  6 22:22:26 2023 INVERTER: QPIGS read timeout
Mon Feb  6 22:22:26 2023 INVERTER: QPIGS reply too short (16 bytes)
Mon Feb  6 22:22:26 2023 INVERTER: Current CRC: F8 54
Mon Feb  6 22:22:29 2023 INVERTER: QPIRI read timeout
Mon Feb  6 22:22:29 2023 INVERTER: QPIRI reply too short (24 bytes)
Mon Feb  6 22:22:29 2023 INVERTER: Current CRC: B4 DA
Mon Feb  6 22:22:32 2023 INVERTER: QPIWS read timeout
Mon Feb  6 22:22:32 2023 INVERTER: QPIWS reply too short (8 bytes)
Mon Feb  6 22:22:37 2023 INVERTER: Current CRC: 49 C1
Mon Feb  6 22:22:38 2023 INVERTER: QMOD reply size (5 bytes)
Mon Feb  6 22:22:38 2023 INVERTER: QMOD: incorrect start/stop bytes.  Buffer: 
…

If I unplug the RX pin (the inverter doesn’t receive any data) the inverter doesn’t goes into alert mode, and I still receive this data. If I’m not using the docker poller cli but just using cat /dev/ttyUSB0, therefore not sending any data to inverter’s RX, it still goes into alert mode. The only way to avoid alert is to unplug the RX pin.

Does anyone have any clue?

Thank you very much,

Bests,

Camille.

comm plug? in the picture you show, it is for display connection, when you are moving the display in another room…
for pc it is anothor one…

Hello catalinbordan, thank you for your reply. There is only one external plug named COMM, it works with the BMS connected to my Pylon batteries. On the manual it is presented as the RS323 plug, among other things (dot number 12):

The LCD screen is plugged inside with another RJ45 cable. I saw other people using this plug labelled COMM with RS232. Are you sure it is only for the LCD?

hmmm, interesting…did not pay attention, on your display board I did not saw communication ports.
Mine have it…like this.

1 Like