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

tq em420 - Aufgenommene Leistung stimmt nicht #16765

Open
1 task done
crazycusti opened this issue Oct 21, 2024 · 9 comments
Open
1 task done

tq em420 - Aufgenommene Leistung stimmt nicht #16765

crazycusti opened this issue Oct 21, 2024 · 9 comments
Labels
devices Specific device support

Comments

@crazycusti
Copy link

Describe the bug

Moin!

Ich habe hier eine Heidelberg Ampfilid Energy Control Wallbox mit seperaten Zähler TQ-Group 420 , in evcc wird mir die aufgenommene Leistung aber mit Faktor *1000? anzeigt. Ich vermute mal das Register wird nicht korrekt im Scale ausgelesen.. Die Box ist erst 1 Woche alt, Zähler ebenso mit aktuellster 3.40 Firmware.

Steps to reproduce

  1. Logs auslesen.
  2. Konfiguration überprüfen, EM420 Webinterface prüfen
  3. Neustart evcc
    ...

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: debug
levels:
  cache: error

# unique installation id
plant: x

sponsortoken: x


interval: 25s # control cycle interval

meters:
- type: template
  template: sma-home-manager
  usage: grid
  host: 192.168.178.110
  name: grid1
- type: template
  template: sma-hybrid
  id: 3
  host: 192.168.178.148
  port: 502
  usage: pv
  modbus: tcpip
  name: pv2
- type: template
  template: sma-hybrid
  id: 3
  host: 192.168.178.148
  port: 502
  usage: battery
  modbus: tcpip
  name: battery3
- type: template
  template: sma-inverter-modbus
  id: 3
  host: 192.168.178.131
  port: 502
  usage: pv
  modbus: tcpip
  name: pv4
- type: template
  template: sma-inverter-modbus
  id: 3
  host: 192.168.178.126
  port: 502
  usage: pv
  modbus: tcpip
  name: pv5
- type: template
  template: sma-inverter-modbus
  id: 3
  host: 192.168.178.187
  port: 502
  usage: pv
  modbus: tcpip
  name: pv6
- name: em420
  type: template
  template: tq-em420
  usage: charger
  host: 192.168.178.94 # IP-Adresse oder Hostname
  token: x
- type: template
  template: sma-inverter-modbus
  id: 3
  host: 192.168.178.112
  port: 502
  usage: pv
  modbus: tcpip
  name: pv7
- type: template
  template: shelly-1pm
  usage: pv
  host: 192.168.178.191
  name: pv8

chargers:
- type: template
  template: heidelberg
  name: wallbox7
  modbus: rs485tcpip
  id: 2
  host: 192.168.178.123 # Hostname
  port: 8899 # Port

vehicles:
 - name: my_car
   type: template
   template: audi
   title: Audi e-tron
   user: x
   password: x
   vin: x
#   capacity: 95


loadpoints:
- title: Hof
  charger: wallbox7
  vehicle: my_car
  mode: pv
  meter: em420
  phases: 3

site:
  title: Klosterhörn
  meters:
    grid: grid1
    pv:
    - pv2
    - pv4
    - pv5
    - pv6
    - pv7
    - pv8
    battery:
    - battery3

tariffs:
  currency: EUR # (default EUR)
  grid:
    type: fixed
    price: 0.26 # EUR/kWh
  feedin:
    type: fixed
    price: 0.06 # EUR/kWh

Log details

