evcc-io / evcc

Sonne tanken ☀️🚘
https://evcc.io
MIT License
3.59k stars 662 forks source link

MQTT evcc/status is offline, even evcc updates other mqtt topics #9196

Closed jowi24 closed 1 year ago

jowi24 commented 1 year ago

Describe the bug

Steps to reproduce

  1. start evcc with mqtt configuration enabled
  2. network connection to internet is lost for some time

Configuration details

# open evcc at http://evcc.local:7070
network:
  schema: http
  host: evcc.local # .local suffix announces the hostname on MDNS
  port: 7070

mqtt:
  broker: openhab:1883
  topic: evcc

log: info
levels:
  cache: error
#  pulse: trace

# unique installation id
plant: xxx

interval: 10s # control cycle interval

sponsortoken: xxx
# sponsors can set telemetry: true to enable anonymous data aggregation
# see https://github.com/evcc-io/evcc/discussions/4554
# telemetry: false

meters:
  - name: netz
    type: template
    template: solaredge-inverter
    usage: grid
    modbus: tcpip
    id: 1
    host: 192.168.178.99
    port: 1502
  - name: solaredge
    type: template
    template: solaredge-inverter
    usage: pv
    modbus: tcpip
    id: 1
    host: 192.168.178.99
    port: 1502

modbusproxy:
  - port: 1502
    uri: 192.168.178.99:1502
    rtu: false

vehicles:
- name: ev1
  type: template
  template: id
  title: ID.3
  user: xxx
  password: xxx
  vin: xxx
  capacity: 58
  phases: 3
  icon: car
  cache: 15m
  minSoc: 0
  targetSoc: 80
  minCurrent: 6
  maxCurrent: 16

chargers:
- type: template
  template: heidelberg
  id: 1
  device: /dev/ttyUSB_WB
  baudrate: 19200
  comset: 8E1
  modbus: rs485serial
  name: wallbox1

loadpoints:
- title: Garage
  charger: wallbox1
  mode: pv
  phases: 3
  mincurrent: 6
  maxcurrent: 16
  resetOnDisconnect: true
  vehicle: ev1

tariffs:
  grid:
    type: tibber
    token: xxx
    homeid: xxx
  co2:
    type: grünstromindex
    zip: xxx
  feedin:
    # rate for feeding excess (pv) energy to the grid
    type: fixed
    price: 0.082 # [currency]/kWh

site:
  title: Mein Zuhause
  meters:
    grid: netz
    pv:
      - solaredge

messaging:
  events:
    start: # charge start event
      title: 🚗⚡ Charge of {{.vehicleTitle}} started
      msg: |
        Wallbox {{.title}} started charging {{.vehicleTitle}} in {{ toString .mode | upper }} mode.

#        --------------------------
#        evcc Status {{printf `(%d-%02d-%02d %02d:%02d:%02d)` now.Year now.Month now.Day now.Hour now.Minute now.Second}}
#        Netz-Leistung: {{round (divf .gridPower 1000) 3 }} kW
#        Solar-Leistung: {{round (divf .pvPower 1000) 3 }} kW
#        Eigenverbrauch: {{round (divf .homePower 1000) 3 }} kW
#        {{if .batteryConfigured}}Batteriespeicher-Status: {{round (divf .batteryPower 1000) 3 }} kW ({{.batterySoc }} %){{end}}
    stop: # charge stop event
      title: 🚗🔋 Charge of {{.vehicleTitle}} finished
      msg: |
        Wallbox {{.title}} finished charging {{.vehicleTitle}}
        with {{round (divf .chargedEnergy 1000) 2 }} kWh in {{.chargeDuration}}.

