Skip to content

Add Huawei SCharger-7KS-S0 / 22KT-S0 #19001

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

Merged
merged 10 commits into from
Mar 23, 2025
Merged

Add Huawei SCharger-7KS-S0 / 22KT-S0 #19001

merged 10 commits into from
Mar 23, 2025

Conversation

premultiply
Copy link
Member

@premultiply premultiply commented Feb 20, 2025

The OCPP implementation of Huawei SCharger-7KS-S0 / 22KT-S0 firmware is still buggy as hell.
This is an attempt to make them usable somehow without any guarantee. Just try.
It MAY support 1p3p phase switching in some way. I don't know...

@premultiply premultiply added enhancement New feature or request devices Specific device support experimental Experimental feature waiting for feedback Suspended progress labels Feb 20, 2025
@premultiply premultiply self-assigned this Feb 20, 2025
@PRiekenberg
Copy link

Do you already have a tester? If I can help you, please give an instruction how to do it.

@smoki3

This comment was marked as outdated.

@PRiekenberg
Copy link

@smoki3 maybe you can try it again with the wallbox in pv mode? The Huawei support stated that phase switching is only possible in this mode.

@Lackmann1994

This comment was marked as off-topic.

@Lackmann1994

This comment was marked as off-topic.

@smoki3

This comment was marked as off-topic.

@smoki3
Copy link

smoki3 commented Mar 2, 2025

I tried your new commits. But seems it does not fix phase switching
image

Its loading in PV mode still with 4,2 kW and does not go below. I am not sure if evcc even tries to trigger phase switching.

here are some logs:

https://pastebin.com/C0vbCAkj

@smoki3
Copy link

smoki3 commented Mar 2, 2025

Please forget my first report. The charger communication was block from some other test. So the controll from evcc was not working at all.

now I was redoing the test. Evcc is now performing a phase switch in the log. But it is not working. I will try with you latest commit now.

https://pastebin.com/T1WG42PX

@smoki3
Copy link

smoki3 commented Mar 2, 2025

with the latest commit I am unable to start a charge even in the fast mode

[ocpp  ] TRACE 2025/03/02 11:27:54 send HW-123: [3,"67c432a700000174017c",{}]
[lp-1  ] DEBUG 2025/03/02 11:27:56 set charge mode: now
[site  ] DEBUG 2025/03/02 11:27:56 ----
[lp-1  ] DEBUG 2025/03/02 11:27:56 charge power: 0W
[lp-1  ] DEBUG 2025/03/02 11:27:56 charge currents: [0 0 0]A
[site  ] DEBUG 2025/03/02 11:27:56 battery 1 power: -2607W
[site  ] DEBUG 2025/03/02 11:27:56 battery 1 soc: 42%
[site  ] DEBUG 2025/03/02 11:27:56 pv 2 power: 234W
[site  ] DEBUG 2025/03/02 11:27:56 pv 1 power: 2725W
[site  ] DEBUG 2025/03/02 11:27:56 grid power: 3W
[site  ] DEBUG 2025/03/02 11:27:56 pv power: 2959W
[site  ] DEBUG 2025/03/02 11:27:56 battery has priority at soc 42% (< 85%)
[site  ] DEBUG 2025/03/02 11:27:56 site power: 103W
[lp-1  ] DEBUG 2025/03/02 11:27:56 charge total import: 774.210kWh
[lp-1  ] DEBUG 2025/03/02 11:27:56 charger status: B
[ocpp  ] TRACE 2025/03/02 11:27:56 send HW-123: [2,"1491203589","SetChargingProfile",{"connectorId":1,"csChargingProfiles":{"chargingProfileId":0,"stackLevel":0,"chargingProfilePurpose":"TxDefaultProfile","chargingProfileKind":"Absolute","chargingSchedule":{"startSchedule":"2025-03-02T10:26:56Z","chargingRateUnit":"W","chargingSchedulePeriod":[{"startPeriod":0,"limit":0}]}}}]
[ocpp  ] TRACE 2025/03/02 11:27:56 recv HW-123: [3,"1491203589",{"status":"Accepted"}]
[lp-1  ] DEBUG 2025/03/02 11:27:56 max charge current: 16A
[ocpp  ] TRACE 2025/03/02 11:27:56 send HW-123: [2,"1766255186","SetChargingProfile",{"connectorId":1,"csChargingProfiles":{"chargingProfileId":0,"stackLevel":0,"chargingProfilePurpose":"TxDefaultProfile","chargingProfileKind":"Absolute","chargingSchedule":{"startSchedule":"2025-03-02T10:26:56Z","chargingRateUnit":"W","chargingSchedulePeriod":[{"startPeriod":0,"limit":0}]}}}]