Okt 21 15:26:08 Smarthome evcc[3823]: [lp-1  ] DEBUG 2024/10/21 15:26:08 vehicle odometer: 113662km
Okt 21 15:26:08 Smarthome evcc[3823]: [tq-em420] TRACE 2024/10/21 15:26:08 GET http://192.168.178.94:80/api/json/local/values/smart-meter
Okt 21 15:26:08 Smarthome evcc[3823]: [sma   ] TRACE 2024/10/21 15:26:08 recv 192.168.178.110: [proto.GroupPacketEntry, proto.SmaNet2PacketEntry]
Okt 21 15:26:08 Smarthome evcc[3823]: [tq-em420] TRACE 2024/10/21 15:26:08 {"smart-meter":{"configuration_id":"84b6174e6d51f10809793fc105951e0851def70b","status":"STATUS_OK","timestamp":{"seconds":1729517168,"nanos":592178297},"values":{"active_energy_+":69564000,"active_energy_+_L1":24308300,"active_energy_+_L2":22834400,"active_energy_+_L3":22421200,"active_energy_-":0,"active_energy_-_L1":0,"active_energy_-_L2":0,"active_energy_-_L3":0,"active_power_+":4070700,"active_power_+_L1":1349300,"active_power_+_L2":1373700,"active_power_+_L3":1347700,"active_power_-":0,"active_power_-_L1":0,"active_power_-_L2":0,"active_power_-_L3":0,"apparent_energy_+":70277900,"apparent_energy_+_L1":24835600,"apparent_energy_+_L2":22930600,"apparent_energy_+_L3":22511900,"apparent_energy_-":0,"apparent_energy_-_L1":0,"apparent_energy_-_L2":0,"apparent_energy_-_L3":0,"apparent_power_+":4099800,"apparent_power_+_L1":1359600,"apparent_power_+_L2":1383600,"apparent_power_+_L3":1356700,"apparent_power_-":0,"apparent_power_-_L1":0,"apparent_power_-_L2":0,"apparent_power_-_L3":0,"current_L1":5903,"current_L2":5959,"current_L3":5886,"power_factor":993,"power_factor_L1":992,"power_factor_L2":993,"power_factor_L3":993,"reactive_energy_+":0,"reactive_energy_+_L1":0,"reactive_energy_+_L2":0,"reactive_energy_+_L3":0,"reactive_energy_-":7156000,"reactive_energy_-_L1":3215100,"reactive_energy_-_L2":2011600,"reactive_energy_-_L3":1929200,"reactive_power_+":0,"reactive_power_+_L1":0,"reactive_power_+_L2":0,"reactive_power_+_L3":0,"reactive_power_-":487900,"reactive_power_-_L1":166600,"reactive_power_-_L2":165100,"reactive_power_-_L3":156100,"supply_frequency":49998,"voltage_L1":230540,"voltage_L2":232296,"voltage_L3":230599}}}
Okt 21 15:26:08 Smarthome evcc[3823]: [lp-1  ] DEBUG 2024/10/21 15:26:08 charge voltages: [231 232 231]V
Okt 21 15:26:08 Smarthome evcc[3823]: [lp-1  ] DEBUG 2024/10/21 15:26:08 detected connected phases: 3p
Okt 21 15:26:08 Smarthome evcc[3823]: [lp-1  ] DEBUG 2024/10/21 15:26:08 charge total import: 69564.000kWh
Okt 21 15:26:09 Smarthome evcc[3823]: [heidel] TRACE 2024/10/21 15:26:09 modbus: send 02 04 00 05 00 01 21 f8
Okt 21 15:26:09 Smarthome evcc[3823]: [sma   ] TRACE 2024/10/21 15:26:09 recv 192.168.178.110: [proto.GroupPacketEntry, proto.SmaNet2PacketEntry]
Okt 21 15:26:09 Smarthome evcc[3823]: [heidel] TRACE 2024/10/21 15:26:09 modbus: recv 02 04 02 00 07 bc f2
Okt 21 15:26:09 Smarthome evcc[3823]: [lp-1  ] DEBUG 2024/10/21 15:26:09 charger status: C
Okt 21 15:26:09 Smarthome evcc[3823]: [lp-1  ] DEBUG 2024/10/21 15:26:09 charge start energy: 69564.000kWh
Okt 21 15:26:09 Smarthome evcc[3823]: [lp-1  ] INFO 2024/10/21 15:26:09 car connected
Okt 21 15:26:09 Smarthome evcc[3823]: [lp-1  ] DEBUG 2024/10/21 15:26:09 pv timer elapse
Okt 21 15:26:09 Smarthome evcc[3823]: [lp-1  ] DEBUG 2024/10/21 15:26:09 pv timer inactive
Okt 21 15:26:09 Smarthome evcc[3823]: [lp-1  ] DEBUG 2024/10/21 15:26:09 charge total import: 69564.000kWh
Okt 21 15:26:09 Smarthome evcc[3823]: [lp-1  ] DEBUG 2024/10/21 15:26:09 charge start energy: 69564.000kWh

