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!

Hello,

did you find a way to do it?
when my ATS will come I think I will open the case of the inverter and take some wire from the switch(on/off witch will only turn off the inverter side) and connect to a relay of a esp8286 witch it will have esphome. so then I will create a automation in home assistant to turn off the inverter when it is not need it.

Hi
I have a Infinisolar V2 5KW inverter, which I think is a fairly new model and includes Grid-Tied functions. I have tried all the settings possible for qpiri qpiws qmod qpigs with no luck.

Sat Sep 5 15:19:18 2020 INVERTER: Current CRC: B7 A9
Sat Sep 5 15:19:21 2020 INVERTER: QPIGS read timeout
Sat Sep 5 15:19:21 2020 INVERTER: QPIGS reply too short (8 bytes)
Sat Sep 5 15:19:21 2020 INVERTER: Current CRC: F8 54
Sat Sep 5 15:19:24 2020 INVERTER: QPIRI read timeout
Sat Sep 5 15:19:24 2020 INVERTER: QPIRI reply too short (8 bytes)
Sat Sep 5 15:19:24 2020 INVERTER: Current CRC: B4 DA
Sat Sep 5 15:19:27 2020 INVERTER: QPIWS read timeout
Sat Sep 5 15:19:27 2020 INVERTER: QPIWS reply too short (8 bytes)
Sat Sep 5 15:19:32 2020 INVERTER: Current CRC: 49 C1
Sat Sep 5 15:19:32 2020 INVERTER: QMOD reply size (5 bytes)
▒at Sep 5 15:19:32 2020 INVERTER: QMOD: incorrect start/stop bytes. Buffer: ^0
Sat Sep 5 15:19:32 2020 INVERTER: Current CRC: B7 A9
Sat Sep 5 15:19:35 2020 INVERTER: QPIGS read timeout
Sat Sep 5 15:19:35 2020 INVERTER: QPIGS reply too short (16 bytes)
Sat Sep 5 15:19:35 2020 INVERTER: Current CRC: F8 54

Would your code need need major updating to support this model? Is there anyway you can confirm that this model is supported without further changes to your code?

I am using usb on the inverter unit itself, so Im assuming a baud rate change isn’t necessary?

Thank you.

Hi
I have an infinisolar v2 5KVA which includes grid-tied functions. Please confirm that @ned-kelly solution wont work. When you say inifinsolar has 3 different protocols are you meaning that is is not supported? Can you give me more details on your setup? What external adapter are you using? Thanks

Hi @catalinbordan i have done some reading, there is no way to do this via command.

I like your idea of using esp8286. if you have proceeded with this let me know. I would be keen to learn more about it and if its possible.

Infinisolar v2 5KVA is likely to be P18 protocol.
It should then run with the Code I uploaded to github or with solar-sis

The difference is: solar-sis still has some more functionality but my project checks for response syntax and crc and provides more reliable communication while i had glitches in data with solar-sis.
Also solar-sis has not mqtt auto discovery for home-assistant.

I intend to freeze a release and publish Windows and Linux (i386) binaries in a few days.

Hello , :smiley: :smiley:
i need to use Raspberry Pi to connect with my Axpert inverter . use its feed back to control some relays by GPIOs in Raspberry Pi
Q1 - can I use this project (add gpio library to it and use it in the code ) :face_with_monocle:?
Q2 - Is there any way to build the project in Raspberry Pi without docker (how hard is it ) ?

thank you > :blush: :blush:

Hello,

I just uploaded some binaries to github.

Daniel

Q1 - can I use this project (add gpio library to it and use it in the code ) :face_with_monocle:?

I do not recommend this way of usage.
All data is sent to MQTT and you could easily create a small tool which reads values via MQTT in your preferred language or in HomeAssistant or NodeRed, etc. to control the relais.
This is much easier to implement, debug and update.

Q2 - Is there any way to build the project in Raspberry Pi without docker (how hard is it ) ?

