Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SOC per MQTT wird nicht zuverlässig aktualisiert #18629

Open
2 tasks done
ThomasWetzel opened this issue Feb 6, 2025 · 3 comments
Open
2 tasks done

SOC per MQTT wird nicht zuverlässig aktualisiert #18629

ThomasWetzel opened this issue Feb 6, 2025 · 3 comments

Comments

@ThomasWetzel
Copy link

ThomasWetzel commented Feb 6, 2025

Unser Kia Niro erhält seinen SOC über ein MQTT Topic. (evcc/niro/soc)
Der SOC wird auch erkannt und im Log festgehalten:

[sma ] TRACE 2025/02/06 15:22:02 recv 10.2.201.120: [proto.GroupPacketEntry, proto.SmaNet2PacketEntry]
[sma ] TRACE 2025/02/06 15:22:03 recv 10.2.201.120: [proto.GroupPacketEntry, proto.SmaNet2PacketEntry]
[sma ] TRACE 2025/02/06 15:22:04 recv 10.2.201.120: [proto.GroupPacketEntry, proto.SmaNet2PacketEntry]
[mqtt ] TRACE 2025/02/06 15:22:04 recv evcc/niro/soc: '36'
[mqtt ] TRACE 2025/02/06 15:22:04 recv evcc/superb/soc: '31'
[mqtt ] TRACE 2025/02/06 15:22:04 recv evcc/niro/range: '110'
[mqtt ] TRACE 2025/02/06 15:22:04 recv evcc/superb/range: '10'
[sma ] TRACE 2025/02/06 15:22:05 recv 10.2.201.120: [proto.GroupPacketEntry, proto.SmaNet2PacketEntry]
[sma ] TRACE 2025/02/06 15:22:06 recv 10.2.201.120: [proto.GroupPacketEntry, proto.SmaNet2PacketEntry]
[sma ] TRACE 2025/02/06 15:22:07 recv 10.2.201.120: [proto.GroupPacketEntry, proto.SmaNet2PacketEntry]
[sma ] TRACE 2025/02/06 15:22:08 recv 10.2.201.120: [proto.GroupPacketEntry, proto.SmaNet2PacketEntry]

Allerdings werden die 36% nicht gespeichert:

Image

Die 110 km Restreichweite werden allerdings empfangen und gespeichert.

Kann bitte jemand überprüfen, warum der SOC nicht zuverlässig gespeichert wird?

Ich kann gerne auch unterstützen.
Vielen Dank!

Steps to reproduce

  1. mir fällt kein Weg ein, das zu reproduzieren, außer das UPDATE-Statement in der Datenbank auszuwerten. Das wird aber leider nicht mitgetract.

Nach einem Neustart wird der SOC wieder korrekt angezeigt.

Configuration details

network:
  schema: http
  host: evcc.local
  port: 7070

log: trace
levels:
  cache: error

plant: e43e450bdc53f143da1713333cafc101b94e2d9c0caf32f6f7e72fb57ff0bcb2

interval: 30s

meters:
  - type: template
    template: sma-home-manager
    usage: grid
    host: 10.2.201.120
    name: sunny

  - name: solar-se-pv
    type: template
    template: sma-hybrid
    usage: pv
    modbus: tcpip
    id: 3
    host: 10.2.201.106
    port: 502

  - name: solar-se-battery
    type: template
    template: sma-hybrid
    usage: battery
    modbus: tcpip
    id: 3
    host: 10.2.201.106
    port: 502

  - name: solar-tripower
    type: template
    template: sma-inverter-modbus
    usage: pv
    modbus: tcpip
    id: 3
    host: 10.2.201.6
    port: 502

loadpoints:
  - title: Kia
    charger: openwb-2
    vehicle: kia
    mode: pv

  - title: Superb
    charger: openwb-1
    vehicle: superb
    mode: pv

vehicles:
  - name: kia
    type: custom
    capacity: 64
    soc:
      source: mqtt
      topic: evcc/niro/soc
    range:
      source: mqtt
      topic: evcc/niro/range

  - name: superb
    type: custom
    capacity: 25
    soc:
      source: mqtt
      topic: evcc/superb/soc
    range:
      source: mqtt
      topic: evcc/superb/range

chargers:
  - name: openwb-2
    type: template
    template: openwb-2.0
    host: 10.2.201.11
    connector: 2
    modbus: tcpip
    id: 1
    port: 1502

  - name: openwb-1
    type: template
    template: openwb-2.0
    host: 10.2.201.11
    connector: 1
    modbus: tcpip
    id: 1
    port: 1502

site:
  title: Zu Hause
  meters:
    grid: sunny
    pv:
      - solar-se-pv
      - solar-tripower
    battery:
      - solar-se-battery

