Liest sich zumindest so.
Michael
Ursprünglich ging es auch um einen Controller. Ich wollte mit einem Programm (Jinx oder DMX Configurator) eine Lichtszene erstellen und mit IP-Symcon diese Lichtszene aufrufen. Aber mir konnte keiner genau sagen, ob Symcon eine Lichtszene aus einem anderen Programm/Software aufrufen kann.
Dann hat man mich auf einen Player hingewiesen. Dort werden die mit einem Programm/Software erstellten Lichtszenen auf einer Speicherkarte gespeichert.
Bei dieser Methode musste es nur noch gelingen mit Symcon diesen DMX bzw. ArtNet Player zu starten…
Aber wenn ich jetzt hier lese, dass es doch möglich ist mit Symcon eine gespeicherte Lichtszene aus Jinx zu starten, dann würde ich diese Methode natürlich vorziehen.
Wenn das Programm auf dem gleichen System läuft wie IP-Symcon und über eine Möglichkeit verfügt wie Jinx solche Sachen per Command Line zu starten, dann sollte das mit IPS_ExecuteEx aus IP-Symcon aufzurufen sein. Der Command Line Aufrufe und welche Parameter übergeben werden müssen ist dann spezifisch für das Programm das aufgerufen wird und muss dann entsprechend in der Dokumentation zu dem Programm nachgeschlagen werden.
Top genauso habe ich mir das vorgestellt.
Jinx und Symcon werden auf dem selben System laufen. Habe zur Zeit auch ein Rechner 24 Stunden am Tag laufen, auf dem eine Überwachungssoftware läuft für meine Kameras. Im neuen Haus wollte ich das so beibehalten, nur zusätzlich mit Symcon drauf und DMX Software.
Ich frage mich noch: Wenn ich über Symcon eine Lichtszene aufrufe, indem Jinx gestartet wird, dann muss man mit einer großen Zeitverzögerung rechnen oder?
Also wenn ich ein Homematic Taster benutze zur Ausführung der Lichtszene, dann gibt es zwischen betätigen des Tasters und Ausführung der Lichtszene eine erhebliche Zeitverzögerung oder nicht…?
Einfacher sollte es wohl sein innerhalb von Jinx im Setup Remote Control zu aktivieren, dann kannst Du aus IP-Symcon über Artnet die Szene aufrufen.Dies ist im Jinx Handbuch unter Remote Control -> Scene/Chase Select beschrieben.
Wenn Remote Control in Jinx aktiviert ist, sollte sich das in ms abspielen, in dem Moment in dem sich die Variable von Homematic in IP-Symcon aktualisiert wird, wird ja ein Befehl per Artnet verschickt, das spielt sich also im Rahmen der üblichen Latenz im Netzwerk ab.
Vielen Dank für die Hilfe. Wenn das alles so klappt wie beschrieben, dann wäre ich sehr zufrieden mit der Lösung. Hier sind echt kompetente Leute im Forum unterwegs. Danke nochmal.
Grundsätzlich sollte sich das testen lassen auch ohne vorhandenes DMX Gerät, denn das DMX Gerät ist ja in dem Fall Jinx. Homematic besitzt Du ja wahrscheinlich schon, dann must Du nur noch Jinx installieren und eine Szene zum Testen anlegen. Anschließend richtest Du die IP-Symcon zunächst Homematic ein und dann DMX. Modus bei DMX ist Artnet und die IP-Adrese ist die IP-Adresse des Rechners auf dem Jinx installiert ist. Wenn Remote Control in Jinx aktiviert ist und Jinx richtig eingerichtet wurde, kann dann mit DMX_SETCHANNEL ein Befehl aus IP-Symcon an Jinx geschickt werden und damit die passende Szene aktiviert werden. Man würde dann also am besten pro aufzurufende Szene ein Skript in IP-Symcon anlegen mit dem Befehl, der den entsprechenden Kanal zur Szene in Jinx aufruft. Auf das Skript kann dann ein Ereigniss gebunden werden, dass bei Variablenaktualisierung des Homematic Aktors auslöst.
Super. Danke für die detaillierte Anleitung. Nur leider besitze ich noch nicht mal Homematic. Das ist erst alles für das neue Haus geplant…
Aber deine Anleitung klingt schon sehr vielversprechend.
Ich sollte mir allmählich die Test Version von Symcon zulegen und Jinx ebenfalls.
Mit Symcon kann man sicherlich auch ein virtuellen Taster/Auslöser anlegen um damit Jinx zu starten… Vermute ich jetzt einfach mal.
Wenn Du gar kein „reales“ Gerät hast, kannst Du einfach einen Variable vom Typ Boolean (rechtsklick -> Objekt hinzufügen -> Variable) im Objektbaum anlegen. Variablenprofil wird~Switch der Variable zugewiesen. Dann noch ein Skript erstellen mit dem Inhalt
SetValue($_IPS['VARIABLE'], $_IPS['VALUE']);
das Skript dann als Aktionsskript der Variable zuweisen. Damit hast Du dann eine Variable, die Du im Webfront ein/ausschalten kannst. Mit dieser Variable kanst Du spielen und diese z.B. als Auslöser nehmen für ein Ereigniss, dass dann eine Szene in Jinx auslösen soll. So kannst Du grundsätzlich Dich auch ohne Geräte mal mit der Funktionsweise von IP-Symcon beschäftigen und das antesten.
Hab mir gestern mal Jinx auf meine Test-VM Installiert.
Das Teil kann ja ziemlich viel. Für Adressierbare LED Streifen scheint es mir aktuell ein wenig übertrieben. Eher dann für LED Walls.
Glaube ich muss mir Trotzdem mal ein wenig Hardware zulegen für den Spieltrieb
Als nächstes Teste ich mal die Steuerung durch IPS.
Grüße
Daniel
Nochmals danke Fonzo für deine Bemühungen.
Ich hoffe ich finde bald ein wenig Zeit, um das alles auszuprobieren.
könnte noch FastLED auf dem Wemos empfehlen. Mache damit gerade erste Erfahrungen, der Hardwareaufwand ist minimal, man kann es einfach über WLAN steuern und es gibt zig Effekte, die man auch leicht slebst erweitern kann.
Anleitung und Download von Jinx!, ansonsten das zip File entpacken und das exe File ausführen, da gibt es sonst nichts zu beachten.
Und danach die lange Anleitung von Jinx! lesen.
Hallo Paul,
ich habe mal testweise das WLED image auf die MineCraft Fackeln der Kids geflasht.
Hast du ggf. schon eine Ansteuerung von IPS über MQTT dafür, wie man z.B. die Speicher aufrufen kann?
Danke u. viele Grüße,
Doc
Hallo,
da ich das wled letzten März verbaut habe und dort die MQTT Anbindung nur Experimentell war habe ich es über die HTTP API Angebunden und dazu ein Script geschrieben welches auch die Datenpunkte und Profile anlegt.
Gerne kann ich das Teilen wenn gewünscht aber habe es mit der aktuellen Version von WLED nicht getestet.
Ja bitte, immer her damit …
Danke u. viele Grüße,
Doc
Hallo,
das Script ist nichts für Anfänger sollte aber selbst erklärent sein, im ersten Script die IP Eintragen (statische IP für den WLed Controller vorausgesetzt) und einmalig Ausführen damit die Profile und Variablen angelgt werden, dann noch einen Timer mit den gewünschten Intervall auf das Script erstellen:
<?php
$wled_ip = "192.168.199.81";
$d = false;
$msg = "";
$parent_id = IPS_GetParent($_IPS['SELF']);
$event = @$_IPS['EVENT'];
if ($d) {
$msg.= "Sender: ".$_IPS['SENDER']." event: ".$event."
";
}
if ($_IPS['SENDER'] == "Execute"){
if (!IPS_VariableProfileExists("WLED.Mode")){
IPS_CreateVariableProfile("WLED.Mode", 1);
IPS_SetVariableProfileText("WLED.Mode", "", "");
IPS_SetVariableProfileValues("WLED.Mode", 1, 65, 1);
IPS_SetVariableProfileDigits("WLED.Mode", 0);
IPS_SetVariableProfileIcon("WLED.Mode", "Link");
IPS_SetVariableProfileAssociation("WLED.Mode", 0, "Statisch", "", -1);
IPS_SetVariableProfileAssociation("WLED.Mode", 1, "Blinken", "", -1);
IPS_SetVariableProfileAssociation("WLED.Mode", 2, "Atmen", "", -1);
IPS_SetVariableProfileAssociation("WLED.Mode", 3, "Farbe Wischen", "", -1);
IPS_SetVariableProfileAssociation("WLED.Mode", 4, "Farbe Wischen Invertiert", "", -1);
IPS_SetVariableProfileAssociation("WLED.Mode", 5, "Farbe Wischen Rückwärts", "", -1);
IPS_SetVariableProfileAssociation("WLED.Mode", 6, "Farbe Wischen Rückwärts Invertiert", "", -1);
IPS_SetVariableProfileAssociation("WLED.Mode", 7, "Farbe Wischen Zufall", "", -1);
IPS_SetVariableProfileAssociation("WLED.Mode", 8, "Zufalls Farbe", "", -1);
IPS_SetVariableProfileAssociation("WLED.Mode", 9, "Einfach Dynamisch", "", -1);
IPS_SetVariableProfileAssociation("WLED.Mode", 10, "Multi Dynamisch", "", -1);
IPS_SetVariableProfileAssociation("WLED.Mode", 11, "Regenbogen", "", -1);
IPS_SetVariableProfileAssociation("WLED.Mode", 12, "Regenbogen Zyklisch", "", -1);
IPS_SetVariableProfileAssociation("WLED.Mode", 13, "Scanner", "", -1);
IPS_SetVariableProfileAssociation("WLED.Mode", 14, "Zweifach Scanner", "", -1);
IPS_SetVariableProfileAssociation("WLED.Mode", 15, "Ausblenden", "", -1);
IPS_SetVariableProfileAssociation("WLED.Mode", 16, "Theaterjagd", "", -1);
IPS_SetVariableProfileAssociation("WLED.Mode", 17, "Theaterjagd Regenbogen", "", -1);
IPS_SetVariableProfileAssociation("WLED.Mode", 18, "Lauflichter", "", -1);
IPS_SetVariableProfileAssociation("WLED.Mode", 19, "Funkeln", "", -1);
IPS_SetVariableProfileAssociation("WLED.Mode", 20, "Funkeln Zufall", "", -1);
IPS_SetVariableProfileAssociation("WLED.Mode", 21, "Funkeln Verblassen", "", -1);
IPS_SetVariableProfileAssociation("WLED.Mode", 22, "Funkeln Verblassen Zufall", "", -1);
IPS_SetVariableProfileAssociation("WLED.Mode", 23, "Glänzen", "", -1);
IPS_SetVariableProfileAssociation("WLED.Mode", 24, "Glänzen Blitzen", "", -1);
IPS_SetVariableProfileAssociation("WLED.Mode", 25, "Glänzen Hyper", "", -1);
IPS_SetVariableProfileAssociation("WLED.Mode", 26, "Stroboskop", "", -1);
IPS_SetVariableProfileAssociation("WLED.Mode", 27, "Stroboskop Regenbogen", "", -1);
IPS_SetVariableProfileAssociation("WLED.Mode", 28, "Multi Stroboskop", "", -1);
IPS_SetVariableProfileAssociation("WLED.Mode", 29, "Blinken Regenbogen", "", -1);
IPS_SetVariableProfileAssociation("WLED.Mode", 30, "Weiß jagen", "", -1);
IPS_SetVariableProfileAssociation("WLED.Mode", 31, "Farbe Jagen", "", -1);
IPS_SetVariableProfileAssociation("WLED.Mode", 32, "Jagen Zufall", "", -1);
IPS_SetVariableProfileAssociation("WLED.Mode", 33, "Jagen Regenbogen", "", -1);
IPS_SetVariableProfileAssociation("WLED.Mode", 34, "Blinken Jagen", "", -1);
IPS_SetVariableProfileAssociation("WLED.Mode", 35, "Blinken Jagen Zufall", "", -1);
IPS_SetVariableProfileAssociation("WLED.Mode", 36, "Jage Regenbogen weiß", "", -1);
IPS_SetVariableProfileAssociation("WLED.Mode", 37, "Jage Schwarz", "", -1);
IPS_SetVariableProfileAssociation("WLED.Mode", 38, "Jage Regenbogen Schwarz", "", -1);
IPS_SetVariableProfileAssociation("WLED.Mode", 39, "Farbe fegen Zufall", "", -1);
IPS_SetVariableProfileAssociation("WLED.Mode", 40, "Lauflicht", "", -1);
IPS_SetVariableProfileAssociation("WLED.Mode", 41, "Lauflicht Rot Blau", "", -1);
IPS_SetVariableProfileAssociation("WLED.Mode", 42, "Lauflicht Zufall", "", -1);
IPS_SetVariableProfileAssociation("WLED.Mode", 43, "Lascon Scanner", "", -1);
IPS_SetVariableProfileAssociation("WLED.Mode", 44, "Komet", "", -1);
IPS_SetVariableProfileAssociation("WLED.Mode", 45, "Feuerwerk", "", -1);
IPS_SetVariableProfileAssociation("WLED.Mode", 46, "Feuerwerk Zufall", "", -1);
IPS_SetVariableProfileAssociation("WLED.Mode", 47, "Weihnachten", "", -1);
IPS_SetVariableProfileAssociation("WLED.Mode", 48, "Feuer Flackern", "", -1);
IPS_SetVariableProfileAssociation("WLED.Mode", 49, "Feuer Flackern Weich", "", -1);
IPS_SetVariableProfileAssociation("WLED.Mode", 50, "Feuer Flackern Intensiv", "", -1);
IPS_SetVariableProfileAssociation("WLED.Mode", 51, "Zirkus", "", -1);
IPS_SetVariableProfileAssociation("WLED.Mode", 52, "Halloween", "", -1);
IPS_SetVariableProfileAssociation("WLED.Mode", 53, "Zweifarben Jagt", "", -1);
IPS_SetVariableProfileAssociation("WLED.Mode", 54, "Dreifarben Jagt", "", -1);
IPS_SetVariableProfileAssociation("WLED.Mode", 55, "ICU", "", -1);
IPS_SetVariableProfileAssociation("WLED.Mode", 56, "Automatik", "", -1);
IPS_SetVariableProfileAssociation("WLED.Mode", 58, "Fernseher", "", -1);
IPS_SetVariableProfileAssociation("WLED.Mode", 60, "Feuer 2012", "", -1);
IPS_SetVariableProfileAssociation("WLED.Mode", 61, "Gradient", "", -1);
}
if (!IPS_VariableProfileExists("WLED.Brightness")){
IPS_CreateVariableProfile("WLED.Brightness", 1);
IPS_SetVariableProfileText("WLED.Brightness", "", "%");
IPS_SetVariableProfileValues("WLED.Brightness", 5, 255, 5);
IPS_SetVariableProfileDigits("WLED.Brightness", 0);
}
if (!IPS_VariableProfileExists("WLED.Speed")){
IPS_CreateVariableProfile("WLED.Speed", 1);
IPS_SetVariableProfileText("WLED.Speed", "", "%");
IPS_SetVariableProfileValues("WLED.Speed", 5, 255, 5);
IPS_SetVariableProfileDigits("WLED.Speed", 0);
}
if (!IPS_VariableProfileExists("WLED.Red")){
IPS_CreateVariableProfile("WLED.Red", 1);
IPS_SetVariableProfileText("WLED.Red", "", " %");
IPS_SetVariableProfileValues("WLED.Red", 0, 255, 1);
IPS_SetVariableProfileDigits("WLED.Red", 0);
IPS_SetVariableProfileIcon("WLED.Red", "Climate");
}
if (!IPS_VariableProfileExists("WLED.Green")){
IPS_CreateVariableProfile("WLED.Green", 1);
IPS_SetVariableProfileText("WLED.Green", "", " %");
IPS_SetVariableProfileValues("WLED.Green", 0, 255, 1);
IPS_SetVariableProfileDigits("WLED.Green", 0);
IPS_SetVariableProfileIcon("WLED.Green", "Climate");
}
if (!IPS_VariableProfileExists("WLED.Blue")){
IPS_CreateVariableProfile("WLED.Blue", 1);
IPS_SetVariableProfileText("WLED.Blue", "", " %");
IPS_SetVariableProfileValues("WLED.Blue", 0, 255, 1);
IPS_SetVariableProfileDigits("WLED.Blue", 0);
IPS_SetVariableProfileIcon("WLED.Blue", "Climate");
}
//PK_CheckOrCreateVariableAndSetValue($parrentId, $type, $name, $value = "", $profile = "", $action = 0, $ident = "", $hide = false, $pos = -1, $caption = "", $force_check = false){
PK_CheckOrCreateVariableAndSetValue($parent_id, 3, "ip", $wled_ip, "~String", $_IPS['SELF'],"ip", false , 9);
PK_CheckOrCreateVariableAndSetValue($parent_id, 0, "connected", "0", "JaNein", $_IPS['SELF'],"connected", false , 9);
PK_CheckOrCreateVariableAndSetValue($parent_id, 0, "on", "0", "Licht", $_IPS['SELF'],"on", false , 10);
PK_CheckOrCreateVariableAndSetValue($parent_id, 1, "fx", "0", "WLED.Mode", $_IPS['SELF'],"fx", false , 11);
PK_CheckOrCreateVariableAndSetValue($parent_id, 1, "brightness", "0", "WLED.Brightness", $_IPS['SELF'],"brightness", false , 12);
PK_CheckOrCreateVariableAndSetValue($parent_id, 1, "speed", "0", "WLED.Speed", $_IPS['SELF'],"speed", false , 13);
$id_color1 = PK_CheckOrCreateDummy($parent_id, "Farbe 1", 20, false, "color1");
PK_CheckOrCreateVariableAndSetValue($id_color1, 1, "red", "0", "WLED.Red", $_IPS['SELF'],"color1_red_1", false , 15);
PK_CheckOrCreateVariableAndSetValue($id_color1, 1, "green", "0", "WLED.Green", $_IPS['SELF'],"color1_green_2", false , 16);
PK_CheckOrCreateVariableAndSetValue($id_color1, 1, "blue", "0", "WLED.Blue", $_IPS['SELF'],"color1_blue_3", false , 17);
$id_color2 = PK_CheckOrCreateDummy($parent_id, "Farbe 2", 21, false, "color2");
PK_CheckOrCreateVariableAndSetValue($id_color2, 1, "red", "0", "WLED.Red", $_IPS['SELF'],"color2_red_5", false , 15);
PK_CheckOrCreateVariableAndSetValue($id_color2, 1, "green", "0", "WLED.Green", $_IPS['SELF'],"color2_green_6", false , 16);
PK_CheckOrCreateVariableAndSetValue($id_color2, 1, "blue", "0", "WLED.Blue", $_IPS['SELF'],"color2_blue_7", false , 17);
$id_color3 = PK_CheckOrCreateDummy($parent_id, "Farbe 3", 22, false, "color3");
PK_CheckOrCreateVariableAndSetValue($id_color3, 1, "red", "0", "WLED.Red", $_IPS['SELF'],"color3_red_9", false , 15);
PK_CheckOrCreateVariableAndSetValue($id_color3, 1, "green", "0", "WLED.Green", $_IPS['SELF'],"color3_green_10", false , 16);
PK_CheckOrCreateVariableAndSetValue($id_color3, 1, "blue", "0", "WLED.Blue", $_IPS['SELF'],"color3_blue_11", false , 17);
} else {
if ($_IPS['SENDER'] == "Variable"){
$value = GetValue($_IPS['VARIABLE']);
}
if (($_IPS['SENDER'] == "WebFront")){
$value = $_IPS['VALUE'];
}
if(isset($value)){
setValue($_IPS['VARIABLE'], $value);
}
if ($_IPS['SENDER'] == "TimerEvent"){
# Read Data from MCLightning V2 --> https://github.com/toblum/McLighting/wiki/HTTP-REST-API
//$vars = IPS_GetChildrenIDs(IPS_GetParent($_IPS['SELF']));
if (SYS_ping($wled_ip, 500)){
$data = json_decode(Sys_GetURLContent("http://".$wled_ip."/json"), True);
SetValue(IPS_GetObjectIDByIdent("connected", IPS_GetParent($_IPS['SELF'])), True);
// print_r($data);
if (is_array($data)){
SetValue(IPS_GetObjectIDByIdent("on", IPS_GetParent($_IPS['SELF'])), $data['state']['on']);
SetValue(IPS_GetObjectIDByIdent("fx", IPS_GetParent($_IPS['SELF'])), $data['state']['seg'][0]['fx']);
SetValue(IPS_GetObjectIDByIdent("brightness", IPS_GetParent($_IPS['SELF'])), $data['state']['bri']);
SetValue(IPS_GetObjectIDByIdent("speed", IPS_GetParent($_IPS['SELF'])), $data['state']['seg'][0]['sx']);
SetValue(IPS_GetObjectIDByIdent("color1_red_1", IPS_GetObjectIDByIdent("color1", IPS_GetParent($_IPS['SELF']))), $data['state']['seg'][0]['col'][0][0]);
SetValue(IPS_GetObjectIDByIdent("color1_green_2", IPS_GetObjectIDByIdent("color1", IPS_GetParent($_IPS['SELF']))), $data['state']['seg'][0]['col'][0][1]);
SetValue(IPS_GetObjectIDByIdent("color1_blue_3", IPS_GetObjectIDByIdent("color1", IPS_GetParent($_IPS['SELF']))), $data['state']['seg'][0]['col'][0][2]);
SetValue(IPS_GetObjectIDByIdent("color2_red_5", IPS_GetObjectIDByIdent("color2", IPS_GetParent($_IPS['SELF']))), $data['state']['seg'][0]['col'][1][0]);
SetValue(IPS_GetObjectIDByIdent("color2_green_6", IPS_GetObjectIDByIdent("color2", IPS_GetParent($_IPS['SELF']))), $data['state']['seg'][0]['col'][1][1]);
SetValue(IPS_GetObjectIDByIdent("color2_blue_7", IPS_GetObjectIDByIdent("color2", IPS_GetParent($_IPS['SELF']))), $data['state']['seg'][0]['col'][1][2]);
SetValue(IPS_GetObjectIDByIdent("color3_red_9", IPS_GetObjectIDByIdent("color3", IPS_GetParent($_IPS['SELF']))), $data['state']['seg'][0]['col'][2][0]);
SetValue(IPS_GetObjectIDByIdent("color3_green_10", IPS_GetObjectIDByIdent("color3", IPS_GetParent($_IPS['SELF']))), $data['state']['seg'][0]['col'][2][1]);
SetValue(IPS_GetObjectIDByIdent("color3_blue_11", IPS_GetObjectIDByIdent("color3", IPS_GetParent($_IPS['SELF']))), $data['state']['seg'][0]['col'][2][2]);
}
} else {
SetValue(IPS_GetObjectIDByIdent("connected", IPS_GetParent($_IPS['SELF'])), False);
}
} elseif ($_IPS['SENDER'] == "WebFront") { #Sender was Webfront
if ($d){ $msg .= "webfront changed ".IPS_GetObject($_IPS['VARIABLE'])['ObjectIdent']." to ".$value."
"; }
switch (IPS_GetObject($_IPS['VARIABLE'])['ObjectIdent']){
case "on":
if ($value == 1){
@file_get_contents("http://".$wled_ip."/win&T=1", false, NULL, 0, 0);
} else {
@file_get_contents("http://".$wled_ip."/win&T=0", false, NULL, 0, 0);
}
break;
case "speed":
@file_get_contents("http://".$wled_ip."/set_speed=$value", false, NULL, 0, 0);
break;
case "brightness":
@file_get_contents("http://".$wled_ip."/set_brightness=$value", false, NULL, 0, 0);
break;
}
}
}
if(strlen($msg) > 0){
if ($_IPS['SENDER'] == "Execute"){
print $msg;
} else {
IPS_LogMessage(IPS_GetName($_IPS['SELF']), $msg);
}
}
function PK_CheckOrCreateVariableAndSetValue($parrentId, $type, $name, $value = "", $profile = "", $action = 0, $ident = "", $hide = false, $pos = -1, $caption = "", $archive = ""){
Global $idArchive;
//type --> 0 = Boolean, 1 = Integer, 2 = Float, 3 = String
$id = @IPS_GetVariableIDByName($name, $parrentId);
if($id === false) {
//Create Variable
$id = IPS_CreateVariable($type);
IPS_SetName($id, $name);
IPS_SetParent($id, $parrentId);
AC_SetLoggingStatus($idArchive, $id, true);
if ($ident != ""){
$ident = str_replace(" ", "", $ident);
$ident = str_replace(":", "", $ident);
$ident = str_replace(".", "", $ident);
$ident = str_replace("-", "", $ident);
$ident = str_replace("_", "", $ident);
$ident = str_replace("@", "", $ident);
}
if(strlen($profile) > 0) {
if(IPS_VariableProfileExists($profile)){
IPS_SetVariableCustomProfile($id, $profile);
}
}
if($action > 0){
if(IPS_ScriptExists($action)){
IPS_SetVariableCustomAction($id, $action);
}
}
if ($ident != ""){
IPS_SetIdent($id, $ident);
}
if ($hide){
IPS_SetHidden($id, $hide);
}
if($pos > -1){
IPS_SetPosition($id, $pos);
}
if (strlen($caption) > 0){
IPS_SetInfo($id, $caption.$ident);
}
if (strlen($archive) > 0){
AC_SetLoggingStatus($idArchive, $id, true);
switch ($archive){
case "Standard":
AC_SetAggregationType ($idArchive, $id, 0);
break;
case "Zaehler":
AC_SetAggregationType ($idArchive, $id, 1);
break;
}
IPS_ApplyChanges($idArchive);
}
}
if((strlen($value) > 0) and (GetValue($id) != $value)){
switch($type){
case 0:
if (is_string($value)){
if (strtolower($value) == "true"){
SetValueBoolean($id, 1);
} else {
SetValueBoolean($id, 0);
}
} else {
SetValueBoolean($id, $value);
}
break;
case 1:
SetValueInteger($id, $value);
break;
case 2:
SetValueFloat($id, $value);
break;
case 3:
SetValueString($id, $value);
break;
}
}
return $id;
}
Hier noch ein Script zum Toggeln:
<?php
$wled_ip = @GetValue(IPS_GetObjectIDByIdent("ip", IPS_GetParent($_IPS['SELF'])));
if($wled_ip){
@file_get_contents("http://".$wled_ip."/win&T=2", false, NULL, 0, 0);
} else {
IPS_LogMessage(IPS_GetName($_IPS['SELF']), "wled_ip not found...");
}
?>
Und der Aufruf mit dem innerhalb von 15 Minuten ein Sonnenaufgang von rot und dunkel auf weiß und Hell ausgeführt wird:
Sys_GetURLContent("http://192.168.199.81/win&FX=0&CL=hFF7800&C2=hFFC28C&W2=255&A=1&NT=255&NL=15&NF=2");
Sag bitte Bescheid ob es so noch Nutzbar ist.
Hallo Paul,
vielen Dank dafür.
Versuche gerade damit klar zu kommen.
Eigentlich würde mir ja ein aufrufen der Presets reichen, so wie du hier den Sonnenausgang angestoßen hast.
Wie komme ich aber an die Daten dafür ran?
Ich konnte in deinem Scripts nichts finden, wie du Presets aufrufst oder habe ich das übersehen?
Danke u. viele Grüße,
Doc