You just need to install all QT toolchain and compiler. Afterwards compiling QTMQTT library and the application is an easy task.
I do not own a Raspberry Pi so I will most likely not provide binaries. But perhaps someone else likes to add those to the project .

1 Like

If it helps, I have managed to run 4 separate docker containers on a single pi4. Each container is monitoring 1 of the 4 inverters (paralleled). Each container has a different mqtt devicename (homeassistant/voltronic homeassistant/voltronic2 homeassistant/voltronic3 …etc). So I have 4 x USB cables out of the pi4. One to each inverter. Using hidraw0, hidraw1, hidraw2, hidraw3 in each container inverter.conf file respectively. Works perfectly. Now I just need to figure out the automations so that I can turn off major appliances (dishwasher, washing machine, tumble dryer, etc) when the load gets to critical point before it trips the load breaker and the whole house goes off.

Can you share how you got it working , i cannot figure it out.

installed the docker version, are there log files where i can look for errors like issues connecting the UPS etc?

seeing topics in my MQTT explorer but no values, values for entities in home assistant are all “unknown”

Hi there, sorry if this has already been asked. I have a raspberry pi right next to my mpp inverter/charger that is already running hassio. Is it possible to just setup this up on the same raspberry pi as hasso?

Hi Guys / @ned-kelly

Not quite sure what the best way of debugging is, while this is running in a docker im not sure how i see errors. Im running a kodak 3kw inverter, i believe its based on voltronic, it ships with watchpower software.

I’m trying to see if there’s an issue with the rs232 >via serial to usb is a problem. I have a serial to USB adaptor which loads in the Raspberry PI OS as a prolific serial to usb device. I can see this device when i run ‘sudo lsusb’, or ls '/dev/ttyUSB0. This device seems to disappear at some point, I think it’s when the ha-inverter runs, but not sure. If i unplug the usb and reconnect, it doesn’t reconnect. If i unplug and reconnect to a new USB port, it registers in ‘lsusb’ and i can see the device /dev/ttyUSB0. IT crashes when i restart the ha-inverter container.

Here are the messages from the command ‘sudo dmesg -T’, hoping they mean something useful?

These are messages i see when i reconnect to a new USB port.

[Sun Nov  8 19:41:13 2020] usb 1-1.3: new full-speed USB device number 10 using xhci_hcd
[Sun Nov  8 19:41:13 2020] usb 1-1.3: string descriptor 0 read error: -32
[Sun Nov  8 19:41:13 2020] usb 1-1.3: New USB device found, idVendor=067b, idProduct=2303, bcdDevice= 3.00
[Sun Nov  8 19:41:13 2020] usb 1-1.3: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[Sun Nov  8 19:41:13 2020] pl2303 1-1.3:1.0: pl2303 converter detected
[Sun Nov  8 19:41:13 2020] pl2303 1-1.3:1.0: pl2303_vendor_read - failed to read [8484]: -32
[Sun Nov  8 19:41:13 2020] pl2303 1-1.3:1.0: pl2303_vendor_write - failed to write [0404]: -32
[Sun Nov  8 19:41:13 2020] pl2303 1-1.3:1.0: pl2303_vendor_read - failed to read [8484]: -32
[Sun Nov  8 19:41:13 2020] pl2303 1-1.3:1.0: pl2303_vendor_read - failed to read [8383]: -32
[Sun Nov  8 19:41:13 2020] pl2303 1-1.3:1.0: pl2303_vendor_write - failed to write [0404]: -32
[Sun Nov  8 19:41:13 2020] pl2303 1-1.3:1.0: pl2303_vendor_read - failed to read [8484]: -32
[Sun Nov  8 19:41:13 2020] pl2303 1-1.3:1.0: pl2303_vendor_write - failed to write [0001]: -32
[Sun Nov  8 19:41:13 2020] usb 1-1.3: pl2303 converter now attached to ttyUSB0

These are the messages i see when i start the ha-inverter container, after these messages the TTYUSB0 device is gone and i need to reboot before the usb connection is detected

