evcc-io / evcc

Sonne tanken β˜€οΈπŸš˜
https://evcc.io
MIT License
3.18k stars 572 forks source link

Price limits appear twice in list #13673

Closed Ben-Leys closed 4 months ago

Ben-Leys commented 4 months ago

Describe the bug

When setting temporary fast charging while in PV mode: after selecting a value, and then opening the list again, sometimes (not for each value) the selected value appears twice in the list. I currently have it for values 2, 5, 6, 9, 12 and 14 ct. See screenshot for example of 9 ct appearing twice in the list. Maybe this issue has something to do with one of the future prices being negative(which often happens these days). Because I can't reproduce it anymore since the exact moment the negative prices were in the past. image

Steps to reproduce

  1. Select temporary fast charging while in PV mode when there are negative prices in the future
  2. Select a price limit
  3. Open the price limit list again

Configuration details

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

log: debug
levels:
  cache: error

# unique installation id
plant: d8b3d8c41cbc94ba287207421e91016f9b808f27e464d1e832d6e3c9fa41af66

interval: 30s # control cycle interval

database:
  type: sqlite
  dsn: /volume1/scripts/evcc/evcc.db

meters:
- type: template
  template: sma-inverter-speedwire
  usage: pv
  host: 192.168.0.228
  password: 
  name: pv1

chargers:
- type: template
  template: pulsarplus
  timeout: 2m
  name: wallbox2

loadpoints:
- title: Garage
  charger: wallbox2
  vehicle: tesla
  mode: off

tariffs:
  currency: EUR
  grid:
    type: entsoe
    domain: BZN|BE
    securitytoken: 
    charges: 0.06779
    tax: 0.06
  feedin:
    type: entsoe
    domain: BZN|BE
    securitytoken: 
    charges: -0.0004
    tax: -0.02

vehicles:
- name: tesla
  type: template
  template: tesla
  title: Tesla S
  accessToken: 
  refreshToken: 
  vin: 
  capacity: 100

site:
  title: Thuis
  meters:
    pv:
    - pv1

Log details

