FHEM Forum

FHEM - Hausautomations-Systeme => Homematic => Thema gestartet von: Rampler am 27 Januar 2015, 19:00:34

Titel: HM-ES-PMSw1-Pl event-on-change
Beitrag von: Rampler am 27 Januar 2015, 19:00:34
Hallo zusammen,
habe durch event-on-Change-reading eState nur noch folgende Zeilen im Log:
2015-01-24_03:20:34 EM.pm.ptot eState: E: 590.1 P: 0.53 I: 21 U: 224.4 f: 49.99
2015-01-24_03:25:16 EM.pm.ptot eState: E: 590.1 P: 0.54 I: 21 U: 223.8 f: 49.97
2015-01-24_03:28:19 EM.pm.ptot eState: E: 590.1 P: 0.53 I: 21 U: 223.7 f: 49.99
2015-01-24_03:31:08 EM.pm.ptot eState: E: 590.2 P: 0.54 I: 21 U: 223.4 f: 49.98
2015-01-24_03:33:43 EM.pm.ptot eState: E: 590.2 P: 0.54 I: 21 U: 223.5 f: 49.97
2015-01-24_03:36:03 EM.pm.ptot eState: E: 590.2 P: 0.53 I: 21 U: 223.5 f: 49.98
2015-01-24_03:38:09 EM.pm.ptot eState: E: 590.2 P: 0.53 I: 21 U: 223.4 f: 49.98
2015-01-24_03:41:05 EM.pm.ptot eState: E: 590.2 P: 0.53 I: 21 U: 223.6 f: 49.99
2015-01-24_03:43:46 EM.pm.ptot eState: E: 590.3 P: 0.53 I: 21 U: 223.5 f: 50.01
2015-01-24_03:46:12 EM.pm.ptot eState: E: 590.3 P: 0.53 I: 21 U: 223.6 f: 49.98

Kann ich irgendwie bewirken, dass ich nur noch Einträge bekomme, wenn sich I: ändert. Beispielweise wird auch gelogt, wenn sich die Frequenz von 49,99 auf 50,00 ändert..

mfg
Klaus
Titel: Antw:HM-ES-PMSw1-Pl event-on-change
Beitrag von: Bennemannc am 27 Januar 2015, 22:31:00
Hallo,

dann machst Du nur ein event-On-change reading auf "current". An der Definition des Logfiles machst Du nichts. Dann wird er komplette Datensatz nur bei Änderung vom Stromwert geschrieben.

Gruß Christoph
Titel: Antw:HM-ES-PMSw1-Pl event-on-change
Beitrag von: Rampler am 28 Januar 2015, 08:51:05
Hallo Bennemannc,
danke für den Tipp...
Wenn ich event-on-Change auf current setzte, erhalte ich:
2015-01-28_08:39:49 EM.pm.ptot current: 2532
2015-01-28_08:39:50 EM.pm.ptot current: 3402
2015-01-28_08:39:58 EM.pm.ptot current: 11
2015-01-28_08:40:49 EM.pm.ptot current: 4256

Ich möchte aber auch die Leistung etc. im Log, da ich diese anplotte...
Also die Zeile:
2015-01-24_03:43:46 EM.pm.ptot eState: E: 590.3 P: 0.53 I: 21 U: 223.5 f: 50.01
wäre schon super, halt nicht so oft, wie jetzt ...

Gruß
Klaus
Titel: Antw:HM-ES-PMSw1-Pl event-on-change
Beitrag von: Bennemannc am 28 Januar 2015, 10:11:36
Hallo,

dann poste doch mal, wie der Eintrag für das Logfile in Deiner fhem.conf aussieht. Ggf. einen Screenschot mit der Definition des Logfiles.

Gruß Christoph
Titel: Antw:HM-ES-PMSw1-Pl event-on-change
Beitrag von: Rampler am 28 Januar 2015, 10:22:39
Hallo,
Logfile Definitionen:
define FileLog_EM.pm FileLog ./log/EM.pm-%Y-%m.log EM.pm.*
attr FileLog_EM.pm archivedir ./log-archive/
attr FileLog_EM.pm icon time_note
attr FileLog_EM.pm logtype text
attr FileLog_EM.pm nrarchive 13
attr FileLog_EM.pm room E-Messung

