evcc-io / evcc

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

EEBUS - PMCC: Crash when charging with 1 Phase #15609

Closed iRateD1703 closed 2 months ago

iRateD1703 commented 2 months ago

Describe the bug

When trying to start charging with the PMCC while using 1 phase evcc crashes. This is most likely the reason cause the charge current for EEBus expects 3 phase current array. The charger within evcc is set to 1 Phase with min current 6 A and max current 10 A.

Steps to reproduce

  1. Connect PMCC charger with 1 Phase
  2. Plug charger into vehicle
  3. Start charging

Configuration details

network:
  schema: http
  host: 192.168.178.101
  port: 7070

meters:
  - name: grid
    type: template
    template: shelly-pro-3em
    usage: grid
    host: 192.168.178.210
  - name: Shelly # pv meter reference
    type: template
    template: shelly-1pm 
    usage: pv  
    host: 192.168.178.211  
    channel: 0
    user: abc
    password: abc
chargers:
  - name: my_charger
    type: template
    template: pmcc
    ski: abc
vehicles:
  - name: Eve
    type: template
    template: iso15118
    capacity: 87

site:
  title: Home # display name for UI
  meters:
    grid: grid # grid meter
    pv:
      - Shelly
loadpoints:
  - title: Garage 
    charger: my_charger 
    vehicle: Eve
    mode: "off" 
    priority: 0
eebus:
  certificate:
    public: |
      -----BEGIN CERTIFICATE-----

      -----END CERTIFICATE-----
    private: |
      -----BEGIN EC PRIVATE KEY-----

      -----END EC PRIVATE KEY-----

Log details

[lp-1  ] DEBUG 2024/08/22 18:21:09 charger status: A
[site  ] DEBUG 2024/08/22 18:21:39 ----
[lp-1  ] DEBUG 2024/08/22 18:21:39 charge power: 0W
[lp-1  ] DEBUG 2024/08/22 18:21:39 charge currents: [0 0 0]A
[site  ] DEBUG 2024/08/22 18:21:39 pv power: 61W
[site  ] DEBUG 2024/08/22 18:21:39 grid meter: 120W
[site  ] DEBUG 2024/08/22 18:21:39 grid powers: [-9 2 127]W
[site  ] DEBUG 2024/08/22 18:21:39 grid currents: [-0.203 0.19 1.29]A
[site  ] DEBUG 2024/08/22 18:21:39 site power: 120W
panic: runtime error: index out of range [1] with length 1

goroutine 107 [running]:
github.com/evcc-io/evcc/charger.(*EEBus).writeLoadControlLimitsVASVW(0xc000658850, {0x37f8e58, 0xc001dd8800}, {0xc001f9c700, 0x3, 0x4})
    github.com/evcc-io/evcc/charger/eebus.go:416 +0x310
github.com/evcc-io/evcc/charger.(*EEBus).writeCurrentLimitData(0xc000658850, {0x37f8e58, 0xc001dd8800}, 0x0)
    github.com/evcc-io/evcc/charger/eebus.go:331 +0x2a5
github.com/evcc-io/evcc/charger.(*EEBus).Status.func1()
    github.com/evcc-io/evcc/charger/eebus.go:194 +0xd0
github.com/evcc-io/evcc/charger.(*EEBus).Status(0xc000658850)
    github.com/evcc-io/evcc/charger/eebus.go:211 +0x21b
github.com/evcc-io/evcc/core.(*Loadpoint).updateChargerStatus(0xc00170e408)
    github.com/evcc-io/evcc/core/loadpoint.go:1006 +0x3c
github.com/evcc-io/evcc/core.(*Loadpoint).Update(0xc00170e408, 0x405e051eb851eb85, {0x0, 0x0, 0x0}, 0x0, 0x0, 0x0, 0xc001ef9ea8, 0x0)
    github.com/evcc-io/evcc/core/loadpoint.go:1667 +0x3ab
github.com/evcc-io/evcc/core.(*Site).update(0xc00171c200, {0x3815850, 0xc00170e408})
    github.com/evcc-io/evcc/core/site.go:882 +0x8b8
github.com/evcc-io/evcc/core.(*Site).Run(0xc00171c200, 0xc001613a40, 0x6fc23ac00)
    github.com/evcc-io/evcc/core/site.go:999 +0x2f5
github.com/evcc-io/evcc/cmd.runRoot.func4()
    github.com/evcc-io/evcc/cmd/root.go:288 +0x25
created by github.com/evcc-io/evcc/cmd.runRoot in goroutine 1
    github.com/evcc-io/evcc/cmd/root.go:287 +0x1e13

What type of operating system are you running?

HomeAssistant Add-on

Version

0.130.2

iRateD1703 commented 2 months ago

Pull request with #15603

iRateD1703 commented 2 months ago

Closed as issue was already dealt with