mqtt:
  broker: 192.168.2.218:1883
  topic: evcc
  clientid: evcc
  user: homeassistant
  password: password

tariffs:
  grid:
    type: template
    template: tibber
    token: token

Log details

[sma   ] TRACE 2025/02/06 15:22:00 recv 10.2.201.120: [proto.GroupPacketEntry, proto.SmaNet2PacketEntry]
[sma   ] TRACE 2025/02/06 15:22:01 recv 10.2.201.120: [proto.GroupPacketEntry, proto.SmaNet2PacketEntry]
[sma   ] TRACE 2025/02/06 15:22:02 recv 10.2.201.120: [proto.GroupPacketEntry, proto.SmaNet2PacketEntry]
[sma   ] TRACE 2025/02/06 15:22:03 recv 10.2.201.120: [proto.GroupPacketEntry, proto.SmaNet2PacketEntry]
[sma   ] TRACE 2025/02/06 15:22:04 recv 10.2.201.120: [proto.GroupPacketEntry, proto.SmaNet2PacketEntry]
[mqtt  ] TRACE 2025/02/06 15:22:04 recv evcc/niro/soc: '36'
[mqtt  ] TRACE 2025/02/06 15:22:04 recv evcc/superb/soc: '31'
[mqtt  ] TRACE 2025/02/06 15:22:04 recv evcc/niro/range: '110'
[mqtt  ] TRACE 2025/02/06 15:22:04 recv evcc/superb/range: '10'
[sma   ] TRACE 2025/02/06 15:22:05 recv 10.2.201.120: [proto.GroupPacketEntry, proto.SmaNet2PacketEntry]
[sma   ] TRACE 2025/02/06 15:22:06 recv 10.2.201.120: [proto.GroupPacketEntry, proto.SmaNet2PacketEntry]
[sma   ] TRACE 2025/02/06 15:22:07 recv 10.2.201.120: [proto.GroupPacketEntry, proto.SmaNet2PacketEntry]
[sma   ] TRACE 2025/02/06 15:22:08 recv 10.2.201.120: [proto.GroupPacketEntry, proto.SmaNet2PacketEntry]
[sma   ] TRACE 2025/02/06 15:22:09 recv 10.2.201.120: [proto.GroupPacketEntry, proto.SmaNet2PacketEntry]
[sma   ] TRACE 2025/02/06 15:22:10 recv 10.2.201.120: [proto.GroupPacketEntry, proto.SmaNet2PacketEntry]
[sma   ] TRACE 2025/02/06 15:22:10 recv 10.2.201.120: [proto.GroupPacketEntry, proto.SmaNet2PacketEntry]
[sma   ] TRACE 2025/02/06 15:22:11 recv 10.2.201.120: [proto.GroupPacketEntry, proto.SmaNet2PacketEntry]
[sma   ] TRACE 2025/02/06 15:22:12 recv 10.2.201.120: [proto.GroupPacketEntry, proto.SmaNet2PacketEntry]
[site  ] DEBUG 2025/02/06 15:22:12 ----
[openwb-2.0] TRACE 2025/02/06 15:22:12 modbus: send 44 4a 00 00 00 06 01 04 27 d8 00 02
[openwb-2.0] TRACE 2025/02/06 15:22:12 modbus: recv 44 4a 00 00 00 07 01 04 04 00 00 00 00
[lp-1  ] DEBUG 2025/02/06 15:22:12 charge power: 0W
[openwb-2.0] TRACE 2025/02/06 15:22:12 modbus: send 44 4b 00 00 00 06 01 04 27 df 00 03
[openwb-2.0] TRACE 2025/02/06 15:22:12 modbus: recv 44 4b 00 00 00 09 01 04 06 00 00 00 00 00 00
[openwb-2.0] TRACE 2025/02/06 15:22:12 modbus: send 44 4c 00 00 00 06 01 04 27 74 00 02
[lp-1  ] DEBUG 2025/02/06 15:22:12 charge currents: [0 0 0]A
[openwb-2.0] TRACE 2025/02/06 15:22:12 modbus: recv 44 4c 00 00 00 07 01 04 04 00 00 00 00
[lp-2  ] DEBUG 2025/02/06 15:22:12 charge power: 0W
[openwb-2.0] TRACE 2025/02/06 15:22:12 modbus: send 44 4d 00 00 00 06 01 04 27 7b 00 03
[openwb-2.0] TRACE 2025/02/06 15:22:12 modbus: recv 44 4d 00 00 00 09 01 04 06 00 00 00 00 00 00
[lp-2  ] DEBUG 2025/02/06 15:22:12 charge currents: [0 0 0]A
[site  ] DEBUG 2025/02/06 15:22:12 grid power: 7W
[site  ] DEBUG 2025/02/06 15:22:12 grid powers: [77 61 -131]W
[site  ] DEBUG 2025/02/06 15:22:12 grid currents: [1.18 1.23 -1.11]A
[solar-tripower] TRACE 2025/02/06 15:22:12 modbus: send 43 73 00 00 00 06 03 04 78 37 00 02
[solar-tripower] TRACE 2025/02/06 15:22:12 modbus: recv 43 73 00 00 00 07 03 04 04 00 00 03 5e
[site  ] DEBUG 2025/02/06 15:22:12 pv 2 power: 862W
[solar-tripower] TRACE 2025/02/06 15:22:12 modbus: send 43 74 00 00 00 06 03 03 77 31 00 04
[solar-tripower] TRACE 2025/02/06 15:22:12 modbus: recv 43 74 00 00 00 0b 03 03 08 00 00 00 00 01 0b 86 30
[solar-se-battery] TRACE 2025/02/06 15:22:12 modbus: send ec 10 00 00 00 06 03 04 7a a3 00 02
[solar-se-battery] TRACE 2025/02/06 15:22:12 modbus: recv ec 10 00 00 00 07 03 04 04 00 00 00 00
[solar-se-battery] TRACE 2025/02/06 15:22:12 modbus: send ec 11 00 00 00 06 03 04 7a a1 00 02
[solar-se-battery] TRACE 2025/02/06 15:22:13 modbus: recv ec 11 00 00 00 07 03 04 04 00 00 02 09
[site  ] DEBUG 2025/02/06 15:22:13 battery 1 power: -521W
[solar-se-pv] TRACE 2025/02/06 15:22:13 modbus: send ec 12 00 00 00 06 03 03 78 35 00 02
[solar-se-pv] TRACE 2025/02/06 15:22:13 modbus: recv ec 12 00 00 00 07 03 03 04 00 00 00 b9
[solar-se-pv] TRACE 2025/02/06 15:22:13 modbus: send ec 13 00 00 00 06 03 03 78 f1 00 02
[solar-se-pv] TRACE 2025/02/06 15:22:13 modbus: recv ec 13 00 00 00 07 03 03 04 00 00 01 c8
[site  ] DEBUG 2025/02/06 15:22:13 pv 1 power: 641W
[solar-se-battery] TRACE 2025/02/06 15:22:13 modbus: send ec 14 00 00 00 06 03 03 7a a9 00 04
[solar-se-battery] TRACE 2025/02/06 15:22:13 modbus: recv ec 14 00 00 00 0b 03 03 08 00 00 00 00 00 34 c7 3f
[solar-se-battery] TRACE 2025/02/06 15:22:13 modbus: send ec 15 00 00 00 06 03 03 78 7d 00 02
[solar-se-battery] TRACE 2025/02/06 15:22:13 modbus: recv ec 15 00 00 00 07 03 03 04 00 00 00 0b
[site  ] DEBUG 2025/02/06 15:22:13 battery 1 soc: 11%
[solar-se-pv] TRACE 2025/02/06 15:22:13 modbus: send ec 16 00 00 00 06 03 03 77 31 00 04
[solar-se-pv] TRACE 2025/02/06 15:22:13 modbus: recv ec 16 00 00 00 0b 03 03 08 00 00 00 00 00 a7 3b b8
[site  ] DEBUG 2025/02/06 15:22:13 pv power: 1503W
[site  ] DEBUG 2025/02/06 15:22:13 site power: -514W
[openwb-2.0] TRACE 2025/02/06 15:22:13 modbus: send 44 4e 00 00 00 06 01 04 27 76 00 02
[openwb-2.0] TRACE 2025/02/06 15:22:13 modbus: recv 44 4e 00 00 00 07 01 04 04 00 48 3e 6f
[lp-2  ] DEBUG 2025/02/06 15:22:13 charge total import: 4734.575kWh
[openwb-2.0] TRACE 2025/02/06 15:22:13 modbus: send 44 4f 00 00 00 06 01 04 27 83 00 01
[openwb-2.0] TRACE 2025/02/06 15:22:13 modbus: recv 44 4f 00 00 00 05 01 04 02 00 00
[openwb-2.0] TRACE 2025/02/06 15:22:13 modbus: send 44 50 00 00 00 06 01 04 27 82 00 01
[openwb-2.0] TRACE 2025/02/06 15:22:13 modbus: recv 44 50 00 00 00 05 01 04 02 00 00
[lp-2  ] DEBUG 2025/02/06 15:22:13 charger status: A
[openwb-2.0] TRACE 2025/02/06 15:22:13 modbus: send 44 51 00 00 00 06 01 04 27 83 00 01
[openwb-2.0] TRACE 2025/02/06 15:22:13 modbus: recv 44 51 00 00 00 05 01 04 02 00 00
[openwb-2.0] TRACE 2025/02/06 15:22:13 modbus: send 44 52 00 00 00 06 01 04 27 82 00 01
[openwb-2.0] TRACE 2025/02/06 15:22:13 modbus: recv 44 52 00 00 00 05 01 04 02 00 00
[lp-2  ] DEBUG 2025/02/06 15:22:13 plan: charge 1h15m29s between 2025-02-07 04:00:00 +0100 CET until 2025-02-07 07:30:00 +0100 CET (power: 11040W, avg cost: 0.276)
[lp-2  ] TRACE 2025/02/06 15:22:13   slot from: 2025-02-07 04:00:00 +0100 CET to 2025-02-07 05:00:00 +0100 CET cost 0.276
[lp-2  ] TRACE 2025/02/06 15:22:13   slot from: 2025-02-07 05:00:00 +0100 CET to 2025-02-07 05:15:29 +0100 CET cost 0.277
[sma   ] TRACE 2025/02/06 15:22:13 recv 10.2.201.120: [proto.GroupPacketEntry, proto.SmaNet2PacketEntry]
[sma   ] TRACE 2025/02/06 15:22:14 recv 10.2.201.120: [proto.GroupPacketEntry, proto.SmaNet2PacketEntry]
[sma   ] TRACE 2025/02/06 15:22:15 recv 10.2.201.120: [proto.GroupPacketEntry, proto.SmaNet2PacketEntry]
[sma   ] TRACE 2025/02/06 15:22:16 recv 10.2.201.120: [proto.GroupPacketEntry, proto.SmaNet2PacketEntry]
[sma   ] TRACE 2025/02/06 15:22:17 recv 10.2.201.120: [proto.GroupPacketEntry, proto.SmaNet2PacketEntry]
[sma   ] TRACE 2025/02/06 15:22:18 recv 10.2.201.120: [proto.GroupPacketEntry, proto.SmaNet2PacketEntry]
[sma   ] TRACE 2025/02/06 15:22:19 recv 10.2.201.120: [proto.GroupPacketEntry, proto.SmaNet2PacketEntry]
[sma   ] TRACE 2025/02/06 15:22:20 recv 10.2.201.120: [proto.GroupPacketEntry, proto.SmaNet2PacketEntry]
[sma   ] TRACE 2025/02/06 15:22:21 recv 10.2.201.120: [proto.GroupPacketEntry, proto.SmaNet2PacketEntry]
[sma   ] TRACE 2025/02/06 15:22:22 recv 10.2.201.120: [proto.GroupPacketEntry, proto.SmaNet2PacketEntry]
[sma   ] TRACE 2025/02/06 15:22:23 recv 10.2.201.120: [proto.GroupPacketEntry, proto.SmaNet2PacketEntry]
[sma   ] TRACE 2025/02/06 15:22:24 recv 10.2.201.120: [proto.GroupPacketEntry, proto.SmaNet2PacketEntry]
[sma   ] TRACE 2025/02/06 15:22:25 recv 10.2.201.120: [proto.GroupPacketEntry, proto.SmaNet2PacketEntry]
[sma   ] TRACE 2025/02/06 15:22:26 recv 10.2.201.120: [proto.GroupPacketEntry, proto.SmaNet2PacketEntry]

