Einzelnen Beitrag anzeigen
  #7 (permalink)  
Alt 31.07.10, 14:41
robertg robertg ist offline
Member
 
Registriert seit: Jan 2010
Ort: Utrecht, Netherlands
Beiträge: 33
Standard $IPS_OLDVALUE, it works...

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...
Mit Zitat antworten