oder der List:
Internals:
   DEF        ./log/EM.pm-%Y-%m.log EM.pm.*
   NAME       FileLog_EM.pm
   NR         231
   NTFY_ORDER 50-FileLog_EM.pm
   REGEXP     EM.pm.*
   STATE      active
   TYPE       FileLog
   currentlogfile ./log/EM.pm-2015-01.log
   logfile    ./log/EM.pm-%Y-%m.log
   Pos:
Attributes:
   archivedir ./log-archive/
   icon       time_note
   logtype    text
   nrarchive  13
   room       E-Messung

bzw List auf das Device:

Internals:
   DEF        27415A02
   NAME       EM.pm.ptot
   NR         233
   STATE      354.3
   TYPE       CUL_HM
   chanNo     02
   device     EM.pm
   Readings:
     2015-01-21 12:41:50   R-averaging     1 s
     2015-01-21 12:41:50   R-sign          off
     2015-01-21 12:41:50   R-txMinDly      8 s
     2015-01-21 12:41:50   R-txThrCur      100 mA
     2015-01-21 12:41:50   R-txThrFrq      1 Hz
     2015-01-21 12:41:50   R-txThrPwr      100 W
     2015-01-21 12:41:50   R-txThrVlt      10 V
     2015-01-21 12:47:49   RegL_01:        08:00 7A:01 7B:08 7C:00 7D:27 7E:10  7F:00 80:64 81:00 82:64 83:64 00:00
     2015-01-28 10:20:31   boot            off
     2015-01-28 10:20:31   current         11
     2015-01-28 10:20:31   eState          E: 354.3 P: 0.84 I: 11 U: 223.9 f: 49.99
     2015-01-28 10:20:31   energy          354.3
     2015-01-27 14:18:11   energyOffset    1219
     2015-01-28 10:20:31   frequency       49.99
     2015-01-28 10:20:31   power           0.84
     2015-01-28 10:20:31   state           354.3
     2015-01-28 10:20:31   voltage         223.9
   Helper:
     Role:
       chn        1
Attributes:
   alias      Energiemessung Gesamtleistung
   event-on-change-reading eState
   group      Energiemessung
   icon       measure_power
   model      HM-ES-PMSw1-Pl
   room       E-Messung


