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!

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

This is so simple and straightforward that it hurts, after hours and hours trying to make the above program talk to hassio.
Thank You

The catalin fork has been working well for me and has been great watching and changing the inverter settings without having to crawl under where the inverter lives.

Noticed that I can see how much solar is coming in, how much AC load is going out… but don’t see an entity that shows how much the inverter is charging my battery/supplying to my DC system.

It’s on a PIP1012LV-MS. Is DC output/charging something it measures? Or how much is from solar and how much is from the grid? I’d love that data.

*I see “battery_charge_current” but it shows 0 despite currently charging at 15amps or so according to my BMS.


pi@betty:~ $ sudo docker exec -it voltronic-mqtt bash -c '/opt/inverter-cli/bin/inverter_poller -d -1'
Wed Aug  3 01:27:56 2022 INVERTER: Debug set
Wed Aug  3 01:27:57 2022 DEBUG:  Current CRC: 49 C1
Wed Aug  3 01:27:57 2022 DEBUG:  Send buffer hex bytes:  ( 51 4d 4f 44 49 c1 0d )
Wed Aug  3 01:27:57 2022 DEBUG:  7 bytes written, 7 bytes sent, 0 bytes remaining
Wed Aug  3 01:27:57 2022 DEBUG:  8 bytes read, 8 total bytes:  28 4c 06 07 0d 00 00 00
Wed Aug  3 01:27:57 2022 DEBUG:  Found reply <cr> at byte: 5
Wed Aug  3 01:27:57 2022 DEBUG:  QMOD: 8 bytes read: (L
Wed Aug  3 01:27:57 2022 DEBUG:  QMOD query finished
Wed Aug  3 01:27:57 2022 DEBUG:  Current CRC: B7 A9
Wed Aug  3 01:27:57 2022 DEBUG:  Send buffer hex bytes:  ( 51 50 49 47 53 b7 a9 0d )
Wed Aug  3 01:27:57 2022 DEBUG:  8 bytes written, 8 bytes sent, 0 bytes remaining
Wed Aug  3 01:27:57 2022 DEBUG:  8 bytes read, 8 total bytes:  28 31 31 38 2e 30 20 36
Wed Aug  3 01:27:57 2022 DEBUG:  8 bytes read, 16 total bytes:  30 2e 30 20 31 31 38 2e
Wed Aug  3 01:27:57 2022 DEBUG:  8 bytes read, 24 total bytes:  30 20 36 30 2e 30 20 30
Wed Aug  3 01:27:57 2022 DEBUG:  8 bytes read, 32 total bytes:  30 30 30 20 30 30 30 30
Wed Aug  3 01:27:57 2022 DEBUG:  8 bytes read, 40 total bytes:  20 30 30 30 20 32 32 37
Wed Aug  3 01:27:57 2022 DEBUG:  8 bytes read, 48 total bytes:  20 31 33 2e 35 35 20 30
Wed Aug  3 01:27:57 2022 DEBUG:  8 bytes read, 56 total bytes:  30 30 20 30 39 35 20 30
Wed Aug  3 01:27:57 2022 DEBUG:  8 bytes read, 64 total bytes:  35 31 36 20 30 30 30 30
Wed Aug  3 01:27:57 2022 DEBUG:  8 bytes read, 72 total bytes:  20 30 33 31 2e 30 20 31
Wed Aug  3 01:27:58 2022 DEBUG:  8 bytes read, 80 total bytes:  33 2e 35 35 20 30 30 30
Wed Aug  3 01:27:58 2022 DEBUG:  8 bytes read, 88 total bytes:  30 30 20 31 30 30 31 30
Wed Aug  3 01:27:58 2022 DEBUG:  8 bytes read, 96 total bytes:  31 30 31 20 38 33 20 30
Wed Aug  3 01:27:58 2022 DEBUG:  8 bytes read, 104 total bytes:  35 20 30 30 30 30 30 20
Wed Aug  3 01:27:58 2022 DEBUG:  8 bytes read, 112 total bytes:  30 30 30 40 ab 0d 00 00
Wed Aug  3 01:27:58 2022 DEBUG:  Found reply <cr> at byte: 110
Wed Aug  3 01:27:58 2022 DEBUG:  QPIGS: 112 bytes read: (118.0 60.0 118.0 60.0 0000 0000 000 227 13.55 000 095 0516 0000 031.0 13.55 00000 10010101 83 05 00000 000
Wed Aug  3 01:27:58 2022 DEBUG:  QPIGS query finished
Wed Aug  3 01:27:58 2022 DEBUG:  Current CRC: F8 54
Wed Aug  3 01:27:58 2022 DEBUG:  Send buffer hex bytes:  ( 51 50 49 52 49 f8 54 0d )
Wed Aug  3 01:27:58 2022 DEBUG:  8 bytes written, 8 bytes sent, 0 bytes remaining
Wed Aug  3 01:27:58 2022 DEBUG:  8 bytes read, 8 total bytes:  28 31 32 30 2e 30 20 30
Wed Aug  3 01:27:58 2022 DEBUG:  8 bytes read, 16 total bytes:  38 2e 33 20 31 32 30 2e
Wed Aug  3 01:27:58 2022 DEBUG:  8 bytes read, 24 total bytes:  30 20 36 30 2e 30 20 30
Wed Aug  3 01:27:58 2022 DEBUG:  8 bytes read, 32 total bytes:  38 2e 33 20 31 30 30 30
Wed Aug  3 01:27:58 2022 DEBUG:  8 bytes read, 40 total bytes:  20 31 30 30 30 20 31 32
Wed Aug  3 01:27:58 2022 DEBUG:  8 bytes read, 48 total bytes:  2e 30 20 31 32 2e 38 20
Wed Aug  3 01:27:58 2022 DEBUG:  8 bytes read, 56 total bytes:  31 31 2e 39 20 31 34 2e
Wed Aug  3 01:27:58 2022 DEBUG:  8 bytes read, 64 total bytes:  36 20 31 34 2e 36 20 32
Wed Aug  3 01:27:58 2022 DEBUG:  8 bytes read, 72 total bytes:  20 32 30 20 30 36 30 20
Wed Aug  3 01:27:58 2022 DEBUG:  8 bytes read, 80 total bytes:  30 20 32 20 30 20 2d 20
Wed Aug  3 01:27:58 2022 DEBUG:  8 bytes read, 88 total bytes:  30 31 20 31 20 30 20 31
Wed Aug  3 01:27:58 2022 DEBUG:  8 bytes read, 96 total bytes:  34 2e 33 20 30 20 30 f4
Wed Aug  3 01:27:58 2022 DEBUG:  8 bytes read, 104 total bytes:  d9 0d 00 00 00 00 00 00
Wed Aug  3 01:27:58 2022 DEBUG:  Found reply <cr> at byte: 98
Wed Aug  3 01:27:58 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 0 - 01 1 0 14.3 0 0
Wed Aug  3 01:27:58 2022 DEBUG:  QPIRI query finished
Wed Aug  3 01:27:58 2022 DEBUG:  Current CRC: B4 DA
Wed Aug  3 01:27:58 2022 DEBUG:  Send buffer hex bytes:  ( 51 50 49 57 53 b4 da 0d )
Wed Aug  3 01:27:58 2022 DEBUG:  8 bytes written, 8 bytes sent, 0 bytes remaining
Wed Aug  3 01:27:58 2022 DEBUG:  8 bytes read, 8 total bytes:  28 30 30 30 30 30 30 30
Wed Aug  3 01:27:58 2022 DEBUG:  8 bytes read, 16 total bytes:  30 30 30 30 30 30 30 30
Wed Aug  3 01:27:58 2022 DEBUG:  8 bytes read, 24 total bytes:  30 30 30 30 30 30 30 30
Wed Aug  3 01:27:58 2022 DEBUG:  8 bytes read, 32 total bytes:  30 30 30 30 30 30 30 30
Wed Aug  3 01:27:58 2022 DEBUG:  8 bytes read, 40 total bytes:  30 eb e4 0d 00 00 00 00
Wed Aug  3 01:27:58 2022 DEBUG:  Found reply <cr> at byte: 36
Wed Aug  3 01:27:58 2022 DEBUG:  QPIWS: 40 bytes read: (00000000000000000000000000000000
Wed Aug  3 01:27:58 2022 DEBUG:  QPIWS query finished
Wed Aug  3 01:27:58 2022 DEBUG:  Start loop
INVERTER: ampfactor from config is 1.00
INVERTER: wattfactor from config is 1.00
{
  "Inverter_mode":3,
  "AC_grid_voltage":118.0,
  "AC_grid_frequency":60.0,
  "AC_out_voltage":118.0,
  "AC_out_frequency":60.0,
  "PV_in_voltage":31.0,
  "PV_in_current":0.0,
  "PV_in_watts":0.0,
  "SCC_voltage":13.5500,
  "Load_pct":0,
  "Load_watt":0,
  "Load_va":0,
  "Bus_voltage":227,
  "Heatsink_temperature":516,
  "Battery_capacity":95,
  "Battery_voltage":13.55,
  "Battery_charge_current":0,
  "Battery_discharge_current":0,
  "Load_status_on":1,
  "SCC_charge_on":0,
  "AC_charge_on":1,
  "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":0,
  "Battery_redischarge_voltage":14.3,
  "Warnings":"00000000000000000000000000000000"
}
Wed Aug  3 01:27:58 2022 INVERTER: All queries complete, exiting loop

Hi, I’m trying to install this directly in to Raspberry PI Home Assistant image (Home Assistant OS) but getting error related to read only when trying to start MQTT docker Any advice for continue from this? Do I need modify files?

How should I configure an inverter.conf if I need to use this container for two inverters?
Each unit connected to a separate port of Raspberry Pi.
Now my config is:

# Basic 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/hidraw0

# 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=120

# This allows you to modify the amperage in case the inverter is giving an incorrect
# 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 incorrect
# 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 will 
# need to run docker exec -it voltronic-mqtt bash -c '/opt/inverter-cli/bin/inverter_poller -d -1'
# or simply inverter_poller -d -1 to check for warnings or errors
# mentioned in https://github.com/ned-kelly/docker-voltronic-homeassistant/issues/5

# This allows you to modify the buffersize for the qpiri command
qpiri=108

# This allows you to modify the buffersize for the qpiws command
qpiws=45

# This allows you to modify the buffersize for the qmod command
qmod=5

# This allows you to modify the buffersize for the qpigs command
qpigs=110

I reinstalled your fork :slight_smile:
strangely, now PBDV27.3 works, any other value not. Probably because 27.3 was my previous and current setting.
Then I tried different values:
PBDV27.3
PBDV27.2
PBDV27.1
PBDV27
the reply for PBDV27V is:
Sat Sep 10 08:41:26 2022 INVERTER: Debug set
Sat Sep 10 08:41:27 2022 DEBUG: Current CRC: 48 3F
Sat Sep 10 08:41:27 2022 DEBUG: Send buffer hex bytes: ( 50 42 44 56 32 37 48 3f 0d )
Sat Sep 10 08:41:27 2022 DEBUG: 8 bytes written, 8 bytes sent, 1 bytes remaining
Sat Sep 10 08:41:27 2022 DEBUG: 1 bytes written, 9 bytes sent, 0 bytes remaining
Sat Sep 10 08:41:27 2022 DEBUG: 7 bytes read, 7 total bytes: 00 28 4e 41 4b 73 73 0d
Sat Sep 10 08:41:27 2022 DEBUG: Found reply at byte: 7
Sat Sep 10 08:41:27 2022 DEBUG: PBDV27: 7 bytes read: (NAK
Sat Sep 10 08:41:27 2022 DEBUG: PBDV27 query finished
Reply: NAK

I checked the hex bytes sent for all values:
50 42 44 56 32 37 2e 33 60 00 0d
50 42 44 56 32 37 2e 32 70 21 0d
50 42 44 56 32 37 2e 31 40 42 0d
50 42 44 56 32 37 48 3f 0d

which in ascii are:
PBDV27.3`
PBDV27.2p!
PBDV27.1@B
PBDV27H?

It’s correct? was expecting the same closing value.

It should work, but as I can see in your reply does not.
Am sorry but I do not have any ideas. I am just a guy to take all the ideas from others forks and combined in my fork… You could try to search in forks to see who did the this changes for sending commands in multiple messages and try to contact them.

In my case all voltronic config entities are present in HA (latest version) and in the log Viewer I can see that sensors are updated but they remain not updated:

With /opt/inverter-cli/bin/inverter_poller -d -1 I get the following:

I already changed settings in inverter.config like:
voltronic-conf

And I also applied:
voltronic-putty

Bought a cable connected:

Any tips to get the data into HA?

Well, well, after some tweaking with parameters I have this and MQTT messages are delivered but without values.

{
  "Inverter_mode":3,
  "AC_grid_voltage":242.0,
  "AC_grid_frequency":49.9,
  "AC_out_voltage":242.0,
  "AC_out_frequency":49.9,
  "PV_in_voltage":0.0,
  "PV_in_current":0.0,
  "PV_in_watts":0.0,
  "PV_in_watthour":0.0000,
  "SCC_voltage":0.0000,
  "Load_pct":0,
  "Load_watt":0,
  "Load_watthour":0.0000,
  "Load_va":0,
  "Bus_voltage":476,
  "Heatsink_temperature":472,
  "Battery_capacity":100,
  "Battery_voltage":28.02,
  "Battery_charge_current":0,
  "Battery_discharge_current":0,
  "Load_status_on":1,
  "SCC_charge_on":0,
  "AC_charge_on":1,
  "Battery_recharge_voltage":23.0,
  "Battery_under_voltage":20.8,
  "Battery_bulk_voltage":28.2,
  "Battery_float_voltage":28.0,
  "Max_grid_charge_current":30,
  "Max_charge_current":50,
  "Out_source_priority":0,
  "Charger_source_priority":0,
  "Battery_redischarge_voltage":27.0,
  "Warnings":"00000000000000000000000000000000"
}
Tue Sep 20 12:38:51 2022 INVERTER: All queries complete, exiting loop.
root@067dcd9785b2:/opt# 

Any tips?

Howdy all!

1st of all, BIG thanks to @ned-kelly for this project!

I have now the container up and running on my Pi4 and I’m getting the correct readings from the inverter ( Effekta AX-M 5000)

But I have few questions:
-Should the inverter entities be under a Device? atm I’m having them all indentified as sensors with no device or area entities
and also they are missing an unique id, so using them is kinda tricky and you can’t give names to entities or edit them.

At some point on my installation process I had one device under the MQTT integration, and it listed all the entities, with their names correctly visible.

I guess I got something wrong with my settings but I can’t figure out what could it be…

Anyone got an idea how to get all inverter entities under the inverter device ?
Any help is much appreciated!

entity

I have a similar problem that entities show up in HA and get updated but value is not updated in the message and it states "ignoring unchanged update ":


But where is the value in the message?

Queries completed:

# The following settings allow you to modify runtime buffers.
# N.B. These values may not be applicable to all inverter types, as such you will 
# need
Thu Sep 22 14:28:19 2022 INVERTER: Current CRC: B4 DA
Thu Sep 22 14:28:22 2022 INVERTER: QPIWS read timeout
Thu Sep 22 14:28:23 2022 INVERTER: QPIWS reply too short (8 bytes)
Thu Sep 22 14:28:28 2022 INVERTER: Current CRC: B7 A9
Thu Sep 22 14:28:31 2022 INVERTER: QPIGS read timeout
Thu Sep 22 14:28:32 2022 INVERTER: QPIGS reply too short (109 bytes)
Thu Sep 22 14:28:32 2022 INVERTER: Current CRC: F8 54
Thu Sep 22 14:28:35 2022 INVERTER: QPIRI read timeout
Thu Sep 22 14:28:35 2022 INVERTER: QPIRI reply too short (67 bytes)
Thu Sep 22 14:28:35 2022 INVERTER: Current CRC: B4 DA
Thu Sep 22 14:28:38 2022 INVERTER: QPIWS read timeout
Thu Sep 22 14:28:39 2022 INVERTER: QPIWS reply too short (15 bytes)
Thu Sep 22 14:28:45 2022 INVERTER: Current CRC: B7 A9
Thu Sep 22 14:28:46 2022 INVERTER: QPIGS reply size (110 bytes)
Thu Sep 22 14:28:46 2022 INVERTER: QPIGS: 110 bytes read: (240.0 49.9 240.0 49.9 0583 0405 020 476 27.98 000 100 0353 0000 000.0 00.00 00000 10011101 40 08 00000 100
Thu Sep 22 14:28:46 2022 INVERTER: QPIGS query finished
Thu Sep 22 14:28:46 2022 INVERTER: Current CRC: F8 54
Thu Sep 22 14:28:49 2022 INVERTER: QPIRI read timeout
Thu Sep 22 14:28:49 2022 INVERTER: QPIRI reply too short (59 bytes)
Thu Sep 22 14:28:50 2022 INVERTER: Current CRC: B4 DA
Thu Sep 22 14:28:53 2022 INVERTER: QPIWS read timeout
Thu Sep 22 14:28:53 2022 INVERTER: QPIWS reply too short (22 bytes)
Thu Sep 22 14:28:58 2022 INVERTER: Current CRC: F8 54
Thu Sep 22 14:29:01 2022 INVERTER: QPIRI read timeout
Thu Sep 22 14:29:01 2022 INVERTER: QPIRI reply too short (38 bytes)
Thu Sep 22 14:29:01 2022 INVERTER: Current CRC: B4 DA
Thu Sep 22 14:29:03 2022 INVERTER: QPIWS reply size (40 bytes)
Thu Sep 22 14:29:03 2022 INVERTER: QPIWS: incorrect start/stop bytes.  Buffer: 0000000000000000000002 33.3000  2432.8.50 1 0  01 1  27 0 0000 000.0 00.00 00000 10011101 40 08 00000 100
Thu Sep 22 14:29:08 2022 INVERTER: Current CRC: F8 54
Thu Sep 22 14:29:11 2022 INVERTER: QPIRI read timeout
Thu Sep 22 14:29:12 2022 INVERTER: QPIRI reply too short (96 bytes)
Thu Sep 22 14:29:12 2022 INVERTER: Current CRC: B4 DA
Thu Sep 22 14:29:12 2022 INVERTER: QPIWS reply size (40 bytes)
Thu Sep 22 14:29:12 2022 INVERTER: QPIWS: incorrect start/stop bytes.  Buffer: (23 13 23000302400 0 23 2.82   30 100  08 00000 100 28.2 28.0 2 30 50 1 0 0 - 01 1 0 27.0 0 0
Thu Sep 22 14:29:17 2022 INVERTER: Current CRC: F8 54
Thu Sep 22 14:29:19 2022 INVERTER: QPIRI reply size (97 bytes)
Thu Sep 22 14:29:19 2022 INVERTER: QPIRI: 97 bytes read: (230.0 13.0 230.0 50.0 13.0 3000 2400 24.0 23.0 20.8 28.2 28.0 2 30 50 1 0 0 - 01 1 0 27.0 0 0
Thu Sep 22 14:29:19 2022 INVERTER: QPIRI query finished
Thu Sep 22 14:29:19 2022 INVERTER: Current CRC: B4 DA
INVERTER: ampfactor from config is 1.00
INVERTER: wattfactor from config is 1.01
{
  "Inverter_mode":3,
  "AC_grid_voltage":240.0,
  "AC_grid_frequency":49.9,
  "AC_out_voltage":240.0,
  "AC_out_frequency":49.9,
  "PV_in_voltage":0.0,
  "PV_in_current":0.0,
  "PV_in_watts":0.0,
  "PV_in_watthour":0.0000,
  "SCC_voltage":0.0000,
  "Load_pct":20,
  "Load_watt":405,
  "Load_watthour":13.5000,
  "Load_va":583,
  "Bus_voltage":476,
  "Heatsink_temperature":353,
  "Battery_capacity":100,
  "Battery_voltage":27.98,
  "Battery_charge_current":0,
  "Battery_discharge_current":0,
  "Load_status_on":1,
  "SCC_charge_on":0,
  "AC_charge_on":1,
  "Battery_recharge_voltage":23.0,
  "Battery_under_voltage":20.8,
  "Battery_bulk_voltage":28.2,
  "Battery_float_voltage":28.0,
  "Max_grid_charge_current":30,
  "Max_charge_current":50,
  "Out_source_priority":0,
  "Charger_source_priority":0,
  "Battery_redischarge_voltage":27.0,
  "Warnings":""
}
Thu Sep 22 14:29:19 2022 INVERTER: All queries complete, exiting loop.
root@3e38c462e535:/opt# 

Any idea?

have you tried MQTT explorer?

it shows the values, if they are working ok.