ORNO-WE-529 Stromzähler mit RS485 in FHEM

Begonnen von StephanSelve, 03 März 2026, 11:50:07

Vorheriges Thema - Nächstes Thema

StephanSelve

Hallo zusammen,

ich bekomme es einfach nicht hin.

Den neuen Stromzähler ORNO-WE-529 kann ich einfach nicht auslesen.
Bei dem Vorgänger ORNO-WE-516 war alles schnell erledigt.

Hier der komplette Code für ein ORNO-WE-516 mit RS485-USB-Dongle
define zaehler_orno516 ModbusAttr 1 60
attr zaehler_orno516 dev-h-defLen 4
attr zaehler_orno516 dev-h-defPoll 1
attr zaehler_orno516 disable 0
attr zaehler_orno516 enableControlSet 1
attr zaehler_orno516 event-min-interval .*:900
attr zaehler_orno516 event-on-change-reading .*
attr zaehler_orno516 obj-h0-reading Serialnbr
attr zaehler_orno516 obj-h13-len 1
attr zaehler_orno516 obj-h13-reading CycleTime
attr zaehler_orno516 obj-h14-format %.1f
attr zaehler_orno516 obj-h14-reading Volt_L1
attr zaehler_orno516 obj-h14-unpack f>
attr zaehler_orno516 obj-h16-format %.1f
attr zaehler_orno516 obj-h16-reading Volt_L2
attr zaehler_orno516 obj-h16-unpack f>
attr zaehler_orno516 obj-h18-format %.1f
attr zaehler_orno516 obj-h18-reading Volt_L3
attr zaehler_orno516 obj-h18-unpack f>
attr zaehler_orno516 obj-h20-format %.1f
attr zaehler_orno516 obj-h20-reading Frequenz_Hz
attr zaehler_orno516 obj-h20-unpack f>
attr zaehler_orno516 obj-h22-format %.2f
attr zaehler_orno516 obj-h22-reading Leistung_L1
attr zaehler_orno516 obj-h22-unpack f>
attr zaehler_orno516 obj-h24-format %.2f
attr zaehler_orno516 obj-h24-reading Leistung_L2
attr zaehler_orno516 obj-h24-unpack f>
attr zaehler_orno516 obj-h256-format %.2f
attr zaehler_orno516 obj-h256-reading kWh_Gesamt
attr zaehler_orno516 obj-h256-unpack f>
attr zaehler_orno516 obj-h258-format %.2f
attr zaehler_orno516 obj-h258-reading kWh_L1
attr zaehler_orno516 obj-h258-unpack f>
attr zaehler_orno516 obj-h26-format %.2f
attr zaehler_orno516 obj-h26-reading Leistung_L3
attr zaehler_orno516 obj-h26-unpack f>
attr zaehler_orno516 obj-h260-format %.2f
attr zaehler_orno516 obj-h260-reading kWh_L2
attr zaehler_orno516 obj-h260-unpack f>
attr zaehler_orno516 obj-h262-format %.2f
attr zaehler_orno516 obj-h262-reading kWh_L3
attr zaehler_orno516 obj-h262-unpack f>
attr zaehler_orno516 obj-h28-format %.3f
attr zaehler_orno516 obj-h28-reading kW_Gesamt
attr zaehler_orno516 obj-h28-unpack f>
attr zaehler_orno516 obj-h30-format %.3f
attr zaehler_orno516 obj-h30-reading kW_L1
attr zaehler_orno516 obj-h30-unpack f>
attr zaehler_orno516 obj-h32-format %.3f
attr zaehler_orno516 obj-h32-reading kW_L2
attr zaehler_orno516 obj-h32-unpack f>
attr zaehler_orno516 obj-h34-format %.3f
attr zaehler_orno516 obj-h34-reading kW_L3
attr zaehler_orno516 obj-h34-unpack f>
attr zaehler_orno516 obj-h54-format %.3f
attr zaehler_orno516 obj-h54-reading Faktor_L1
attr zaehler_orno516 obj-h54-unpack f>
attr zaehler_orno516 obj-h56-format %.3f
attr zaehler_orno516 obj-h56-reading Faktor_L2
attr zaehler_orno516 obj-h56-unpack f>
attr zaehler_orno516 obj-h58-format %.3f
attr zaehler_orno516 obj-h58-reading Faktor_L3
attr zaehler_orno516 obj-h58-unpack f>
attr zaehler_orno516 room ORNO

define filelog_watt FileLog ./Watt-%Y-%W.log zaehler_orno516
attr filelog_watt logtype text
attr filelog_watt room ORNO


define modbus_line Modbus /dev/ttyUSB0@9600,8,E,1
attr modbus_line room ORNO

Es wäre schön, wenn mir jemand helfen kann.
Ich benötige die Vorgaben zum Auslesen.

Herzliche Grüße
Stephan

Hermann

Hallo Stephan
Bin nur durch zufall auf diesen Beitrag gestoßen darum sehr spät.
Warscheinlich hast du es schon gelöst, wenn nicht stellen ich mal einen Link zu verfügung
dort kann man die PC software runterladen um den Zähler direkt auszulesen und eine
Excel Tabelle mit den Modbus adressen.
https://www.orno.pl/en/energy-meters-with-mid/2489-3-phase-energy-meter-100a-rs-485-port-mid-4-modules-installation-rail-din-th-35mm-pv-ready-5908254846557.html

Vielleicht hilft es ja weiter.

mfg. Hermann

Schöne Grüße aus dem Münsterland
PI3+ Fritzbox , Homematic , FS20 , 1Wire , Shelly , EspXXXX , Duofern , Modbus

StephanSelve

Hallo liebe FHEM-Gemeinde,

