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!

you could try my fork.

Hi,
similare issue for me, warnings returns this: image
Voltronic VMIII 50000W, firmware U1:47.00, U2: 02.70, U3: 00.24

Did anybody find a solution for it?

Thanks for everyone who’s contributed to this. Just tried the @catalinbordan fork and was quickly able to get data into Home Assistant right as the sun was setting. Saw PV data streaming in and it was great.

Now that the sun is down, I wanted to see the load data. Turned on my inverter via the switch (usually is off to only run the mppt side of things), and doesn’t seem to show load info. It says 0, but I’m definitely charging my computer from it right now. Any idea why load data might not be working? It’s a PIP1012LV-MS and using the USB cable from it into the pi.

*Note, I didn’t look at my inverter serial number and thus didn’t change it in mqtt.json, but I assume that doesn’t effect anything other than a label…

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

pi@betty:/opt/ha-inverter-mqtt-agent $ sudo docker exec -it voltronic-mqtt bash -c '/opt/inverter-cli/bin/inverter_poller -d -1'
Wed Jun 29 03:50:41 2022 INVERTER: Debug set
Wed Jun 29 03:50:41 2022 DEBUG:  Current CRC: 49 C1
Wed Jun 29 03:50:41 2022 DEBUG:  Send buffer hex bytes:  ( 51 4d 4f 44 49 c1 0d )
Wed Jun 29 03:50:41 2022 DEBUG:  7 bytes written, 7 bytes sent, 0 bytes remaining
Wed Jun 29 03:50:41 2022 DEBUG:  8 bytes read, 8 total bytes:  28 42 e7 c9 0d 00 00 00
Wed Jun 29 03:50:41 2022 DEBUG:  Found reply <cr> at byte: 5
Wed Jun 29 03:50:41 2022 DEBUG:  QMOD: 8 bytes read: (B
Wed Jun 29 03:50:41 2022 DEBUG:  QMOD query finished
Wed Jun 29 03:50:41 2022 DEBUG:  Current CRC: B7 A9
Wed Jun 29 03:50:41 2022 DEBUG:  Send buffer hex bytes:  ( 51 50 49 47 53 b7 a9 0d )
Wed Jun 29 03:50:41 2022 DEBUG:  8 bytes written, 8 bytes sent, 0 bytes remaining
Wed Jun 29 03:50:41 2022 DEBUG:  8 bytes read, 8 total bytes:  28 30 30 30 2e 30 20 30
Wed Jun 29 03:50:41 2022 DEBUG:  8 bytes read, 16 total bytes:  30 2e 30 20 31 31 39 2e
Wed Jun 29 03:50:41 2022 DEBUG:  8 bytes read, 24 total bytes:  30 20 36 30 2e 30 20 30
Wed Jun 29 03:50:42 2022 DEBUG:  8 bytes read, 32 total bytes:  30 30 30 20 30 30 30 30
Wed Jun 29 03:50:42 2022 DEBUG:  8 bytes read, 40 total bytes:  20 30 30 30 20 32 30 30
Wed Jun 29 03:50:42 2022 DEBUG:  8 bytes read, 48 total bytes:  20 31 33 2e 30 39 20 30
Wed Jun 29 03:50:42 2022 DEBUG:  8 bytes read, 56 total bytes:  30 30 20 30 34 39 20 30
Wed Jun 29 03:50:42 2022 DEBUG:  8 bytes read, 64 total bytes:  34 39 36 20 30 30 30 30
Wed Jun 29 03:50:42 2022 DEBUG:  8 bytes read, 72 total bytes:  20 30 30 30 2e 30 20 31
Wed Jun 29 03:50:42 2022 DEBUG:  8 bytes read, 80 total bytes:  33 2e 32 30 20 30 30 30
Wed Jun 29 03:50:42 2022 DEBUG:  8 bytes read, 88 total bytes:  30 31 20 31 30 30 31 30
Wed Jun 29 03:50:42 2022 DEBUG:  8 bytes read, 96 total bytes:  30 30 30 20 38 33 20 30
Wed Jun 29 03:50:42 2022 DEBUG:  8 bytes read, 104 total bytes:  35 20 30 30 30 30 30 20
Wed Jun 29 03:50:42 2022 DEBUG:  8 bytes read, 112 total bytes:  30 30 30 77 9c 0d 00 00
Wed Jun 29 03:50:42 2022 DEBUG:  Found reply <cr> at byte: 110
Wed Jun 29 03:50:42 2022 DEBUG:  QPIGS: 112 bytes read: (000.0 00.0 119.0 60.0 0000 0000 000 200 13.09 000 049 0496 0000 000.0 13.20 00001 10010000 83 05 00000 000
Wed Jun 29 03:50:42 2022 DEBUG:  QPIGS query finished
Wed Jun 29 03:50:42 2022 DEBUG:  Current CRC: F8 54
Wed Jun 29 03:50:42 2022 DEBUG:  Send buffer hex bytes:  ( 51 50 49 52 49 f8 54 0d )
Wed Jun 29 03:50:42 2022 DEBUG:  8 bytes written, 8 bytes sent, 0 bytes remaining
Wed Jun 29 03:50:42 2022 DEBUG:  8 bytes read, 8 total bytes:  28 31 32 30 2e 30 20 30
Wed Jun 29 03:50:42 2022 DEBUG:  8 bytes read, 16 total bytes:  38 2e 33 20 31 32 30 2e
Wed Jun 29 03:50:42 2022 DEBUG:  8 bytes read, 24 total bytes:  30 20 36 30 2e 30 20 30
Wed Jun 29 03:50:42 2022 DEBUG:  8 bytes read, 32 total bytes:  38 2e 33 20 31 30 30 30
Wed Jun 29 03:50:42 2022 DEBUG:  8 bytes read, 40 total bytes:  20 31 30 30 30 20 31 32
Wed Jun 29 03:50:42 2022 DEBUG:  8 bytes read, 48 total bytes:  2e 30 20 31 32 2e 38 20
Wed Jun 29 03:50:42 2022 DEBUG:  8 bytes read, 56 total bytes:  31 31 2e 39 20 31 34 2e
Wed Jun 29 03:50:42 2022 DEBUG:  8 bytes read, 64 total bytes:  36 20 31 34 2e 36 20 32
Wed Jun 29 03:50:42 2022 DEBUG:  8 bytes read, 72 total bytes:  20 32 30 20 30 36 30 20
Wed Jun 29 03:50:42 2022 DEBUG:  8 bytes read, 80 total bytes:  30 20 32 20 32 20 2d 20
Wed Jun 29 03:50:42 2022 DEBUG:  8 bytes read, 88 total bytes:  30 31 20 31 20 30 20 31
Wed Jun 29 03:50:42 2022 DEBUG:  8 bytes read, 96 total bytes:  33 2e 33 20 30 20 30 41
Wed Jun 29 03:50:42 2022 DEBUG:  8 bytes read, 104 total bytes:  82 0d 00 00 00 00 00 00
Wed Jun 29 03:50:42 2022 DEBUG:  Found reply <cr> at byte: 98
Wed Jun 29 03:50:42 2022 DEBUG:  QPIRI: 104 bytes read: (120.0 08.3 120.0 60.0 08.3 1000 1000 12.0 12.8 11.9 14.6 14.6 2 20 060 0 2 2 - 01 1 0 13.3 0 0
Wed Jun 29 03:50:42 2022 DEBUG:  QPIRI query finished
Wed Jun 29 03:50:42 2022 DEBUG:  Current CRC: B4 DA
Wed Jun 29 03:50:42 2022 DEBUG:  Send buffer hex bytes:  ( 51 50 49 57 53 b4 da 0d )
Wed Jun 29 03:50:42 2022 DEBUG:  8 bytes written, 8 bytes sent, 0 bytes remaining
Wed Jun 29 03:50:43 2022 DEBUG:  8 bytes read, 8 total bytes:  28 30 30 30 30 30 31 30
Wed Jun 29 03:50:43 2022 DEBUG:  8 bytes read, 16 total bytes:  30 30 30 30 30 30 30 30
Wed Jun 29 03:50:43 2022 DEBUG:  8 bytes read, 24 total bytes:  30 30 30 30 30 30 30 30
Wed Jun 29 03:50:43 2022 DEBUG:  8 bytes read, 32 total bytes:  30 30 30 30 30 30 30 30
Wed Jun 29 03:50:43 2022 DEBUG:  8 bytes read, 40 total bytes:  30 fe 82 0d 00 00 00 00
Wed Jun 29 03:50:43 2022 DEBUG:  Found reply <cr> at byte: 36
Wed Jun 29 03:50:43 2022 DEBUG:  QPIWS: 40 bytes read: (00000100000000000000000000000000
Wed Jun 29 03:50:43 2022 DEBUG:  QPIWS query finished
Wed Jun 29 03:50:43 2022 DEBUG:  Start loop
INVERTER: ampfactor from config is 1.00
INVERTER: wattfactor from config is 1.00
{
  "Inverter_mode":4,
  "AC_grid_voltage":0.0,
  "AC_grid_frequency":0.0,
  "AC_out_voltage":119.0,
  "AC_out_frequency":60.0,
  "PV_in_voltage":0.0,
  "PV_in_current":0.0,
  "PV_in_watts":0.0,
  "SCC_voltage":13.2000,
  "Load_pct":0,
  "Load_watt":0,
  "Load_va":0,
  "Bus_voltage":200,
  "Heatsink_temperature":496,
  "Battery_capacity":49,
  "Battery_voltage":13.09,
  "Battery_charge_current":0,
  "Battery_discharge_current":1,
  "Load_status_on":1,
  "SCC_charge_on":0,
  "AC_charge_on":0,
  "Battery_voltage_offset_for_fans_on":83,
  "Eeprom_version":5,
  "PV_charging_power":0,
  "Charging_to_floating_mode":0,
  "Switch_On":0,
  "Dustproof_installed":0,
  "Battery_recharge_voltage":12.8,
  "Battery_under_voltage":11.9,
  "Battery_bulk_voltage":14.6,
  "Battery_float_voltage":14.6,
  "Max_grid_charge_current":20,
  "Max_charge_current":60,
  "Out_source_priority":2,
  "Charger_source_priority":2,
  "Battery_redischarge_voltage":13.3,
  "Warnings":"00000100000000000000000000000000"
}
Wed Jun 29 03:50:43 2022 INVERTER: All queries complete, exiting loop.

1.What it is the protocol code for your inverter?(command for that it is QPI). It should be PI30.
2. According to the manual you have a warning: “LINE FAIL”

QPI returns PI30
:man_shrugging:t2:

Do you know what Line Fail means?

Also, after yesterday’s success, today I can see data using the inverter_poller command directly, but nothing is getting passed to home assistant. Everything says “UNKNOWN.”

pi@betty:~ $ sudo docker exec -it voltronic-mqtt bash -c '/opt/inverter-cli/bin/inverter_poller -r QPI'
Reply:  PI30

@Andre_Magro @catalinbordan
Hello, thank you so much for help. I found how to read the data from my inverter Isolar Hybrid 5.5kw. I used catalin’s fork and andres’s set baud rate.
Catalin’s fork and after that this
sudo stty -F /dev/ttyUSB0 sane (to first clean all the settings)
sudo stty -F /dev/ttyUSB0 2400 raw -echo (without the first command this one did not work)
cat /dev/ttyUSB0 (to confirm that data is passing by the rs232 usb adapter)

Thank you very both for help now I can read data from inverter.
Cheers

2 Likes

1.strange, your raw output from debug it is not according manual.
2. do not know, manual do not say…
3. did you do step 8. 1? sudo nano config/mqtt.json (change it with your variables)

Question. Why I have that in warnings, it is number 17 and in manual mean eeprom fault, is it problem or how to fix it.

pi@raspberrypi:/opt/ha-inverter-mqtt-agent $ sudo docker exec -it voltronic-mqtt bash -c ‘/opt/inverter-cli/bin/inverter_poller -d -1’
Thu Jun 30 12:49:01 2022 INVERTER: Debug set
Thu Jun 30 12:49:01 2022 DEBUG: Current CRC: 49 C1
Thu Jun 30 12:49:01 2022 DEBUG: Send buffer hex bytes: ( 51 4d 4f 44 49 c1 0d )
Thu Jun 30 12:49:01 2022 DEBUG: 7 bytes written, 7 bytes sent, 0 bytes remaining
Thu Jun 30 12:49:01 2022 DEBUG: 5 bytes read, 5 total bytes: 10 00 00 28 4c 06 07 0d
Thu Jun 30 12:49:01 2022 DEBUG: Found reply at byte: 5
Thu Jun 30 12:49:01 2022 DEBUG: QMOD: 5 bytes read: (L
Thu Jun 30 12:49:01 2022 DEBUG: QMOD query finished
Thu Jun 30 12:49:01 2022 DEBUG: Current CRC: B7 A9
Thu Jun 30 12:49:01 2022 DEBUG: Send buffer hex bytes: ( 51 50 49 47 53 b7 a9 0d )
Thu Jun 30 12:49:01 2022 DEBUG: 8 bytes written, 8 bytes sent, 0 bytes remaining
Thu Jun 30 12:49:02 2022 DEBUG: 10 bytes read, 10 total bytes: 32 39 2e 30 20 35 30 2e
Thu Jun 30 12:49:02 2022 DEBUG: 12 bytes read, 22 total bytes: 39 2e 30 20 35 30 2e 30
Thu Jun 30 12:49:02 2022 DEBUG: 11 bytes read, 33 total bytes: 38 37 20 30 36 38 36 20
Thu Jun 30 12:49:02 2022 DEBUG: 12 bytes read, 45 total bytes: 34 34 39 20 35 34 2e 30
Thu Jun 30 12:49:02 2022 DEBUG: 15 bytes read, 60 total bytes: 30 30 20 30 30 34 34 20
Thu Jun 30 12:49:02 2022 DEBUG: 12 bytes read, 72 total bytes: 20 31 36 39 2e 33 20 30
Thu Jun 30 12:49:02 2022 DEBUG: 11 bytes read, 83 total bytes: 30 20 30 30 30 30 30 20
Thu Jun 30 12:49:02 2022 DEBUG: 12 bytes read, 95 total bytes: 30 31 31 31 20 30 30 20
Thu Jun 30 12:49:02 2022 DEBUG: 11 bytes read, 106 total bytes: 30 30 36 30 38 20 31 31
Thu Jun 30 12:49:02 2022 DEBUG: 4 bytes read, 110 total bytes: 38 20 31 31 30 a9 5f 0d
Thu Jun 30 12:49:02 2022 DEBUG: Found reply at byte: 110
Thu Jun 30 12:49:02 2022 DEBUG: QPIGS: 110 bytes read: (229.0 50.0 229.0 50.0 0687 0686 012 449 54.00 000 100 0044 03.5 169.3 00.00 00000 10010111 00 00 00608 110
Thu Jun 30 12:49:02 2022 DEBUG: QPIGS query finished
Thu Jun 30 12:49:02 2022 DEBUG: Current CRC: F8 54
Thu Jun 30 12:49:02 2022 DEBUG: Send buffer hex bytes: ( 51 50 49 52 49 f8 54 0d )
Thu Jun 30 12:49:02 2022 DEBUG: 8 bytes written, 8 bytes sent, 0 bytes remaining
Thu Jun 30 12:49:02 2022 DEBUG: 9 bytes read, 9 total bytes: 32 33 30 2e 30 20 32 33
Thu Jun 30 12:49:02 2022 DEBUG: 15 bytes read, 24 total bytes: 30 20 35 30 2e 30 20 32
Thu Jun 30 12:49:02 2022 DEBUG: 12 bytes read, 36 total bytes: 35 35 30 30 20 35 35 30
Thu Jun 30 12:49:02 2022 DEBUG: 11 bytes read, 47 total bytes: 38 2e 30 20 34 36 2e 30
Thu Jun 30 12:49:02 2022 DEBUG: 12 bytes read, 59 total bytes: 30 20 35 36 2e 34 20 35
Thu Jun 30 12:49:02 2022 DEBUG: 11 bytes read, 70 total bytes: 20 32 20 32 30 20 30 32
Thu Jun 30 12:49:02 2022 DEBUG: 12 bytes read, 82 total bytes: 31 20 33 20 31 20 30 31
Thu Jun 30 12:49:02 2022 DEBUG: 15 bytes read, 97 total bytes: 2e 30 20 30 20 31 53 bc
Thu Jun 30 12:49:02 2022 DEBUG: 1 bytes read, 98 total bytes: 30 20 30 20 31 53 bc 0d
Thu Jun 30 12:49:03 2022 DEBUG: Found reply at byte: 98
Thu Jun 30 12:49:03 2022 DEBUG: QPIRI: 98 bytes read: (230.0 23.9 230.0 50.0 23.9 5500 5500 48.0 46.0 44.0 56.4 54.0 2 20 020 0 1 3 1 01 0 0 54.0 0 1
Thu Jun 30 12:49:03 2022 DEBUG: QPIRI query finished
Thu Jun 30 12:49:03 2022 DEBUG: Current CRC: B4 DA
Thu Jun 30 12:49:03 2022 DEBUG: Send buffer hex bytes: ( 51 50 49 57 53 b4 da 0d )
Thu Jun 30 12:49:03 2022 DEBUG: 8 bytes written, 8 bytes sent, 0 bytes remaining
Thu Jun 30 12:49:03 2022 DEBUG: 12 bytes read, 12 total bytes: 30 30 30 30 30 30 30 30
Thu Jun 30 12:49:03 2022 DEBUG: 11 bytes read, 23 total bytes: 30 30 30 31 30 30 30 30
Thu Jun 30 12:49:03 2022 DEBUG: 11 bytes read, 34 total bytes: 30 30 30 30 30 30 30 45
Thu Jun 30 12:49:03 2022 DEBUG: 2 bytes read, 36 total bytes: 30 30 30 30 30 45 18 0d
Thu Jun 30 12:49:03 2022 DEBUG: Found reply at byte: 36
Thu Jun 30 12:49:03 2022 DEBUG: QPIWS: 36 bytes read: (00000000000000000100000000000000
Thu Jun 30 12:49:03 2022 DEBUG: QPIWS query finished
Thu Jun 30 12:49:03 2022 DEBUG: Start loop
INVERTER: ampfactor from config is 1.00
INVERTER: wattfactor from config is 1.00
{
“Inverter_mode”:3,
“AC_grid_voltage”:229.0,
“AC_grid_frequency”:50.0,
“AC_out_voltage”:229.0,
“AC_out_frequency”:50.0,
“PV_in_voltage”:169.3,
“PV_in_current”:3.5,
“PV_in_watts”:0.0,
“SCC_voltage”:0.0000,
“Load_pct”:12,
“Load_watt”:686,
“Load_va”:687,
“Bus_voltage”:449,
“Heatsink_temperature”:44,
“Battery_capacity”:100,
“Battery_voltage”:54.00,
“Battery_charge_current”:0,
“Battery_discharge_current”:0,
“Load_status_on”:1,
“SCC_charge_on”:1,
“AC_charge_on”:1,
“Battery_voltage_offset_for_fans_on”:0,
“Eeprom_version”:0,
“PV_charging_power”:608,
“Charging_to_floating_mode”:1,
“Switch_On”:1,
“Dustproof_installed”:0,
“Battery_recharge_voltage”:46.0,
“Battery_under_voltage”:44.0,
“Battery_bulk_voltage”:56.4,
“Battery_float_voltage”:54.0,
“Max_grid_charge_current”:20,
“Max_charge_current”:20,
“Out_source_priority”:1,
“Charger_source_priority”:3,
“Battery_redischarge_voltage”:54.0,
“Warnings”:“00000000000000000100000000000000”
}
Thu Jun 30 12:49:03 2022 INVERTER: All queries complete, exiting loop.

The load output seems to be intermittent. Not sure why, but I would guess something to do with the inverter.

I did do step 8.

After some testing (restarting the container, restarting the pi, changing mqtt.json), it seems I can only get the container to pass along data to home assistant if I go through all the steps, edit the mqtt.json, and rebuild the container. Everything else didn’t change the “unknown” data. But first load after fresh build of the container has data stream into home assistant. Even maintained connection after an overnight where the inverter turns off. So that’s a success.

Is there a way to debug, or walk through the steps of the mqtt side of things? The inverter-cli continually has returned data even when it hasn’t seemed to send it via mqtt.

Good morning. I hope not to bother anyone with my question…

I am a rookie of home assistant I am very willing to acquire data voltronic axpert ad home assistant…

since I’m not good bike I asked you for kindness if you can oientarmi to understand… Can I use an old pentium4 3.2 PC with USB port to capture data and send it over the network?

what software do I need to install docker must be installed u windwos or on linux.

thanks

Hi, can you help with crontab code. To work catalin’s fork I should set baud rate raw, without raw in sudo stty -F /dev/ttyUSB0 2400 raw doesn’t work. And after every reboot I should set baud rate with raw to work. Can you help me to modify your script to seting baud rate 2400 raw after reboot?

Hi, I got everything setup and working with home assistant, but i want to add influxdb. In HA, I have added the user “solar” to influxdb and made a database named “solar”. In the mqtt.json file, I have it enabled and also filled the info in. When everything is started, nothing shows up in the database. I am also using @catalinbordan 's fork.

This is my mqtt.json file.

  GNU nano 5.4                                                                                                   config/mqtt.json                                                                                                            {
    "server": "192.168.0.90",
    "port": "1883",
    "topic": "homeassistant",
    "devicename": "max",
    "manufacturer": "Kodak",
    "model": "PIP3024MSXE",
    "serial": "6969",
    "ver": "20.13",
    "username": "mqtt",
    "password": "********",
    "influx": {
        "enabled": "true",
        "host": "http://192.168.0.90:8086",
        "username": "solar",
        "password": "********",
        "device": "max",
        "prefix": "solar",
        "database": "solar",
        "namingMap": {
            "Inverter_mode": "output_mode",
            "AC_grid_voltage":  "grid_voltage",
            "AC_grid_frequency":  "grid_frecuency",
            "AC_out_voltage":  "ac_output_voltage",
            "AC_out_frequency":  "ac_output_frecuency",
            "PV_in_voltage":  "pv_input_voltage_1",
            "PV_in_current":  "pv_input_current_for_battery",
            "PV_in_watts":  "pv_input_watts",
            "PV_in_watthour": "pv_input_watthour",
            "SCC_voltage": "battery_voltage_from_scc",
            "Load_pct": "output_load_percent",
            "Load_watt": "output_load_watt",
            "Load_watthour": "outpu_load_watthour",
            "Load_va": "ac_output_power_va",
            "Bus_voltage": "bus_voltage",
            "Heatsink_temperature": "inverter_heat_sink_temperature",
            "Battery_capacity": "battery_capacity",
            "Battery_voltage": "battery_voltage",
            "Battery_charge_current": "battery_charging_current",
            "Battery_discharge_current": "battery_discharge_current",
            "Load_status_on": "load_status_on",
            "SCC_charge_on": "scc_charge_on",
            "AC_charge_on": "ac_charge_on",
            "Battery_recharge_voltage":  "battery_recharge_voltage",
            "Battery_under_voltage":  "battery_under_voltage",
            "Battery_bulk_voltage":  "battery_bulk_voltage",
            "Battery_float_voltage":  "battery_float_voltage",
            "Max_grid_charge_current": "max_grid_charge_current",
            "Max_charge_current": "max_charge_current",
            "Out_source_priority": "output_source_priority",
            "Charger_source_priority": "charger_source_priority",
            "Battery_redischarge_voltage":  "battery_re_discharge_voltage"
        }
    }
}

what needs to change for it to work?

Thank you

I have installed your fork but is the same. No data “PV_in_wats”:

Fri Jul 8 13:30:02 2022 INVERTER: Debug set
Fri Jul 8 13:30:02 2022 DEBUG: Current CRC: 49 C1
Fri Jul 8 13:30:02 2022 DEBUG: Send buffer hex bytes: ( 51 4d 4f 44 49 c1 0d )
Fri Jul 8 13:30:02 2022 DEBUG: 7 bytes written, 7 bytes sent, 0 bytes remaining
Fri Jul 8 13:30:03 2022 DEBUG: 8 bytes read, 8 total bytes: 28 4c 06 07 0d 00 00 00
Fri Jul 8 13:30:03 2022 DEBUG: Found reply at byte: 5
Fri Jul 8 13:30:03 2022 DEBUG: QMOD: 8 bytes read: (L
Fri Jul 8 13:30:03 2022 DEBUG: QMOD query finished
Fri Jul 8 13:30:03 2022 DEBUG: Current CRC: B7 A9
Fri Jul 8 13:30:03 2022 DEBUG: Send buffer hex bytes: ( 51 50 49 47 53 b7 a9 0d )
Fri Jul 8 13:30:03 2022 DEBUG: 8 bytes written, 8 bytes sent, 0 bytes remaining
Fri Jul 8 13:30:03 2022 DEBUG: 8 bytes read, 8 total bytes: 28 32 32 35 2e 34 20 34
Fri Jul 8 13:30:03 2022 DEBUG: 8 bytes read, 16 total bytes: 39 2e 39 20 32 32 35 2e
Fri Jul 8 13:30:03 2022 DEBUG: 8 bytes read, 24 total bytes: 34 20 34 39 2e 39 20 30
Fri Jul 8 13:30:03 2022 DEBUG: 8 bytes read, 32 total bytes: 33 38 33 20 30 32 39 39
Fri Jul 8 13:30:03 2022 DEBUG: 8 bytes read, 40 total bytes: 20 30 30 36 20 33 36 30
Fri Jul 8 13:30:03 2022 DEBUG: 8 bytes read, 48 total bytes: 20 30 32 2e 30 30 20 30
Fri Jul 8 13:30:03 2022 DEBUG: 8 bytes read, 56 total bytes: 30 30 20 30 30 30 20 30
Fri Jul 8 13:30:03 2022 DEBUG: 8 bytes read, 64 total bytes: 30 33 35 20 30 30 2e 36
Fri Jul 8 13:30:03 2022 DEBUG: 8 bytes read, 72 total bytes: 20 32 32 33 2e 31 20 30
Fri Jul 8 13:30:03 2022 DEBUG: 8 bytes read, 80 total bytes: 30 2e 30 30 20 30 30 30
Fri Jul 8 13:30:03 2022 DEBUG: 8 bytes read, 88 total bytes: 30 30 20 30 30 30 31 30
Fri Jul 8 13:30:03 2022 DEBUG: 8 bytes read, 96 total bytes: 31 31 30 20 30 30 20 30
Fri Jul 8 13:30:03 2022 DEBUG: 8 bytes read, 104 total bytes: 30 20 30 30 31 33 36 20
Fri Jul 8 13:30:03 2022 DEBUG: 8 bytes read, 112 total bytes: 30 31 30 da d2 0d 00 00
Fri Jul 8 13:30:03 2022 DEBUG: Found reply at byte: 110
Fri Jul 8 13:30:03 2022 DEBUG: QPIGS: 112 bytes read: (225.4 49.9 225.4 49.9 0383 0299 006 360 02.00 000 000 0035 00.6 223.1 00.00 00000 00010110 00 00 00136 010
Fri Jul 8 13:30:03 2022 DEBUG: QPIGS query finished
Fri Jul 8 13:30:03 2022 DEBUG: Current CRC: F8 54
Fri Jul 8 13:30:03 2022 DEBUG: Send buffer hex bytes: ( 51 50 49 52 49 f8 54 0d )
Fri Jul 8 13:30:03 2022 DEBUG: 8 bytes written, 8 bytes sent, 0 bytes remaining
Fri Jul 8 13:30:03 2022 DEBUG: 8 bytes read, 8 total bytes: 28 32 33 30 2e 30 20 32
Fri Jul 8 13:30:03 2022 DEBUG: 8 bytes read, 16 total bytes: 34 2e 33 20 32 33 30 2e
Fri Jul 8 13:30:03 2022 DEBUG: 8 bytes read, 24 total bytes: 30 20 35 30 2e 30 20 32
Fri Jul 8 13:30:03 2022 DEBUG: 8 bytes read, 32 total bytes: 34 2e 33 20 35 36 30 30
Fri Jul 8 13:30:03 2022 DEBUG: 8 bytes read, 40 total bytes: 20 35 36 30 30 20 34 38
Fri Jul 8 13:30:03 2022 DEBUG: 8 bytes read, 48 total bytes: 2e 30 20 34 36 2e 30 20
Fri Jul 8 13:30:03 2022 DEBUG: 8 bytes read, 56 total bytes: 34 32 2e 30 20 35 36 2e
Fri Jul 8 13:30:03 2022 DEBUG: 8 bytes read, 64 total bytes: 34 20 35 34 2e 30 20 30
Fri Jul 8 13:30:03 2022 DEBUG: 8 bytes read, 72 total bytes: 20 30 33 30 20 30 36 30
Fri Jul 8 13:30:03 2022 DEBUG: 8 bytes read, 80 total bytes: 20 30 20 31 20 33 20 39
Fri Jul 8 13:30:03 2022 DEBUG: 8 bytes read, 88 total bytes: 20 30 30 20 30 20 30 20
Fri Jul 8 13:30:04 2022 DEBUG: 8 bytes read, 96 total bytes: 35 34 2e 30 20 30 20 31
Fri Jul 8 13:30:04 2022 DEBUG: 8 bytes read, 104 total bytes: 20 30 30 30 6c ce 0d 00
Fri Jul 8 13:30:04 2022 DEBUG: Found reply at byte: 103
Fri Jul 8 13:30:04 2022 DEBUG: QPIRI: 104 bytes read: (230.0 24.3 230.0 50.0 24.3 5600 5600 48.0 46.0 42.0 56.4 54.0 0 030 060 0 1 3 9 00 0 0 54.0 0 1 000
Fri Jul 8 13:30:04 2022 DEBUG: QPIRI query finished
Fri Jul 8 13:30:04 2022 DEBUG: Current CRC: B4 DA
Fri Jul 8 13:30:04 2022 DEBUG: Send buffer hex bytes: ( 51 50 49 57 53 b4 da 0d )
Fri Jul 8 13:30:04 2022 DEBUG: 8 bytes written, 8 bytes sent, 0 bytes remaining
Fri Jul 8 13:30:04 2022 DEBUG: 8 bytes read, 8 total bytes: 28 30 30 30 30 30 30 30
Fri Jul 8 13:30:04 2022 DEBUG: 8 bytes read, 16 total bytes: 30 30 30 30 30 30 30 30
Fri Jul 8 13:30:04 2022 DEBUG: 8 bytes read, 24 total bytes: 30 30 30 30 30 30 30 31
Fri Jul 8 13:30:04 2022 DEBUG: 8 bytes read, 32 total bytes: 30 30 30 30 30 30 30 30
Fri Jul 8 13:30:04 2022 DEBUG: 8 bytes read, 40 total bytes: 31 30 30 30 30 ed be 0d
Fri Jul 8 13:30:04 2022 DEBUG: Found reply at byte: 40
Fri Jul 8 13:30:04 2022 DEBUG: QPIWS: 40 bytes read: (000000000000000000000010000000010000
Fri Jul 8 13:30:04 2022 DEBUG: QPIWS query finished
Fri Jul 8 13:30:04 2022 DEBUG: Start loop
INVERTER: ampfactor from config is 1.00
INVERTER: wattfactor from config is 1.00
{
“Inverter_mode”:3,
“AC_grid_voltage”:225.4,
“AC_grid_frequency”:49.9,
“AC_out_voltage”:225.4,
“AC_out_frequency”:49.9,
“PV_in_voltage”:223.1,
“PV_in_current”:0.6,
“PV_in_watts”:0.0,
“SCC_voltage”:0.0000,
“Load_pct”:6,
“Load_watt”:299,
“Load_va”:383,
“Bus_voltage”:360,
“Heatsink_temperature”:35,
“Battery_capacity”:0,
“Battery_voltage”:2.00,
“Battery_charge_current”:0,
“Battery_discharge_current”:0,
“Load_status_on”:1,
“SCC_charge_on”:1,
“AC_charge_on”:0,
“Battery_voltage_offset_for_fans_on”:0,
“Eeprom_version”:0,
“PV_charging_power”:136,
“Charging_to_floating_mode”:0,
“Switch_On”:1,
“Dustproof_installed”:0,
“Battery_recharge_voltage”:46.0,
“Battery_under_voltage”:42.0,
“Battery_bulk_voltage”:56.4,
“Battery_float_voltage”:54.0,
“Max_grid_charge_current”:30,
“Max_charge_current”:60,
“Out_source_priority”:1,
“Charger_source_priority”:3,
“Battery_redischarge_voltage”:54.0,
“Warnings”:“000000000000000000000010000000010000”
}

Thank you!

:smile: PV_charging_power”:136

I’ve just been debugging this same issue, its because the code is hardcoded to calculate pv power from SCC Voltage which is always being returned as 0.

I modded the code to read it from the QPIGS command instead but haven’t yet been able to make it work since it doesn’t seem to want to use the locally built version on my pi, preferring to use the stock version from github…

Hey so sorry for the super late reply, I’ve been tied down for the last few months. Have you managed to get your issue sorted?

Is there a running list of confirmed inverter models that this is working with? If not, can everyone post their model here? Specifically, I’m wondering if MPP-Solar LV6548 works and/or EG4 6500EX.

Hi Where do i find the file to change these values?

Kind Regards
Quintin

normally inside the inverter.conf file here
/opt/docker-voltronic-homeassistant/config/inverter.conf

Hi guys,
I finnaly set up my homeassiastace with my solar inverterMKS5K MKS5K. To do it i have use old laptop running on Debian witch installed Home Assistant Supervised. to comunicate with inverter i have used mpp-solar soft from mpp-solar. Mpp-solar wos the easyest and the fastest way to download data from inverter via usb to homeassistance.

with this setup i dont have to bother about QPIGS values and ather, and its working.

my mpp-solar config looks like this:


[SETUP]
pause=5
mqtt_broker=localhost
mqtt_user=*****
mqtt_pass=*****

[Inverter_1]
port=/dev/ttyUSB0
protocol=PI30
command=QPIGS
tag=QPIGS
outputs=mqtt

my configuration.yaml


# Loads default set of integrations. Do not remove.
default_config:

# Text to speech
tts:
  - platform: google_translate

automation: !include automations.yaml
script: !include scripts.yaml
scene: !include scenes.yaml

sensor pv:
  - platform: mqtt
    force_update: true
    state_class: measurement
    device_class: energy
    state_topic: "QPIGS/status/pv_input_power/value"
    name: "PV Input"
    
sensor bat status:
  - platform: mqtt
    force_update: true
    state_class: measurement
    device_class: energy    
    state_topic: "QPIGS/status/battery_capacity/value"
    name: "Bat status"

sensor temp status:
  - platform: mqtt
    force_update: true
    state_class: measurement
    device_class: energy
    state_topic: "QPIGS/status/inverter_heat_sink_temperature/value"
    name: "inverter tenp"

sensor out power:
  - platform: mqtt
    force_update: true
    state_class: measurement
    device_class: energy
    state_topic: "QPIGS/status/ac_output_active_power/value"
    name: "out power"
    
sensor bat volt:
  - platform: mqtt
    force_update: true
    state_class: measurement
    device_class: energy
    state_topic: "QPIGS/status/battery_voltage/value"
    name: "bat Vol"

sensor bat discharg:
  - platform: mqtt
    force_update: true
    state_class: measurement
    device_class: energy
    state_topic: "QPIGS/status/battery_discharge_current/value"
    name: "bat. discharg. currnet"

sensor bat char:
  - platform: mqtt
    force_update: true
    state_class: measurement
    device_class: energy
    state_topic: "QPIGS/status/battery_charging_current/value"
    name: "bat. charg. current"
    
switch:
  - platform: template
    switches:
      ewelink_virtual_switch:
        turn_on:
          service: switch.turn_on
        turn_off:
          service: switch.turn_off

and my lovellace card looks like

title: Home
views:
  - path: default_view
    title: Home
    cards:
      - type: horizontal-stack
        cards:
          - show_current: true
            show_forecast: true
            type: weather-forecast
            entity: weather.openweathermap
            name: 'Pogoda '
            secondary_info_attribute: visibility_unit
      - type: vertical-stack
        cards:
          - type: entity
            entity: switch.1012344
          - type: entities
            entities:
              - entity: automation.grzalka_off
              - entity: automation.grzalka_on
              - entity: sensor.inverter_tenp
      - type: horizontal-stack
        cards:
          - hours_to_show: 24
            graph: line
            type: sensor
            entity: sensor.pv_input
            detail: 1
          - hours_to_show: 24
            graph: line
            type: sensor
            entity: sensor.out_power
            detail: 1
      - type: horizontal-stack
        cards:
          - hours_to_show: 24
            graph: line
            type: sensor
            entity: sensor.bat_vol
            detail: 1
          - hours_to_show: 24
            graph: line
            type: sensor
            entity: sensor.bat_charg_current
            detail: 1
          - hours_to_show: 24
            graph: line
            type: sensor
            entity: sensor.bat_discharg_currnet
            detail: 1
      - type: gauge
        entity: sensor.bat_status
        unit: '%'
        min: 0
        max: 100
        needle: false
      - type: entities
        entities:
          - sensor.dzienna_produkca_pv
          - sensor.dzienne_zuzycie_energi_2
          - sensor.miesieczne_produkcja_pv
          - sensor.miesieczne_zuzycie_enerki
      - type: history-graph
        entities:
          - entity: sensor.pv_input
          - entity: sensor.out_power
        hours_to_show: 12
      - type: history-graph
        entities:
          - entity: sensor.bat_vol
        hours_to_show: 12
      - type: history-graph
        entities:
          - entity: sensor.bat_charg_current
          - entity: sensor.bat_discharg_currnet
        hours_to_show: 12
      - show_name: true
        show_icon: true
        type: button
        tap_action:
          action: toggle
        entity: switch.1012344
        show_state: true
        icon: mdi:thermometer-lines
        icon_height: 20px

im useing also small script to run to send a request from mpp-solar to inverter i hope it help someone

#!/bin/bash
/usr/bin/watch -n 1 mpp-solar -C > /dev/null 2>&1 &
exec bash

i hope it help someone

2 Likes