evcc-io / evcc

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

BatteryDischargeControl mit Sofar HYD 15 via Sofar ModBus TCP LAN Stick API-Fehler #11454

Closed sahomm closed 8 months ago

sahomm commented 8 months ago

Describe the bug

Bei dem Setzen des Parameter BatteryDischargeConect wird ein API-Fehler in der GUI ausgegeben. Gemäß Log wurde dieser jedoch gesetzt.

Genutzt wird ein Sofar HYD 15 KTL 3PH, angebunden ist dieser via Modus TCP mittels des Sofar Ethernetdongle.

Bildschirmfoto 2024-01-03 um 18 13 04

Steps to reproduce

  1. Parameter Batteriesteuerung setzen
  2. ...

Configuration details

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

log: info
levels:
  cache: error

# unique installation id
plant: xxx

interval: 10s # control cycle interval

meters:
  - name: my_grid
    type: template
    template: sofarsolar-g3
    usage: grid

    # Modbus TCP
    modbus: tcpip
    id: 1
    host: 192.168.181.135 # Hostname
    port: 8899 # Port
#    delay: 10s # optional 

  - name: my_pv
    type: template
    template: sofarsolar-g3
    usage: pv
    # Modbus TCP
    modbus: tcpip
    id: 1
    host: 192.168.181.135 # Hostname
    port: 8899 # Port
#    delay: 10s # optional 

  - name: my_battery
    type: template
    template: sofarsolar-g3
    usage: battery

    # Modbus TCP
    modbus: tcpip
    id: 1
    host: 192.168.181.135 # Hostname
    port: 8899 # Port
#    delay: 10s # optional 

chargers:
- type: template
  template: ellipro 
  ski: xxx  
  ip: 192.168.181.130  
  name: wallbox3

vehicles:
- type: template
  template: audi 
  title: Audi A6
  user: xxx  
  password: xxx  
  vin: xxx  
  capacity: 14  
  name: ev2

- name: my_car
  type: template
  template: id
  title: ID3 # Wird in der Benutzeroberfläche angezeigt (optional)
  user: xxx # Benutzerkonto (bspw. E-Mail Adresse, User Id, etc.)
  password: xxx # Passwort des Benutzerkontos (bei führenden Nullen bitte in einfache Hochkommata setzen)
  vin: xxx # Erforderlich, wenn mehrere Fahrzeuge des Herstellers vorhanden sind (optional)
  capacity: 58 # Akkukapazität in kWh (optional) 

loadpoints:
- title: Wallbox Elli
  charger: wallbox3
  mode: pv
  phases: 3
  mincurrent: 6
  maxcurrent: 16
#  resetOnDisconnect: true

site:
  title: Berliner Str. 
  meters:
    grid: my_grid
    pv: my_pv
    battery: my_battery

eebus:
  certificate:
      private: |
          -----BEGIN EC PRIVATE KEY-----
          xxx
          -----END EC PRIVATE KEY-----
      public: |
          -----BEGIN CERTIFICATE-----
          xxx
          -----END CERTIFICATE-----

tariffs:
  currency: EUR # (default EUR)
  grid:
    # static grid price
    type: fixed
    price: 0.400 # [currency]/kWh

  feedin:
    # rate for feeding excess (pv) energy to the grid
    type: fixed
    price: 0.08 # [currency]/kWh

sponsortoken: xxx

Log details

