KOSTAL Smart Energy Meter auslesen

Begonnen von uwek, 01 April 2020, 08:23:41

Vorheriges Thema - Nächstes Thema

ch.eick

Zitat von: ch.eick am 12 Juni 2020, 09:45:12
Eventuell stimmt da etwas mit dem $val/10000 nicht.
In anderen Devices musste ich folgendes schreiben

$val/10000;$val

Damit die Berechnung übernommen wird. Das prüfe ich später mal.

Hier noch eine kurze Rueckmeldung: Die Werte stimmen so mit dieser Umrechnung! Es war mein Gedankenfehler, da ich nach den Momentanwerten gesucht hatte und es sich bei 1.0.8 und 2.0.8 um die Gesamtzaehler handelt.
RPI4; Docker; CUNX; Eltako FSB61NP; SamsungTV H-Serie; Sonos; Vallox; Luxtronik; 3x FB7490; Stromzähler mit DvLIR; wunderground; Plenticore 10 mit BYD; EM410; SMAEM; Modbus TCP
Contrib: https://svn.fhem.de/trac/browser/trunk/fhem/contrib/ch.eick

killah78

Zitat von: uwek am 12 Juni 2020, 10:41:26
An einigen Readings bin ich gescheiert, z.B. konnte ich für M_Exported nie plausible Werte auslesen - M_Imported hingegen ging.
Glücklicherweise habe ich dann die Register für Active energy gefunden, die ja dieselben Werte enthalten sollten.

Hi, kurz als Kommentar: Das mit M_Exported hatte ich bereits gelöst. Die Werte sind fälschlicherweise mit Vorzeichen. Also nicht wie angegeben unsigned. Daher einfach mit "i>" entpacken, dann bekommst du die korrekten aber negativen Werte.

ch.eick

Zitat von: killah78 am 22 Juni 2020, 13:41:07
Hi, kurz als Kommentar: Das mit M_Exported hatte ich bereits gelöst. Die Werte sind fälschlicherweise mit Vorzeichen. Also nicht wie angegeben unsigned. Daher einfach mit "i>" entpacken, dann bekommst du die korrekten aber negativen Werte.
Hallo,
kannst Du eventuell Deine komplette Konfiguration mal bereitstellen?
RPI4; Docker; CUNX; Eltako FSB61NP; SamsungTV H-Serie; Sonos; Vallox; Luxtronik; 3x FB7490; Stromzähler mit DvLIR; wunderground; Plenticore 10 mit BYD; EM410; SMAEM; Modbus TCP
Contrib: https://svn.fhem.de/trac/browser/trunk/fhem/contrib/ch.eick

stolus

Zitat von: ch.eick am 22 Juni 2020, 15:41:05
Hallo,
kannst Du eventuell Deine komplette Konfiguration mal bereitstellen?
Hallo,
ich komme auch gerade mit der Konfig nicht weiter und eine kleiner Tip würde helfen.
Danke ;)
FHEM im Proxmox LXC
Raspberrymatic mit HB-RF-USB-2 für Homematic
ESPEasy/Tasmota/Shelly
Bayernlüfter, Plenticore Solar mit KSME EM410, EVCC mit E-Auto
Vailliant Arotherm Plus Wp mit ebus

ch.eick

RPI4; Docker; CUNX; Eltako FSB61NP; SamsungTV H-Serie; Sonos; Vallox; Luxtronik; 3x FB7490; Stromzähler mit DvLIR; wunderground; Plenticore 10 mit BYD; EM410; SMAEM; Modbus TCP
Contrib: https://svn.fhem.de/trac/browser/trunk/fhem/contrib/ch.eick

killah78

Zitat von: ch.eick am 22 Juni 2020, 15:41:05
Hallo,
kannst Du eventuell Deine komplette Konfiguration mal bereitstellen?

Hi, sorry zur späten Rückmeldung. Ich kann leider nicht viel zeigen, da ich bisher nur rumgespielt habe und noch tue. Der Plenticore ist zwar in Betrieb, aber die Batterie wird noch geliefert.
Habe bisher 3 Devices eigebunden: 1. Wechelrichter (Plenticore), 2. Wechelrichter (IQ) und den KSEM. Dazu habe ich mir noch ein Dummydevice erstellt, welches ausschließlich UserReadings aus den Geräten (alle 5 Minuten) erhält und geloggt werden.

Wie gesagt, das ist bisher alles zum testen und noch nicht final fertig.


Internals:
   DEF        71 10 192.168.78.67:1502 TCP
   DeviceName 192.168.78.67:1502
   EXPECT     idle
   FD         62
   FUUID      5edf8150-f33f-86d0-1a39-9acf189d0568fc27
   INTERVAL   10
   IODev      Plenticore
   LASTOPEN   1596513512.50603
   MODBUSID   71
   MODE       master
   MODULEVERSION Modbus 4.1.5 - 17.9.2019
   NAME       Plenticore
   NOTIFYDEV  global
   NR         816
   NTFY_ORDER 50-Plenticore
   PARTIAL   
   PROTOCOL   TCP
   STATE      opened
   TCPConn    1
   TRIGGERTIME 1596544319.58288
   TRIGGERTIME_FMT 2020-08-04 14:31:59
   TYPE       ModbusAttr
   devioLoglevel 3
   lastUpdate 1596544309.58288
   nextOpenDelay 60
   QUEUE:
   READ:
     BUFFER     
   READINGS:
     2020-08-04 14:31:50   AC_Phase1_W     0.00
     2020-08-04 14:31:50   AC_Phase2_W     0.00
     2020-08-04 14:31:50   AC_Phase3_W     0.00
     2020-08-04 14:31:49   AC_Phase_total_W 0.00
     2020-08-04 14:31:50   Battery_SOC     0.00
     2020-08-04 14:31:50   DC_Power1       0.00
     2020-08-04 14:31:49   DC_Power2       0.00
     2020-08-04 14:31:50   DC_Power3_IQ    0.00
     2020-08-04 14:31:50   DC_Power4_IQ    0.00
     2020-08-04 14:31:50   DC_Power_total  0.00
     2020-08-04 14:31:50   KSEM_phase1_W   296.40
     2020-08-04 14:31:49   KSEM_phase2_W   19.70
     2020-08-04 14:31:49   KSEM_phase3_W   151.70
     2020-08-04 14:31:50   KSEM_phase_all_W 462.30
     2020-08-04 14:31:49   Yield_Daily     0.00
     2020-08-04 14:31:49   Yield_Monthly   0.00
     2020-08-04 14:31:49   Yield_Total     968374.50
     2020-08-04 14:31:49   Yield_Yearly    968374.50
     2020-08-04 14:29:19   ZAV_DC_Power1   0
     2020-08-04 14:29:50   ZAV_DC_Power2   0
     2020-08-04 14:29:19   ZAV_DC_Power3_IQ 0
     2020-08-04 14:29:19   ZAV_DC_Power4_IQ 0
     2020-08-04 14:31:50   ZAV_KSEM_phase_all_W 486
     2020-08-04 14:30:29   ZAV_ZZZ_AC_Phase_total_W 0
     2020-08-04 14:29:19   ZAV_ZZZ_DC_Power_Total_W 0
     2020-08-04 14:31:50   ZAV_ZZZ_Hausverbrauch_W 486
     2020-08-04 14:29:09   ZZZ_AC_Phase1_W 0
     2020-08-04 14:29:09   ZZZ_AC_Phase2_W 0
     2020-08-04 14:29:09   ZZZ_AC_Phase3_W 0
     2020-08-04 14:30:29   ZZZ_AC_Phase_total_W 0
     2020-08-04 14:29:19   ZZZ_DC_Power_Total_W 0
     2020-08-04 14:31:50   ZZZ_Hausverbrauch_W 462.3
     2020-08-04 14:28:50   ZZZ_Yield_Daily 0
     2020-08-04 14:28:50   ZZZ_Yield_Monthly 0
     2020-08-04 14:28:50   ZZZ_Yield_Total 1522900.44
     2020-08-04 14:28:50   ZZZ_Yield_Yearly 1522900.44
     2020-08-04 14:31:50   statZZZ_AC_Phase_total_WDay Min: 0 Avg: 0 Max: 0
     2020-08-03 23:59:55   statZZZ_AC_Phase_total_WDayLast Min: 0 Avg: 0 Max: 0
     2020-08-04 14:31:50   statZZZ_AC_Phase_total_WHour Min: 0 Avg: 0 Max: 0
     2020-08-04 13:59:55   statZZZ_AC_Phase_total_WHourLast Min: 0 Avg: 0 Max: 0
     2020-08-04 14:31:50   statZZZ_AC_Phase_total_WMonth Min: 0 Avg: 0 Max: 0
     2020-07-31 23:59:55   statZZZ_AC_Phase_total_WMonthLast Min: 0 Avg: 817 Max: 9361
     2020-08-04 14:31:50   statZZZ_AC_Phase_total_WYear Min: 0 Avg: 989 Max: 9361 (since:  )
     2020-08-04 14:31:50   statZZZ_Yield_Total Hour: 0.00 Day: 0.00 Month: 0.00 Year: 1380187.11 (since: 2020-06-10 )
     2020-08-04 13:59:55   statZZZ_Yield_TotalLast Hour: 0.00 Day: 0.00 Month: 633274.87 Year: -
     2020-08-04 05:58:32   state           opened
   REMEMBER:
     lid        71
     lname      Plenticore
     lrecv      1596544310.44198
     lsend      1596544310.41707
   defptr:
     Plenticore 71
   gotReadings:
     AC_Phase1_W 0.00
     AC_Phase2_W 0.00
     AC_Phase3_W 0.00
   helper:
     _98_statistics wetter_stat
   lastRead:
     h100       1596544310.19364
     h156       1596544310.44281
     h162       1596544310.4433
     h168       1596544310.44375
     h172       1596544309.83815
     h210       1596544310.08673
     h224       1596544310.08736
     h234       1596544309.61029
     h244       1596544309.61085
     h252       1596544310.31473
     h260       1596544310.31525
     h270       1596544309.71806
     h320       1596544309.95588
     h322       1596544309.95631
     h324       1596544309.95677
     h326       1596544309.9572