What type of operating system or environment does evcc run on?

Linux

External automation

  • I have made sure that no external automation like HomeAssistant or Node-RED is active or accessing any of the mentioned devices when this issue occurs.

Nightly build

  • I have verified that the issue is reproducible with the latest nightly build

Version

v0.133.0

@StefanSchoof
Copy link
Contributor

Kann es sein, dass du den poll.mode entsprechend deiner Erwartung konfiguriert hast? https://docs.evcc.io/docs/reference/configuration/loadpoints#poll

@ThomasWetzel
Copy link
Author

Die Daten werden initial von einer HomeAssistant-Integration von Kia abgeholt und dann über eine zeitgesteuerte NodeRed-Automation jede Minute an das Topic aktualisiert.

Diese Daten kommen ja auch an. Das habe ich sowohl mit einem MQTT-Listener überprüft als auch wird der Wert von evcc erkannt, wie im Trace zu sehen ist.

Ein pull.mode kommt hier gar nicht imho vor. Die Reichweite, die 1:1 genauso konfiguriert ist, wird richtig gelesen und auch aktualisiert. Daher können wir den pull.mode - denke ich - ausschließen.

Das Verhalten ist leider auch nicht reproduzierbar, da durch einen Neustart die Werte wieder richtig aktualisiert werden.

Wäre es denkbar, die Datenbank-Kommandos zu tracen? Dann müssten wir, was in der Datenbank ankommt.

@mfuchs1984
Copy link
Contributor

Hast du eine längeres Logfile, das die Entwicklung zeigt?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants