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!

Ok I moved forward a bit. Via the : sudo docker exec -it voltronic-mqtt bash -c ‘/opt/inverter-cli/bin/inverter_poller -d -1’, I got …

Fri Feb 28 15:53:30 2020 INVERTER: QPIRI reply size (97 bytes)
Fri Feb 28 15:53:30 2020 INVERTER: QPIRI: incorrect start/stop bytes.  Buffer: (230.0 21.7 230.0 50.0 21.7 5000 5000 48.0 48.0 47.0 53.2 53.2 3 40 100 1 1 1 9 01 0 1 51.0 0 1 0 00053 010
Fri Feb 28 15:53:30 2020 INVERTER: Current CRC: B4 DA
Fri Feb 28 15:53:30 2020 INVERTER: QPIWS reply size (36 bytes)
Fri Feb 28 15:53:30 2020 INVERTER: QPIWS: incorrect start/stop bytes.  Buffer: (000000000000000000000000000000000000 48.0 48.0 47.0 53.2 53.2 3 40 100 1 1 1 9 01 0 1 51.0 0 1 0 00053 010
Fri Feb 28 15:53:35 2020 INVERTER: Current CRC: F8 54
Fri Feb 28 15:53:36 2020 INVERTER: QPIRI reply size (97 bytes)
Fri Feb 28 15:53:36 2020 INVERTER: QPIRI: incorrect start/stop bytes.  Buffer: 010▒▒
Fri Feb 28 15:53:36 2020 INVERTER: Current CRC: B4 DA
Fri Feb 28 15:53:36 2020 INVERTER: QPIWS reply size (36 bytes)
Fri Feb 28 15:53:36 2020 INVERTER: QPIWS: incorrect start/stop bytes.  Buffer: .0 48.0 47.0 53.2 53.2 3 40 100 1 1 5000 5000 48.0 48.0 47.0 53.(230.0 21.7 230.0 50.0 21.7 5000  00053 010

Where it seems there are error on start/stop bytes… Any idea ?

Would this run on a Raspberry Pi Zero?

Hi, I am a HASSIO noob and would like to integrate with an Axper inverter. The current monitoring method is unreliable and only supports email notification. These notifications are generally slow, if they arrive at all.

Just to confirm, are you running the data collect separate from your HASSIO installation or on the same HW? Could I run it on a PI and send it to my HASSIO host?

Regards
Shaun

I got it working on a pi 3 without any issues I think the pi 1 ia a bit to old to handle this.
do you think this would run on a pi zero I can get them cheaper as an orange pi

Yes as long as you can get Docker or perhaps Balena running on it!

Hi mate, have a look at the issue on github here which has a fix for this bug - https://github.com/ned-kelly/docker-voltronic-homeassistant/issues/5

@raphii has now made a fix also so you can just change the qpiri to match the correct byte size for your inverter’s response (it changes depending on the firmware version running) in your config/inverter.conf.

Cheers,

not to be a pain but do you have an export of your grafana Dashboards available having a hard time with power totals and savings

Not today sorry mate - Currently away and VPN not reliable from my location - If you shoot me a reminder PM though over the weekend I can give you an export :slight_smile:

1 Like

Hey everyone, hoping someone could shed some light on an issue similar to what @riaan199 had earlier, I just can seem to get to get the image to build:

I can’t get any other additional logs on the failed container build all I get is the above error code 139. I’m using an old raspi B+:
pi model b +

I’d try with a pi 3 but I don’t have a spare laying around, thank you in advance!

yeah I had to use a pi 3 before it started working make sure that the

docker run hello-world

I was unable to get docker to work properly on my old pi

1 Like

Thanks! Unfortunately hello-world doesn’t run unless I specify the image to pull

docker run armv6l/hello-world

Apparently even though debian images are built for arm they are not guaranteed to work on armv6

Update!! So I finally managed to get this running on the pi 1! :grinning:

I had to use the arm32v6/alpine image which is about 4MB on it’s own and made some changes to the Dockerfile:

FROM arm32v6/alpine:latest

RUN apk update && apk add --no-cache bash build-base git curl cmake jq mosquitto-clients

ADD sources/ /opt/
ADD config/ /etc/inverter/

RUN cd /opt/inverter-cli && \
    mkdir bin && cmake . && make && mv inverter_poller bin/

WORKDIR /opt
ENTRYPOINT ["/bin/bash", "/opt/inverter-mqtt/entrypoint.sh"]

I had to add bash because alpine didn’t ship with it, instead it shipped with /bin/sh otherwise I’d have to change the ENTRYPOINT and all the .sh files :sweat:

I had a couple of errors at first like ERROR: Failed to create usr/bin/cmake: I/O error so I resorted to running an image in interactive mode and proceeded to install all the packages through apk add several times before all packages were installed successfully. After this I just had to create an image from the container with the build tools needed, though this whole part might not be necessary if you don’t get any installation errors as I believe it was because of timeouts on my end.

image

3 Likes

Hi there, I’m trying to interface my PIP4048 through Raspberry to HA.

Via USB - USB (hidraw0) connection I have no problem reading the values after setting the buffer of QPIRI to 98, however I notice that the update time between HA and the inverter is sometimes even longer than one minute. Is there a way to make more fast communication? How can MQTT make more push notification?

Tried also through serial connection (ttyUSB0) I can not get any data from the inverter even setting the QPIRI buffer to 102, as suggested by some, I report the result below.

Mon Mar 30 16:22:25 2020 INVERTER: Current CRC: B7 A9
Mon Mar 30 16:22:28 2020 INVERTER: QPIGS read timeout
Mon Mar 30 16:22:28 2020 INVERTER: QPIGS reply too short (7 bytes)
Mon Mar 30 16:22:28 2020 INVERTER: Current CRC: F8 54
Mon Mar 30 16:22:31 2020 INVERTER: QPIRI read timeout
Mon Mar 30 16:22:31 2020 INVERTER: QPIRI reply too short (7 bytes)
Mon Mar 30 16:22:31 2020 INVERTER: Current CRC: B4 DA
Mon Mar 30 16:22:34 2020 INVERTER: QPIWS read timeout
Mon Mar 30 16:22:34 2020 INVERTER: QPIWS reply too short (10 bytes)
Mon Mar 30 16:22:39 2020 INVERTER: Current CRC: 49 C1
Mon Mar 30 16:22:42 2020 INVERTER: QMOD read timeout
Mon Mar 30 16:22:42 2020 INVERTER: QMOD reply too short (3 bytes)
Mon Mar 30 16:22:42 2020 INVERTER: Current CRC: B7 A9
Mon Mar 30 16:22:45 2020 INVERTER: QPIGS read timeout
Mon Mar 30 16:22:45 2020 INVERTER: QPIGS reply too short (3 bytes)
Mon Mar 30 16:22:45 2020 INVERTER: Current CRC: F8 54
Mon Mar 30 16:22:48 2020 INVERTER: QPIRI read timeout
Mon Mar 30 16:22:48 2020 INVERTER: QPIRI reply too short (7 bytes)
Mon Mar 30 16:22:48 2020 INVERTER: Current CRC: B4 DA
Mon Mar 30 16:22:51 2020 INVERTER: QPIWS read timeout
Mon Mar 30 16:22:51 2020 INVERTER: QPIWS reply too short (7 bytes)
Mon Mar 30 16:22:56 2020 INVERTER: Current CRC: 49 C1
Mon Mar 30 16:22:56 2020 INVERTER: QMOD reply size (5 bytes)
nfiguration options for the actual inverter polling process...bytes.  Buffer: (NAKs�

Hi
I am pulling my hair out! :slight_smile: Hope one of you who got this working can shed some light on what I can try.

My Invermax variant of the Axpert VMIII inverter is plugged into USB via /dev/hidraw0

The entities show up in HA but everything is unknown. MQTT client receives messages like:
{
“name”: “voltronic_Battery_voltage”,
“unit_of_measurement”: “V”,
“state_topic”: “homeassistant/sensor/voltronic_Battery_voltage”,
“icon”: “mdi:battery-outline”
}

sudo docker exec -it voltronic-mqtt bash -c '/opt/inverter-cli/bin/inverter_poller -d -1'
SHOWS:
Tue Mar 31 14:33:29 2020 INVERTER: QPIRI reply size (102 bytes)
Tue Mar 31 14:33:29 2020 INVERTER: QPIRI: incorrect start/stop bytes. Buffer: (230.0 …
Tue Mar 31 14:33:29 2020 INVERTER: Current CRC: B4 DA
Tue Mar 31 14:33:29 2020 INVERTER: QPIWS reply size (36 bytes)
Tue Mar 31 14:33:29 2020 INVERTER: QPIWS: incorrect start/stop bytes. Buffer: (…
Tue Mar 31 14:33:34 2020 INVERTER: Current CRC: F8 54

modified inverter.conf TO:
qpiri=102
qpiws=36
qmod=5
qpigs=110

I removed everything from docker and re-ran sudo docker-compose up -d

With no success. Are those config updates being deployed? Please help.

1 Like

Hi mate, try to set qpiri to 98 and the other to default value, if it works can you say to me how much time require to refresh your inverter value like W instant consumption.

Many thanks.

Andrea

Hi Guys,

There’s been some updates today so can you try and run it using the latest builds on docker hub (they now support multi architecture).

As for your issue @francois-dotnet

Can you try and change the following in your config:

(This seems to be the default for the 4/5kw versions)

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

Thanks @tcapanna and @ned-kelly. qpiri=98 and just like it seems to all be working. :smiley:

@francois-dotnet Of nothing, you’re welcome, when you can let me know how often the data is updated between the inverter and Hass.IO

@ned-kelly Is there a way to make more push notification, so I can have more data polling?

I set mine to every 15 seconds and for that you have to update two files:

  • sources/inverter-mqtt/entrypoint.sh on the last command to push using the watch command to run every 15 secs instead of 30 watch -n 15 /opt/inverter-mqtt/mqtt-push.sh > /dev/null 2>&1
  • config/inverter.conf on the run_interval setting to match your execution time as this is used to calculate your watt hour values if I still remember correctly

Thank you @wax911, I have already tried to adjust the threshold by acting on these two files, also by recompiling the docker-compose after the modification, but analyzing with mqtt-spy and other listening services I know that the notifications occur anyway with a variable frequency and very not constant.
I use even other device, like the Tasmota sensor, the transmit every 10s and are very reliable.

If you connect the inverter Via RS232 or USB or Eth-RS232 with WatchPower - Lucibus and some other software you can see the variations with a refresh rate of several milliseconds…logically I do not expect to get this kind of results, but already having an update every 5/10 seconds would be very useful in programming the automations.

1 Like