Attributes:
   dev-h-combine 16
   dev-type-Fl_R2-format %.2f
   dev-type-Fl_R2-len 2
   dev-type-Fl_R2-revRegs 1
   dev-type-Fl_R2-unpack f>
   event-min-interval .*:300
   event-on-change-reading .*
   obj-h100-poll 1
   obj-h100-reading DC_Power_total
   obj-h100-type Fl_R2
   obj-h156-poll 1
   obj-h156-reading AC_Phase1_W
   obj-h156-type Fl_R2
   obj-h162-poll 1
   obj-h162-reading AC_Phase2_W
   obj-h162-type Fl_R2
   obj-h168-poll 1
   obj-h168-reading AC_Phase3_W
   obj-h168-type Fl_R2
   obj-h172-poll 1
   obj-h172-reading AC_Phase_total_W
   obj-h172-type Fl_R2
   obj-h210-poll 1
   obj-h210-reading Battery_SOC
   obj-h210-type Fl_R2
   obj-h224-poll 1
   obj-h224-reading KSEM_phase1_W
   obj-h224-type Fl_R2
   obj-h234-poll 1
   obj-h234-reading KSEM_phase2_W
   obj-h234-type Fl_R2
   obj-h244-poll 1
   obj-h244-reading KSEM_phase3_W
   obj-h244-type Fl_R2
   obj-h252-poll 1
   obj-h252-reading KSEM_phase_all_W
   obj-h252-type Fl_R2
   obj-h260-poll 1
   obj-h260-reading DC_Power1
   obj-h260-type Fl_R2
   obj-h270-poll 1
   obj-h270-reading DC_Power2
   obj-h270-type Fl_R2
   obj-h320-poll 1
   obj-h320-reading Yield_Total
   obj-h320-type Fl_R2
   obj-h322-poll 1
   obj-h322-reading Yield_Daily
   obj-h322-type Fl_R2
   obj-h324-poll 1
   obj-h324-reading Yield_Yearly
   obj-h324-type Fl_R2
   obj-h326-poll 1
   obj-h326-reading Yield_Monthly
   obj-h326-type Fl_R2
   room       Photovoltaik
   userReadings ZZZ_DC_Power_Total_W:DC_Power_total.* { ReadingsNum ("Plenticore","DC_Power_total", 0) + ReadingsNum ("IQ","DC_Power_total", 0);},DC_Power3_IQ { ReadingsNum ("IQ","DC_Power1", 0);},DC_Power4_IQ { ReadingsNum ("IQ","DC_Power2", 0);},ZZZ_AC_Phase1_W:AC_Phase1_W.* { ReadingsNum ("Plenticore","AC_Phase1_W", 0) + ReadingsNum ("IQ","AC_Phase1_W", 0);},ZZZ_AC_Phase2_W:AC_Phase2_W.* { ReadingsNum ("Plenticore","AC_Phase2_W", 0) + ReadingsNum ("IQ","AC_Phase2_W", 0);},ZZZ_AC_Phase3_W:AC_Phase3_W.* { ReadingsNum ("Plenticore","AC_Phase3_W", 0) + ReadingsNum ("IQ","AC_Phase3_W", 0);},ZZZ_AC_Phase_total_W:AC_Phase_total_W.* { ReadingsNum ("Plenticore","AC_Phase_total_W", 0) + ReadingsNum ("IQ","AC_Phase_total_W", 0);},ZZZ_Yield_Daily:Yield_Daily.* { ReadingsNum ("Plenticore","Yield_Daily", 0) + ReadingsNum ("IQ","Yield_Daily", 0);},ZZZ_Yield_Monthly:Yield_Monthly.* { ReadingsNum ("Plenticore","Yield_Monthly", 0) + ReadingsNum ("IQ","Yield_Monthly", 0);},ZZZ_Yield_Yearly:Yield_Yearly.* { ReadingsNum ("Plenticore","Yield_Yearly", 0) + ReadingsNum ("IQ","Yield_Yearly", 0);},ZZZ_Yield_Total:Yield_Total.* { ReadingsNum ("Plenticore","Yield_Total", 0) + ReadingsNum ("IQ","Yield_Total", 0);},ZZZ_Hausverbrauch_W:ZZZ_AC_Phase_total_W.*|KSEM_phase_all_W.* { ReadingsNum ("Plenticore","KSEM_phase_all_W", 0) + ReadingsNum ("Plenticore","ZZZ_AC_Phase_total_W", 0);},ZAV_ZZZ_Hausverbrauch_W:ZZZ_Hausverbrauch_W.* {sprintf('%.0f', movingAverage('Plenticore','ZZZ_Hausverbrauch_W',300))},ZAV_DC_Power1:DC_Power1.* {sprintf('%.0f', movingAverage('Plenticore','DC_Power1',300))},ZAV_DC_Power2:DC_Power2.* {sprintf('%.0f', movingAverage('Plenticore','DC_Power2',300))},ZAV_DC_Power3_IQ:DC_Power3_IQ.* {sprintf('%.0f', movingAverage('Plenticore','DC_Power3_IQ',300))},ZAV_DC_Power4_IQ:DC_Power4_IQ.* {sprintf('%.0f', movingAverage('Plenticore','DC_Power4_IQ',300))},ZAV_ZZZ_DC_Power_Total_W:ZZZ_DC_Power_Total_W.* {sprintf('%.0f', movingAverage('Plenticore','ZZZ_DC_Power_Total_W',300))},ZAV_ZZZ_AC_Phase_total_W:ZZZ_AC_Phase_total_W.* {sprintf('%.0f', movingAverage('Plenticore','ZZZ_AC_Phase_total_W',300))},ZAV_KSEM_phase_all_W:KSEM_phase_all_W.* {sprintf('%.0f', movingAverage('Plenticore','KSEM_phase_all_W',300))}

   userattr   DbLogInclude dev-h-combine dev-type-Fl_R2-format dev-type-Fl_R2-len dev-type-Fl_R2-revRegs dev-type-Fl_R2-unpack event-on-change-reading obj-h100-poll obj-h100-reading obj-h100-type obj-h106-poll obj-h106-reading obj-h106-type obj-h108-poll obj-h108-reading obj-h108-type obj-h110-poll obj-h110-reading obj-h110-type obj-h112-poll obj-h112-reading obj-h112-type obj-h114-poll obj-h114-reading obj-h114-type obj-h116-poll obj-h116-reading obj-h116-type obj-h118-poll obj-h118-reading obj-h118-type obj-h156-poll obj-h156-reading obj-h156-type obj-h162-poll obj-h162-reading obj-h162-type obj-h168-poll obj-h168-reading obj-h168-type obj-h172-poll obj-h172-reading obj-h172-type obj-h210-poll obj-h210-reading obj-h210-type obj-h224-poll obj-h224-reading obj-h224-type obj-h234-poll obj-h234-reading obj-h234-type obj-h244-poll obj-h244-reading obj-h244-type obj-h252-poll obj-h252-reading obj-h252-type obj-h260-poll obj-h260-reading obj-h260-type obj-h270-poll obj-h270-reading obj-h270-type obj-h320-poll obj-h320-reading obj-h320-type obj-h322-poll obj-h322-reading obj-h322-type obj-h324-poll obj-h324-reading obj-h324-type obj-h326-poll obj-h326-reading obj-h326-type userReadings


