Add files via upload
This commit is contained in:
@@ -7,6 +7,7 @@
|
|||||||
],
|
],
|
||||||
"actions":
|
"actions":
|
||||||
[
|
[
|
||||||
|
{ "type": "Button", "label": "Set Init Values", "onClick": "VTMM_setInitValues($id);" }
|
||||||
|
|
||||||
],
|
],
|
||||||
"status":
|
"status":
|
||||||
|
|||||||
+9
-2
@@ -14,13 +14,13 @@ class MinMax extends IPSModule {
|
|||||||
|
|
||||||
SetValue($this->RegisterVariableFloat("ActualValue", "Aktueller Wert","",0),123.4);
|
SetValue($this->RegisterVariableFloat("ActualValue", "Aktueller Wert","",0),123.4);
|
||||||
|
|
||||||
SetValue($this->RegisterVariableFloat("MinValue", "Minimalwert","LimitValue",10),20);
|
$this->RegisterVariableFloat("MinValue", "Minimalwert","LimitValue",10);
|
||||||
$this->EnableAction("MinValue");
|
$this->EnableAction("MinValue");
|
||||||
SetValue($this->RegisterVariableBoolean("MinValueEn", "Minimalwert auswerten?","LimitEn",20),true);
|
SetValue($this->RegisterVariableBoolean("MinValueEn", "Minimalwert auswerten?","LimitEn",20),true);
|
||||||
$this->EnableAction("MinValueEn");
|
$this->EnableAction("MinValueEn");
|
||||||
$this->RegisterVariableBoolean("IsMinValue", "Minimalwert","~Alert",30);
|
$this->RegisterVariableBoolean("IsMinValue", "Minimalwert","~Alert",30);
|
||||||
|
|
||||||
SetValue($this->RegisterVariableFloat("MaxValue", "Maximalwert","LimitValue",50),70);
|
$this->RegisterVariableFloat("MaxValue", "Maximalwert","LimitValue",50);
|
||||||
$this->EnableAction("MaxValue");
|
$this->EnableAction("MaxValue");
|
||||||
SetValue($this->RegisterVariableBoolean("MaxValueEn", "Maximalwert auswerten?","LimitEn",60),true);
|
SetValue($this->RegisterVariableBoolean("MaxValueEn", "Maximalwert auswerten?","LimitEn",60),true);
|
||||||
$this->EnableAction("MaxValueEn");
|
$this->EnableAction("MaxValueEn");
|
||||||
@@ -169,7 +169,14 @@ class MinMax extends IPSModule {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
public function setInitValues(){
|
||||||
|
|
||||||
|
SetValue($this->GetIDForIdent("NotifyTitel"),"Störung!");
|
||||||
|
SetValue($this->GetIDForIdent("NotifyTextMin"),"Grenzwert unterschritten");
|
||||||
|
SetValue($this->GetIDForIdent("NotifyTextMax"),"Grenzwert überschritten");
|
||||||
|
SetValue($this->GetIDForIdent("Hysterese"),1);
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
@@ -11,6 +11,7 @@
|
|||||||
],
|
],
|
||||||
"actions":
|
"actions":
|
||||||
[
|
[
|
||||||
|
{ "type": "Button", "label": "Set Init Values", "onClick": "VTMA_setInitValues($id);" }
|
||||||
|
|
||||||
],
|
],
|
||||||
"status":
|
"status":
|
||||||
|
|||||||
+16
-5
@@ -14,13 +14,13 @@ class Multialarmer extends IPSModule {
|
|||||||
$this->RegisterPropertyInteger("ValueId03",0);
|
$this->RegisterPropertyInteger("ValueId03",0);
|
||||||
$this->RegisterPropertyInteger("ValueId04",0);
|
$this->RegisterPropertyInteger("ValueId04",0);
|
||||||
|
|
||||||
SetValue($this->RegisterVariableBoolean("NotifyEn01", "Variable 01 Melden?","LimitEn",95),true);
|
$this->RegisterVariableBoolean("NotifyEn01", "Variable 01 Melden?","LimitEn",95);
|
||||||
$this->EnableAction("NotifyEn01");
|
$this->EnableAction("NotifyEn01");
|
||||||
SetValue($this->RegisterVariableBoolean("NotifyEn02", "Variable 02 Melden?","LimitEn",115),true);
|
$this->RegisterVariableBoolean("NotifyEn02", "Variable 02 Melden?","LimitEn",115);
|
||||||
$this->EnableAction("NotifyEn02");
|
$this->EnableAction("NotifyEn02");
|
||||||
SetValue($this->RegisterVariableBoolean("NotifyEn03", "Variable 03 Melden?","LimitEn",135),true);
|
$this->RegisterVariableBoolean("NotifyEn03", "Variable 03 Melden?","LimitEn",135);
|
||||||
$this->EnableAction("NotifyEn03");
|
$this->EnableAction("NotifyEn03");
|
||||||
SetValue($this->RegisterVariableBoolean("NotifyEn04", "Variable 04 Melden?","LimitEn",155),true);
|
$this->RegisterVariableBoolean("NotifyEn04", "Variable 04 Melden?","LimitEn",155);
|
||||||
$this->EnableAction("NotifyEn04");
|
$this->EnableAction("NotifyEn04");
|
||||||
|
|
||||||
SetValue($this->RegisterVariableString("NotifyTitel01", "Titel der Benachrichtigung Var 01","~TextBox",100),"Störung!");
|
SetValue($this->RegisterVariableString("NotifyTitel01", "Titel der Benachrichtigung Var 01","~TextBox",100),"Störung!");
|
||||||
@@ -98,7 +98,7 @@ class Multialarmer extends IPSModule {
|
|||||||
|
|
||||||
|
|
||||||
$NotifyTitel01 = GetValue($this->GetIDForIdent("NotifyTitel01"));
|
$NotifyTitel01 = GetValue($this->GetIDForIdent("NotifyTitel01"));
|
||||||
$NotifyText01 = IPS_GetName($IdVariable01);//GetValue($this->GetIDForIdent("NotifyText01"));
|
$NotifyText01 = IPS_GetName($IdVariable01);//GetValue($this->GetIDForIdent("NotifyText01")); 2.207.168.165/29
|
||||||
|
|
||||||
$NotifyTitel02 = GetValue($this->GetIDForIdent("NotifyTitel02"));
|
$NotifyTitel02 = GetValue($this->GetIDForIdent("NotifyTitel02"));
|
||||||
$NotifyText02 = IPS_GetName($IdVariable02);//GetValue($this->GetIDForIdent("NotifyText02"));
|
$NotifyText02 = IPS_GetName($IdVariable02);//GetValue($this->GetIDForIdent("NotifyText02"));
|
||||||
@@ -140,6 +140,17 @@ class Multialarmer extends IPSModule {
|
|||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function setInitValues(){
|
||||||
|
SetValue($this->GetIDForIdent("NotifyTitel01"),"Störung!");
|
||||||
|
|
||||||
|
SetValue($this->GetIDForIdent("NotifyTitel02"),"Störung!");
|
||||||
|
|
||||||
|
SetValue($this->GetIDForIdent("NotifyTitel03"),"Störung!");
|
||||||
|
|
||||||
|
SetValue($this->GetIDForIdent("NotifyTitel04"),"Störung!");
|
||||||
|
}
|
||||||
|
|
||||||
private function notify($trigid, $webfrontid, $targetid, $art, $smname, $ico){
|
private function notify($trigid, $webfrontid, $targetid, $art, $smname, $ico){
|
||||||
|
|
||||||
if (GetValueBoolean($trigid) == true && ($this->GetBuffer($smname) == "true")) {
|
if (GetValueBoolean($trigid) == true && ($this->GetBuffer($smname) == "true")) {
|
||||||
|
|||||||
+19
-8
@@ -14,19 +14,15 @@ class Varnamer extends IPSModule {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
SetValue($this->RegisterVariableString("Name01", "Name Variable 1","~TextBox",10),"Variable 1");
|
$this->RegisterVariableString("Name01", "Name Variable 1","~TextBox",10);
|
||||||
$this->EnableAction("Name01");
|
$this->EnableAction("Name01");
|
||||||
SetValue($this->RegisterVariableString("Name02", "Name Variable 2","~TextBox",10),"Variable 2");
|
$this->RegisterVariableString("Name02", "Name Variable 2","~TextBox",20);
|
||||||
$this->EnableAction("Name02");
|
$this->EnableAction("Name02");
|
||||||
SetValue($this->RegisterVariableString("Name03", "Name Variable 3","~TextBox",10),"Variable 3");
|
$this->RegisterVariableString("Name03", "Name Variable 3","~TextBox",30);
|
||||||
$this->EnableAction("Name03");
|
$this->EnableAction("Name03");
|
||||||
SetValue($this->RegisterVariableString("Name04", "Name Variable 4","~TextBox",10),"Variable 4");
|
$this->RegisterVariableString("Name04", "Name Variable 4","~TextBox",40);
|
||||||
$this->EnableAction("Name04");
|
$this->EnableAction("Name04");
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Überschreibt die intere IPS_ApplyChanges($id) Funktion
|
// Überschreibt die intere IPS_ApplyChanges($id) Funktion
|
||||||
@@ -34,6 +30,8 @@ class Varnamer extends IPSModule {
|
|||||||
// Diese Zeile nicht löschen
|
// Diese Zeile nicht löschen
|
||||||
parent::ApplyChanges();
|
parent::ApplyChanges();
|
||||||
|
|
||||||
|
$this->getInitValues();
|
||||||
|
|
||||||
}
|
}
|
||||||
public function RequestAction($Ident, $Value) {
|
public function RequestAction($Ident, $Value) {
|
||||||
$varid = $this->GetIDForIdent($Ident);
|
$varid = $this->GetIDForIdent($Ident);
|
||||||
@@ -70,6 +68,19 @@ class Varnamer extends IPSModule {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function getInitValues(){
|
||||||
|
$Idvalue01 = $this->ReadPropertyInteger("IdVariable01");
|
||||||
|
$Idvalue02 = $this->ReadPropertyInteger("IdVariable02");
|
||||||
|
$Idvalue03 = $this->ReadPropertyInteger("IdVariable03");
|
||||||
|
$Idvalue04 = $this->ReadPropertyInteger("IdVariable04");
|
||||||
|
|
||||||
|
SetValue($this->GetIDForIdent("Name01"),IPS_GetName($Idvalue01));
|
||||||
|
SetValue($this->GetIDForIdent("Name02"),IPS_GetName($Idvalue01));
|
||||||
|
SetValue($this->GetIDForIdent("Name03"),IPS_GetName($Idvalue01));
|
||||||
|
SetValue($this->GetIDForIdent("Name04"),IPS_GetName($Idvalue01));
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user