Guten Morgen,
Ich möchte gerne per Phillips Hue Dimmer Schalter meine Rollläden bedienen.
Der Phillps Hue Dimmer Schalter sendet on-press und off-press (diese beiden nutze ich um eine Homematic Lampe zu schalten)
Und down-press und up-prsss für die Rollladen, Hoch und Runter fahren klappt auch, aber ich möchte wie bei einem UP-Rolladen Schalter. Wenn ich erneut auf den Schalter drücke, das die Rollladen stehen bleiben. Und genau da stehe ich gerade auf dem Schlauch.
Bedeutet wenn ich down-press Drücke fahren die Rollladen runter, wenn ich dann up-press Drücker fahren die komplett wieder hoch. Die sollen aber einfach stehen bleiben.
Hier ein Auszug aus meinem Skirpt :
case "down-press" :
$variable = IPS_GetVariable(12345);
$profileName = $variable['VariableCustomProfile'];
if ($profileName == '') {
$profileName = $variable['VariableProfile'];
}
$value = 0;
if ($profileName != '') {
$profile = IPS_GetVariableProfile($profileName);
$value = (0 * 0.01 * ($profile['MaxValue'] - $profile['MinValue'])) + $profile['MinValue'];
}
RequestAction(12345, $value);
//Rolladen soll runterfahren
break;
case "up-press" :
//Rollladen soll hochfahren
$variable = IPS_GetVariable(12345);
$profileName = $variable['VariableCustomProfile'];
if ($profileName == '') {
$profileName = $variable['VariableProfile'];
}
$value = 100;
if ($profileName != '') {
$profile = IPS_GetVariableProfile($profileName);
$value = (100 * 0.01 * ($profile['MaxValue'] - $profile['MinValue'])) + $profile['MinValue'];
}
RequestAction(12345, $value);
break;