Internals:
   DEF        71 10 192.168.78.68:1502 TCP
   DeviceName 192.168.78.68:1502
   EXPECT     idle
   FD         63
   FUUID      5edf82d0-f33f-86d0-84b8-ef25036d91c7e534
   INTERVAL   10
   IODev      IQ
   LASTOPEN   1596513477.49939
   MODBUSID   71
   MODE       master
   MODULEVERSION Modbus 4.1.5 - 17.9.2019
   NAME       IQ
   NOTIFYDEV  global
   NR         817
   NTFY_ORDER 50-IQ
   PARTIAL   
   PROTOCOL   TCP
   STATE      opened
   TCPConn    1
   TRIGGERTIME 1596549883.9244
   TRIGGERTIME_FMT 2020-08-04 16:04:43
   TYPE       ModbusAttr
   devioLoglevel 3
   lastUpdate 1596549873.9244
   nextOpenDelay 60
   nextQueueRun 1596549874.03325
   QUEUE:
     HASH(0xaaab00fa6390)
     HASH(0xaaab00876748)
     HASH(0xaaab01615d70)
     HASH(0xaaab007cef40)
   READ:
     BUFFER     
   READINGS:
     2020-08-04 16:04:23   AC_Phase1_W     0.00
     2020-08-04 16:04:23   AC_Phase2_W     0.00
     2020-08-04 16:04:23   AC_Phase3_W     0.00
     2020-08-04 16:04:24   AC_Phase_total_W 0.00
     2020-08-04 16:04:24   DC_Power1       0.00
     2020-08-04 16:04:24   DC_Power2       0.00
     2020-08-04 16:04:33   DC_Power_total  0.00
     2020-08-04 16:04:24   Yield_Daily     0.00
     2020-08-04 16:04:24   Yield_Monthly   0.00
     2020-08-04 16:04:24   Yield_Total     554525.94
     2020-08-04 16:04:24   Yield_Yearly    554525.94
     2020-08-04 05:57:57   state           opened
   REMEMBER:
     lid        71
     lname      IQ
     lrecv      1596549873.93309
     lsend      1596549873.92899
   defptr:
     IQ         71
   gotReadings:
     DC_Power_total 0.00
   lastRead:
     h100       1596549873.9341
     h156       1596549863.95111
     h162       1596549863.95222
     h168       1596549863.95267
     h172       1596549864.28943
     h260       1596549864.42775
     h270       1596549864.43013
     h320       1596549864.17874
     h322       1596549864.17916
     h324       1596549864.17958
     h326       1596549864.17997
Attributes:
   dev-h-combine 16
   dev-type-Fl_R2-format %.2f
   dev-type-Fl_R2-len 2
   dev-type-Fl_R2-revRegs 1
   dev-type-Fl_R2-unpack f>
   event-min-interval .*:300
   event-on-change-reading .*
   obj-h100-poll 1
   obj-h100-reading DC_Power_total
   obj-h100-type Fl_R2
   obj-h156-poll 1
   obj-h156-reading AC_Phase1_W
   obj-h156-type Fl_R2
   obj-h162-poll 1
   obj-h162-reading AC_Phase2_W
   obj-h162-type Fl_R2
   obj-h168-poll 1
   obj-h168-reading AC_Phase3_W
   obj-h168-type Fl_R2
   obj-h172-poll 1
   obj-h172-reading AC_Phase_total_W
   obj-h172-type Fl_R2
   obj-h260-poll 1
   obj-h260-reading DC_Power1
   obj-h260-type Fl_R2
   obj-h270-poll 1
   obj-h270-reading DC_Power2
   obj-h270-type Fl_R2
   obj-h320-poll 1
   obj-h320-reading Yield_Total
   obj-h320-type Fl_R2
   obj-h322-poll 1
   obj-h322-reading Yield_Daily
   obj-h322-type Fl_R2
   obj-h324-poll 1
   obj-h324-reading Yield_Yearly
   obj-h324-type Fl_R2
   obj-h326-poll 1
   obj-h326-reading Yield_Monthly
   obj-h326-type Fl_R2
   room       Photovoltaik
   userattr   DbLogInclude dev-h-combine dev-type-Fl_R2-format dev-type-Fl_R2-len dev-type-Fl_R2-revRegs dev-type-Fl_R2-unpack event-on-change-reading obj-h0-poll obj-h0-reading obj-h0-type obj-h100-poll obj-h100-reading obj-h100-type obj-h106-poll obj-h106-reading obj-h106-type obj-h108-poll obj-h108-reading obj-h108-type obj-h110-poll obj-h110-reading obj-h110-type obj-h112-poll obj-h112-reading obj-h112-type obj-h114-poll obj-h114-reading obj-h114-type obj-h116-poll obj-h116-reading obj-h116-type obj-h118-poll obj-h118-reading obj-h118-type obj-h156-poll obj-h156-reading obj-h156-type obj-h162-poll obj-h162-reading obj-h162-type obj-h168-poll obj-h168-reading obj-h168-type obj-h172-poll obj-h172-reading obj-h172-type obj-h2-poll obj-h2-reading obj-h2-type obj-h210-poll obj-h210-reading obj-h210-type obj-h224-poll obj-h224-reading obj-h224-type obj-h234-poll obj-h234-reading obj-h234-type obj-h244-poll obj-h244-reading obj-h244-type obj-h252-poll obj-h252-reading obj-h252-type obj-h260-poll obj-h260-reading obj-h260-type obj-h270-poll obj-h270-reading obj-h270-type obj-h320-poll obj-h320-reading obj-h320-type obj-h322-poll obj-h322-reading obj-h322-type obj-h324-poll obj-h324-reading obj-h324-type obj-h326-poll obj-h326-reading obj-h326-type userReadings