[Sun Nov  8 20:04:47 2020] br-7c940eaae4a5: port 2(vethc903b32) entered blocking state
[Sun Nov  8 20:04:47 2020] br-7c940eaae4a5: port 2(vethc903b32) entered disabled state
[Sun Nov  8 20:04:47 2020] device vethc903b32 entered promiscuous mode
[Sun Nov  8 20:04:47 2020] IPv6: ADDRCONF(NETDEV_CHANGE): vetheb4011e: link becomes ready
[Sun Nov  8 20:04:47 2020] IPv6: ADDRCONF(NETDEV_CHANGE): vethc903b32: link becomes ready
[Sun Nov  8 20:04:47 2020] br-7c940eaae4a5: port 2(vethc903b32) entered blocking state
[Sun Nov  8 20:04:47 2020] br-7c940eaae4a5: port 2(vethc903b32) entered forwarding state
[Sun Nov  8 20:04:48 2020] eth0: renamed from vetheb4011e
[Sun Nov  8 20:04:48 2020] br-7c940eaae4a5: port 2(vethc903b32) entered disabled state
[Sun Nov  8 20:04:48 2020] br-7c940eaae4a5: port 2(vethc903b32) entered blocking state
[Sun Nov  8 20:04:48 2020] br-7c940eaae4a5: port 2(vethc903b32) entered forwarding state
[Sun Nov  8 20:04:48 2020] pl2303 1-1.3:1.0: pl2303_vendor_write - failed to write [0008]: -32
[Sun Nov  8 20:04:48 2020] pl2303 1-1.3:1.0: pl2303_vendor_write - failed to write [0009]: -32
[Sun Nov  8 20:04:48 2020] pl2303 ttyUSB0: pl2303_get_line_request - failed: -32
[Sun Nov  8 20:04:48 2020] pl2303 ttyUSB0: pl2303_set_line_request - failed: -32
[Sun Nov  8 20:04:48 2020] pl2303 1-1.3:1.0: pl2303_vendor_read - failed to read [0080]: -32
[Sun Nov  8 20:04:48 2020] pl2303 ttyUSB0: usb_serial_generic_read_bulk_callback - urb stopped: -32
[Sun Nov  8 20:04:48 2020] pl2303 ttyUSB0: usb_serial_generic_read_bulk_callback - urb stopped: -32
[Sun Nov  8 20:04:48 2020] pl2303 ttyUSB0: pl2303_get_line_request - failed: -32
[Sun Nov  8 20:04:48 2020] pl2303 ttyUSB0: pl2303_set_line_request - failed: -32
[Sun Nov  8 20:04:48 2020] pl2303 1-1.3:1.0: pl2303_vendor_read - failed to read [0080]: -32
[Sun Nov  8 20:04:52 2020] pl2303 ttyUSB0: pl2303_set_control_lines - failed: -32
[Sun Nov  8 20:04:52 2020] pl2303 ttyUSB0: error sending break = -32
[Sun Nov  8 20:04:52 2020] pl2303 1-1.3:1.0: pl2303_vendor_write - failed to write [0008]: -32
[Sun Nov  8 20:04:52 2020] pl2303 1-1.3:1.0: pl2303_vendor_write - failed to write [0009]: -32
[Sun Nov  8 20:04:52 2020] pl2303 ttyUSB0: pl2303_get_line_request - failed: -32
[Sun Nov  8 20:04:52 2020] pl2303 ttyUSB0: pl2303_set_line_request - failed: -32
[Sun Nov  8 20:04:52 2020] pl2303 1-1.3:1.0: pl2303_vendor_read - failed to read [0080]: -32
[Sun Nov  8 20:04:52 2020] pl2303 ttyUSB0: usb_serial_generic_read_bulk_callback - urb stopped: -32
[Sun Nov  8 20:04:52 2020] pl2303 ttyUSB0: pl2303_set_control_lines - failed: -32
[Sun Nov  8 20:04:52 2020] pl2303 ttyUSB0: usb_serial_generic_read_bulk_callback - urb stopped: -32
[Sun Nov  8 20:04:52 2020] pl2303 ttyUSB0: usb_serial_generic_write_bulk_callback - urb stopped: -32
[Sun Nov  8 20:04:52 2020] usb 1-1.3: USB disconnect, device number 10
[Sun Nov  8 20:04:52 2020] pl2303 ttyUSB0: pl2303_set_control_lines - failed: -19
[Sun Nov  8 20:04:52 2020] pl2303 ttyUSB0: error sending break = -19
[Sun Nov  8 20:04:52 2020] pl2303 ttyUSB0: pl2303 converter now disconnected from ttyUSB0
[Sun Nov  8 20:04:52 2020] pl2303 1-1.3:1.0: device disconnected
[Sun Nov  8 20:04:52 2020] usb 1-1.3: new full-speed USB device number 11 using xhci_hcd
[Sun Nov  8 20:04:52 2020] usb 1-1.3: device descriptor read/64, error -32
[Sun Nov  8 20:04:53 2020] usb 1-1.3: device descriptor read/64, error -32
[Sun Nov  8 20:04:53 2020] usb 1-1.3: new full-speed USB device number 12 using xhci_hcd
[Sun Nov  8 20:04:53 2020] usb 1-1.3: device descriptor read/64, error -32
[Sun Nov  8 20:04:53 2020] usb 1-1.3: unable to read config index 0 descriptor/start: -75
[Sun Nov  8 20:04:53 2020] usb 1-1.3: can't read configurations, error -75
[Sun Nov  8 20:04:53 2020] usb 1-1-port3: attempt power cycle
[Sun Nov  8 20:04:54 2020] usb 1-1.3: new full-speed USB device number 13 using xhci_hcd
[Sun Nov  8 20:04:54 2020] usb 1-1.3: unable to read config index 0 descriptor/start: -32
[Sun Nov  8 20:04:54 2020] usb 1-1.3: chopping to 0 config(s)
[Sun Nov  8 20:04:54 2020] usb 1-1.3: can't read configurations, error -32
[Sun Nov  8 20:04:54 2020] usb 1-1.3: new full-speed USB device number 14 using xhci_hcd
[Sun Nov  8 20:04:54 2020] usb 1-1.3: device descriptor read/8, error -32
[Sun Nov  8 20:04:54 2020] usb 1-1.3: unable to read config index 0 descriptor/start: -32
[Sun Nov  8 20:04:54 2020] usb 1-1.3: chopping to 0 config(s)
[Sun Nov  8 20:04:54 2020] usb 1-1.3: can't read configurations, error -32
[Sun Nov  8 20:04:54 2020] usb 1-1-port3: unable to enumerate USB device

