Reading in zwei Readings aufsplitten

Begonnen von jailbreaker07, 12 Januar 2019, 10:27:19

Vorheriges Thema - Nächstes Thema

jailbreaker07

Hallo,

ich habe eine Device mit dem Namen Wandthermostat_Party_Climate dieses hat das Reading "statMeasured-tempDay" mit den Inhalt Min: 0.0 Avg: 14.5 Max: 14.5 (since:  )
aus diesen Reading möchte ich jetzt ein Reading mit "Min" und eines mit "Max" machen......

Ich weiß das das irgendwie mit RegEx geht nur wie genau.....?

Internals:
   .triggerUsed 1
   DEF        64CFEC02
   NAME       Wandthermostat_Party_Climate
   NOTIFYDEV  global
   NR         680
   NTFY_ORDER 50-Wandthermostat_Party_Climate
   STATE      T: 14.4 desired: 21.0
   TYPE       CUL_HM
   chanNo     02
   device     Wandthermostat_Party
   .attraggr:
   .attrminint:
   READINGS:
     2019-01-12 10:23:57   boostTime       -
     2019-01-12 10:23:57   commReporting   off
     2019-01-12 10:23:57   controlMode     auto
     2019-01-12 10:23:57   desired-temp    21.0
     2019-01-12 10:23:47   humidity        55
     2019-01-12 10:23:57   measured-temp   14.4
     2019-01-12 10:23:57   statHumidityDay Min: 0 Avg: 52 Max: 55
     2019-01-12 10:23:57   statHumidityMonth Min: 0 Avg: 60 Max: 55
     2019-01-12 10:23:57   statHumidityYear Min: 0 Avg: 60 Max: 55
     2019-01-12 10:23:57   statMeasured-tempDay Min: 0.0 Avg: 14.5 Max: 14.5 (since:  )
     2019-01-12 10:23:57   statMeasured-tempHour Min: 0.0 Avg: 14.5 Max: 14.5 (since:  )
     2019-01-12 10:23:57   statMeasured-tempMonth Min: 0.0 Avg: 14.5 Max: 14.5 (since:  )
     2019-01-12 10:23:57   statMeasured-tempYear Min: 0.0 Avg: 14.5 Max: 14.5 (since:  )
     2019-01-12 10:23:57   state           T: 14.4 desired: 21.0
     2019-01-12 10:23:57   winOpenReporting off
   helper:
     _98_statistics satistic_Party_temp
     regLst     ,1,7,8,9
     expert:
       def        1
       det        0
       raw        1
       tpl        0
     role:
       chn        1
     shRegR:
       07         00
     tmpl:
Attributes:
   model      HM-TC-IT-WM-W-EU
   peerIDs    00000000,
   room       Sonstiges



Danke Gruß

Thorsten

CoolTux


userReadings tempDayMax:statMeasured-tempDay:.* { (split(' ',ReadingsVal($name,'statMeasured-tempDay','error')))[1] }


Wenn das bei Dir geht schaffst Du auch das 2.
Du musst nicht wissen wie es geht! Du musst nur wissen wo es steht, wie es geht.
Support me to buy new test hardware for development: https://www.paypal.com/paypalme/MOldenburg
My FHEM Git: https://git.cooltux.net/FHEM/
Das TuxNet Wiki:
https://www.cooltux.net

jailbreaker07

Hey,

das funktioniert leider nicht....

userReadings tempDayMax:statMeasured-tempDay:.* { (split(' ',ReadingsVal($name,'statMeasured-tempDay','error')))[1] }

CoolTux

Du musst nicht wissen wie es geht! Du musst nur wissen wo es steht, wie es geht.
Support me to buy new test hardware for development: https://www.paypal.com/paypalme/MOldenburg
My FHEM Git: https://git.cooltux.net/FHEM/
Das TuxNet Wiki:
https://www.cooltux.net

CoolTux

Ausser das Max und Min vertauscht waren klappt es bei mir im übrigen.
Voraussezung ist natürlich das das Reading statMeasured-tempDay ein Event werfen darf. Aber das ist ja Grundwissen FHEM und userReadings.
Du musst nicht wissen wie es geht! Du musst nur wissen wo es steht, wie es geht.
Support me to buy new test hardware for development: https://www.paypal.com/paypalme/MOldenburg
My FHEM Git: https://git.cooltux.net/FHEM/
Das TuxNet Wiki:
https://www.cooltux.net

jailbreaker07

Hey,

wenn ich das Reading statMeasured-tempDay manuell schreibe funktioniert das....

Das Problem ist wie du schon sagtest das kein Event gefeuert wird....

Laut Even Monitor kommt nur:

2019-01-12 11:11:24 statistics satistic_Party_temp Updated stats for: Wandthermostat_Party_Climate
2019-01-12 11:11:24 CUL_HM Wandthermostat_Party_Climate desired-temp: 21.0
2019-01-12 11:11:24 CUL_HM Wandthermostat_Party_Climate humidity: 55
2019-01-12 11:11:24 CUL_HM Wandthermostat_Party_Climate measured-temp: 14.1
2019-01-12 11:11:24 CUL_HM Wandthermostat_Party_Climate T: 14.1 desired: 21.0



jailbreaker07

Hey,

so geht das :

tempDayMin:measured-temp:.* { (split(' ',ReadingsVal($name,'statMeasured-tempDay','error')))[1] }

danke für die Hilfe :-)

CoolTux

Bestimmt weil es aus dem Statistikmodul kommt. Dann halt so machen wie Du, ein anderes Reading als Trigger nehmen  :)

Super
Du musst nicht wissen wie es geht! Du musst nur wissen wo es steht, wie es geht.
Support me to buy new test hardware for development: https://www.paypal.com/paypalme/MOldenburg
My FHEM Git: https://git.cooltux.net/FHEM/
Das TuxNet Wiki:
https://www.cooltux.net