Rainer,
I couldn't find $IPS_OLDVALUE in the documentation either but after a search on the forum I found a peace of samplecode from Attain... the thing is that you have to trigger the script through the varable change (Attain will explain this when you follow the link
Anfängerprobleme: Änderungsrate einer Temperatur berechnen
You can try this one to:
PHP-Code:
IF ( $IPS_SENDER == "Variable"){
$Differenz = $IPS_VALUE - $IPS_OLDVALUE;
$Script = IPS_GetScript($IPS_SELF);
$Zeit = time() - $Script['LastExecute'];
IPS_LogMessage( $Differenz , $Zeit);
IPS_LogMessage( $IPS_OLDVALUE , $IPS_VALUE);
// weitere Berrechnungen.......
}
Question remains: "How did Attain know about the $IPS_OLDVALUE"
But it works
Regards,
Robert
I can read and speak it but not write it...