FHEM - readingswatcher - Monitor battery devices
From time to time, it happens that a battery inside a device dies before updating the battery state to something like “low”. For that case, we can use the FHEM module readingsWatcher. From FHEM commandref: The module monitors readings in other modules that its readings or their times change at certain intervals and if necessary, triggers events that can be processed further with other modules (for example, notify, DOIF).
Activate the module with basic usage:
define readingswatcher readingsWatcher attr ku.temp.hum.1 readingsWatcher 3600,,temperature,humidity
After that, I use an DOIF and msg to send out some alerts:
defmod doif.readingswatcher DOIF ([readingswatcher:state] eq "timeout")\ (\ msg "ALARM: Folgende Geräte funktionieren möglicherweise nicht mehr: [readingswatcher:deadDevs]"\ )
For more information, see https://fhem.de/commandref.html#readingsWatcher