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

Load Management and Peak Shaving #13207

Merged
merged 35 commits into from
Apr 27, 2024
Merged

Load Management and Peak Shaving #13207

merged 35 commits into from
Apr 27, 2024

Conversation

andig
Copy link
Member

@andig andig commented Mar 29, 2024

Potential replacement for #8427. Closer alignment to evcc standards, untested.

Configuration from #8427 should hopefully work, use W instead of kW. Published on Docker Hub als :lm-new. Turn on trace log for testing. Live circuit data is available at /api/state unter /circuits and also published on MQTT.

Scope:

  • load management
  • peak shaving

NOTE

We consider load management an advanced feature targeted at professional users (this charging parks etc). The pricing model is not yet determined, but we will make sure that a basic version of load management remains free for all evcc users.

TODO

  • reverse parent/children handling
  • move circuits to UI-based config (implement circuits as devices)
  • tests
  • implement current limits (only power implemented)
  • publish circuits
  • add circuit titles
  • test loadpoint interaction
  • check publishing on InfluxDB

Out of scope

  • UI @naltatis
  • load balancing
  • priority support
  • planner support

@andig andig marked this pull request as draft March 29, 2024 14:56
@RTTTC RTTTC mentioned this pull request Mar 31, 2024
@andig
Copy link
Member Author

andig commented Mar 31, 2024

@naltatis der Integration Build läuft hier jeweils ewig, könntest Du mal schauen warum?

@OneLineTwoBugs
Copy link

OneLineTwoBugs commented Mar 31, 2024

I can't get it to start.
[main ] FATAL 2024/03/31 22:22:38 missing parent circuit: map[maxpower:138000 meter:grid parent:<nil>]
I tried omitting parent: and parent: main, but neither seems to work.
relevant config section:

circuits:
  - name: main
    maxPower: 138000
    meter: grid
    parent:

  - name: emob
    maxPower: 86250
    meter: emob
    parent: main

@andig
Copy link
Member Author

andig commented Mar 31, 2024

Fixed. Gib ihm bitte nochmal eine Chance.

@ross-w
Copy link
Sponsor Contributor

ross-w commented Apr 1, 2024