It sends a limit 0?

@smoki3
Copy link

smoki3 commented Mar 2, 2025

So its exactly the same issue as before. As soon evcc wants to just use 1 phase the charge stops immediately. And I am not able to start it unless I manually reset the limit to a value higher than 4100 watt

@premultiply
Copy link
Member Author

It sends a limit 0?

Sorry my fault 🤦🏻‍♂️
That should be fixed now.
Please try again.

@github-actions github-actions bot added the stale Outdated and ready to close label Mar 10, 2025
@premultiply premultiply removed the stale Outdated and ready to close label Mar 10, 2025
@MucheteWO
Copy link

Hallo. Wenn ihr mir beschreibt, was ich tuen soll, kann ich das bei einem Kollege von mir auch testen. Er hat die Wallbox und alles von Huawei. Vollzugriff habe ich auch.

@smoki3
Copy link

smoki3 commented Mar 11, 2025

It sends a limit 0?

Sorry my fault 🤦🏻‍♂️ That should be fixed now. Please try again.

I tested it this weekend. So was also not working. The commands are now send correltly. But the charger stops as soon a limit is sent below 4,1kW. Its actually by design that they does not support phase switching through OCPP

@aravindnadumane
Copy link

aravindnadumane commented Mar 16, 2025

Screenshot_20250316_100900_FusionSolar

with 160T fw version i get this option, perhaps in the previous version, had the huawei developer wrongly tipped 4.1 lower limit instead of 1.4 ? 😀

@premultiply premultiply removed experimental Experimental feature waiting for feedback Suspended progress labels Mar 16, 2025
@premultiply premultiply marked this pull request as ready for review March 16, 2025 13:25
@opitzb86
Copy link

Guten Morgen,
was genau wir für den merge dieses PR benötigt und wie kann ich dazu beitragen?
Danke

@smoki3
Copy link

smoki3 commented Mar 23, 2025

Eine funktionierende Firmware

@premultiply premultiply requested a review from andig March 23, 2025 10:18
@andig andig merged commit 6e8761e into master Mar 23, 2025
6 checks passed
@andig andig deleted the fix/ocpp-force-power branch March 23, 2025 10:33
@opitzb86
Copy link

Hallo und viele Dank für den merge.

Habe gerade mal den letzten nightly build installiert und versucht den Parameter forcepowerctrl wie folgt einzubinden:

chargers:
- name: my_charger
  type: template
  template: ocpp
  stationid: 1315011205BK.01521
  remotestart: false
  connecttimeout: 5m
  ForcePowerCtrl: true

Wenn ich die config so starte bekomme ich aber folgende Fehlermeldung:

Mar 25 20:45:22 raspberrypi evcc[5897]: [main  ] FATAL 2025/03/25 20:45:22 charger [my_charger] cannot create charger 'my_charger': cannot create charger type 'template': invalid key: forcepowerctrl

Vermutlich mache ich hier etwas falsch....

@smoki3
Copy link

smoki3 commented Mar 25, 2025

It's forcewattctrl: true or use ocpp-huawei

@opitzb86
Copy link

@smoki3, danke.

forcewattctrl: true liefert das gleiche problem, aber ocpp-huawei nimmt er.
Jetzt muss ich es nur noch testen was passiert. Danke.

@premultiply
Copy link
Member Author

Das Template heisst ocpp-huawei oder der Type ocpp.
Nicht alles durcheinander.

@Lackmann1994
Copy link

Anyone knows what is causing this error?

ERROR 2025/03/29 19:30:36 ocpp message (67e83c4c0000003e003a): OccurrenceConstraintViolation - Field Call.Payload.ChargePointVendor required but not found for feature BootNotification ([2,"67e83c4c0000003e003a","BootNotification",{"chargePointModel":"ACChargePoint","chargePointSerialNumber":"test","chargePointVendor":""}])

I am running the T160 firmware on my charger and when the evcc server runs the charger actually stops complaining about not reaching the OCPP server so communication parameters seem to be set correct.

here are my logs of evcc:

Click to expand log
Mar 29 19:29:12 raspberrypi systemd[1]: Started evcc.service - evcc.
Mar 29 19:29:13 raspberrypi evcc[2587]: [main  ] INFO 2025/03/29 19:29:13 evcc 0.202.1 (6f5c0b64)
Mar 29 19:29:13 raspberrypi evcc[2587]: [main  ] INFO 2025/03/29 19:29:13 using config file: /etc/evcc.yaml
Mar 29 19:29:13 raspberrypi evcc[2587]: [db    ] INFO 2025/03/29 19:29:13 using sqlite database: /var/lib/evcc/evcc.db
Mar 29 19:29:15 raspberrypi evcc[2587]: [main  ] INFO 2025/03/29 19:29:15 listening at :7070
Mar 29 19:29:15 raspberrypi evcc[2587]: [ocpp-1] DEBUG 2025/03/29 19:29:15 waiting for chargepoint: 30s
Mar 29 19:29:17 raspberrypi evcc[2587]: [ocpp  ] INFO 2025/03/29 19:29:17 charge point connected, registering: test
Mar 29 19:29:36 raspberrypi evcc[2587]: [ocpp  ] ERROR 2025/03/29 19:29:36 ocpp message (67e83c100000003c0038): OccurrenceConstraintViolation - Field Call.Payload.ChargePointVendor required but not found for feature BootNotification ([2,"67e83c100000003c0038","BootNotification",{"chargePointModel":"ACChargePoint","chargePointSerialNumber":"test","chargePointVendor":""}])
Mar 29 19:29:47 raspberrypi evcc[2587]: [ocpp-1] DEBUG 2025/03/29 19:29:47 failed configuring availability: timeout
Mar 29 19:30:06 raspberrypi evcc[2587]: [ocpp  ] ERROR 2025/03/29 19:30:06 ocpp message (67e83c2e0000003d0039): OccurrenceConstraintViolation - Field Call.Payload.ChargePointVendor required but not found for feature BootNotification ([2,"67e83c2e0000003d0039","BootNotification",{"chargePointModel":"ACChargePoint","chargePointSerialNumber":"test","chargePointVendor":""}])
Mar 29 19:30:17 raspberrypi evcc[2587]: [main  ] FATAL 2025/03/29 19:30:17 charger [wallbox4] cannot create charger 'wallbox4': cannot create charger type 'template': cannot create charger type 'ocpp': timeout
Mar 29 19:30:17 raspberrypi evcc[2587]: [main  ] FATAL 2025/03/29 19:30:17 will attempt restart in: 15m0s
Mar 29 19:30:36 raspberrypi evcc[2587]: [ocpp  ] ERROR 2025/03/29 19:30:36 ocpp message (67e83c4c0000003e003a): OccurrenceConstraintViolation - Field Call.Payload.ChargePointVendor required but not found for feature BootNotification ([2,"67e83c4c0000003e003a","BootNotification",{"chargePointModel":"ACChargePoint","chargePointSerialNumber":"test","chargePointVendor":""}])
Mar 29 19:31:06 raspberrypi evcc[2587]: [ocpp  ] ERROR 2025/03/29 19:31:06 ocpp message (67e83c6a0000003f003b): OccurrenceConstraintViolation - Field Call.Payload.ChargePointVendor required but not found for feature BootNotification ([2,"67e83c6a0000003f003b","BootNotification",{"chargePointModel":"ACChargePoint","chargePointSerialNumber":"test","chargePointVendor":""}])

and here is my evcc config (made with evcc configure):

Click to expand config
# 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: 30s # control cycle interval

sponsortoken: ...

# sponsors can set telemetry: true to enable anonymous data aggregation
# see https://github.com/evcc-io/evcc/discussions/4554
telemetry: false

meters:
- type: template
  template: huawei-sun2000
  id: 1
  host: 192.168.178.179
  port: 502
  usage: grid
  modbus: tcpip
  timeout: 15s
  storageunit: 1
  name: grid1
- type: template
  template: huawei-sun2000
  id: 1
  host: 192.168.178.179
  port: 502
  usage: pv
  modbus: tcpip
  timeout: 15s
  storageunit: 1
  name: pv2
- type: template
  template: huawei-sun2000
  id: 1
  host: 192.168.178.179
  port: 502
  usage: battery
  modbus: tcpip
  timeout: 15s
  storageunit: 1
  name: battery3

chargers:
- type: template
  template: ocpp-huawei
  connector: 1
  remotestart: false
  connecttimeout: 30s
  meterinterval: 10s
  name: wallbox4

loadpoints:
- title: Garage
  charger: wallbox4
  mode: pv

site:
  title: My home
  meters:
    grid: grid1
    pv:
    - pv2
    battery:
    - battery3

@premultiply
Copy link
Member Author

Huawei firmware still has many issues where they do not care about the OCPP specification.

They have to fix it in the firmware!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
devices Specific device support enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants