howto use "event-on-update-reading" and "notify"

Begonnen von bend94, 11 Januar 2017, 15:56:30

Vorheriges Thema - Nächstes Thema

bend94

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



rudolfkoenig

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.