Internals:
   DEF        1 30 192.168.78.66:502 TCP
   DeviceName 192.168.78.66:502
   EXPECT     idle
   FD         48
   FUUID      5ede2b7f-f33f-86d0-bd4d-b879d95b49e87b46
   INTERVAL   30
   IODev      KSEM
   LASTOPEN   1595867898.58884
   MODBUSID   1
   MODE       master
   MODULEVERSION Modbus 4.1.5 - 17.9.2019
   NAME       KSEM
   NOTIFYDEV  global
   NR         815
   NTFY_ORDER 50-KSEM
   PARTIAL   
   PROTOCOL   TCP
   STATE      opened
   TCPConn    1
   TRIGGERTIME 1596549917.99525
   TRIGGERTIME_FMT 2020-08-04 16:05:17
   TYPE       ModbusAttr
   devioLoglevel 3
   lastUpdate 1596549887.99525
   nextOpenDelay 60
   QUEUE:
   READ:
     BUFFER     
   READINGS:
     2020-08-04 16:04:48   Active_Energy_L1_+_Wh 413244.90
     2020-08-04 16:04:49   Active_Energy_L1_-_Wh 351636.50
     2020-08-04 16:04:48   Active_Energy_L2_+_Wh 144169.50
     2020-08-04 16:04:48   Active_Energy_L2_-_Wh 428880.40
     2020-08-04 16:04:50   Active_Energy_L3_+_Wh 151542.40
     2020-08-04 16:04:48   Active_Energy_L3_-_Wh 403434.60
     2020-08-04 16:04:50   Active_Energy_total_+_Wh 664831.00
     2020-08-04 16:04:50   Active_Energy_total_-_Wh 1139825.40
     2020-08-04 16:04:50   Active_Power_L1_+_W 309.60
     2020-08-04 16:04:50   Active_Power_L1_-_W 0.00
     2020-08-04 16:04:50   Active_Power_L2_-_W 0.00
     2020-08-04 16:04:48   Active_Power_L2_P_W 187.70
     2020-08-04 16:04:48   Active_Power_L3_+_W 334.20
     2020-08-04 16:04:48   Active_Power_L3_-_W 0.00
     2020-08-04 16:04:49   Active_Power_total_+_W 822.50
     2020-08-04 16:04:50   Active_Power_total_-_W 0.00
     2020-08-04 16:04:48   Z_Active_Energy_total_+_Wh -113982.50
     2020-08-04 16:04:48   Z_Active_Energy_total_-_Wh 66483.00
     2020-08-04 16:04:50   statActive_Energy_total_+_Wh Hour: 55.30 Day: 8706.40 Month: 57920.50 Year: 564294.50 (since: 2020-06-11 )
     2020-08-04 15:59:55   statActive_Energy_total_+_WhLast Hour: 593.50 Day: 18794.20 Month: 373364.40 Year: -
     2020-08-04 16:04:50   statActive_Energy_total_-_Wh Hour: 0.00 Day: 0.00 Month: 0.00 Year: 1027773.70 (since: 2020-06-11 )
     2020-08-04 15:59:55   statActive_Energy_total_-_WhLast Hour: 0.00 Day: 0.00 Month: 465601.10 Year: -
     2020-07-27 18:38:18   state           opened
   REMEMBER:
     lid        1
     lname      KSEM
     lrecv      1596549890.73192
     lsend      1596549890.7296
   defptr:
     KSEM       1
   gotReadings:
     Active_Power_L2_-_W 0.00
   helper:
     _98_statistics wetter_stat
   lastRead:
     h0         1596549889.14735
     h120       1596549888.24935
     h122       1596549888.45916
     h2         1596549890.09409
     h40        1596549890.41687
     h40107     1596549888.56464
     h40115     1596549888.35417
     h42        1596549890.62586
     h512       1596549890.31228
     h516       1596549890.52135
     h592       1596549888.77428
     h596       1596549889.99002
     h672       1596549888.03902
     h676       1596549888.87918
     h752       1596549890.20764
     h756       1596549888.14432
     h80        1596549888.66938
     h82        1596549890.73407
Attributes:
   dev-type-Fl_R2-expr $val / 10
   dev-type-Fl_R2-format %.2f
   dev-type-Fl_R2-len 2
   dev-type-Fl_R2-revRegs 0
   dev-type-Fl_R2-unpack I>
   dev-type-Fl_R2b-expr $val / 10
   dev-type-Fl_R2b-format %.2f
   dev-type-Fl_R2b-len 2
   dev-type-Fl_R2b-revRegs 0
   dev-type-Fl_R2b-unpack i>
   dev-type-Fl_R4-expr $val / 10
   dev-type-Fl_R4-format %.2f
   dev-type-Fl_R4-len 4
   dev-type-Fl_R4-revRegs 0
   dev-type-Fl_R4-unpack Q>
   event-min-interval .*:300
   event-on-change-reading .*
   obj-h0-poll 1
   obj-h0-reading Active_Power_total_+_W
   obj-h0-type Fl_R2
   obj-h120-poll 1
   obj-h120-reading Active_Power_L3_+_W
   obj-h120-type Fl_R2
   obj-h122-poll 1
   obj-h122-reading Active_Power_L3_-_W
   obj-h122-type Fl_R2
   obj-h2-poll 1
   obj-h2-reading Active_Power_total_-_W
   obj-h2-type Fl_R2
   obj-h40-poll 1
   obj-h40-reading Active_Power_L1_+_W
   obj-h40-type Fl_R2
   obj-h40107-poll 1
   obj-h40107-reading Z_Active_Energy_total_+_Wh
   obj-h40107-type Fl_R2b
   obj-h40115-poll 1
   obj-h40115-reading Z_Active_Energy_total_-_Wh
   obj-h40115-type Fl_R2
   obj-h42-poll 1
   obj-h42-reading Active_Power_L1_-_W
   obj-h42-type Fl_R2
   obj-h512-poll 1
   obj-h512-reading Active_Energy_total_+_Wh
   obj-h512-type Fl_R4
   obj-h516-poll 1
   obj-h516-reading Active_Energy_total_-_Wh
   obj-h516-type Fl_R4
   obj-h592-poll 1
   obj-h592-reading Active_Energy_L1_+_Wh
   obj-h592-type Fl_R4
   obj-h596-poll 1
   obj-h596-reading Active_Energy_L1_-_Wh
   obj-h596-type Fl_R4
   obj-h672-poll 1
   obj-h672-reading Active_Energy_L2_+_Wh
   obj-h672-type Fl_R4
   obj-h676-poll 1
   obj-h676-reading Active_Energy_L2_-_Wh
   obj-h676-type Fl_R4
   obj-h752-poll 1
   obj-h752-reading Active_Energy_L3_+_Wh
   obj-h752-type Fl_R4
   obj-h756-poll 1
   obj-h756-reading Active_Energy_L3_-_Wh
   obj-h756-type Fl_R4
   obj-h80-poll 1
   obj-h80-reading Active_Power_L2_P_W
   obj-h80-type Fl_R2
   obj-h82-poll 1
   obj-h82-reading Active_Power_L2_-_W
   obj-h82-type Fl_R2
   room       Photovoltaik
   userattr   DbLogInclude dev-type-Fl_R2-expr dev-type-Fl_R2-format dev-type-Fl_R2-len dev-type-Fl_R2-revRegs dev-type-Fl_R2-unpack dev-type-Fl_R2b-expr dev-type-Fl_R2b-format dev-type-Fl_R2b-len dev-type-Fl_R2b-revRegs dev-type-Fl_R2b-unpack dev-type-Fl_R4-expr dev-type-Fl_R4-format dev-type-Fl_R4-len dev-type-Fl_R4-revRegs dev-type-Fl_R4-unpack event-on-change-reading obj-h0-poll obj-h0-reading obj-h0-type obj-h120-poll obj-h120-reading obj-h120-type obj-h122-poll obj-h122-reading obj-h122-type obj-h2-poll obj-h2-reading obj-h2-type obj-h40-poll obj-h40-reading obj-h40-type obj-h40107-poll obj-h40107-reading obj-h40107-type obj-h40115-poll obj-h40115-reading obj-h40115-type obj-h42-poll obj-h42-reading obj-h42-type obj-h512-poll obj-h512-reading obj-h512-type obj-h516-poll obj-h516-reading obj-h516-type obj-h592-poll obj-h592-reading obj-h592-type obj-h596-poll obj-h596-reading obj-h596-type obj-h672-poll obj-h672-reading obj-h672-type obj-h676-poll obj-h676-reading obj-h676-type obj-h752-poll obj-h752-reading obj-h752-type obj-h756-poll obj-h756-reading obj-h756-type obj-h80-poll obj-h80-reading obj-h80-type obj-h82-poll obj-h82-reading obj-h82-type userReadings