Having some issues with the published lm-new Docker tag. The UI never comes up (doesn't listen on 7070), but I can't see any errors in the log (trace or otherwise) as to why.

evcc.yaml modified slightly from the version I was using with the other PR (kW to W, added circuit to site, removed currents):

---
site:
  - title: xxx
    circuit: main
    meters:
      grid: grid
      pv:
        - solar

loadpoints:
  - title: Garage
    charger: zjbeny
    phases: 1
    vehicle: ioniq5
    mode: pv
    maxcurrent: 32
    circuit: garage
    priority: 1
  - title: Ebike
    charger: ebike
    phases: 1
    mode: pv
    mincurrent: 1
    maxcurrent: 1
    circuit: garagegpo

chargers:
  - name: zjbeny
    type: template
    template: ocpp
    stationid: zjb
    getconfiguration: false
    timeout: 2m
  - name: ebike
    type: template
    template: tasmota
    host: 172.16.3.124
    channel: 1
    standbypower: 15
    integrateddevice: true
    icon: bike

meters:
  - name: grid
    type: custom
    power:
      source: mqtt
      topic: SunGather/A22D350470
      jq: .meter_power
      timeout: 30s
  - name: solar
    type: custom
    power:
      source: mqtt
      topic: SunGather/A22D350470
      jq: .total_active_power
      timeout: 30s

vehicles:
  - name: ioniq5
    type: template
    template: hyundai
    icon: car
    title: Ioniq 5
    user: redacted
    password: redacted
    language: en # 'en' for English and 'de' for German (optional)
    mode: pv
    minCurrent: 6
    maxCurrent: 32

circuits:
  - name: main
    #maxCurrent: 0
    maxPower: 9600 #9.6
    meter: grid
    parent:
  - name: garage
    #maxCurrent: 32
    maxPower: 7200 #7.2
    meter:
    parent: main
  - name: garagegpo
    #maxCurrent: 10
    maxPower: 2400 #2.4
    meter:
    parent: main

tariffs:
  currency: AUD
  grid:
    type: amber
    token: redacted
    siteid: redacted
    channel: general

  feedin:
    type: amber
    token: redacted
    siteid: redacted
    channel: feedIn

mqtt:
  broker: mosquitto.mosquitto
  topic: evcc # root topic for publishing, set empty to disable publishing
  user: redacted
  password: redacted

interval: 10s
log: trace

@andig
Copy link
Member Author

andig commented Apr 1, 2024

@ross-w I can't reproduce this. Are you sure it isn't waiting for the OCPP charger or an MQTT update?

@andig andig added the backlog Things to do later label Apr 1, 2024
@TMA84
Copy link
Sponsor

TMA84 commented Apr 1, 2024

@andig
It works on my test installation.

@andig
Copy link
Member Author

andig commented Apr 1, 2024

@TMA84 thanks for letting me know! Just running or actual load balancing behavior?

@ross-w
Copy link
Sponsor Contributor

ross-w commented Apr 4, 2024

@ross-w spotted the bug, fixed and docker pushed.

Thanks @andig ! I can confirm it starts now

@OneLineTwoBugs

Can i ask: what is the use case of limiting power rather than current? I can't really think of one, because the limit of all electrical cirtuits is always current, not power, right?

You are correct. Tolerance in Australia is the same, so you're correct there is a lot of room for discrepancy.
I'm using power as all my meters only report power, not current. I'll see if I can find a source of the voltage and publish this to MQTT so I can calculate currents from the power meters and do it that way.

@andig andig changed the title Load Management: alternative approach Load Management and Peak Shaving Apr 4, 2024
@andig andig added needs documentation Triggers issue creation in evcc-io/docs and removed enhancement New feature or request labels Apr 4, 2024
@vistalba
Copy link

vistalba commented Apr 9, 2024

Is this already in 0.125 included or any hint when it will be in the official release? (As Homeassinstant Addon I can't test other image tags :()

@Frintrop
Copy link

Is this already in 0.125 included or any hint when it will be in the official release? (As Homeassinstant Addon I can't test other image tags :()

you may fork the hassio addon repository and set another docker image there ?

@TMA84
Copy link
Sponsor

TMA84 commented Apr 12, 2024

Is this already in 0.125 included or any hint when it will be in the official release? (As Homeassinstant Addon I can't test other image tags :()

you may fork the hassio addon repository and set another docker image there ?

Unfortunately this didn't work in my tests

@Frintrop
Copy link

Is this already in 0.125 included or any hint when it will be in the official release? (As Homeassinstant Addon I can't test other image tags :()

you may fork the hassio addon repository and set another docker image there ?

Unfortunately this didn't work in my tests

you can try my repository: https://github.com/Frintrop/hassio-addon.
you have to disable origin evcc repo to do that

@ross-w
Copy link
Sponsor Contributor

ross-w commented Apr 16, 2024

So far the monitoring is working OK and it has prevented a breaker trip on a number of occasions. I might see if I can get a voltage feed from somewhere and switch to current monitoring, as it seems to shut off charging altogether in power mode (as opposed to current)

Any chance we could get a rebased version of this pushed up to docker hub? Specifically I'm after this PR, as my EVSE balks when a transaction is stopped and refuses to restart without physically disconnecting the cable

@djfanatix
Copy link

I tested this and I get a warning when it is over power.
I assume this is static Load-Balancing (chargers shuts off when overpower) or is dynamic also possible (Charger tries to keep power value under certain value, same as PV Surpluss)?

@andig
Copy link
Member Author

andig commented Apr 17, 2024

It does

@djfanatix
Copy link

It does

Hmm, then I need to test it further.
It didn’t adjust the load with a go-e charger

@andig andig marked this pull request as ready for review April 27, 2024 08:45
@andig
Copy link
Member Author

andig commented Apr 27, 2024

See note on commercial model above.

@andig andig merged commit 26973a0 into master Apr 27, 2024
7 checks passed
@andig andig deleted the feat/load-management branch April 27, 2024 08:50
@djfanatix

This comment was marked as resolved.

@andig
Copy link
Member Author

andig commented May 4, 2024

Please open new issue with debug log. It should be throttled indeed.

@evcc-io evcc-io locked as resolved and limited conversation to collaborators May 4, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
backlog Things to do later experimental Experimental feature needs documentation Triggers issue creation in evcc-io/docs prio Priority
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

10 participants