evcc-io / evcc

Solar Charging ☀️🚘
https://evcc.io
MIT License
3.67k stars 688 forks source link

Wattpilot: crash since last Update to 0.119.5 #9806

Closed savus4 closed 1 year ago

savus4 commented 1 year ago

Describe the bug

Hallo zusammen,

erstmal danke für super Software! Funktioniert echt gut und ist auch noch schön anzuschauen!

Seit dem neusten Update auf die 0.119.5 funktioniert evcc mit meinem Wattpilot nicht mehr. Hat vermutlich etwas mit der Versionsänderung der wattpilot Library zu tun könnte ich mir vorstellen?

Downgrade auf die letzte Version lässt es erstmal wieder laufen. Danke fürs Anschauen bei Gelegenheit!

Steps to reproduce

  1. Update to version 0.119.5 from 0.119.4
  2. evcc will always crash now and restart

Configuration details

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

log: debug
levels:
  cache: error

# unique installation id
plant: *****

interval: 15s # control cycle interval

meters:
- type: template
  template: fronius-solarapi-v1
  usage: grid
  host: 192.168.53.121
  name: grid1
- type: template
  template: fronius-solarapi-v1
  usage: pv
  host: 192.168.53.121
  name: pv2
- type: template
  template: fronius-solarapi-v1
  usage: battery
  host: 192.168.53.121
  name: battery3

chargers:
- type: template
  template: fronius-wattpilot
  host: 192.168.53.23
  password: *****
  name: wallbox5

vehicles:
- type: template
  template: renault
  title: Twingo
  user: *****
  password: *****
  vin: *****
  capacity: 22
  phases: 3
  icon: car
  cache: 15m
  mode: off
  minSoc: 20
  targetSoc: 85
  minCurrent: 8
  maxCurrent: 16
  name: ev4

loadpoints:
- title: Garage
  charger: wallbox5
  vehicle: ev4
  mode: off
  phases: 0
  mincurrent: 6
  maxcurrent: 16
  resetOnDisconnect: false
  enable:
    delay: 5m
  disable:
    delay: 4m
  guardduration: 7m

tariffs:
  grid:
    # either
    type: tibber
    token: *****
  feedin:
    type: fixed
    price: 0.0703

site:
  title: Zuhause
  meters:
    grid: grid1
    pv:
    - pv2
    battery:
    - battery3
  residualPower: 100

messaging:
  events:
    start:
      title: Ladevorgang von ${vehicleTitle} gestartet
      msg: Wallbox ${title} hat angefangen ${vehicleTitle} im ${mode} Modus zu laden.
    stop: # charge stop event
      title: Ladevorgang von ${vehicleTitle} gestoppt
      msg: Wallbox ${title} hat ${vehicleTitle} fertig geladen mit ${chargedEnergy}kWh in ${chargeDuration}
    connect: # vehicle connect event
      title: ${vehicleTitle} verbunden mit Wallbox ${title}
      msg: ${vehicleTitle} verbunden mit Wallbox ${title} mit ${pvPower} kW PV.
    disconnect: # vehicle connected event
      title: ${vehicleTitle} getrennt von Wallbox ${title}
      msg: ${vehicleTitle} wurde von der Wallbox ${title} nach ${connectedDuration} getrennt.

  services:
    - type: pushover
      app: *****
      recipients: *****
        - *****

sponsortoken: *****

Log details

evcc -l debug charger
[main  ] INFO 2023/09/09 11:00:02 evcc 0.119.5
[main  ] INFO 2023/09/09 11:00:02 using config file: /etc/evcc.yaml
[db    ] INFO 2023/09/09 11:00:02 using sqlite database: /home/riepl/.evcc/evcc.db
panic: interface conversion: interface {} is nil, not string

goroutine 1 [running]:
github.com/mabunixda/wattpilot.(*Wattpilot).GetRFID(...)
    github.com/mabunixda/wattpilot@v1.6.0/wattpilot.go:712
github.com/evcc-io/evcc/charger.(*Wattpilot).Identify(0x2a1cbe0?)
    github.com/evcc-io/evcc/charger/fronius-wattpilot.go:135 +0x80
github.com/evcc-io/evcc/cmd.(*dumper).Dump(0x4000a82990?, {0x40000ec000?, 0x8?}, {0x1f65040, 0x40000ea5d8})
    github.com/evcc-io/evcc/cmd/dumper.go:205 +0xe8c
github.com/evcc-io/evcc/cmd.(*dumper).DumpWithHeader(0x4000f31b78, {0x40000ec000?, 0x2129f35?}, {0x1f65040?, 0x40000ea5d8?})
    github.com/evcc-io/evcc/cmd/dumper.go:29 +0x6c
github.com/evcc-io/evcc/cmd.runCharger(0x40004d3100?, {0x4000a60b20, 0x0, 0x2})
    github.com/evcc-io/evcc/cmd/charger.go:133 +0x9a4
github.com/spf13/cobra.(*Command).execute(0x47748a0, {0x4000a60b00, 0x2, 0x2})
    github.com/spf13/cobra@v1.7.0/command.go:944 +0x640
github.com/spf13/cobra.(*Command).ExecuteC(0x47759e0)
    github.com/spf13/cobra@v1.7.0/command.go:1068 +0x320
github.com/spf13/cobra.(*Command).Execute(...)
    github.com/spf13/cobra@v1.7.0/command.go:992
github.com/evcc-io/evcc/cmd.Execute()
    github.com/evcc-io/evcc/cmd/root.go:110 +0x24
main.main()
    github.com/evcc-io/evcc/main.go:45 +0x38

######################################
This is how a normal start looks like:

Sep 09 11:19:00 riepls-pi systemd[1]: evcc.service: Scheduled restart job, restart counter is at 29.
Sep 09 11:19:00 riepls-pi systemd[1]: Stopped evcc.
Sep 09 11:19:00 riepls-pi systemd[1]: evcc.service: Consumed 4.586s CPU time.
Sep 09 11:19:00 riepls-pi systemd[1]: Started evcc.
Sep 09 11:19:01 riepls-pi evcc[4530]: [main  ] INFO 2023/09/09 11:19:01 evcc 0.119.5
Sep 09 11:19:01 riepls-pi evcc[4530]: [main  ] INFO 2023/09/09 11:19:01 using config file: /etc/evcc.yaml
Sep 09 11:19:01 riepls-pi evcc[4530]: [main  ] INFO 2023/09/09 11:19:01 starting ui and api at :7070
Sep 09 11:19:01 riepls-pi evcc[4530]: [db    ] INFO 2023/09/09 11:19:01 using sqlite database: /var/lib/evcc/evcc.db
Sep 09 11:19:07 riepls-pi evcc[4530]: [site  ] INFO 2023/09/09 11:19:07 site config:
Sep 09 11:19:07 riepls-pi evcc[4530]: [site  ] INFO 2023/09/09 11:19:07   meters:      grid ✓ pv ✓ battery ✓
Sep 09 11:19:07 riepls-pi evcc[4530]: [site  ] INFO 2023/09/09 11:19:07     grid:      power ✓ energy ✗ currents ✗
Sep 09 11:19:07 riepls-pi evcc[4530]: [site  ] INFO 2023/09/09 11:19:07     pv 1:      power ✓ energy ✗ currents ✗
Sep 09 11:19:07 riepls-pi evcc[4530]: [site  ] INFO 2023/09/09 11:19:07     battery 1: power ✓ energy ✗ currents ✗ soc ✓ capacity ✗
Sep 09 11:19:07 riepls-pi evcc[4530]: [site  ] INFO 2023/09/09 11:19:07     battery 1: power ✓ energy ✗ currents ✗ soc ✓ capacity ✗
Sep 09 11:19:07 riepls-pi evcc[4530]: [site  ] INFO 2023/09/09 11:19:07   vehicles:
Sep 09 11:19:07 riepls-pi evcc[4530]: [site  ] INFO 2023/09/09 11:19:07     vehicle 1: range ✓ finish ✓ status ✓ climate ✓ wakeup ✓
Sep 09 11:19:07 riepls-pi evcc[4530]: [lp-1  ] INFO 2023/09/09 11:19:07 loadpoint 1:
Sep 09 11:19:07 riepls-pi evcc[4530]: [lp-1  ] INFO 2023/09/09 11:19:07   mode:        off
Sep 09 11:19:07 riepls-pi evcc[4530]: [lp-1  ] INFO 2023/09/09 11:19:07   charger:     power ✓ energy ✗ currents ✓ phases ✓ wakeup ✗
Sep 09 11:19:07 riepls-pi evcc[4530]: [lp-1  ] INFO 2023/09/09 11:19:07   meters:      charge ✓
Sep 09 11:19:07 riepls-pi evcc[4530]: [lp-1  ] INFO 2023/09/09 11:19:07     charge:    power ✓ energy ✗ currents ✓
Sep 09 11:19:07 riepls-pi evcc[4530]: [lp-1  ] DEBUG 2023/09/09 11:19:07 phase timer inactive
Sep 09 11:19:07 riepls-pi evcc[4530]: [lp-1  ] DEBUG 2023/09/09 11:19:07 pv timer inactive
Sep 09 11:19:07 riepls-pi evcc[4530]: [lp-1  ] DEBUG 2023/09/09 11:19:07 guard timer inactive
Sep 09 11:19:07 riepls-pi evcc[4530]: [lp-1  ] INFO 2023/09/09 11:19:07 vehicle updated: unknown -> Twingo
Sep 09 11:19:07 riepls-pi evcc[4530]: [lp-1  ] DEBUG 2023/09/09 11:19:07 set charge mode: off
Sep 09 11:19:07 riepls-pi evcc[4530]: [lp-1  ] DEBUG 2023/09/09 11:19:07 set min current: 8
Sep 09 11:19:07 riepls-pi evcc[4530]: [lp-1  ] DEBUG 2023/09/09 11:19:07 set target soc: 85
Sep 09 11:19:07 riepls-pi evcc[4530]: [lp-1  ] DEBUG 2023/09/09 11:19:07 set max current: 16
Sep 09 11:19:07 riepls-pi evcc[4530]: [site  ] WARN 2023/09/09 11:19:07 interval <30s can lead to unexpected behavior, see https://docs.evcc.io/docs/reference/configuration/interval
Sep 09 11:19:07 riepls-pi evcc[4530]: [site  ] DEBUG 2023/09/09 11:19:07 ----
Sep 09 11:19:07 riepls-pi evcc[4530]: [lp-1  ] DEBUG 2023/09/09 11:19:07 charge power: 0W
Sep 09 11:19:07 riepls-pi evcc[4530]: [site  ] DEBUG 2023/09/09 11:19:07 pv power: 4746W
Sep 09 11:19:07 riepls-pi evcc[4530]: [site  ] DEBUG 2023/09/09 11:19:07 battery soc: 62%
Sep 09 11:19:07 riepls-pi evcc[4530]: [site  ] DEBUG 2023/09/09 11:19:07 battery power: -2107W
Sep 09 11:19:07 riepls-pi evcc[4530]: [site  ] DEBUG 2023/09/09 11:19:07 grid power: 29W
Sep 09 11:19:07 riepls-pi evcc[4530]: [site  ] DEBUG 2023/09/09 11:19:07 site power: -1978W
Sep 09 11:19:08 riepls-pi evcc[4530]: [lp-1  ] DEBUG 2023/09/09 11:19:08 vehicle odometer: 17281km
Sep 09 11:19:08 riepls-pi evcc[4530]: [lp-1  ] DEBUG 2023/09/09 11:19:08 charge currents: [0 0 0]A
Sep 09 11:19:08 riepls-pi evcc[4530]: [lp-1  ] DEBUG 2023/09/09 11:19:08 charger status: B
Sep 09 11:19:08 riepls-pi evcc[4530]: [lp-1  ] INFO 2023/09/09 11:19:08 car connected
Sep 09 11:19:08 riepls-pi evcc[4530]: [lp-1  ] DEBUG 2023/09/09 11:19:08 pv timer elapse
Sep 09 11:19:08 riepls-pi evcc[4530]: [lp-1  ] DEBUG 2023/09/09 11:19:08 pv timer inactive
Sep 09 11:19:08 riepls-pi evcc[4530]: [lp-1  ] DEBUG 2023/09/09 11:19:08 charger: guard elapse
Sep 09 11:19:08 riepls-pi evcc[4530]: [lp-1  ] DEBUG 2023/09/09 11:19:08 guard timer inactive
Sep 09 11:19:08 riepls-pi evcc[4530]: panic: interface conversion: interface {} is nil, not string
Sep 09 11:19:08 riepls-pi evcc[4530]: goroutine 437 [running]:
Sep 09 11:19:08 riepls-pi evcc[4530]: github.com/mabunixda/wattpilot.(*Wattpilot).GetRFID(...)
Sep 09 11:19:08 riepls-pi evcc[4530]:         github.com/mabunixda/wattpilot@v1.6.0/wattpilot.go:712
Sep 09 11:19:08 riepls-pi evcc[4530]: github.com/evcc-io/evcc/charger.(*Wattpilot).Identify(0x4000740ba0?)
Sep 09 11:19:08 riepls-pi evcc[4530]:         github.com/evcc-io/evcc/charger/fronius-wattpilot.go:135 +0x80
Sep 09 11:19:08 riepls-pi evcc[4530]: github.com/evcc-io/evcc/core.(*Loadpoint).createSession(0x40008d0000)
Sep 09 11:19:08 riepls-pi evcc[4530]:         github.com/evcc-io/evcc/core/loadpoint_session.go:40 +0xe4
Sep 09 11:19:08 riepls-pi evcc[4530]: github.com/evcc-io/evcc/core.(*Loadpoint).evVehicleConnectHandler(0x40008d0000)
Sep 09 11:19:08 riepls-pi evcc[4530]:         github.com/evcc-io/evcc/core/loadpoint.go:470 +0x204
Sep 09 11:19:08 riepls-pi evcc[4530]: reflect.Value.call({0x1bef780?, 0x4000e51cc0?, 0x4000ae3f70?}, {0x211aab0, 0x4}, {0x47e33c0, 0x0, 0x0?})
Sep 09 11:19:08 riepls-pi evcc[4530]:         reflect/value.go:596 +0x994
Sep 09 11:19:08 riepls-pi evcc[4530]: reflect.Value.Call({0x1bef780?, 0x4000e51cc0?, 0x0?}, {0x47e33c0?, 0x10?, 0x4000ae3f70?})
Sep 09 11:19:08 riepls-pi evcc[4530]:         reflect/value.go:380 +0x94
Sep 09 11:19:08 riepls-pi evcc[4530]: github.com/asaskevich/EventBus.(*EventBus).doPublish(0x1ceda80?, 0x40013e0c90, {0x21271f3?, 0x4000e51cd0?}, {0x0?, 0x1a4ace8?, 0x4000bad968?})
Sep 09 11:19:08 riepls-pi evcc[4530]:         github.com/asaskevich/EventBus@v0.0.0-20200907212545-49d423059eef/event_bus.go:160 +0x60
Sep 09 11:19:08 riepls-pi evcc[4530]: github.com/asaskevich/EventBus.(*EventBus).Publish(0x4000af0ea0, {0x21271f3, 0x

What type of operating system are you running?

Linux (Raspberry Pi OS)

Version

evcc version 0.119.5

StefanSchoof commented 1 year ago

Siehe auch https://github.com/evcc-io/evcc/discussions/9779

savus4 commented 1 year ago

@StefanSchoof Ah sorry, hab nicht weit genug nach unten in den Discussions geschaut.

Dann hier zu machen am besten?

StefanSchoof commented 1 year ago

Da es ein bestätigen Problem ist, ist es denke in Ordnung dafür ein Issue zu haben. Macht es leichter andern die drauf stoßen den Report zu finden

andig commented 1 year ago

/cc @mabunixda

mabunixda commented 1 year ago

PR ist im Teststadium bei mir lokal, morgen oder Montag kommt der PR zum mergen

neujbit commented 1 year ago

Bei mir crasht evcc auch mit dem Wattpiloten

Pixinger commented 1 year ago

Eine kleine Erweiterung zum Issue. Seit dem Update auf 0.119.5 kann ich EVCC auch nicht mehr starten. Ich vermute das Problem wird ähnlich sein, hat allerdings eine etwas andere Fehlermeldung. Bin mir nicht sicher ob dafür ein eigenes Ticket erstellt werden sollte. Vielleicht hilft die Information ja weiter.

Using config file: /config/evcc.yaml
starting evcc: 'EVCC_DATABASE_DSN=/data/evcc.db evcc --config /config/evcc.yaml'
[main  ] INFO 2023/09/09 19:53:37 evcc 0.119.5
[main  ] INFO 2023/09/09 19:53:37 using config file: /config/evcc.yaml
[main  ] INFO 2023/09/09 19:53:37 starting ui and api at :7070
[lp-1  ] WARN 2023/09/09 19:53:40 locking phase config to 1p for switchable charger
[site  ] INFO 2023/09/09 19:53:40 site config:
[site  ] INFO 2023/09/09 19:53:40   meters:      grid ✓ pv ✓ battery ✓
[site  ] INFO 2023/09/09 19:53:40     grid:      power ✓ energy ✗ currents ✗
[site  ] INFO 2023/09/09 19:53:40     pv 1:      power ✓ energy ✗ currents ✗
[site  ] INFO 2023/09/09 19:53:40     battery 1: power ✓ energy ✗ currents ✗ soc ✓ capacity ✗
[site  ] INFO 2023/09/09 19:53:40   vehicles:
[site  ] INFO 2023/09/09 19:53:40     vehicle 1: range ✗ finish ✗ status ✗ climate ✗ wakeup ✗
[lp-1  ] INFO 2023/09/09 19:53:40 loadpoint 1:
[lp-1  ] INFO 2023/09/09 19:53:40   mode:        off
[lp-1  ] INFO 2023/09/09 19:53:40   charger:     power ✓ energy ✗ currents ✓ phases ✓ wakeup ✗
[lp-1  ] INFO 2023/09/09 19:53:40   meters:      charge ✓
[lp-1  ] INFO 2023/09/09 19:53:40     charge:    power ✓ energy ✗ currents ✓
[lp-1  ] INFO 2023/09/09 19:53:40 vehicle updated: unknown -> CAR-XYZ
[lp-1  ] INFO 2023/09/09 19:53:40 car connected
panic: interface conversion: interface {} is float64, not string
goroutine 418 [running]:
github.com/mabunixda/wattpilot.(*Wattpilot).GetRFID(...)
    github.com/mabunixda/wattpilot@v1.6.0/wattpilot.go:712
github.com/evcc-io/evcc/charger.(*Wattpilot).Identify(0x400091a440?)
    github.com/evcc-io/evcc/charger/fronius-wattpilot.go:135 +0x80
github.com/evcc-io/evcc/core.(*Loadpoint).createSession(0x4000884c00)
    github.com/evcc-io/evcc/core/loadpoint_session.go:40 +0xe4
github.com/evcc-io/evcc/core.(*Loadpoint).evVehicleConnectHandler(0x4000884c00)
    github.com/evcc-io/evcc/core/loadpoint.go:470 +0x204
reflect.Value.call({0x1bef7a0?, 0x4000fd78c0?, 0x4001099910?}, {0x211aaf0, 0x4}, {0x47e3460, 0x0, 0x0?})
    reflect/value.go:596 +0x994
reflect.Value.Call({0x1bef7a0?, 0x4000fd78c0?, 0x0?}, {0x47e3460?, 0x10?, 0x4001099910?})
    reflect/value.go:380 +0x94
github.com/asaskevich/EventBus.(*EventBus).doPublish(0x1cedaa0?, 0x40011051d0, {0x212722f?, 0x4000fd78d0?}, {0x0?, 0x1a4b708?, 0x4000da9968?})
    github.com/asaskevich/EventBus@v0.0.0-20200907212545-49d423059eef/event_bus.go:160 +0x60
github.com/asaskevich/EventBus.(*EventBus).Publish(0x400078b740, {0x212722f, 0x7}, {0x0, 0x0, 0x0})
    github.com/asaskevich/EventBus@v0.0.0-20200907212545-49d423059eef/event_bus.go:144 +0x5ac
github.com/evcc-io/evcc/core.(*Loadpoint).updateChargerStatus(0x4000884c00)
    github.com/evcc-io/evcc/core/loadpoint.go:886 +0x44c
github.com/evcc-io/evcc/core.(*Loadpoint).Update(0x4000884c00, 0x3ff0000000000000?, 0x0, 0x0?, 0x0?, 0x3ff0000000000000, 0x4000bd9b80, 0x0)
    github.com/evcc-io/evcc/core/loadpoint.go:1498 +0x1b0
github.com/evcc-io/evcc/core.(*Site).update(0x4000eda800, {0x2b5af18?, 0x4000884c00})
    github.com/evcc-io/evcc/core/site.go:755 +0x400
github.com/evcc-io/evcc/core.(*Site).Run(0x4000eda800, 0x4000e991a0, 0x6fc23ac00)
    github.com/evcc-io/evcc/core/site.go:850 +0x1a4
github.com/evcc-io/evcc/cmd.runRoot.func4()
    github.com/evcc-io/evcc/cmd/root.go:282 +0x2c
created by github.com/evcc-io/evcc/cmd.runRoot in goroutine 1
    github.com/evcc-io/evcc/cmd/root.go:281 +0x16ac

Installiert als Homeassistant Addon (https://github.com/evcc-io/hassio-addon) auf einem Raspi.

andig commented 1 year ago

Depends on https://github.com/mabunixda/wattpilot/issues/23

Xerenas commented 4 months ago

Ich habe aktuell aus das Problem: charge rater: connection is not valid, charge currents: connection is not valid und charge power: connection is not valid. Habe zwei Wattpiloten im Einsatz. Gibt es hierfür schon eine Lösung?

maijo366 commented 4 months ago

Ich habe aktuell aus das Problem: charge rater: connection is not valid, charge currents: connection is not valid und charge power: connection is not valid. Habe zwei Wattpiloten im Einsatz. Gibt es hierfür schon eine Lösung?

Leider auch immer wieder das selbe Problem. Alles upgedatet /EVCC - Wattpilot. Problem tritt jede Minute auf. Nach Neustart ist kurz der Fehler wieder weg.

andig commented 4 months ago

Das Problem hier ist seit fast einem Jahr behoben.