Internals:
   FUUID      5edfcb80-f33f-86d0-6c37-ba7d5aee1a94848d
   NAME       du_Solar
   NR         819
   STATE      load
   TYPE       dummy
   READINGS:
     2020-08-04 16:05:00   KSEM_Active_Energy_total_N_Wh 1139825.40
     2020-08-04 16:05:00   KSEM_Active_Energy_total_P_Wh 664831.00
     2020-08-04 16:05:00   ZAV_DC_Power1   0
     2020-08-04 16:05:00   ZAV_DC_Power2   0
     2020-08-04 16:05:00   ZAV_DC_Power3_IQ 0
     2020-08-04 16:05:00   ZAV_DC_Power4_IQ 0
     2020-08-04 16:05:00   ZAV_KSEM_phase_all_W 670
     2020-08-04 16:05:00   ZAV_ZZZ_AC_Phase_total_W 0
     2020-08-04 16:05:00   ZAV_ZZZ_DC_Power_Total_W 0
     2020-08-04 16:05:00   ZAV_ZZZ_Hausverbrauch_W 670
     2020-08-04 16:05:00   ZZZ_Hausverbrauch_autark 0.00
     2020-08-04 16:05:00   ZZZ_Hausverbrauch_autark_month 0.00
     2020-08-04 16:05:00   ZZZ_Hausverbrauch_autark_year 38.44
     2020-08-04 16:05:00   ZZZ_Hausverbrauch_month 57920.5
     2020-08-04 16:05:00   ZZZ_Hausverbrauch_today 8706.4
     2020-08-04 16:05:00   ZZZ_Hausverbrauch_year 916707.91
     2020-08-04 16:05:00   ZZZ_Yield_Total 1522900.44
     2020-08-04 16:05:00   statKSEM_Active_Energy_total_N_Wh Hour: 0.00 Day: 0.00 Month: 0.00 Year: 1027773.70 (since: 2020-06-11 )
     2020-08-04 16:05:00   statKSEM_Active_Energy_total_N_day 0.00
     2020-08-04 16:05:00   statKSEM_Active_Energy_total_N_month 0.00
     2020-08-04 16:05:00   statKSEM_Active_Energy_total_N_year 1027773.70
     2020-08-04 16:05:00   statKSEM_Active_Energy_total_P_Wh Hour: 55.30 Day: 8706.40 Month: 57920.50 Year: 564294.50 (since: 2020-06-11 )
     2020-08-04 16:05:00   statKSEM_Active_Energy_total_P_day 8706.40
     2020-08-04 16:05:00   statKSEM_Active_Energy_total_P_month 57920.50
     2020-08-04 16:05:00   statKSEM_Active_Energy_total_P_year 564294.50
     2020-08-04 16:05:00   statZZZ_AC_Phase_total_WDay Min: 0 Avg: 0 Max: 0
     2020-08-04 16:05:00   statZZZ_AC_Phase_total_WHour Min: 0 Avg: 0 Max: 0
     2020-08-04 16:05:00   statZZZ_AC_Phase_total_WHourLast Min: 0 Avg: 0 Max: 0
     2020-08-04 16:05:00   statZZZ_AC_Phase_total_WMonth Min: 0 Avg: 0 Max: 0
     2020-08-04 16:05:00   statZZZ_AC_Phase_total_WYear Min: 0 Avg: 988 Max: 9361 (since:  )
     2020-08-04 16:05:00   statZZZ_Yield_Total Hour: 0.00 Day: 0.00 Month: 0.00 Year: 1380187.11 (since: 2020-06-10 )
     2020-08-04 16:05:00   statZZZ_Yield_TotalLast Hour: 0.00 Day: 0.00 Month: 633274.87 Year: -
     2020-08-04 16:05:00   statZZZ_Yield_Total_day 0.00
     2020-08-04 16:05:00   statZZZ_Yield_Total_month 0.00
     2020-08-04 16:05:00   statZZZ_Yield_Total_year 1380187.11
     2020-08-04 16:05:00   state           load