[main  ] INFO 2024/01/03 18:41:17 evcc 0.123.5 (7819662a)
[main  ] INFO 2024/01/03 18:41:17 using config file: /etc/evcc.yaml
[main  ] INFO 2024/01/03 18:41:17 starting ui and api at :7070
[db    ] INFO 2024/01/03 18:41:17 using sqlite database: /root/.evcc/evcc.db
[eebus ] INFO 2024/01/03 18:41:17 Local SKI:  xxx
[eebus ] DEBUG 2024/01/03 18:41:17 mdns: announce
[eebus ] DEBUG 2024/01/03 18:41:17 mdns: using avahi
[eebus ] DEBUG 2024/01/03 18:41:17 starting websocket server on :4712
[eebus ] DEBUG 2024/01/03 18:41:17 mdns: start search
[eebus ] DEBUG 2024/01/03 18:41:17 ski: xxx name: Elli-Wallbox-2117A1BRE2 brand: Elli model: Wallbox typ: Wallbox identifier: Elli-Wallbox-2117A1BRE2 register: false host: wallbox-2117A1BRE2.local port: 4712 addresses: [192.168.181.130]
[eebus ] DEBUG 2024/01/03 18:41:17 delaying connection to xxx by 1.008s to minimize double connection probability
[eebus ] DEBUG 2024/01/03 18:41:18 trying to connect to xxx at 192.168.181.130
[eebus ] DEBUG 2024/01/03 18:41:18 initiating connection to xxx at 192.168.181.130:4712
[eebus ] DEBUG 2024/01/03 18:41:18 incoming connection request from xxx
[eebus ] DEBUG 2024/01/03 18:41:19 closing existing double connection
[eebus ] DEBUG 2024/01/03 18:41:19 Send:  read 1 NodeManagementDetailedDiscoveryData
[eebus ] DEBUG 2024/01/03 18:41:19 xxx Error sending spine message:  connection is closed
[eebus ] DEBUG 2024/01/03 18:41:19 Send:  read 1 NodeManagementDetailedDiscoveryData
[eebus ] DEBUG 2024/01/03 18:41:19 Recv: d:_i:47859_Elli-Wallbox-2117A1BRE2: to NodeManagement read 198 NodeManagementDetailedDiscoveryData
[eebus ] DEBUG 2024/01/03 18:41:19 Send: d:_i:47859_Elli-Wallbox-2117A1BRE2 reply 2 198 NodeManagementDetailedDiscoveryData
[eebus ] DEBUG 2024/01/03 18:41:19 Send: d:_i:47859_Elli-Wallbox-2117A1BRE2 result 3 198 ResultData 0
[eebus ] DEBUG 2024/01/03 18:41:19 Recv: d:_i:47859_Elli-Wallbox-2117A1BRE2: to NodeManagement reply 200 1 NodeManagementDetailedDiscoveryData
[eebus ] DEBUG 2024/01/03 18:41:19 Send: d:_i:47859_Elli-Wallbox-2117A1BRE2 read 5 DeviceClassificationManufacturerData
[eebus ] DEBUG 2024/01/03 18:41:19 Send:  call 4 NodeManagementSubscriptionRequestCall
[eebus ] DEBUG 2024/01/03 18:41:19 Send: d:_i:47859_Elli-Wallbox-2117A1BRE2 read 6 DeviceDiagnosisStateData
[eebus ] DEBUG 2024/01/03 18:41:19 Send: d:_i:47859_Elli-Wallbox-2117A1BRE2 read 7 NodeManagementUseCaseData
[eebus ] DEBUG 2024/01/03 18:41:19 Recv: d:_i:47859_Elli-Wallbox-2117A1BRE2: to NodeManagement call 202 NodeManagementSubscriptionRequestCall
[eebus ] DEBUG 2024/01/03 18:41:19 Send: d:_i:47859_Elli-Wallbox-2117A1BRE2 result 8 202 ResultData 0
[eebus ] DEBUG 2024/01/03 18:41:19 Recv: d:_i:47859_Elli-Wallbox-2117A1BRE2: to DeviceClassification reply 206 5 DeviceClassificationManufacturerData
[eebus ] DEBUG 2024/01/03 18:41:19 Recv: d:_i:47859_Elli-Wallbox-2117A1BRE2: to NodeManagement result 210 4 ResultData 0
[eebus ] DEBUG 2024/01/03 18:41:19 Recv: d:_i:47859_Elli-Wallbox-2117A1BRE2: to DeviceDiagnosis reply 212 6 DeviceDiagnosisStateData
[eebus ] DEBUG 2024/01/03 18:41:19 Recv: d:_i:47859_Elli-Wallbox-2117A1BRE2: to NodeManagement reply 213 7 NodeManagementUseCaseData
[eebus ] DEBUG 2024/01/03 18:41:19 Recv: d:_i:47859_Elli-Wallbox-2117A1BRE2: to NodeManagement read 214 NodeManagementDetailedDiscoveryData
[eebus ] DEBUG 2024/01/03 18:41:19 Send: d:_i:47859_Elli-Wallbox-2117A1BRE2 reply 9 214 NodeManagementDetailedDiscoveryData
[eebus ] DEBUG 2024/01/03 18:41:19 Send: d:_i:47859_Elli-Wallbox-2117A1BRE2 result 10 214 ResultData 0
[eebus ] DEBUG 2024/01/03 18:41:19 Recv: d:_i:47859_Elli-Wallbox-2117A1BRE2: to NodeManagement read 215 NodeManagementDestinationListData
[eebus ] DEBUG 2024/01/03 18:41:19 Send: d:_i:47859_Elli-Wallbox-2117A1BRE2 reply 11 215 NodeManagementDestinationListData
[eebus ] DEBUG 2024/01/03 18:41:19 Send: d:_i:47859_Elli-Wallbox-2117A1BRE2 result 12 215 ResultData 0
[eebus ] DEBUG 2024/01/03 18:41:20 Recv: d:_i:47859_Elli-Wallbox-2117A1BRE2: to NodeManagement read 216 NodeManagementUseCaseData
[eebus ] DEBUG 2024/01/03 18:41:20 Send: d:_i:47859_Elli-Wallbox-2117A1BRE2 reply 13 216 NodeManagementUseCaseData
[eebus ] DEBUG 2024/01/03 18:41:20 Send: d:_i:47859_Elli-Wallbox-2117A1BRE2 result 14 216 ResultData 0
[site  ] WARN 2024/01/03 18:41:21 battery configured but residualPower is missing or <= 0 (add residualPower: 100 to site), see https://docs.evcc.io/en/docs/reference/configuration/site#residualpower
[site  ] INFO 2024/01/03 18:41:21 site config:
[site  ] INFO 2024/01/03 18:41:21   meters:      grid ✓ pv ✓ battery ✓
[site  ] INFO 2024/01/03 18:41:21     grid:      power ✓ energy ✓ currents ✓
[site  ] INFO 2024/01/03 18:41:21     pv 1:      power ✓ energy ✓ currents ✗
[site  ] INFO 2024/01/03 18:41:21     battery 1: power ✓ energy ✓ currents ✗ soc ✓ capacity ✗
[site  ] INFO 2024/01/03 18:41:21   vehicles:
[site  ] INFO 2024/01/03 18:41:21     vehicle 1: range ✓ finish ✓ status ✓ climate ✓ wakeup ✓
[site  ] INFO 2024/01/03 18:41:21     vehicle 2: range ✓ finish ✓ status ✓ climate ✓ wakeup ✓
[lp-1  ] INFO 2024/01/03 18:41:21 loadpoint 1:
[lp-1  ] INFO 2024/01/03 18:41:21   mode:        pv
[lp-1  ] INFO 2024/01/03 18:41:21   charger:     power ✓ energy ✗ currents ✓ phases ✗ wakeup ✗
[lp-1  ] INFO 2024/01/03 18:41:21   meters:      charge ✓
[lp-1  ] INFO 2024/01/03 18:41:21     charge:    power ✓ energy ✗ currents ✓
[lp-1  ] DEBUG 2024/01/03 18:41:21 phase timer inactive
[lp-1  ] DEBUG 2024/01/03 18:41:21 pv timer inactive
[lp-1  ] DEBUG 2024/01/03 18:41:21 guard timer inactive
[site  ] WARN 2024/01/03 18:41:21 interval <30s can lead to unexpected behavior, see https://docs.evcc.io/docs/reference/configuration/interval
[site  ] DEBUG 2024/01/03 18:41:21 ----
[lp-1  ] DEBUG 2024/01/03 18:41:21 charge power: 0W
[site  ] DEBUG 2024/01/03 18:41:21 pv power: 0W
[site  ] DEBUG 2024/01/03 18:41:22 battery soc: 60%
[site  ] DEBUG 2024/01/03 18:41:22 battery power: 0W
[site  ] DEBUG 2024/01/03 18:41:22 grid power: 710W
[site  ] DEBUG 2024/01/03 18:41:23 grid powers: [230 240 240]W
[site  ] DEBUG 2024/01/03 18:41:24 grid currents: [1.01 1 1.02]A
[site  ] DEBUG 2024/01/03 18:41:24 site power: 710W
[lp-1  ] DEBUG 2024/01/03 18:41:24 charge currents: [0 0 0]A
[lp-1  ] DEBUG 2024/01/03 18:41:24 charger status: A
[lp-1  ] INFO 2024/01/03 18:41:24 car disconnected
[lp-1  ] DEBUG 2024/01/03 18:41:24 set session soc limit: 0
[lp-1  ] DEBUG 2024/01/03 18:41:24 set session energy limit: 0
[site  ] DEBUG 2024/01/03 18:41:31 ----
[lp-1  ] DEBUG 2024/01/03 18:41:31 charge power: 0W
[site  ] DEBUG 2024/01/03 18:41:31 pv power: 0W
[site  ] DEBUG 2024/01/03 18:41:32 battery soc: 60%
[site  ] DEBUG 2024/01/03 18:41:32 battery power: 0W
[site  ] DEBUG 2024/01/03 18:41:32 grid power: 710W
[site  ] DEBUG 2024/01/03 18:41:33 grid powers: [230 240 240]W
[site  ] DEBUG 2024/01/03 18:41:34 grid currents: [0.97 1.01 1.02]A
[site  ] DEBUG 2024/01/03 18:41:34 site power: 710W
[lp-1  ] DEBUG 2024/01/03 18:41:34 charge currents: [0 0 0]A
[lp-1  ] DEBUG 2024/01/03 18:41:34 charger status: A
[site  ] DEBUG 2024/01/03 18:41:41 ----
[lp-1  ] DEBUG 2024/01/03 18:41:41 charge power: 0W
[site  ] DEBUG 2024/01/03 18:41:45 pv power: 0W
[site  ] DEBUG 2024/01/03 18:41:46 battery soc: 60%
[site  ] DEBUG 2024/01/03 18:41:46 battery power: 0W
[site  ] DEBUG 2024/01/03 18:41:47 grid power: 610W
[site  ] DEBUG 2024/01/03 18:41:48 grid powers: [210 200 200]W
[site  ] DEBUG 2024/01/03 18:41:49 grid currents: [0.88 0.84 0.85]A
[site  ] DEBUG 2024/01/03 18:41:49 site power: 610W
[lp-1  ] DEBUG 2024/01/03 18:41:49 charge currents: [0 0 0]A
[lp-1  ] DEBUG 2024/01/03 18:41:49 charger status: A
[site  ] DEBUG 2024/01/03 18:41:51 ----
[lp-1  ] DEBUG 2024/01/03 18:41:51 charge power: 0W
[site  ] DEBUG 2024/01/03 18:41:51 pv power: 0W
[site  ] DEBUG 2024/01/03 18:41:52 battery soc: 60%
[site  ] DEBUG 2024/01/03 18:41:52 battery power: 0W
[site  ] DEBUG 2024/01/03 18:41:52 set battery discharge control: true
[site  ] DEBUG 2024/01/03 18:41:52 grid power: 610W
[site  ] DEBUG 2024/01/03 18:41:53 grid powers: [210 200 200]W
[site  ] DEBUG 2024/01/03 18:41:54 grid currents: [0.88 0.84 0.85]A
[site  ] DEBUG 2024/01/03 18:41:54 site power: 610W
[lp-1  ] DEBUG 2024/01/03 18:41:54 charge currents: [0 0 0]A
[lp-1  ] DEBUG 2024/01/03 18:41:54 charger status: A
[site  ] DEBUG 2024/01/03 18:42:01 ----
[lp-1  ] DEBUG 2024/01/03 18:42:01 charge power: 0W
[site  ] DEBUG 2024/01/03 18:42:01 pv power: 0W
[site  ] DEBUG 2024/01/03 18:42:02 battery soc: 60%
[site  ] DEBUG 2024/01/03 18:42:02 battery power: 0W
[site  ] DEBUG 2024/01/03 18:42:02 grid power: 610W
[site  ] DEBUG 2024/01/03 18:42:03 grid powers: [210 200 200]W
[site  ] DEBUG 2024/01/03 18:42:04 grid currents: [0.88 0.84 0.85]A
[site  ] DEBUG 2024/01/03 18:42:04 site power: 610W
[lp-1  ] DEBUG 2024/01/03 18:42:04 charge currents: [0 0 0]A
[lp-1  ] DEBUG 2024/01/03 18:42:04 charger status: A

