evcc-io / evcc

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

Awattar: panic: runtime error: invalid memory address or nil pointer dereference #10960

Closed andig closed 10 months ago

andig commented 10 months ago

Hallo, ein Freund hatte gestern ein Update von EVCC gemacht, doch dieses mal startete danach EVCC nicht mehr.

pi@raspievcc2:~ $ evcc
[main  ] INFO 2023/11/30 05:58:59 evcc 0.122.1 (b9360a3a)
[main  ] INFO 2023/11/30 05:58:59 using config file: /etc/evcc.yaml
[main  ] INFO 2023/11/30 05:58:59 starting ui and api at :7070
[db    ] INFO 2023/11/30 05:59:01 using sqlite database: /home/pi/.
evcc/evcc.db
[lp-1  ] WARN 2023/11/30 05:59:05 Configuring soc.target at loadpoi
nt is deprecated and must be applied per vehicle
[lp-1  ] WARN 2023/11/30 05:59:05 vehicles option is deprecated
[lp-1  ] WARN 2023/11/30 05:59:05 locking phase config to 1p for sw
itchable charger
panic: runtime error: invalid memory address or nil pointer derefer
ence
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x1d45
38c]

goroutine 93 [running]:
[github.com/evcc-io/evcc/util.(*Monitor[...]).SetFunc(0x2c44668](http://github.com/evcc-io/evcc/util.(*Monitor%5B...%5D).SetFunc(0x2c44668), 0x5
757f64)
        [github.com/evcc-io/evcc/util/monitor.go:33](http://github.com/evcc-io/evcc/util/monitor.go:33) +0x24
[github.com/evcc-io/evcc/util.(*Monitor[...]).Set(..](http://github.com/evcc-io/evcc/util.(*Monitor%5B...%5D).Set(..).)
        [github.com/evcc-io/evcc/util/monitor.go:28](http://github.com/evcc-io/evcc/util/monitor.go:28)
[github.com/evcc-io/evcc/tariff.(*Awattar).run(0x50dda40](http://github.com/evcc-io/evcc/tariff.(*Awattar).run(0x50dda40), 0x5100e00)
        [github.com/evcc-io/evcc/tariff/awattar.go:85](http://github.com/evcc-io/evcc/tariff/awattar.go:85) +0x494
created by [github.com/evcc-io/evcc/tariff.NewAwattarFromConfig](http://github.com/evcc-io/evcc/tariff.NewAwattarFromConfig) in g
oroutine 1
        [github.com/evcc-io/evcc/tariff/awattar.go:49](http://github.com/evcc-io/evcc/tariff/awattar.go:49) +0x1f8
pi@raspievcc2:~ $

Ich hab dann den Tarifs Teil aus der Konfiguration auskommentiert, und siehe da, EVCC startet wieder.

#tariffs:
#  grid:
#    type: awattar
#    region: de # or at
#    charges: 0
#    tax: 0

Hat sich bei der Konfiguration von Awattar was geändert. Wie bekomme ich den dynamische Tarif wieder reinkonfiguriert?

Besten Dank Maergsche

Originally posted by @Maergsche in https://github.com/evcc-io/evcc/discussions/10958

andig commented 10 months ago

Closed in https://github.com/evcc-io/evcc/commit/f5347c6b2dedc08685d07ad89b41864683eda2ff