[main  ] INFO 2024/05/01 15:59:49 evcc 0.125.0 (090b0a70)
[main  ] INFO 2024/05/01 15:59:49 using config file: /etc/evcc.yaml
[main  ] INFO 2024/05/01 15:59:49 starting ui and api at :7070
[db    ] INFO 2024/05/01 15:59:49 using sqlite database: /volume1/scripts/evcc/evcc.db
[ocpp-1] DEBUG 2024/05/01 15:59:50 waiting for chargepoint: 5m0s
[ocpp  ] INFO 2024/05/01 16:01:17 charge point connected, registering: 243792
[site  ] INFO 2024/05/01 16:01:29 site config:
[site  ] INFO 2024/05/01 16:01:29   meters:      grid βœ— pv βœ“ battery βœ—
[site  ] INFO 2024/05/01 16:01:29     pv 1:      power βœ“ energy βœ“ currents βœ“
[site  ] INFO 2024/05/01 16:01:29   vehicles:
[site  ] INFO 2024/05/01 16:01:29     vehicle 1: range βœ“ finish βœ“ status βœ“ climate βœ— wakeup βœ“
[lp-1  ] INFO 2024/05/01 16:01:29 loadpoint 1:
[lp-1  ] INFO 2024/05/01 16:01:29   mode:        off
[lp-1  ] INFO 2024/05/01 16:01:29   charger:     power βœ— energy βœ“ currents βœ— phases βœ— wakeup βœ—
[lp-1  ] INFO 2024/05/01 16:01:29   meters:      charge βœ—
[lp-1  ] DEBUG 2024/05/01 16:01:29 set smart cost limit: 0.13999999999999999
[lp-1  ] DEBUG 2024/05/01 16:01:29 phase timer inactive
[lp-1  ] DEBUG 2024/05/01 16:01:29 pv timer inactive
[site  ] WARN 2024/05/01 16:01:29 interval <30s can lead to unexpected behavior, see https://do                                                                              cs.evcc.io/docs/reference/configuration/interval
[site  ] DEBUG 2024/05/01 16:01:29 ----
[lp-1  ] DEBUG 2024/05/01 16:01:29 charge power: 0W
[site  ] DEBUG 2024/05/01 16:01:29 pv power: 3734W
[site  ] DEBUG 2024/05/01 16:01:29 site power: -3734W
[lp-1  ] DEBUG 2024/05/01 16:01:29 charger status: A
[lp-1  ] INFO 2024/05/01 16:01:29 car disconnected
[lp-1  ] DEBUG 2024/05/01 16:01:29 set charge mode: off
[lp-1  ] DEBUG 2024/05/01 16:01:29 set session soc limit: 0
[lp-1  ] DEBUG 2024/05/01 16:01:29 set session energy limit: 0
[site  ] DEBUG 2024/05/01 16:01:29 ----
[lp-1  ] DEBUG 2024/05/01 16:01:29 charge power: 0W
[site  ] DEBUG 2024/05/01 16:01:29 pv power: 3734W
[site  ] DEBUG 2024/05/01 16:01:29 site power: -3734W
[lp-1  ] DEBUG 2024/05/01 16:01:29 charger status: A
[site  ] DEBUG 2024/05/01 16:01:44 ----
[lp-1  ] DEBUG 2024/05/01 16:01:44 charge power: 0W
[site  ] DEBUG 2024/05/01 16:01:44 pv power: 3676W
[site  ] DEBUG 2024/05/01 16:01:44 site power: -3676W
[lp-1  ] DEBUG 2024/05/01 16:01:44 charger status: A
[main  ] INFO 2024/05/01 16:14:34 evcc 0.125.0 (090b0a70)
[main  ] INFO 2024/05/01 16:14:34 using config file: /etc/evcc.yaml
[main  ] INFO 2024/05/01 16:14:34 starting ui and api at :7070
[db    ] INFO 2024/05/01 16:14:34 using sqlite database: /volume1/scripts/evcc/evcc.db
[ocpp-1] DEBUG 2024/05/01 16:14:35 waiting for chargepoint: 5m0s
[ocpp  ] INFO 2024/05/01 16:14:40 charge point connected, registering: 243792
[site  ] INFO 2024/05/01 16:14:44 site config:
[site  ] INFO 2024/05/01 16:14:44   meters:      grid βœ— pv βœ“ battery βœ—
[site  ] INFO 2024/05/01 16:14:44     pv 1:      power βœ“ energy βœ“ currents βœ“
[site  ] INFO 2024/05/01 16:14:44   vehicles:
[site  ] INFO 2024/05/01 16:14:44     vehicle 1: range βœ“ finish βœ“ status βœ“ climate βœ— wakeup βœ“
[lp-1  ] INFO 2024/05/01 16:14:44 loadpoint 1:
[lp-1  ] INFO 2024/05/01 16:14:44   mode:        off
[lp-1  ] INFO 2024/05/01 16:14:44   charger:     power βœ— energy βœ“ currents βœ— phases βœ— wakeup βœ—
[lp-1  ] INFO 2024/05/01 16:14:44   meters:      charge βœ—
[lp-1  ] DEBUG 2024/05/01 16:14:44 set smart cost limit: 0.13999999999999999
[lp-1  ] DEBUG 2024/05/01 16:14:44 phase timer inactive
[lp-1  ] DEBUG 2024/05/01 16:14:44 pv timer inactive
[site  ] WARN 2024/05/01 16:14:45 interval <30s can lead to unexpected behavior, see https://do                                                                              cs.evcc.io/docs/reference/configuration/interval
[site  ] DEBUG 2024/05/01 16:14:45 ----
[lp-1  ] DEBUG 2024/05/01 16:14:45 charge power: 0W
[site  ] DEBUG 2024/05/01 16:14:45 pv power: 4297W
[site  ] DEBUG 2024/05/01 16:14:45 site power: -4297W
[lp-1  ] DEBUG 2024/05/01 16:14:45 charger status: A
[lp-1  ] INFO 2024/05/01 16:14:45 car disconnected
[lp-1  ] DEBUG 2024/05/01 16:14:45 set session soc limit: 0
[lp-1  ] DEBUG 2024/05/01 16:14:45 set session energy limit: 0
[site  ] DEBUG 2024/05/01 16:15:00 ----
[lp-1  ] DEBUG 2024/05/01 16:15:00 charge power: 0W
[site  ] DEBUG 2024/05/01 16:15:00 pv power: 4300W
[site  ] DEBUG 2024/05/01 16:15:00 site power: -4300W
[lp-1  ] DEBUG 2024/05/01 16:15:00 charger status: A
[site  ] DEBUG 2024/05/01 16:15:15 ----
[lp-1  ] DEBUG 2024/05/01 16:15:15 charge power: 0W
[site  ] DEBUG 2024/05/01 16:15:15 pv power: 4278W
[site  ] DEBUG 2024/05/01 16:15:15 site power: -4278W
[lp-1  ] DEBUG 2024/05/01 16:15:15 charger status: A
[site  ] DEBUG 2024/05/01 16:15:30 ----
[lp-1  ] DEBUG 2024/05/01 16:15:30 charge power: 0W
[site  ] DEBUG 2024/05/01 16:15:30 pv power: 4353W
[site  ] DEBUG 2024/05/01 16:15:30 site power: -4353W
[lp-1  ] DEBUG 2024/05/01 16:15:30 charger status: A
[lp-1  ] DEBUG 2024/05/01 16:15:41 set smart cost limit: 0.09
[lp-1  ] DEBUG 2024/05/01 16:15:43 set smart cost limit: 0.08
[lp-1  ] DEBUG 2024/05/01 16:15:45 set smart cost limit: 0.07
[site  ] DEBUG 2024/05/01 16:15:45 ----
[lp-1  ] DEBUG 2024/05/01 16:15:45 charge power: 0W
[site  ] DEBUG 2024/05/01 16:15:45 pv power: 4376W
[site  ] DEBUG 2024/05/01 16:15:45 site power: -4376W
[lp-1  ] DEBUG 2024/05/01 16:15:45 charger status: A
[lp-1  ] DEBUG 2024/05/01 16:15:46 set smart cost limit: 0.06
[lp-1  ] DEBUG 2024/05/01 16:15:48 set smart cost limit: 0.05
[lp-1  ] DEBUG 2024/05/01 16:15:49 set smart cost limit: 0.04
[lp-1  ] DEBUG 2024/05/01 16:15:50 set smart cost limit: 0.03
[lp-1  ] DEBUG 2024/05/01 16:15:52 set smart cost limit: 0.02
[lp-1  ] DEBUG 2024/05/01 16:15:53 set smart cost limit: 0.01
[site  ] DEBUG 2024/05/01 16:16:00 ----
[lp-1  ] DEBUG 2024/05/01 16:16:00 charge power: 0W
[site  ] DEBUG 2024/05/01 16:16:00 pv power: 4399W
[site  ] DEBUG 2024/05/01 16:16:00 site power: -4399W
[lp-1  ] DEBUG 2024/05/01 16:16:00 charger status: A
[lp-1  ] DEBUG 2024/05/01 16:16:03 set smart cost limit: 0.09
[lp-1  ] DEBUG 2024/05/01 16:16:05 set smart cost limit: 0.1
[lp-1  ] DEBUG 2024/05/01 16:16:06 set smart cost limit: 0.11
[lp-1  ] DEBUG 2024/05/01 16:16:08 set smart cost limit: 0.12
[lp-1  ] DEBUG 2024/05/01 16:16:10 set smart cost limit: 0.13
[lp-1  ] DEBUG 2024/05/01 16:16:12 set smart cost limit: 0.09
[lp-1  ] DEBUG 2024/05/01 16:16:14 set smart cost limit: 0.08
[site  ] DEBUG 2024/05/01 16:16:15 ----
[lp-1  ] DEBUG 2024/05/01 16:16:15 charge power: 0W
[site  ] DEBUG 2024/05/01 16:16:15 pv power: 4365W
[site  ] DEBUG 2024/05/01 16:16:15 site power: -4365W
[lp-1  ] DEBUG 2024/05/01 16:16:15 charger status: A
[lp-1  ] DEBUG 2024/05/01 16:16:15 set smart cost limit: 0.07
[lp-1  ] DEBUG 2024/05/01 16:16:17 set smart cost limit: 0.06
[lp-1  ] DEBUG 2024/05/01 16:16:19 set smart cost limit: 0.05
[lp-1  ] DEBUG 2024/05/01 16:16:20 set smart cost limit: 0.04
[lp-1  ] DEBUG 2024/05/01 16:16:21 set smart cost limit: 0.03
[lp-1  ] DEBUG 2024/05/01 16:16:23 set smart cost limit: 0.02
[lp-1  ] DEBUG 2024/05/01 16:16:24 set smart cost limit: 0.01
[lp-1  ] DEBUG 2024/05/01 16:16:26 set smart cost limit: 0
[lp-1  ] DEBUG 2024/05/01 16:16:27 set smart cost limit: 0.05
[site  ] DEBUG 2024/05/01 16:16:30 ----
[lp-1  ] DEBUG 2024/05/01 16:16:30 charge power: 0W
[site  ] DEBUG 2024/05/01 16:16:30 pv power: 4363W
[site  ] DEBUG 2024/05/01 16:16:30 site power: -4363W
[lp-1  ] DEBUG 2024/05/01 16:16:30 charger status: A
[lp-1  ] DEBUG 2024/05/01 16:16:31 set smart cost limit: 0.06
[lp-1  ] DEBUG 2024/05/01 16:16:33 set smart cost limit: 0.07
[lp-1  ] DEBUG 2024/05/01 16:16:34 set smart cost limit: 0.08
[lp-1  ] DEBUG 2024/05/01 16:16:36 set smart cost limit: 0.09
[lp-1  ] DEBUG 2024/05/01 16:16:38 set smart cost limit: 0.1
[lp-1  ] DEBUG 2024/05/01 16:16:40 set smart cost limit: 0.11
[site  ] DEBUG 2024/05/01 16:16:45 ----
[lp-1  ] DEBUG 2024/05/01 16:16:45 charge power: 0W
[site  ] DEBUG 2024/05/01 16:16:45 pv power: 4348W
[site  ] DEBUG 2024/05/01 16:16:45 site power: -4348W
[lp-1  ] DEBUG 2024/05/01 16:16:45 charger status: A
[lp-1  ] DEBUG 2024/05/01 16:16:46 set smart cost limit: 0.09
[lp-1  ] DEBUG 2024/05/01 16:16:49 set smart cost limit: 0.1
[lp-1  ] DEBUG 2024/05/01 16:16:50 set smart cost limit: 0.07
[lp-1  ] DEBUG 2024/05/01 16:16:52 set smart cost limit: 0.06
[lp-1  ] DEBUG 2024/05/01 16:16:54 set smart cost limit: 0.05
[lp-1  ] DEBUG 2024/05/01 16:16:55 set smart cost limit: 0.04
[lp-1  ] DEBUG 2024/05/01 16:16:56 set smart cost limit: 0.03
[lp-1  ] DEBUG 2024/05/01 16:16:57 set smart cost limit: 0.02
[lp-1  ] DEBUG 2024/05/01 16:16:58 set smart cost limit: 0.01
[lp-1  ] DEBUG 2024/05/01 16:16:59 set smart cost limit: 0
[site  ] DEBUG 2024/05/01 16:17:00 ----
[lp-1  ] DEBUG 2024/05/01 16:17:00 charge power: 0W
[site  ] DEBUG 2024/05/01 16:17:00 pv power: 4304W
[site  ] DEBUG 2024/05/01 16:17:00 site power: -4304W
[lp-1  ] DEBUG 2024/05/01 16:17:00 charger status: A
[lp-1  ] DEBUG 2024/05/01 16:17:01 set smart cost limit: 0.04
[lp-1  ] DEBUG 2024/05/01 16:17:04 set smart cost limit: 0.02
[lp-1  ] DEBUG 2024/05/01 16:17:06 set smart cost limit: 0.05
[lp-1  ] DEBUG 2024/05/01 16:17:07 set smart cost limit: 0.06
[lp-1  ] DEBUG 2024/05/01 16:17:08 set smart cost limit: 0.07
[lp-1  ] DEBUG 2024/05/01 16:17:10 set smart cost limit: 0.08
[lp-1  ] DEBUG 2024/05/01 16:17:12 set smart cost limit: 0.09
[lp-1  ] DEBUG 2024/05/01 16:17:15 set smart cost limit: 0.1
[site  ] DEBUG 2024/05/01 16:17:15 ----
[lp-1  ] DEBUG 2024/05/01 16:17:15 charge power: 0W
[site  ] DEBUG 2024/05/01 16:17:15 pv power: 4255W
[site  ] DEBUG 2024/05/01 16:17:15 site power: -4255W
[lp-1  ] DEBUG 2024/05/01 16:17:15 charger status: A
[site  ] DEBUG 2024/05/01 16:17:30 ----
[lp-1  ] DEBUG 2024/05/01 16:17:30 charge power: 0W
[site  ] DEBUG 2024/05/01 16:17:30 pv power: 4237W
[site  ] DEBUG 2024/05/01 16:17:30 site power: -4237W
[lp-1  ] DEBUG 2024/05/01 16:17:30 charger status: A
[site  ] DEBUG 2024/05/01 16:17:45 ----
[lp-1  ] DEBUG 2024/05/01 16:17:45 charge power: 0W
[site  ] DEBUG 2024/05/01 16:17:45 pv power: 4236W
[site  ] DEBUG 2024/05/01 16:17:45 site power: -4236W
[lp-1  ] DEBUG 2024/05/01 16:17:45 charger status: A
[lp-1  ] DEBUG 2024/05/01 16:17:56 set smart cost limit: 0.04
[lp-1  ] DEBUG 2024/05/01 16:17:58 set smart cost limit: 0.06
[lp-1  ] DEBUG 2024/05/01 16:17:59 set smart cost limit: 0.07
[site  ] DEBUG 2024/05/01 16:18:00 ----
[lp-1  ] DEBUG 2024/05/01 16:18:00 charge power: 0W
[site  ] DEBUG 2024/05/01 16:18:00 pv power: 4184W
[site  ] DEBUG 2024/05/01 16:18:00 site power: -4184W
[lp-1  ] DEBUG 2024/05/01 16:18:00 charger status: A
[lp-1  ] DEBUG 2024/05/01 16:18:01 set smart cost limit: 0.09
[lp-1  ] DEBUG 2024/05/01 16:18:04 set smart cost limit: 0.08
[lp-1  ] DEBUG 2024/05/01 16:18:05 set smart cost limit: 0.1
[lp-1  ] DEBUG 2024/05/01 16:18:08 set smart cost limit: 0.18
[lp-1  ] DEBUG 2024/05/01 16:18:11 set smart cost limit: 0.19
[lp-1  ] DEBUG 2024/05/01 16:18:14 set smart cost limit: 0.2
[site  ] DEBUG 2024/05/01 16:18:15 ----
[lp-1  ] DEBUG 2024/05/01 16:18:15 charge power: 0W
[site  ] DEBUG 2024/05/01 16:18:15 pv power: 4243W
[site  ] DEBUG 2024/05/01 16:18:15 site power: -4243W
[lp-1  ] DEBUG 2024/05/01 16:18:15 charger status: A
[lp-1  ] DEBUG 2024/05/01 16:18:17 set smart cost limit: 0.05
[lp-1  ] DEBUG 2024/05/01 16:18:19 set smart cost limit: 0.06
[lp-1  ] DEBUG 2024/05/01 16:18:21 set smart cost limit: 0.07
[lp-1  ] DEBUG 2024/05/01 16:18:23 set smart cost limit: 0.08
[lp-1  ] DEBUG 2024/05/01 16:18:24 set smart cost limit: 0.09
[lp-1  ] DEBUG 2024/05/01 16:18:26 set smart cost limit: 0.1
[lp-1  ] DEBUG 2024/05/01 16:18:28 set smart cost limit: 0.12
[site  ] DEBUG 2024/05/01 16:18:30 ----
[lp-1  ] DEBUG 2024/05/01 16:18:30 charge power: 0W
[site  ] DEBUG 2024/05/01 16:18:30 pv power: 4181W
[site  ] DEBUG 2024/05/01 16:18:30 site power: -4181W
[lp-1  ] DEBUG 2024/05/01 16:18:30 charger status: A
[lp-1  ] DEBUG 2024/05/01 16:18:30 set smart cost limit: 0.01
[lp-1  ] DEBUG 2024/05/01 16:18:34 set smart cost limit: 0.02
[lp-1  ] DEBUG 2024/05/01 16:18:35 set smart cost limit: 0.03
[lp-1  ] DEBUG 2024/05/01 16:18:36 set smart cost limit: 0.04
[lp-1  ] DEBUG 2024/05/01 16:18:37 set smart cost limit: 0.05
[lp-1  ] DEBUG 2024/05/01 16:18:39 set smart cost limit: 0.06
[lp-1  ] DEBUG 2024/05/01 16:18:40 set smart cost limit: 0.07
[site  ] DEBUG 2024/05/01 16:18:45 ----
[lp-1  ] DEBUG 2024/05/01 16:18:45 charge power: 0W
[site  ] DEBUG 2024/05/01 16:18:45 pv power: 4159W
[site  ] DEBUG 2024/05/01 16:18:45 site power: -4159W
[lp-1  ] DEBUG 2024/05/01 16:18:45 charger status: A
[site  ] DEBUG 2024/05/01 16:19:00 ----
[lp-1  ] DEBUG 2024/05/01 16:19:00 charge power: 0W
[site  ] DEBUG 2024/05/01 16:19:00 pv power: 4106W
[site  ] DEBUG 2024/05/01 16:19:00 site power: -4106W
[lp-1  ] DEBUG 2024/05/01 16:19:00 charger status: A
[site  ] DEBUG 2024/05/01 16:19:15 ----
[lp-1  ] DEBUG 2024/05/01 16:19:15 charge power: 0W
[site  ] DEBUG 2024/05/01 16:19:15 pv power: 4199W
[site  ] DEBUG 2024/05/01 16:19:15 site power: -4199W
[lp-1  ] DEBUG 2024/05/01 16:19:15 charger status: A
[site  ] DEBUG 2024/05/01 16:19:30 ----
[lp-1  ] DEBUG 2024/05/01 16:19:30 charge power: 0W
[site  ] DEBUG 2024/05/01 16:19:30 pv power: 4233W
[site  ] DEBUG 2024/05/01 16:19:30 site power: -4233W
[lp-1  ] DEBUG 2024/05/01 16:19:30 charger status: A
[site  ] DEBUG 2024/05/01 16:19:45 ----
[lp-1  ] DEBUG 2024/05/01 16:19:45 charge power: 0W
[site  ] DEBUG 2024/05/01 16:19:45 pv power: 4261W
[site  ] DEBUG 2024/05/01 16:19:45 site power: -4261W
[lp-1  ] DEBUG 2024/05/01 16:19:45 charger status: A
[site  ] DEBUG 2024/05/01 16:20:00 ----
[lp-1  ] DEBUG 2024/05/01 16:20:00 charge power: 0W
[site  ] DEBUG 2024/05/01 16:20:00 pv power: 4177W
[site  ] DEBUG 2024/05/01 16:20:00 site power: -4177W
[lp-1  ] DEBUG 2024/05/01 16:20:00 charger status: A
[site  ] DEBUG 2024/05/01 16:20:15 ----
[lp-1  ] DEBUG 2024/05/01 16:20:15 charge power: 0W
[site  ] DEBUG 2024/05/01 16:20:15 pv power: 4195W
[site  ] DEBUG 2024/05/01 16:20:15 site power: -4195W
[lp-1  ] DEBUG 2024/05/01 16:20:15 charger status: A
[site  ] DEBUG 2024/05/01 16:20:30 ----
[lp-1  ] DEBUG 2024/05/01 16:20:30 charge power: 0W
[site  ] DEBUG 2024/05/01 16:20:30 pv power: 4217W
[site  ] DEBUG 2024/05/01 16:20:30 site power: -4217W
[lp-1  ] DEBUG 2024/05/01 16:20:30 charger status: A

What type of operating system are you running?

Docker container

Version

evcc 0.125.0 (090b0a70)

naltatis commented 4 months ago

This should be fixed with the above PR. I wasn't able to reproduce, but it has most likely to do with matching float values.

Explanation: The options we present are dynamically calculated based on the current pricing situation. Since the price limit can also be set via API with arbitrary values, we ensure that the existing value is also present in the options list. To check the existence, we compared float values. Now we only compare up to two digit precision.