What type of operating system are you running?

Linux

Version

0.123.5

andig commented 8 months ago

Probiers mal mit curl. Was steht in der Antwort?

sahomm commented 8 months ago

nach: curl -X POST -v http://localhost:7070/api/batterydischargecontrol/true

mit direkter Adressierung: curl -X POST -v http://192.168.181.135:8899/api/batterydischargecontrol/true

andig commented 8 months ago

Das ergibt ja keinen Sinn. Dein Screenshot zeigt, dass der Request geht.

mit direkter Adressierung:

Was heisst das? Der Request muss an evcc gehen, wo auch immer das bei Dir läuft.

sahomm commented 8 months ago

ich war mir mir nicht sicher ob der Request an den WR zur Steuerung gehen soll, sry.

Dein Screenshot zeigt, dass der Request geht

Stimmt, dies sagt ja auch das Log, hier ein Auszug:

[lp-1  ] DEBUG 2024/01/04 10:05:19 charge power: 0W
[site  ] DEBUG 2024/01/04 10:05:20 pv power: 300W
[site  ] DEBUG 2024/01/04 10:05:21 battery soc: 54%
[site  ] DEBUG 2024/01/04 10:05:21 battery power: 0W
[site  ] DEBUG 2024/01/04 10:05:21 grid power: 480W
[site  ] DEBUG 2024/01/04 10:05:22 grid powers: [160 160 160]W
[site  ] DEBUG 2024/01/04 10:05:22 grid currents: [0.66 0.62 0.71]A
[site  ] DEBUG 2024/01/04 10:05:23 site power: 480W
[lp-1  ] DEBUG 2024/01/04 10:05:23 charge currents: [0 0 0]A
[lp-1  ] DEBUG 2024/01/04 10:05:23 charger status: A
**[site  ] DEBUG 2024/01/04 10:05:24 set battery discharge control: false**
[site  ] DEBUG 2024/01/04 10:05:29 ----
[lp-1  ] DEBUG 2024/01/04 10:05:29 charge power: 0W
[site  ] DEBUG 2024/01/04 10:05:30 pv power: 300W
[site  ] DEBUG 2024/01/04 10:05:31 battery soc: 54%
[site  ] DEBUG 2024/01/04 10:05:31 battery power: 0W
[site  ] DEBUG 2024/01/04 10:05:31 grid power: 480W
[site  ] DEBUG 2024/01/04 10:05:32 grid powers: [160 160 160]W
[site  ] DEBUG 2024/01/04 10:05:33 grid currents: [0.66 0.66 0.66]A
[site  ] DEBUG 2024/01/04 10:05:33 site power: 480W
[lp-1  ] DEBUG 2024/01/04 10:05:33 charge currents: [0 0 0]A
[lp-1  ] DEBUG 2024/01/04 10:05:33 charger status: A
[site  ] DEBUG 2024/01/04 10:05:39 ----
[lp-1  ] DEBUG 2024/01/04 10:05:39 charge power: 0W
[site  ] DEBUG 2024/01/04 10:05:40 pv power: 300W
[site  ] DEBUG 2024/01/04 10:05:41 battery soc: 54%
[site  ] DEBUG 2024/01/04 10:05:41 battery power: 0W
[site  ] DEBUG 2024/01/04 10:05:41 grid power: 490W
[site  ] DEBUG 2024/01/04 10:05:42 grid powers: [170 160 160]W
**[site  ] DEBUG 2024/01/04 10:05:42 set battery discharge control: true**
[site  ] DEBUG 2024/01/04 10:05:42 grid currents: [0.7 0.66 0.71]A
[site  ] DEBUG 2024/01/04 10:05:43 site power: 490W
[lp-1  ] DEBUG 2024/01/04 10:05:43 charge currents: [0 0 0]A
[lp-1  ] DEBUG 2024/01/04 10:05:43 charger status: A
[site  ] DEBUG 2024/01/04 10:05:49 ----
[lp-1  ] DEBUG 2024/01/04 10:05:49 charge power: 0W
[site  ] DEBUG 2024/01/04 10:05:57 pv power: 300W
[site  ] DEBUG 2024/01/04 10:05:57 battery soc: 54%
[site  ] DEBUG 2024/01/04 10:05:57 battery power: 0W
[site  ] DEBUG 2024/01/04 10:05:58 grid power: 470W
[site  ] DEBUG 2024/01/04 10:05:59 grid powers: [150 160 160]W
[site  ] DEBUG 2024/01/04 10:06:00 grid currents: [0.62 0.66 0.66]A
[site  ] DEBUG 2024/01/04 10:06:00 site power: 470W
[lp-1  ] DEBUG 2024/01/04 10:06:00 charge currents: [0 0 0]A
[lp-1  ] DEBUG 2024/01/04 10:06:00 charger status: A
[site  ] DEBUG 2024/01/04 10:06:00 ----