Alle anderen sind mit Event-on-Change mit no definiert:
Internals:
   DEF        27415A
   HMLAN1_MSGCNT 168
   HMLAN1_RAWMSG E27415A,0000,17BE4D40,FF,FFBF,AAA45F27415A29A083800DDB000054000B08BD01
   HMLAN1_RSSI -65
   HMLAN1_TIME 2015-01-28 10:20:50
   HMLAN2_MSGCNT 188
   HMLAN2_RAWMSG E27415A,0000,272A86B6,FF,FF99,AAA45F27415A29A083800DDB000054000B08BD01
   HMLAN2_RSSI -103
   HMLAN2_TIME 2015-01-28 10:20:50
   IODev      HMLAN1
   LASTInputDev HMLAN2
   MSGCNT     356
   NAME       EM.pm
   NR         230
   STATE      CMDs_done
   TYPE       CUL_HM
   channel_01 EM.pm.sw
   channel_02 EM.pm.ptot
   channel_03 EM.pm.p
   channel_04 EM.pm.i
   channel_05 EM.pm.u
   channel_06 EM.pm.f
   lastMsg    No:AA - t:5F s:27415A d:29A083 800DDB000054000B08BD01
   protLastRcv 2015-01-28 10:20:50
   protSnd    168 last_at:2015-01-28 10:20:50
   protState  CMDs_done
   rssi_HMLAN1 avg:-60 min:-60 max:-60 lst:-60 cnt:1
   rssi_at_HMLAN1 avg:-64.69 min:-67 max:-63 lst:-65 cnt:196
   rssi_at_HMLAN2 avg:-95.77 min:-103 max:-87 lst:-103 cnt:188
   Readings:
     2015-01-28 09:10:40   Activity        alive
     2015-01-21 12:56:58   D-firmware      1.6
     2015-01-21 12:56:58   D-serialNr      LEQ0183798
     2015-01-21 12:47:48   PairedTo        0x29A083
     2015-01-21 12:41:48   R-intKeyVisib   visib
     2015-01-21 12:41:48   R-localResDis   off
     2015-01-21 12:41:48   R-pairCentral   0x29A083
     2015-01-21 12:47:48   RegL_00:        02:81 0A:29 0B:A0 0C:83 18:00 00:00
     2015-01-27 14:18:11   powerOn         2015-01-27 14:18:11
     2015-01-21 12:47:52   sabotageAttack  ErrIoAttack cnt:11
     2015-01-28 10:20:50   state           CMDs_done
   Helper:
     cSnd       0129A08327415A010E
     mId        00AC
     rxType     1
     Io:
       newChn     +27415A,00,01,00
       nextSend   1422436850.95695
       rxt        0
       vccu       vccu
       p:
         27415A
         00
         01
         00
       prefIO:
         HMLAN1
         HMLAN2
     Mrssi:
       mNo        AA
       Io:
         HMLAN1     -63
         HMLAN2     -103
     Prt:
       bErr       0
       sProc      0
       Rspwait:
     Q:
       qReqConf
       qReqStat   02,03,04,05,06
     Role:
       dev        1
     Rpt:
       IO         HMLAN1
       flg        A
       ts         1422436850.87908
       ack:
         HASH(0x1ac80f8)
         AA800229A08327415A00
     Rssi:
       Hmlan1:
         avg        -60
         cnt        1
         lst        -60
         max        -60
         min        -60
       At_hmlan1:
         avg        -64.6989795918367
         cnt        196
         lst        -65
         max        -63
         min        -67
       At_hmlan2:
         avg        -95.7712765957446
         cnt        188
         lst        -103
         max        -87
         min        -103
Attributes:
   IODev      HMLAN1
   IOgrp      vccu:HMLAN1,HMLAN2
   actCycle   000:10
   actStatus  alive
   alias      Energiemessung Controller
   autoReadReg 4_reqStatus
   event-on-change-reading no
   expert     2_full
   firmware   1.6
   group      Energiemessung
   icon       message_socket_on_off
   model      HM-ES-PMSw1-Pl
   room       E-Messung
   serialNr   LEQ0183798
   subType    powerMeter
   webCmd     getConfig:clear msgEvents


Titel: Antw:HM-ES-PMSw1-Pl event-on-change
Beitrag von: frank am 28 Januar 2015, 11:00:38
schaut mal hier: http://forum.fhem.de/index.php/topic,31856.msg251321.html#msg251321 (http://forum.fhem.de/index.php/topic,31856.msg251321.html#msg251321)

es gibt eine neue funktion event-aggregator. die könnte eventuell das problem lösen. hört sich jedenfalls spannend an.

gruss frank
Titel: Antw:HM-ES-PMSw1-Pl event-on-change
Beitrag von: Rohan am 28 Januar 2015, 11:14:08
Moins,

reicht nicht einfach die Umstellung von "current" auf "eState"?

Antwort: Nein, da der TO nur Änderungen von I haben möchte. :-X

Gruß
Thomas
Titel: Antw:HM-ES-PMSw1-Pl event-on-change
Beitrag von: Bennemannc am 28 Januar 2015, 14:56:35
Hallo,

setze das "define FileLog_EM.pm FileLog ./log/EM.pm-%Y-%m.log EM.pm.*" doch einfach mal auf "EM.pm.ptot:.*" ohne etwas davor und schaue mal was dann geloggt wird.
Kannst ja auch mal hier lesen http://forum.fhem.de/index.php?topic=26694.0 vielleicht hilt Dir das weiter.


Gruß Christoph