#        --------------------------
#        evcc Status {{printf `(%d-%02d-%02d %02d:%02d:%02d)` now.Year now.Month now.Day now.Hour now.Minute now.Second}}
#        Netz-Leistung: {{round (divf .gridPower 1000) 3 }} kW
#        Solar-Leistung: {{round (divf .pvPower 1000) 3 }} kW
#        Eigenverbrauch: {{round (divf .homePower 1000) 3 }} kW
#        {{if .batteryConfigured}}Batteriespeicher-Status: {{round (divf .batteryPower 1000) 3 }} kW ({{.batterySoc }} %){{end}}
    connect: # vehicle connect event
      title: "🚗 {{.vehicleTitle}} connected on wallbox {{.title}}"
      msg: |
        {{.vehicleTitle}} connected on wallbox {{.title}} at {{round (divf .pvPower 1000) 2 }} kW PV.

#        --------------------------
#        evcc Status {{printf `(%d-%02d-%02d %02d:%02d:%02d)` now.Year now.Month now.Day now.Hour now.Minute now.Second}}
#        Netz-Leistung: {{round (divf .gridPower 1000) 3 }} kW
#        Solar-Leistung: {{round (divf .pvPower 1000) 3 }} kW
#        Eigenverbrauch: {{round (divf .homePower 1000) 3 }} kW
#        {{if .batteryConfigured}}Batteriespeicher-Status: {{round (divf .batteryPower 1000) 3 }} kW ({{.batterySoc }} %){{end}}
    disconnect: # vehicle connected event
      title: "🚗 {{.vehicleTitle}} disconnected of wallbox {{.title}}"
      msg: |
        {{.vehicleTitle}} disconnected of wallbox {{.title}} after {{.connectedDuration}}.

#        --------------------------
#        evcc Status {{printf `(%d-%02d-%02d %02d:%02d:%02d)` now.Year now.Month now.Day now.Hour now.Minute now.Second}}
#        Netz-Leistung: {{round (divf .gridPower 1000) 3 }} kW
#        Solar-Leistung: {{round (divf .pvPower 1000) 3 }} kW
#        Eigenverbrauch: {{round (divf .homePower 1000) 3 }} kW
#        {{if .batteryConfigured}}Batteriespeicher-Status: {{round (divf .batteryPower 1000) 3 }} kW ({{.batterySoc }} %){{end}}
  services:
  - type: telegram
    token: xxx
    chats:
    - xxx

Log details

