FHEM Forum

FHEM => Automatisierung => Thema gestartet von: bend94 am 11 Januar 2017, 15:56:30

Titel: howto use "event-on-update-reading" and "notify"
Beitrag von: bend94 am 11 Januar 2017, 15:56:30
Hello,

I have a Temperature sensor.
i can read temperature with :

FHEM> list Temp STATE
it displays:
FHEM>
Temp DATE&TIME 20°

Fine

I would like to write in a file only the tempvalue (without DATETIME...)

how to do that ?

Please Help
Thanks


Titel: Antw:howto use "event-on-update-reading" and "notify"
Beitrag von: rudolfkoenig am 11 Januar 2017, 16:20:50
A possible solution:
define temp_ntfy notify Temp:state { my $val = ReadingsNum("Temp", "state", 0);; `echo $val > myfile.txt` }

Since your problem description is inaccurate, the solution might not be the one you want.