Attributes:
   room       Photovoltaik
   userReadings ZAV_DC_Power1 { ReadingsNum ("Plenticore","ZAV_DC_Power1", 0);},ZAV_DC_Power2 { ReadingsNum ("Plenticore","ZAV_DC_Power2", 0);},ZAV_DC_Power3_IQ { ReadingsNum ("Plenticore","ZAV_DC_Power3_IQ", 0);},ZAV_DC_Power4_IQ { ReadingsNum ("Plenticore","ZAV_DC_Power4_IQ", 0);},ZAV_KSEM_phase_all_W { ReadingsNum ("Plenticore","ZAV_KSEM_phase_all_W", 0);},ZAV_ZZZ_AC_Phase_total_W { ReadingsNum ("Plenticore","ZAV_ZZZ_AC_Phase_total_W", 0);},ZAV_ZZZ_DC_Power_Total_W { ReadingsNum ("Plenticore","ZAV_ZZZ_DC_Power_Total_W", 0);},ZAV_ZZZ_Hausverbrauch_W { ReadingsNum ("Plenticore","ZAV_ZZZ_Hausverbrauch_W", 0);},statZZZ_AC_Phase_total_WDay { ReadingsVal ("Plenticore","statZZZ_AC_Phase_total_WDay", 0);}, statZZZ_AC_Phase_total_WHour { ReadingsVal ("Plenticore","statZZZ_AC_Phase_total_WHour", 0);}, statZZZ_AC_Phase_total_WHourLast { ReadingsVal ("Plenticore","statZZZ_AC_Phase_total_WHourLast", 0);}, statZZZ_AC_Phase_total_WMonth { ReadingsVal ("Plenticore","statZZZ_AC_Phase_total_WMonth", 0);}, statZZZ_AC_Phase_total_WYear { ReadingsVal ("Plenticore","statZZZ_AC_Phase_total_WYear", 0);}, statZZZ_Yield_Total { ReadingsVal ("Plenticore","statZZZ_Yield_Total", 0);}, statZZZ_Yield_TotalLast { ReadingsVal ("Plenticore","statZZZ_Yield_TotalLast", 0);}, ZZZ_Yield_Total { ReadingsNum ("Plenticore","ZZZ_Yield_Total", 0);}, KSEM_Active_Energy_total_P_Wh { ReadingsVal ("KSEM","Active_Energy_total_+_Wh", 0);}, KSEM_Active_Energy_total_N_Wh { ReadingsNum ("KSEM","Active_Energy_total_-_Wh", 0);},statKSEM_Active_Energy_total_P_Wh { ReadingsVal ("KSEM","statActive_Energy_total_+_Wh", 0);}, statKSEM_Active_Energy_total_N_Wh { ReadingsVal ("KSEM","statActive_Energy_total_-_Wh", 0);},

statKSEM_Active_Energy_total_N_day { ReadingsVal($NAME,"statKSEM_Active_Energy_total_N_Wh",0) =~ m/Day:\s([\d\.]+)/ ? $1 : "N/A" },
statKSEM_Active_Energy_total_N_month { ReadingsVal($NAME,"statKSEM_Active_Energy_total_N_Wh",0) =~ m/Month:\s([\d\.]+)/ ? $1 : "N/A" },
statKSEM_Active_Energy_total_N_year { ReadingsVal($NAME,"statKSEM_Active_Energy_total_N_Wh",0) =~ m/Year:\s([\d\.]+)/ ? $1 : "N/A" },
statKSEM_Active_Energy_total_P_day { ReadingsVal($NAME,"statKSEM_Active_Energy_total_P_Wh",0) =~ m/Day:\s([\d\.]+)/ ? $1 : "N/A" },
statKSEM_Active_Energy_total_P_month { ReadingsVal($NAME,"statKSEM_Active_Energy_total_P_Wh",0) =~ m/Month:\s([\d\.]+)/ ? $1 : "N/A" },
statKSEM_Active_Energy_total_P_year { ReadingsVal($NAME,"statKSEM_Active_Energy_total_P_Wh",0) =~ m/Year:\s([\d\.]+)/ ? $1 : "N/A" },

statZZZ_Yield_Total_day { ReadingsVal($NAME,"statZZZ_Yield_Total",0) =~ m/Day:\s([\d\.]+)/ ? $1 : "N/A" },
statZZZ_Yield_Total_month { ReadingsVal($NAME,"statZZZ_Yield_Total",0) =~ m/Month:\s([\d\.]+)/ ? $1 : "N/A" },
statZZZ_Yield_Total_year { ReadingsVal($NAME,"statZZZ_Yield_Total",0) =~ m/Year:\s([\d\.]+)/ ? $1 : "N/A" },

ZZZ_Hausverbrauch_today { my $v1 = ReadingsVal($NAME,"statZZZ_Yield_Total",0) =~ m/Day:\s([\d\.]+)/ ? $1 : "0"; my $v2 = ReadingsVal($NAME,"statKSEM_Active_Energy_total_N_Wh",0) =~ m/Day:\s([\d\.]+)/ ? $1 : "0"; my $v3 = ReadingsVal($NAME,"statKSEM_Active_Energy_total_P_Wh",0) =~ m/Day:\s([\d\.]+)/ ? $1 : "0"; my $v9 = $v1 - $v2 + $v3; $v9},
ZZZ_Hausverbrauch_month { my $v1 = ReadingsVal($NAME,"statZZZ_Yield_Total",0) =~ m/Month:\s([\d\.]+)/ ? $1 : "0"; my $v2 = ReadingsVal($NAME,"statKSEM_Active_Energy_total_N_Wh",0) =~ m/Month:\s([\d\.]+)/ ? $1 : "0"; my $v3 = ReadingsVal($NAME,"statKSEM_Active_Energy_total_P_Wh",0) =~ m/Month:\s([\d\.]+)/ ? $1 : "0"; my $v9 = $v1 - $v2 + $v3; $v9},
ZZZ_Hausverbrauch_year { my $v1 = ReadingsVal($NAME,"statZZZ_Yield_Total",0) =~ m/Year:\s([\d\.]+)/ ? $1 : "0"; my $v2 = ReadingsVal($NAME,"statKSEM_Active_Energy_total_N_Wh",0) =~ m/Year:\s([\d\.]+)/ ? $1 : "0"; my $v3 = ReadingsVal($NAME,"statKSEM_Active_Energy_total_P_Wh",0) =~ m/Year:\s([\d\.]+)/ ? $1 : "0"; my $v9 = $v1 - $v2 + $v3; $v9},