[site  ] ERROR 2023/08/01 05:17:52 tariff: outdated
[telegram] ERROR 2023/08/01 05:17:57 Post "https://api.telegram.org/bot***/getUpdates": dial tcp: lookup api.telegram.org on 127.0.0.11:53: server misbehaving
[telegram] ERROR 2023/08/01 05:17:57 Failed to get updates, retrying in 3 seconds...
[site  ] ERROR 2023/08/01 05:18:02 tariff: outdated
[telegram] ERROR 2023/08/01 05:18:08 Post "https://api.telegram.org/bot***/getUpdates": dial tcp: lookup api.telegram.org on 127.0.0.11:53: server misbehaving
[telegram] ERROR 2023/08/01 05:18:08 Failed to get updates, retrying in 3 seconds...
[site  ] ERROR 2023/08/01 05:18:12 tariff: outdated
[telegram] ERROR 2023/08/01 05:18:19 Post "https://api.telegram.org/bot***/getUpdates": dial tcp: lookup api.telegram.org on 127.0.0.11:53: server misbehaving
[telegram] ERROR 2023/08/01 05:18:19 Failed to get updates, retrying in 3 seconds...
[site  ] ERROR 2023/08/01 05:18:22 tariff: outdated
[telegram] ERROR 2023/08/01 05:18:30 Post "https://api.telegram.org/bot***/getUpdates": dial tcp: lookup api.telegram.org on 127.0.0.11:53: server misbehaving
[telegram] ERROR 2023/08/01 05:18:30 Failed to get updates, retrying in 3 seconds...
[site  ] ERROR 2023/08/01 05:18:32 tariff: outdated
[telegram] ERROR 2023/08/01 05:18:41 Post "https://api.telegram.org/bot***/getUpdates": dial tcp: lookup api.telegram.org on 127.0.0.11:53: server misbehaving
[telegram] ERROR 2023/08/01 05:18:41 Failed to get updates, retrying in 3 seconds...
[site  ] ERROR 2023/08/01 05:18:42 tariff: outdated
[site  ] ERROR 2023/08/01 05:18:52 tariff: outdated
[telegram] ERROR 2023/08/01 05:18:52 Post "https://api.telegram.org/bot***/getUpdates": dial tcp: lookup api.telegram.org on 127.0.0.11:53: server misbehaving
[telegram] ERROR 2023/08/01 05:18:52 Failed to get updates, retrying in 3 seconds...
[site  ] ERROR 2023/08/01 05:19:02 tariff: outdated
[telegram] ERROR 2023/08/01 05:19:03 Post "https://api.telegram.org/bot***/getUpdates": dial tcp: lookup api.telegram.org on 127.0.0.11:53: server misbehaving
[telegram] ERROR 2023/08/01 05:19:03 Failed to get updates, retrying in 3 seconds...
[site  ] ERROR 2023/08/01 05:19:12 tariff: outdated
[telegram] ERROR 2023/08/01 05:19:14 Post "https://api.telegram.org/bot***/getUpdates": dial tcp: lookup api.telegram.org on 127.0.0.11:53: server misbehaving
[telegram] ERROR 2023/08/01 05:19:14 Failed to get updates, retrying in 3 seconds...
[site  ] ERROR 2023/08/01 05:19:22 tariff: outdated
[telegram] ERROR 2023/08/01 05:19:25 Post "https://api.telegram.org/bot***/getUpdates": dial tcp: lookup api.telegram.org on 127.0.0.11:53: server misbehaving
[telegram] ERROR 2023/08/01 05:19:25 Failed to get updates, retrying in 3 seconds...
[site  ] ERROR 2023/08/01 05:19:32 tariff: outdated
[telegram] ERROR 2023/08/01 05:19:36 Post "https://api.telegram.org/bot***/getUpdates": dial tcp: lookup api.telegram.org on 127.0.0.11:53: server misbehaving
[telegram] ERROR 2023/08/01 05:19:36 Failed to get updates, retrying in 3 seconds...
[site  ] ERROR 2023/08/01 05:19:42 tariff: outdated
[telegram] ERROR 2023/08/01 05:19:47 Post "https://api.telegram.org/bot***/getUpdates": dial tcp: lookup api.telegram.org on 127.0.0.11:53: server misbehaving
[telegram] ERROR 2023/08/01 05:19:47 Failed to get updates, retrying in 3 seconds...
[site  ] ERROR 2023/08/01 05:19:52 tariff: outdated
[telegram] ERROR 2023/08/01 05:19:58 Post "https://api.telegram.org/bot***/getUpdates": dial tcp: lookup api.telegram.org on 127.0.0.11:53: server misbehaving
[telegram] ERROR 2023/08/01 05:19:58 Failed to get updates, retrying in 3 seconds...
[site  ] ERROR 2023/08/01 05:20:02 tariff: outdated
[telegram] ERROR 2023/08/01 05:20:09 Post "https://api.telegram.org/bot***/getUpdates": dial tcp: lookup api.telegram.org on 127.0.0.11:53: server misbehaving
[telegram] ERROR 2023/08/01 05:20:09 Failed to get updates, retrying in 3 seconds...
[site  ] ERROR 2023/08/01 05:20:12 tariff: outdated
[telegram] ERROR 2023/08/01 05:20:20 Post "https://api.telegram.org/bot***/getUpdates": dial tcp: lookup api.telegram.org on 127.0.0.11:53: server misbehaving
[telegram] ERROR 2023/08/01 05:20:20 Failed to get updates, retrying in 3 seconds...
[site  ] ERROR 2023/08/01 05:20:22 tariff: outdated
[tibber] ERROR 2023/08/01 05:20:23 Post "https://api.tibber.com/v1-beta/gql": dial tcp: lookup api.tibber.com: i/o timeout
[telegram] ERROR 2023/08/01 05:20:31 Post "https://api.telegram.org/bot***/getUpdates": dial tcp: lookup api.telegram.org on 127.0.0.11:53: server misbehaving
[telegram] ERROR 2023/08/01 05:20:31 Failed to get updates, retrying in 3 seconds...
[site  ] ERROR 2023/08/01 05:20:32 tariff: outdated
[site  ] ERROR 2023/08/01 05:20:42 tariff: outdated
[telegram] ERROR 2023/08/01 05:20:42 Post "https://api.telegram.org/bot***/getUpdates": dial tcp: lookup api.telegram.org on 127.0.0.11:53: server misbehaving
[telegram] ERROR 2023/08/01 05:20:42 Failed to get updates, retrying in 3 seconds...
[site  ] ERROR 2023/08/01 05:20:52 tariff: outdated
[telegram] ERROR 2023/08/01 05:20:53 Post "https://api.telegram.org/bot***/getUpdates": dial tcp: lookup api.telegram.org on 127.0.0.11:53: server misbehaving
[telegram] ERROR 2023/08/01 05:20:53 Failed to get updates, retrying in 3 seconds...
[site  ] ERROR 2023/08/01 05:21:02 tariff: outdated
[telegram] ERROR 2023/08/01 05:21:04 Post "https://api.telegram.org/bot***/getUpdates": dial tcp: lookup api.telegram.org on 127.0.0.11:53: server misbehaving
[telegram] ERROR 2023/08/01 05:21:04 Failed to get updates, retrying in 3 seconds...
[site  ] ERROR 2023/08/01 05:21:12 tariff: outdated
[telegram] ERROR 2023/08/01 05:21:15 Post "https://api.telegram.org/bot***/getUpdates": dial tcp: lookup api.telegram.org on 127.0.0.11:53: server misbehaving
[telegram] ERROR 2023/08/01 05:21:15 Failed to get updates, retrying in 3 seconds...
[site  ] ERROR 2023/08/01 05:21:22 tariff: outdated
[telegram] ERROR 2023/08/01 05:21:26 Post "https://api.telegram.org/bot***/getUpdates": dial tcp: lookup api.telegram.org on 127.0.0.11:53: server misbehaving
[telegram] ERROR 2023/08/01 05:21:26 Failed to get updates, retrying in 3 seconds...
[site  ] ERROR 2023/08/01 05:21:32 tariff: outdated
[telegram] ERROR 2023/08/01 05:21:37 Post "https://api.telegram.org/bot***/getUpdates": dial tcp: lookup api.telegram.org on 127.0.0.11:53: server misbehaving
[telegram] ERROR 2023/08/01 05:21:37 Failed to get updates, retrying in 3 seconds...
[site  ] ERROR 2023/08/01 05:21:42 tariff: outdated
[telegram] ERROR 2023/08/01 05:21:48 Post "https://api.telegram.org/bot***/getUpdates": dial tcp: lookup api.telegram.org on 127.0.0.11:53: server misbehaving
[telegram] ERROR 2023/08/01 05:21:48 Failed to get updates, retrying in 3 seconds...
[site  ] ERROR 2023/08/01 05:21:52 tariff: outdated
[telegram] ERROR 2023/08/01 05:21:59 Post "https://api.telegram.org/bot***/getUpdates": dial tcp: lookup api.telegram.org on 127.0.0.11:53: server misbehaving
[telegram] ERROR 2023/08/01 05:21:59 Failed to get updates, retrying in 3 seconds...
[site  ] ERROR 2023/08/01 05:22:02 tariff: outdated
[telegram] ERROR 2023/08/01 05:22:10 Post "https://api.telegram.org/bot***/getUpdates": dial tcp: lookup api.telegram.org on 127.0.0.11:53: server misbehaving
[telegram] ERROR 2023/08/01 05:22:10 Failed to get updates, retrying in 3 seconds...
[site  ] ERROR 2023/08/01 05:22:12 tariff: outdated
[gsi   ] ERROR 2023/08/01 05:22:13 Get "https://api.corrently.io/v2.0/gsi/prediction?zip=***": dial tcp: lookup api.corrently.io: i/o timeout
[telegram] ERROR 2023/08/01 05:22:21 Post "https://api.telegram.org/bot***/getUpdates": dial tcp: lookup api.telegram.org on 127.0.0.11:53: server misbehaving
[telegram] ERROR 2023/08/01 05:22:21 Failed to get updates, retrying in 3 seconds...
[site  ] ERROR 2023/08/01 05:22:22 tariff: outdated
[site  ] ERROR 2023/08/01 05:22:32 tariff: outdated
[telegram] ERROR 2023/08/01 05:22:32 Post "https://api.telegram.org/bot***/getUpdates": dial tcp: lookup api.telegram.org on 127.0.0.11:53: server misbehaving
[telegram] ERROR 2023/08/01 05:22:32 Failed to get updates, retrying in 3 seconds...
[site  ] ERROR 2023/08/01 05:22:42 tariff: outdated
[telegram] ERROR 2023/08/01 05:22:43 Post "https://api.telegram.org/bot***/getUpdates": dial tcp: lookup api.telegram.org on 127.0.0.11:53: server misbehaving
[telegram] ERROR 2023/08/01 05:22:43 Failed to get updates, retrying in 3 seconds...
[site  ] ERROR 2023/08/01 05:22:52 tariff: outdated
[telegram] ERROR 2023/08/01 05:22:54 Post "https://api.telegram.org/bot***/getUpdates": dial tcp: lookup api.telegram.org on 127.0.0.11:53: server misbehaving
[telegram] ERROR 2023/08/01 05:22:54 Failed to get updates, retrying in 3 seconds...
[site  ] ERROR 2023/08/01 05:23:02 tariff: outdated
[telegram] ERROR 2023/08/01 05:23:05 Post "https://api.telegram.org/bot***/getUpdates": dial tcp: lookup api.telegram.org on 127.0.0.11:53: server misbehaving
[telegram] ERROR 2023/08/01 05:23:05 Failed to get updates, retrying in 3 seconds...
[site  ] ERROR 2023/08/01 05:23:12 tariff: outdated
[telegram] ERROR 2023/08/01 05:23:16 Post "https://api.telegram.org/bot***/getUpdates": dial tcp: lookup api.telegram.org on 127.0.0.11:53: server misbehaving
[telegram] ERROR 2023/08/01 05:23:16 Failed to get updates, retrying in 3 seconds...
[site  ] ERROR 2023/08/01 05:23:22 tariff: outdated
[telegram] ERROR 2023/08/01 05:23:27 Post "https://api.telegram.org/bot***/getUpdates": dial tcp: lookup api.telegram.org on 127.0.0.11:53: server misbehaving
[telegram] ERROR 2023/08/01 05:23:27 Failed to get updates, retrying in 3 seconds...
[site  ] ERROR 2023/08/01 05:23:32 tariff: outdated
[telegram] ERROR 2023/08/01 05:23:38 Post "https://api.telegram.org/bot***/getUpdates": dial tcp: lookup api.telegram.org on 127.0.0.11:53: server misbehaving
[telegram] ERROR 2023/08/01 05:23:38 Failed to get updates, retrying in 3 seconds...
[site  ] ERROR 2023/08/01 05:23:42 tariff: outdated
[telegram] ERROR 2023/08/01 05:23:49 Post "https://api.telegram.org/bot***/getUpdates": dial tcp: lookup api.telegram.org on 127.0.0.11:53: server misbehaving
[telegram] ERROR 2023/08/01 05:23:49 Failed to get updates, retrying in 3 seconds...
[site  ] ERROR 2023/08/01 05:23:52 tariff: outdated
[site  ] ERROR 2023/08/01 05:24:02 tariff: outdated
[site  ] ERROR 2023/08/01 05:24:12 tariff: outdated
[site  ] ERROR 2023/08/01 05:24:22 tariff: outdated