What type of operating system are you running?

Linux

Nightly build

  • I have verified that the issue is reproducible with the latest nightly build

Version

v0.130.13

@andig
Copy link
Member

andig commented Oct 21, 2024

Was sagt denn

evcc meter --log trace,db:error

@andig andig added the devices Specific device support label Oct 21, 2024
@n0cturne
Copy link

In deiner Konfig hast du als usage "charger" beim Zähler:

  • name: em420
    type: template
    template: tq-em420
    usage: charger
    host: 192.168.178.94 # IP-Adresse oder Hostname
    token: x

In der Dokue für Zähler an einer Wallbox wird hier jedoch immer "charge" verwendet. Vielleicht ist das auch das Problem?

@andig
Copy link
Member

andig commented Oct 22, 2024

Das wird komplett ignoriert. Der externe Zähler hat ja nur einen Verwendungszweck.

@An-Wi
Copy link

An-Wi commented Oct 22, 2024

Das wird komplett ignoriert. Der externe Zähler hat ja nur einen Verwendungszweck.

Mh, korrgiere mich, wenn ich das falsch verstehe, aber der "externe Zähler" wird ihr doch anders als üblich verwendet.
Ich selbst habe auch den TQ EM-3xx im Einsatz als "Netzverknüpfungszähler" (usage: grid).
Der Grid-Zähler von @crazycusti ist ein ganz anderen: "sma-home-manager" laut yaml.
Der TQ EM-420 wird hier doch als "Wallbox-Zähler" (usage: charge[r]) verwendet.

Wenn das flag "usage" ignoriert wird, woher weißt du dann, dass es der Wallbox-Zähler und kein Grid-Zähler ist?

@n0cturne
Copy link

und der Zähler wird auch beim Loadpoint verwendet:
loadpoints:

  • title: Hof
    charger: wallbox7
    vehicle: my_car
    mode: pv
    meter: em420
    phases: 3

Oder genügt das Bereits?

@andig
Copy link
Member

andig commented Oct 22, 2024

Gegenfrage: was soll er denn anderes messen als die angeschlossenen Ströme und Leistungen?

@VolkerK62
Copy link
Contributor

usage spielt hier überhaupt keine Rolle. Deshalb kommt auch kein Fehler, trotz des falschen wordings.

Wenn das flag "usage" ignoriert wird, woher weißt du dann, dass es der Wallbox-Zähler und kein Grid-Zähler ist?

Entscheidend ist die Zuordnung in site oder loadpoint.

usage ist wichtig bzgl. der richtigen Register Abfragen (z.B. Hybrid-Wechselricher) und/oder beim richtigen Skalieren.

@n0cturne
Copy link

aber geht es hier nicht eventuell um die Skalierung (Leistung aber mit Faktor *1000)?

@VolkerK62
Copy link
Contributor

laut dem Log oben, kommen folgende Leistungswerte:

 "active_power_+": 4070700,
 "active_power_-": 0,

Die Differenz wird in der Implementierung durch 1000 geteilt

return (res.SmartMeter.Values.ActivePowerP - res.SmartMeter.Values.ActivePowerM) / 1e3, err

Somit sollte eine Leistung von 4070,7W angezeigt werden.

Aber es fehlt die Antwort auf #16765 (comment)

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

No branches or pull requests

5 participants