so funktioniert es.
Stromzähler ORNO-WE-529 am RS485 Anschluss mit einem Elfin EW11 (wlan to RS485) verbinden.
Hinweis: Der EW11 funktioniert stabil, besser wie ein USB-Stick-RS485.

Wlan am EW11 einrichten
Serial Port Setting: 2400/8/1/even; 512/50; Disable, Disable, Modbus
Communication Settings: Name=TPC, Tcp Server; 502/512/60/0; 3; Disable/Uart

Dann noch "define orno_we_529 ModbusAttr ....
define orno_we_529 ModbusAttr 1 30 192.168.xxx.xx:502 TCP
attr orno_we_529 alias ORNO WE-529
attr orno_we_529 dev-h-defLen 1
attr orno_we_529 dev-h-defPoll 1
attr orno_we_529 disable 0
attr orno_we_529 enableControlSet 1
attr orno_we_529 event-on-change-reading .*
attr orno_we_529 icon stromzaehler_icon@green
attr orno_we_529 obj-h1025-expr hex($val) / 1000
attr orno_we_529 obj-h1025-format %.1f V
attr orno_we_529 obj-h1025-len 1
attr orno_we_529 obj-h1025-poll 1
attr orno_we_529 obj-h1025-reading Spannung L1
attr orno_we_529 obj-h1025-unpack n
attr orno_we_529 obj-h1027-expr hex($val) / 1000
attr orno_we_529 obj-h1027-format %.1f V
attr orno_we_529 obj-h1027-len 1
attr orno_we_529 obj-h1027-poll 1
attr orno_we_529 obj-h1027-reading Spannung L2
attr orno_we_529 obj-h1027-unpack n
attr orno_we_529 obj-h1029-expr hex($val) / 1000
attr orno_we_529 obj-h1029-format %.1f V
attr orno_we_529 obj-h1029-len 1
attr orno_we_529 obj-h1029-poll 1
attr orno_we_529 obj-h1029-reading Spannung L3
attr orno_we_529 obj-h1033-expr $val
attr orno_we_529 obj-h1033-format %.1f V
attr orno_we_529 obj-h1033-poll 1
attr orno_we_529 obj-h1033-reading Leitungsspannung zwischen Phase B und Phase C
attr orno_we_529 obj-h1037-expr 4
attr orno_we_529 obj-h1037-format %.5f V
attr orno_we_529 obj-h1037-len 1
attr orno_we_529 obj-h1037-poll 1
attr orno_we_529 obj-h1037-reading Mittelwert der L-N-Spannung
attr orno_we_529 obj-h1039-expr hex(hex($val)) / 1000
attr orno_we_529 obj-h1039-format %.1f V
attr orno_we_529 obj-h1039-len 1
attr orno_we_529 obj-h1039-poll 1
attr orno_we_529 obj-h1039-reading Mittelwert der L-L-Spannung
attr orno_we_529 obj-h1039-unpack n
attr orno_we_529 obj-h1051-expr $val / 1000
attr orno_we_529 obj-h1051-format %.3f kW
attr orno_we_529 obj-h1051-poll 1
attr orno_we_529 obj-h1051-reading Wirkleistung_L1
attr orno_we_529 obj-h1053-expr $val / 1000
attr orno_we_529 obj-h1053-format %.3f kW
attr orno_we_529 obj-h1053-poll 1
attr orno_we_529 obj-h1053-reading Wirkleistung_L2
attr orno_we_529 obj-h1055-expr $val / 1000
attr orno_we_529 obj-h1055-format %.3f kW
attr orno_we_529 obj-h1055-poll 1
attr orno_we_529 obj-h1055-reading Wirkleistung_L3
attr orno_we_529 obj-h1057-expr $val / 1000
attr orno_we_529 obj-h1057-format %.3f kW
attr orno_we_529 obj-h1057-poll 1
attr orno_we_529 obj-h1057-reading Wirkleistung_Gesamt
attr orno_we_529 obj-h1077-expr $val /10
attr orno_we_529 obj-h1077-format %.1f Hz
attr orno_we_529 obj-h1077-poll 1
attr orno_we_529 obj-h1077-reading Gesamtfrequenz
attr orno_we_529 obj-h1281-expr $val /100
attr orno_we_529 obj-h1281-format %.3f kWh
attr orno_we_529 obj-h1281-poll 1
attr orno_we_529 obj-h1281-reading Gesamt-Wirkleistung L1
attr orno_we_529 obj-h1381-expr $val / 100
attr orno_we_529 obj-h1381-format %.2f kWh
attr orno_we_529 obj-h1381-poll 1
attr orno_we_529 obj-h1381-reading Gesamt-Wirkleistung L2
attr orno_we_529 obj-h1481-expr $val / 100
attr orno_we_529 obj-h1481-format %.2f kWh
attr orno_we_529 obj-h1481-poll 1
attr orno_we_529 obj-h1481-reading Gesamt-Wirkleistung L3
attr orno_we_529 obj-h271-expr $val / 100
attr orno_we_529 obj-h271-format %.2f kWh
attr orno_we_529 obj-h271-poll 1
attr orno_we_529 obj-h271-reading Gesamte aktive Energie in Vorwärtsrichtung
attr orno_we_529 room Modbus

Das war ein Stück Arbeit herauszufinden, welche Readings benötigt werden.
Die Herstellerangaben sind etwas undurchsichtig.

Daher stimmen die Spannungsangaben der Leiter 1 bis 3, aber nicht zwischen L1 und L2, bzw. L2 und L3 usw.

Vielleicht hat von euch jemand eine Idee, welcher Rechenschritt, oder obj-hxxxx benötigt wird.

Viele liebe Grüße
Stephan