What type of operating system are you running?

Linux

Version

0.118.10

andig commented 1 year ago

Bitte erstmal Fehler beheben- in Deinem Fall funktioniert DNS nicht. Verhalten damit undefiniert.

jowi24 commented 1 year ago

Hallo andig, ich habe den evcc container neugestartet, jetzt ist der mqtt status wieder "online". DNS funktioniert auf dem Host und im Container, zumindest funktioniert ein dig api.telegram.org problemlos.

jowi24 commented 1 year ago

@andig der DNS Fehler steht in keinem Zusammenhang mit dem geschilderten Problem, da die Verbindung zum MQTT etabliert ist, ist es irrelevant ob DNS nun funktioniert oder nicht.

tobox commented 1 year ago

Ich kann den Fehler bei mir bestätigen:

Ich nutze in Home Assistant "status = online" als availability topic und habe oft das Problem, dass EVCC in Home Assistant nicht funktioniert, obwohl EVCC selbst ganz normal läuft.

Der Fehler ist bei mir reproduzierbar, wenn ich den MQTT Server neu starte!

EVCC verbindet sich dann wieder mit dem MQTT server, setzt aber status NICHT auf ONLINE!

andig commented 1 year ago

@tobox wenn Dein System sich so verhält brauchen wir bitte- wie bei jedem anderen Fehler auch- das Logfile. "Bei mir auch" ist keine verwertbare Fehlermeldung :(. Wenn Du das hast bitte neue Fehlermeldung- hier war das mit anderen Themen überlagert.

tobox commented 1 year ago

Ich kann gerne morgen ein neues issue aufmachen...

Aber hier nochmal im Schnelldurchgang die Möglichkeit den Fehler zu reprodzieren:

Hier ein Logfile, falls das hilft:

root@evcc:/etc# /usr/bin/evcc 
[main  ] INFO 2023/08/14 23:10:56 evcc 0.118.11 (224c7d2d)
[main  ] INFO 2023/08/14 23:10:56 using config file: /etc/evcc.yaml
[main  ] INFO 2023/08/14 23:10:56 starting ui and api at :7070
[db    ] INFO 2023/08/14 23:10:56 using sqlite database: /root/.evcc/evcc.db
[mqtt  ] INFO 2023/08/14 23:10:56 connecting evcc-176797813 at tcp://mosquitto.fritz.box:1883
[mqtt  ] DEBUG 2023/08/14 23:10:56 tcp://mosquitto.fritz.box:1883 connected
[site  ] INFO 2023/08/14 23:10:56 site config:
[site  ] INFO 2023/08/14 23:10:56   meters:      grid ✓ pv ✗ battery ✗
[site  ] INFO 2023/08/14 23:10:56     grid:      power ✓ energy ✓ currents ✗
[lp-1  ] INFO 2023/08/14 23:10:56 loadpoint 1:
[lp-1  ] INFO 2023/08/14 23:10:56   mode:        off
[lp-1  ] INFO 2023/08/14 23:10:56   charger:     power ✗ energy ✗ currents ✗ phases ✗ wakeup ✗
[lp-1  ] INFO 2023/08/14 23:10:56   meters:      charge ✗
[lp-1  ] DEBUG 2023/08/14 23:10:56 phase timer inactive
[lp-1  ] DEBUG 2023/08/14 23:10:56 pv timer inactive
[lp-1  ] DEBUG 2023/08/14 23:10:56 guard timer inactive
[lp-1  ] ERROR 2023/08/14 23:10:56 charger: dial tcp 192.168.0.8:502: connect: network is unreachable
[site  ] DEBUG 2023/08/14 23:10:56 ----
[lp-1  ] DEBUG 2023/08/14 23:10:56 charge power: 0W
[site  ] ERROR 2023/08/14 23:10:56 grid meter: read failed: dial tcp: lookup rs485.fritz.box on [fd00::7642:7fff:fe40:b887]:53: no such host
[site  ] ERROR 2023/08/14 23:10:56 grid meter: read failed: dial tcp: lookup rs485.fritz.box on [fd00::7642:7fff:fe40:b887]:53: no such host

Hier wird jetzt der MQTT Server neu gestartet

[mqtt  ] ERROR 2023/08/14 23:11:01 tcp://mosquitto.fritz.box:1883 connection lost: EOF
[mqtt  ] DEBUG 2023/08/14 23:11:02 tcp://mosquitto.fritz.box:1883 connected
[mqtt  ] DEBUG 2023/08/14 23:11:02 tcp://mosquitto.fritz.box:1883 subscribe evcctest/loadpoints/1/vehicle/set
[mqtt  ] DEBUG 2023/08/14 23:11:02 tcp://mosquitto.fritz.box:1883 subscribe evcctest/loadpoints/1/minSoc/set
[mqtt  ] DEBUG 2023/08/14 23:11:02 tcp://mosquitto.fritz.box:1883 subscribe evcctest/loadpoints/1/targetSoc/set
[mqtt  ] DEBUG 2023/08/14 23:11:02 tcp://mosquitto.fritz.box:1883 subscribe evcctest/loadpoints/1/phases/set
[mqtt  ] DEBUG 2023/08/14 23:11:02 tcp://mosquitto.fritz.box:1883 subscribe evcctest/site/residualPower/set
[mqtt  ] DEBUG 2023/08/14 23:11:02 tcp://mosquitto.fritz.box:1883 subscribe evcctest/site/smartCostLimit/set
[mqtt  ] DEBUG 2023/08/14 23:11:02 tcp://mosquitto.fritz.box:1883 subscribe evcctest/loadpoints/1/disableThreshold/set
[mqtt  ] DEBUG 2023/08/14 23:11:02 tcp://mosquitto.fritz.box:1883 subscribe evcctest/site/bufferSoc/set
[mqtt  ] DEBUG 2023/08/14 23:11:02 tcp://mosquitto.fritz.box:1883 subscribe evcctest/loadpoints/1/mode/set
[mqtt  ] DEBUG 2023/08/14 23:11:02 tcp://mosquitto.fritz.box:1883 subscribe evcctest/loadpoints/1/enableThreshold/set
[mqtt  ] DEBUG 2023/08/14 23:11:02 tcp://mosquitto.fritz.box:1883 subscribe evcctest/loadpoints/1/targetTime/set
[mqtt  ] DEBUG 2023/08/14 23:11:02 tcp://mosquitto.fritz.box:1883 subscribe evcctest/loadpoints/1/minCurrent/set
[mqtt  ] DEBUG 2023/08/14 23:11:02 tcp://mosquitto.fritz.box:1883 subscribe evcctest/loadpoints/1/maxCurrent/set
[mqtt  ] DEBUG 2023/08/14 23:11:02 tcp://mosquitto.fritz.box:1883 subscribe evcctest/site/prioritySoc/set
[mqtt  ] DEBUG 2023/08/14 23:11:02 tcp://mosquitto.fritz.box:1883 subscribe evcctest/site/bufferStartSoc/set
[mqtt  ] DEBUG 2023/08/14 23:11:02 tcp://mosquitto.fritz.box:1883 subscribe evcctest/loadpoints/1/targetEnergy/set
tobox commented 1 year ago

In provider/mqtt/client.go wird folgendes gesetzt:

options.SetAutoReconnect(true)

Der status wird nur in Run in server/mqtt.go gesetzt, welches vermutlich nur einmal beim Starten in runRoot aus cmd/root.go aufgerufen wird.

Ich denke, das erklärt das Verhalten einigermaßen.

jowi24 commented 1 year ago

@tobox Danke für Deine Mühe, das Vorgehen ausführlich zu dokumentieren!

andig commented 1 year ago

V.a. zeigt das Logfile jetzt überhaupt das Mqtt Verhalten anstatt nur irrelevante Fehlermeldungen 😬

andig commented 1 year ago

Test wäre gut :)

tobox commented 1 year ago
evcc/status online

---> hier MQTT Server neu gestartet

evcc/status offline
evcc/status online

Sieht schon mal nicht ganz falsch aus!