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!

@Thaelian - Can you try the queries via a Serial cable (or serial2usb) rather than via the USB?

the 8 byte response usually happens when there’s previous data that was sent over the USB/Serial and the buffer has not been cleared - You could also try and power off/on the inverter so it reboots - The early firmware was a bit buggy on them I found (I previously had an older 24v 3kw inverter also before upgrading it to the 5kw version)

@ned-kelly I have rebooted the inverter and tried using my Serial to USB cable.

This is the result:

pi@raspberrypi:/dev $ docker exec -it voltronic-mqtt /bin/bash
root@3890fb9fbb27:/opt# /opt/inverter-cli/bin/inverter_poller -d -1
Fri Apr 24 07:20:11 2020 INVERTER: Debug set
Fri Apr 24 07:20:11 2020 INVERTER: Current CRC: 49 C1
Fri Apr 24 07:20:11 2020 INVERTER: QMOD reply size (5 bytes)
Fri Apr 24 07:20:11 2020 INVERTER: QMOD: incorrect start/stop bytes. Buffer: (N configuration options for the actual inverter polling process…

The device to read from…

Use: /dev/ttyS0 if you have a serial device,

/dev/ttyUSB0 if a USB<>Serial,

/dev/hidraw0 if you’re connecting via the USB port on the inverter.

device=/dev/ttyUSB0

How many times per hour is the program going to run…

This is used to calculate the PV & Load Watt Hours between runs…

If unsure, leave as default - it will run every minute…

(120 = every 30 seconds)…

run_interval=240

This allows you to modify the amperage in case the inverter is giving an incor rect

reading compared to measurement tools. Normally this will remain ‘1’

amperage_factor=1.0

This allows you to modify the wattage in case the inverter is giving an incorr ect

reading compared to measurement tools. Normally this will remain ‘1’

watt_factor=1.01

The following settings allow you to modify runtime buffers.

N.B. These values may not be applicable to all inverter types, as such you wil l

need

Fri Apr 24 07:20:11 2020 INVERTER: Current CRC: B7 A9
Fri Apr 24 07:20:11 2020 INVERTER: QPIGS reply size (110 bytes)
Fri Apr 24 07:20:11 2020 INVERTER: QPIGS: incorrect start/stop bytes. Buffer: A Kss
(NAK
s
(NAK
s
(NAK
s
(NAKss
(NAKss
(NAKss
(NAKss
(NAKss
(NAKss
(NAKss
(NAKss
(NAK
s
(NAKss
(NAKss
(NAKss
/dev/ttyS0 if you have a serial device,

/dev/ttyUSB0 if a USB<>Serial,

/dev/hidraw0 if you’re connecting via the USB port on the inverter.

device=/dev/ttyUSB0

How many times per hour is the program going to run…

This is used to calculate the PV & Load Watt Hours between runs…

If unsure, leave as default - it will run every minute…

(120 = every 30 seconds)…

run_interval=240

This allows you to modify the amperage in case the inverter is giving an incor rect

reading compared to measurement tools. Normally this will remain ‘1’

amperage_factor=1.0

This allows you to modify the wattage in case the inverter is giving an incorr ect

reading compared to measurement tools. Normally this will remain ‘1’

watt_factor=1.01

The following settings allow you to modify runtime buffers.

N.B. These values may not be applicable to all inverter types, as such you wil l

need

Fri Apr 24 07:20:12 2020 INVERTER: Current CRC: F8 54
Fri Apr 24 07:20:12 2020 INVERTER: QPIRI reply size (98 bytes)
Fri Apr 24 07:20:12 2020 INVERTER: QPIRI: incorrect start/stop bytes. Buffer: ( NAKss
(NAK
s
(NAK
s
(NAK
s
(NAK
s
(NAK
s
(NAK
s
(NAKss
(NAK
s
(NAKss
(NAKss
(NAKss
(NAKss
(NAKss
AKss
(NAKss
/dev/ttyS0 if you have a serial device,

/dev/ttyUSB0 if a USB<>Serial,

/dev/hidraw0 if you’re connecting via the USB port on the inverter.

device=/dev/ttyUSB0

It loops at this point

its working great to be fair, the inverters are paralleled up and when i change from grid to battery they both change, the readings are from which ever i have it plugged into but for charging/battery they both activate so all is good, thankyou for the work you have done on this, cant wait to start logging data over the weeks :slight_smile:

Hi guys,

I have one Effekta AX-P inverter and this week I bought Raspberry Pi 4 Model B 4GB - Full Package. First steps was to download Balena and installed HA ver 3.13.

All ok until here but from this morning I read your post and I do not understand if is necessary to change/erase/add some files on micro SD card from Pi 4, for install docker and docker compose on my Pi 4.

Is it necessary to delete the current HA image from the sdcard and install your docker in sdcard that also contains HA?

I have very little knowledge of Linux, please explain to me the steps to follow in my case, to install this application for monitoring and configuring the inverter.

L.E. Today uninstalled HA, clean microsd card and install Raspbian Lite. Only after that is possible to install Docker & Docker compose. This steps missing from this tutorial until now. So, I have docker 19.03.8 and compose 1.25.5.

What is the next steps?

Sorry but until now I do not understanded complete your advices. Only after 8 hours I am after the step with install Docker compose and I have version 1.25.5.

What is the next step for Git?

Git link loaded complete. For settings I do not know what is the right commands…

Expect your advices.

only sensor not working on my install is voltronic_PV_in_watts it just stays at 0 constantly

The instructions are on the github page, as is stated in the first post.

L.E. Installed Git software on Pi4 with this command
sudo apt-get install git-core

and send this command after finished installation for check all

git

and after that

git clone https://github.com/ned-kelly/docker-voltronic-homeassistant.git /opt/ha-inverter-mqtt-agent

Reply is
fatal: could not create work tree dir ‘/opt/ha-inverter-mqtt-agent’: Permission denied

put sudo git clone…

sudo everything

follow that to guide how to install docker and docker compose

Docker & docker compose installed ok.

I was succesfull for git clone with command
sudo su

before
git clone https://github.com/ned-kelly/docker-voltronic-homeassistant.git /opt/ha-inverter-mqtt-agent

I introduced next commands
cd /opt/ha-inverter-mqtt-agent
vi config/inverter.conf

After that I have the next window and all is blocked again…I can not give the last two commands…

See image

I tried to connect USB/serial cable from inverter but no data, no window…

The HA window doesn’t work.

I am exasperated after two extremely mentally tiring days…now I’m going to make 9-10 km with my bike to recover…:slight_smile:

cd /opt/ha-inverter-mqtt-agent

sudo nano vi config/inverter.conf

then press enter on that command, it will bring up a blank sheet thing

close that down by pressing ctrl key and x

you should then see your inverter.conf

make the changes you need to then save it by pressing ctrl key and letter o key it will ask for file name leave it as is and press enter

then exit again by ctrl and x

in the mqtt thing AGAIN put sudo nano then the command and again close the blank sheet down by pressing ctrl and x then you will see the mqtt page, do not change the voltronic name or the homeassistant else it wont auto add into home assistant

What? nano vi? What nonsense. nano is an editor. vi is an editor. Choose one. nano is easier.

1 Like

I am getting this same problem. I am an absolute novice at the hole Home Assistant and MQTT. I have tested the broker in the Developer tools and I can sent and receive payloads on topics.

No matter what I do I cannot get my Home Assistant to pickup on any of the sensors or devices from the voltronic docker.

I am running Supervised Home Assistant and the voltronic docker on the same Ubuntu Server 20.04 LTS machine.

How do I check that the voltronic docker image is running correctly and connecting to the inverter and to the MQTT broker? I do have Portainer setup and I am not sure if I have the networking for the Docker images setup correctly.

Thanks in advance for any information.

Managed to get it working by playing around with the networks of the docker containers.

Hi again,
Thank you very much for advices gazzaman2k & nickrout

So, I started Pi4 - login and after that I sent the commands

cd /opt/ha-inverter-mqtt-agent - enter
sudo nano config/inverter.conf – enter – enter

I do not changed anything in attached window.

I do not know if is necessary to change anything there, so leave unchanged.

Then
ctrl +o – enter
ctrl +x
sudo nano
ctrl +x

In putty remain attached page

Please don’t post photos of text.

The file tells you what you need to change.

You will definitely need to change mqtt.conf - only you will know what is needed.

Ok nickrout but is easier to see all the window.

Clarifications:

  • All operations I made w/o USB cable from inverter connected on Pi 4.
  • After all, I connected USB cable and sent the command

docker-compose up -d

Result is
pi@raspberrypi:/opt/ha-inverter-mqtt-agent $ docker-compose up -d
Creating network “ha-inverter-mqtt-agent_default” with the default driver
Pulling watchtower (containrrr/watchtower:)…
latest: Pulling from containrrr/watchtower
c4b177d7cf7a: Pull complete
676d5222541c: Pull complete
cf0b6b1ec4b2: Pull complete
Digest: sha256:76fb863ea0c513d870f8634a13e061f81c387a62ecc27ad64f9b06179181c394
Status: Downloaded newer image for containrrr/watchtower:latest
Creating voltronic-mqtt … done
Creating watchtower … done
pi@raspberrypi:/opt/ha-inverter-mqtt-agent $

It is ok?

Where I can acces now the Voltronic interface?
The local Pi 4 address 192.168.0.125 can not be accesed in browser.
HA address http://homeassistant:8123/onboarding.html give me acces denied.