Hi,
if you don’t know what to do, not likely…

It’s not about me not knowing what to do. I have read through this thread and cannot see anyone mentioning they have set this up on the same instance as thier home assistance device if using a pi. I wanted to double check as I wasn’t sure unless I tried it for myself. If it communicates via mqtt then having the mqtt broker (homeassistant) and this service on the same device is what I didn’t know would work? If anyone can confirm this then I will set it up.

Alright, i’ll just carry on talking to myself :slight_smile: finally got it working. If anyone else is wondering, those errors i was getting were because my usb to serial adapter was a piece of junk. I ordered a better quality one after reading about serial to USB adapters here : http://www.usconverters.com/index.php?main_page=page&id=62&chapter=0

2 Likes

I have set it up for my father , raspberry 3b with raspberry os and docker homeassistant , running both on 1 device working flawless, so i can confirm you can use one device

1 Like

That’s great. Thanks for your reply. I will give it a go on my raspberry pi with home assistant on.

1 Like

Has anyone experienced issues with their connection to /dev/ttyUSB0 for the first time after a reboot? docker logs show connection refused.

What solves this for me is connecting to the usb to serial device by running : screen /dev/ttyUSB0 9600, once i end this screen session mqtt starts receiving values from the inverter. I need to run this after every reboot.

Wondering if there’s a better way of fixing this?