ZZZ_Hausverbrauch_autark { my $v1 = ReadingsVal($NAME,"statZZZ_Yield_Total",0) =~ m/Day:\s([\d\.]+)/ ? $1 : "0"; my $v2 = ReadingsVal($NAME,"statKSEM_Active_Energy_total_N_Wh",0) =~ m/Day:\s([\d\.]+)/ ? $1 : "0"; my $v3 = ReadingsVal($NAME,"statKSEM_Active_Energy_total_P_Wh",0) =~ m/Day:\s([\d\.]+)/ ? $1 : "0"; my $v9 = ( $v1 - $v2 ) / ( $v1 - $v2 + $v3 ) * 100; sprintf("%.2f",$v9)},
ZZZ_Hausverbrauch_autark_month { my $v1 = ReadingsVal($NAME,"statZZZ_Yield_Total",0) =~ m/Month:\s([\d\.]+)/ ? $1 : "0"; my $v2 = ReadingsVal($NAME,"statKSEM_Active_Energy_total_N_Wh",0) =~ m/Month:\s([\d\.]+)/ ? $1 : "0"; my $v3 = ReadingsVal($NAME,"statKSEM_Active_Energy_total_P_Wh",0) =~ m/Month:\s([\d\.]+)/ ? $1 : "0"; my $v9 = ( $v1 - $v2 ) / ( $v1 - $v2 + $v3 ) * 100; sprintf("%.2f",$v9)},
ZZZ_Hausverbrauch_autark_year { my $v1 = ReadingsVal($NAME,"statZZZ_Yield_Total",0) =~ m/Year:\s([\d\.]+)/ ? $1 : "0"; my $v2 = ReadingsVal($NAME,"statKSEM_Active_Energy_total_N_Wh",0) =~ m/Year:\s([\d\.]+)/ ? $1 : "0"; my $v3 = ReadingsVal($NAME,"statKSEM_Active_Energy_total_P_Wh",0) =~ m/Year:\s([\d\.]+)/ ? $1 : "0"; my $v9 = ( $v1 - $v2 ) / ( $v1 - $v2 + $v3 ) * 100; sprintf("%.2f",$v9)}

ch.eick

Zitat von: killah78 am 04 August 2020, 16:10:03
Hi, sorry zur späten Rückmeldung. Ich kann leider nicht viel zeigen, da ich bisher nur rumgespielt habe und noch tue. Der Plenticore ist zwar in Betrieb, aber die Batterie wird noch geliefert.
Habe bisher 3 Devices eigebunden: 1. Wechelrichter (Plenticore), 2. Wechelrichter (IQ) und den KSEM. Dazu habe ich mir noch ein Dummydevice erstellt, welches ausschließlich UserReadings aus den Geräten (alle 5 Minuten) erhält und geloggt werden.

Wie gesagt, das ist bisher alles zum testen und noch nicht final fertig.

Okay, kein Problem. Ich schaue mal nach readings, die noch nicht bei mir drin sind.
Was mit auffällt ist, dass Du eigene Namen gewählt hast. Ich hatte versucht mich an die ModBus namen zu halten, damit der Zusammenhang besser zu erkennen ist. Das bleibt aber jedem selber überlassen.
RPI4; Docker; CUNX; Eltako FSB61NP; SamsungTV H-Serie; Sonos; Vallox; Luxtronik; 3x FB7490; Stromzähler mit DvLIR; wunderground; Plenticore 10 mit BYD; EM410; SMAEM; Modbus TCP
Contrib: https://svn.fhem.de/trac/browser/trunk/fhem/contrib/ch.eick

killah78

Wie loggst du denn die Werte? Die kommen ja alle paar Sekunden an. Mir ist bisher nichts besseres eingefallen, als alle 5 Minuten ein average in ein dummy zu schreiben und dieses zu loggen. Aber wie gesagt, steht alles noch auf Anfang, warte noch auf die Batterie.

ch.eick

Zitat von: killah78 am 04 August 2020, 18:14:33
Wie loggst du denn die Werte? Die kommen ja alle paar Sekunden an. Mir ist bisher nichts besseres eingefallen, als alle 5 Minuten ein average in ein dummy zu schreiben und dieses zu loggen. Aber wie gesagt, steht alles noch auf Anfang, warte noch auf die Batterie.
Ich logge in die LogDB, alles andere kannst Du vergessen, bei dem Datenaufkommen.
Wir haben auch schon mit RepDB ganz nette SQLs erstellt.

Laut Deinem Device läuft das bei Dir alle 10 Sekunden. Änder mal die 10 in 60 :-)

71 10 192.168.78.67:1502 TCP

Eventuell solltest Du doch lieber meine Definition nehmen...
RPI4; Docker; CUNX; Eltako FSB61NP; SamsungTV H-Serie; Sonos; Vallox; Luxtronik; 3x FB7490; Stromzähler mit DvLIR; wunderground; Plenticore 10 mit BYD; EM410; SMAEM; Modbus TCP
Contrib: https://svn.fhem.de/trac/browser/trunk/fhem/contrib/ch.eick

ch.eick

#54
Ohne jetzt den Thread entern zu wollen, ist mein aktuellster Stand nun im Wiki zu finden.
https://wiki.fhem.de/wiki/Kostal_Plenticore_10_Plus

- Kostal Plenticore 10 Plus
- BYD Speicher
- KSEM
- PV-Eigenverbrauch
- Wetter Prognose
- Plenticore Statistiken
...
RPI4; Docker; CUNX; Eltako FSB61NP; SamsungTV H-Serie; Sonos; Vallox; Luxtronik; 3x FB7490; Stromzähler mit DvLIR; wunderground; Plenticore 10 mit BYD; EM410; SMAEM; Modbus TCP
Contrib: https://svn.fhem.de/trac/browser/trunk/fhem/contrib/ch.eick