Nur warum kommt die Meldung gem. Screenshot?

andig commented 8 months ago

ich war mir mir nicht sicher ob der Request an den WR zur Steuerung gehen soll, sry.

Nein, an evcc. Mach doch bitte mal den Request wie angefragt.

sahomm commented 8 months ago

ich dachte diesen Request meinst du:

curl -X POST -v http://localhost:7070/api/batterydischargecontrol/true Trying ::1:7070... connect to ::1 port 7070 failed: Verbindungsaufbau abgelehnt Trying 127.0.0.1:7070... connect to 127.0.0.1 port 7070 failed: Verbindungsaufbau abgelehnt Failed to connect to localhost port 7070: Verbindungsaufbau abgelehnt Closing connection 0 curl: (7) Failed to connect to localhost port 7070: Verbindungsaufbau abgelehnt

oder welchen curl Request meinst du?

andig commented 8 months ago

Genau den, aber bitte auf evcc. Anscheinend läuft das nicht auf localhost, sonst gäbe es eine Antwort.

sahomm commented 8 months ago

merkwürdig, ich hatte diesen gestern auf der Konsole des EVCC ausgeführt. Ggf. lief zu dem Zeitpunkt EVCC nicht, sry! Aber du liegest genau richtig, nach heutigem Versuch kommt folgende Ausgabe:

curl -X POST -v http://localhost:7070/api/batterydischargecont
rol/true
*   Trying ::1:7070...
* Connected to localhost (::1) port 7070 (#0)
> POST /api/batterydischargecontrol/true HTTP/1.1
> Host: localhost:7070
> User-Agent: curl/7.74.0
> Accept: */*
> 
* Mark bundle as not supporting multiuse
< HTTP/1.1 400 Bad Request
< Content-Type: application/json; charset=UTF-8
< Vary: Accept-Encoding
< Date: Thu, 04 Jan 2024 10:07:44 GMT
< Content-Length: 77
< 
{"error":"dod: modbus: response data size '17' does not match expected '4'"}
* Connection #0 to host localhost left intact

merkwürdigerweise funktioniert FALSE:

curl -X POST -v http://localhost:7070/api/batterydischargecont
rol/false
*   Trying ::1:7070...
* Connected to localhost (::1) port 7070 (#0)
> POST /api/batterydischargecontrol/false HTTP/1.1
> Host: localhost:7070
> User-Agent: curl/7.74.0
> Accept: */*
> 
* Mark bundle as not supporting multiuse
< HTTP/1.1 200 OK
< Content-Type: application/json; charset=UTF-8
< Vary: Accept-Encoding
< Date: Thu, 04 Jan 2024 10:10:58 GMT
< Content-Length: 17
< 
{"result":false}
* Connection #0 to host localhost left intact
andig commented 8 months ago

{"error":"dod: modbus: response data size '17' does not match expected '4'"}

Die Umschaltung funktioniert nicht. Bitte mal auf der Kommandozeile:

evcc meter --log error,modbus:trace --battery-mode hold

durchführen.

@naltatis das ist wieder ein Fall, wo wir aus dem UI einen Request machen der einen Fehler liefert, den Fehler aber nirgendwo anzeigen. Könnten wir das error Result- wenn es eines gibt- zumindest mit in die Logmeldung aufnehmen, auch wenns ein technischer Fehler ist? Wir sind sonst blind...

sahomm commented 8 months ago

Ich habe -c zum Verweis auf die evcc.yaml ergänzt. Hier der Result:

evcc -c /etc/evcc.yaml meter --log error,modbus:trace --battery-mode hold
[main  ] INFO 2024/01/04 12:42:42 evcc 0.123.5 (7819662a)
[main  ] INFO 2024/01/04 12:42:42 using config file: /etc/evcc.yaml
[modbus] TRACE 2024/01/04 12:42:42 modbus: send 00 01 00 00 00 06 01 03 06 08 00 01
[modbus] TRACE 2024/01/04 12:42:43 modbus: recv 00 01 00 00 00 05 01 03 02 00 35
[modbus] TRACE 2024/01/04 12:42:43 modbus: send 00 02 00 00 00 09 01 10 10 4d 00 01 02 12 5c
[modbus] TRACE 2024/01/04 12:42:43 modbus: recv 00 02 00 00 00 13 01 10 10 4d 00 01 95 1e 00 00 00 00 00 00 00 00 00 00 00
[main  ] FATAL 2024/01/04 12:42:43 set battery mode: dod: modbus: response data size '17' does not match expected '4'
andig commented 8 months ago

It seems writing 02 12(530) to DOD (10 4d) does not work. Seems we should remove the scale: 100 from the template.

@PeterPablo original request was https://github.com/evcc-io/evcc/issues/10379#issuecomment-1805276942. Does this analysis make sense?

@sahomm could you give remote access to WR (port forwarting) to info@evcc.io so we can test this?

andig commented 8 months ago

Leider klappt auch das nicht:

evcc meter --log error,modbus:trace -c battery.yaml -b normal -w 30s

MinSoc: 20
[modbus] TRACE 2024/01/04 14:28:22 modbus: send 00 01 00 00 00 09 01 10 10 4d 00 01 02 00 50
[modbus] TRACE 2024/01/04 14:28:22 modbus: recv 00 01 00 00 00 13 01 10 10 4d 00 01 95 1e 00 00 00 00 00 00 00 00 00 00 00
[main  ] FATAL 2024/01/04 14:28:22 set battery mode: dod: modbus: response data size '17' does not match expected '4'

Minsoc 20% entspricht DOD 80%, also 0x50. Leider wird auch das vom WR abgelehnt. Jetzt bin ich ratlos.

sahomm commented 8 months ago

In folgendem Thread aus dem PV-Forum wurde davon gesprochen, dass beim Schreiben auf den Sofar die Daten in einem bestimmten Frame gemeinsam geschrieben werden müssen.

https://www.photovoltaikforum.com/thread/217362-sofar-hyd-serie-kommunikation-%C3%BCber-modbus-tcp-erfahrungen/?pageNo=4 SOFAR HYD Serie - Kommunikation über Modbus TCP - Erfahrungen - Photovoltaikforum photovoltaikforum.com

Kann es evtl damit zusammenhängen?

Am 04.01.2024 um 14:31 schrieb andig @.***>:

Leider klappt auch das nicht:

evcc meter --log error,modbus:trace -c battery.yaml -b normal -w 30s

MinSoc: 20 [modbus] TRACE 2024/01/04 14:28:22 modbus: send 00 01 00 00 00 09 01 10 10 4d 00 01 02 00 50 [modbus] TRACE 2024/01/04 14:28:22 modbus: recv 00 01 00 00 00 13 01 10 10 4d 00 01 95 1e 00 00 00 00 00 00 00 00 00 00 00 [main ] FATAL 2024/01/04 14:28:22 set battery mode: dod: modbus: response data size '17' does not match expected '4' Minsoc 20% entspricht DOD 80%, also 0x50. Leider wird auch das vom WR abgelehnt. Jetzt bin ich ratlos.

— Reply to this email directly, view it on GitHub https://github.com/evcc-io/evcc/issues/11454#issuecomment-1877100280, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACXAM5YJXSIFK25B4N3XKFTYM2VMJAVCNFSM6AAAAABBLYXKWGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNZXGEYDAMRYGA. You are receiving this because you were mentioned.

andig commented 8 months ago

Wen dem so wäre- mit den Parametern kann die komplette Batteriekonfiguration geändert werden- wäre mit das zu heiss und eignet sich ohnehin nicht für ein Template. Dann müsste die Umsetzung leider wieder raus bis es einen besseren Ansatz gibt.

sahomm commented 8 months ago

das verstehe ich. Leider bin ich hier wenig Hilfe. Solle jedoch bedarf bestehen weiter zum Test auf den WR zugreifen zu wollen, bitte melden.

VIELN DANK FÜR DEINE MÜHE!!!!

Beste Grüße

Sascha

Am 04.01.2024 um 14:54 schrieb andig @.***>:

Wen dem so wäre- mit den Parametern kann die komplette Batteriekonfiguration geändert werden- wäre mit das zu heiss und eignet sich ohnehin nicht für ein Template. Dann müsste die Umsetzung leider wieder raus bis es einen besseren Ansatz gibt.

— Reply to this email directly, view it on GitHub https://github.com/evcc-io/evcc/issues/11454#issuecomment-1877130967, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACXAM57AGCV66W5DUHVCPYLYM2YABAVCNFSM6AAAAABBLYXKWGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNZXGEZTAOJWG4. You are receiving this because you were mentioned.

PeterPablo commented 8 months ago

Ich hatte damals nur die Register anhand der Dokumentation herausgesucht. Bezüglich Umsetzung mit MODBUS und dessen Eigenheiten habe ich bisher leider keine Erfahrungen. Der SofarSolar-Support hatte mir ja nach einigen Tagen die Dokumentation zur Verfügung gestellt. Ich würde dort mal nachfragen ob sie einen Tipp haben.

sahomm commented 8 months ago

@PeterPablo vielen Dank für deine Mühe! Solltest du ein Sofar HYD 15 zum testen benötigen, laß es mich wissen, ich gebe dir gerne meinen frei.

Wie oben geschrieben, hat es im PV-Forum scheinbar bereits Erfolge gegeben. Ggf. kannst du/ihr von den Erfahrungen partizipieren oder laß(t) es mich wissen wie ich dich ggf. unterstützen kann.

andig commented 8 months ago

Wir haben das jetzt wieder ausgebaut da leider nur der ganze Batterieblock geschrieben werden kann.

PeterPablo commented 8 months ago

Ich hatte damals nur die Register anhand der Dokumentation herausgesucht. Bezüglich Umsetzung mit MODBUS und dessen Eigenheiten habe ich bisher leider keine Erfahrungen. Der SofarSolar-Support hatte mir ja nach einigen Tagen die Dokumentation zur Verfügung gestellt. Ich würde dort mal nachfragen ob sie einen Tipp haben.