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!

Got it. Thanks! I’m now able to get data into HA! Woo!

From your suggestions I started the console in the container and was able to install nano and edit the inverter.conf and mqtt.json files. For anyone looking for them they’re in /etc/inverter (up a folder from where it places you in opt).

I think the big issue I’d been having was how I deployed the container. I tried via ssh, but there was no docker-compose installed on Raspberry Pi OS, and when I tried apt-get, that also wasn’t there. So I tried copying the docker-compose.yaml file into Portainer stacks. But that kept erroring out too, with issues with the volume and devices not being found.

The success I’ve had so far is just adding a container and copying the image link and manually replicating the docker-compose in Portainer. Removing /dev/ttyUSB0 and adding /dev/hidraw0 to my device list seemed to help. I still can’t get the ./config:/etc/inverter volume to work, it wants absolute paths and I think there’s also permission issues.

But, data from the inverter has got to HA, so that’s a huge step forward after banging my head into this for a few days.

I installed Portainer separately after running into an error, could that be the cause of what seems like permission errors?

Hi.
Anyone managed to get an axpert 5k working with rs232-ttl with esphome?
Ive tried to make 2 rj45-ttl adapters using the micro rs232-ttl converters. but just keep getting the following error

[13:13:40][D][pipsolar:757]: timeout command to poll: QPIRI
[13:13:40][D][pipsolar:840]: Sending polling command : QPIRI with length 5

Im presuming there is an issue with the cable.
I’ve followed the cable pinouts from here

HI! I was wondering if you could use this same code to connect to an ACUVIM Power meter?

WOuld this work if i install HA using a virtual machine?

I can help a little here.

I could not get this to work when running HA in the preferred setup under HassOS.

I ended up doing a fresh install of Debian on my Pi then running a supervised installed of HA in docker on that and this project in its own docker.

This project appears to be running, as I can see entities for inverter info in HA, but there’s no data for me yet (as I chase a different issue with communication with the inverter).

Note that by standing this up in docker alongside HA, that makes my HA install “unhealthy” and unsupported. I have had to stop this stack to update HA core when updates are available, but otherwise it seems fine. It was a fair bit more work than just running HassOS though, but I haven’t touched Linux in 20yrs,

Replaced my usb/rs232 and now I have data flow (and working with the windows app)

But now I am trying to determine what values for the various settings.

Would someone have an updated firmware for an mpp solar 10kw/Hybrid inverter. the firmware now is Main FW version: 00001.01 ?. Sry for asking for this here. But from what i can read is more realisable with the newest firmware. Kind Regards Michael
InfiniSolar 3P 10kw

For anyone using an MPP/Voltronic 7.2kw Inverter, these settings got me going.

qpiri=108

qpiws=45

qmod=5

qpigs=110

Further discussion here - 7.2 Voltronic Max with x2 MPPT · Issue #60 · ned-kelly/docker-voltronic-homeassistant (github.com)

1 Like

I needed the app to read my mpp solar inverter (PIP 5048 GK) using a raspberry pi zero via USB, the docker stuff and all were to heavy, I rewritten a mono app that suits my need feel free to have a look and maybe contribute.

Check this GitHub - Alexplose/mpp-solar-poller: Mono app that read from mpp-solar usb port using a raspberry pi zero w

I have a 5sec loop between measure, but can be less.

1 Like

Does your inverter have 2x MPPTs?

If so does this read both?

I cannot read PV data currently on my 7.2kw

I only have 1 MPPT does the documentation tells how to read both ?
I found all details for mine in product-application_pdf-20190724092401-8519-pip-gk-mk-protocol.pdf

Hi Mark, Sorry I know this dates back some time but a quick question. Is there anything else specifically you needed to do to get all the paralleled inverters to pull the entities for each into HA via MQTT ? I have the same as yourself with giving each container a different MQTT devicename and specified hidraw0,1,2 for the 3 inverters. If i go to the MQTT listener in HA I can see the topics for each but for some reason it will only display the 1st inverter entities (hidraw0). Does the Client ID being the same across the 3 containers matter ?

Hi Kenny. My config is as follows:
config/mqtt.json as follows:

{
    "server": "192.168.10.102",
    "port": "1883",
    "topic": "homeassistant",
    "devicename": "voltronic1",
    "username": "*********",
    "password": "********"
}

With the only change for each container being the devicename. voltronic2, voltronic3 & voltronic4

config/inverter.conf as follows:

device=/dev/hidraw0

run_interval=120

amperage_factor=1.0

watt_factor=1.01

qpiri=98
qpiws=36
qmod=5
qpigs=110

With the only change for each container being the device=/dev/hidraw0 / 1/ 2/ 3

docker-compose.yml as follows:

version: '3'

services:
  voltronic-mqtt:

    image: bushrangers/ha-voltronic-mqtt

    container_name: voltronic-mqtt1

    privileged: true
    restart: always

    volumes:
        - ./config/:/etc/inverter/

    devices:
      - /dev/bus/usb:/dev/bus/usb:rwm
      - /dev/ttyUSB0:/dev/ttyUSB0:rwm
      - /dev/ttyUSB1:/dev/ttyUSB1:rwm

      - /dev/ttyS0:/dev/ttyS0
      - /dev/ttyS1:/dev/ttyS1
      - /dev/ttyS2:/dev/ttyS2

  watchtower:
    image: containrrr/watchtower
    container_name: watchtower1

    restart: always
    privileged: true

    volumes:
      - /var/run/docker.sock:/var/run/docker.sock

    command: --interval 500

With the only change for each container being the container_name: voltronic-mqtt1, voltronic-mqtt2, etc

Hope this helps you out.

My inverter

I also have this snmp card installed: And with this i can get some values into homeassistant by snmp protocol, But i want to make use of the homeassistant energy meter.
https://voltronicpower.com/en-US/Product/Detail/SNMP-web-Card,-SNMP-Box

I have the 10kw hybrid mpp solar inverter

can someone help with the correct values

qpiri=108

qpiws=45

qmod=5

qpigs=110

Hi Dan

My MppSolar inverter has 3 solar inputs, and it is only read the first. Did you find out more about reading from multiple inputs/MPPT’s?

Thanks for your time in supplying the info regarding your config Mark, I managed to get it work ! :champagne:

Hi
Does anyone deal already with Axpert VM 1000 or Master Power Omega UM 1000?
What I can do to find the right config?

This is how the output looks like. Any help appreciated.

root@Solar1:/opt/docker/ha-inverter-mqtt-agent/sources/inverter-cli# ./inverter_poller -1 -d
Sun Jan 2 12:34:13 2022 INVERTER: Debug set
Sun Jan 2 12:34:13 2022 INVERTER: Current CRC: 49 C1
Sun Jan 2 12:34:16 2022 INVERTER: QMOD read timeout
Sun Jan 2 12:34:16 2022 INVERTER: QMOD reply size (215 bytes)
Sun Jan 2 12:34:16 2022 INVERTER: QMOD: incorrect start/stop bytes. Buffer: .56 001 95 003 0002 03.7 14.00 10 31 00<(28.50.0 2 .0 000 000431 14.2 00109 2 50 0031 0(32…0 28. 50000 00 0031 452 00 09 00370002 552 000 1000111 0 031 000▒(0000000000(0000000000000000(00000000000000000000000(NAK
Sun Jan 2 12:34:16 2022 INVERTER: Current CRC: B7 A9
Sun Jan 2 12:34:19 2022 INVERTER: QPIGS read timeout
Sun Jan 2 12:34:19 2022 INVERTER: QPIGS reply size (67 bytes)
Sun Jan 2 12:34:19 2022 INVERTER: QPIGS: incorrect start/stop bytes. Buffer: (28.0 0.0 280 500000 0043 146 0 0950037 02 0500 10101100300032000▒
Sun Jan 2 12:34:19 2022 INVERTER: Current CRC: F8 54
Sun Jan 2 12:34:22 2022 INVERTER: QPIRI read timeout
Sun Jan 2 12:34:22 2022 INVERTER: QPIRI reply size (31 bytes)
Sun Jan 2 12:34:22 2022 INVERTER: QPIRI: incorrect start/stop bytes. Buffer: 3050015 1.5 14. 13. 20 303(NAs
Sun Jan 2 12:34:22 2022 INVERTER: Current CRC: B4 DA
Sun Jan 2 12:34:25 2022 INVERTER: QPIWS read timeout
Sun Jan 2 12:34:25 2022 INVERTER: QPIWS reply size (22 bytes)
Sun Jan 2 12:34:25 2022 INVERTER: QPIWS: incorrect start/stop bytes. Buffer: (0000000000000000000▒
Sun Jan 2 12:34:30 2022 INVERTER: Current CRC: 49 C1
Sun Jan 2 12:34:33 2022 INVERTER: QMOD read timeout
Sun Jan 2 12:34:33 2022 INVERTER: QMOD reply size (10 bytes)
(NAssan 2 12:34:33 2022 INVERTER: QMOD: incorrect start/stop bytes. Buffer: B▒▒
Sun Jan 2 12:34:33 2022 INVERTER: Current CRC: B7 A9
Sun Jan 2 12:34:36 2022 INVERTER: QPIGS read timeout
Sun Jan 2 12:34:36 2022 INVERTER: QPIGS reply size (68 bytes)
Sun Jan 2 12:34:36 2022 INVERTER: QPIGS: incorrect start/stop bytes. Buffer: ( 500 229.05000 0 000 14.1 0003 0001.2 459 00 100011 00 03 0038 00▒
Sun Jan 2 12:34:36 2022 INVERTER: Current CRC: F8 54

Hi

Not sure if i missed it or not but how do I add the devices on HA build in energy integration without using another fork ?

everything else is working perfect thanks !!

Hello @henry.joubert, were you able to send MUCHGC002 command in to the inverter please? I’m fighting with the same issue. It seems that it’s possible to send comands into the inverter up to 5 charracters so for example POP00 or PCP01 will work correctly and inverter is understanding, but whenever I’m trying to send some longer command, It’s not working. In my case I’m trying to change operation logic of inverter using command POPLG02

POPLG<nn><cr>: Setting operation logic (Only for KING)
Computer: POPLG <nn.n><CRC><cr>
Inverter: (ACK<CRC><cr> if Inverter accepts this command, otherwise, responds (NAK<CRC><cr>
nn:00: automatically, 01: On-line mode, 02: ECO mode

thanks

1 Like

Hi I done it in this way

Add this to ESPHOME config for my inverter

api:
  services: 
    - service: ac_grid_current
      variables:
        ACCurent: float
      then:
      - logger.log: "STARTING VARIABLE ACCurrent"
      - output.pipsolar.set_level:
          id: rct0_current_max_ac_charging_current
          value: !lambda 'return ACCurent;'
      - logger.log: "VARIABLE ACCurrent ENDS"

output:
  - platform: pipsolar
    pipsolar_id: inverter0
    current_max_ac_charging_current:
      possible_values: 
      - 2
      - 10
      - 20
      - 30
      id: rct0_current_max_ac_charging_current

on HA

in automation.yaml

- id: '1627028353839'
  alias: Rct Setting max charging Current
  description: ''
  trigger:
  - platform: state
    entity_id: input_select.setting_max_charging_current
  condition: []
  action:
  - service: esphome.rct_inverter_ac_max_current
    data:
      ACCurent: "{% if is_state(\"input_select.setting_max_charging_current\", \"\
        2 Amp\") %}\n  2\n{% elif is_state(\"input_select.setting_max_charging_current\"\
        , \"10 Amp\") %}\n  10\n{% elif is_state(\"input_select.setting_max_charging_current\"\
        , \"20 Amp\") %}\n  20\n{% elif is_state(\"input_select.setting_max_charging_current\"\
        , \"30 Amp\") %}\n  30\n{% elif is_state(\"input_select.setting_max_charging_current\"\
        , \"40 Amp\") %}\n  40\n{% elif is_state(\"input_select.setting_max_charging_current\"\
        , \"50 Amp\") %}\n  50\n{% elif is_state(\"input_select.setting_max_charging_current\"\
        , \"60 Amp\") %}\n  60\n{% endif %}\n"
  mode: single

and

create in helpers
input_select.setting_max_charging_current
with the values of
2 Amp, 10 Amp, 20 Amp, 30 Amp,40 Amp,50 Amp,60 Amp

Hope this help

1 Like