Anfäger braucht hilfe

Hallo

bin IP-Symcon Anfänger habe auf version 2.5 aktualisiert nun funk das Script
für doppelte kanalzahl nicht mehr .Es schaltet zwar die Lampe ein ,aber nicht aus
bei 2.4 ging das,

<?
$Variable = ("21714");
if ($Variable == true)
{
FS20_SwitchMode(41047 /*[Wohnbereich-OG\Licht-Fernseher]*/, true);
}
else
{
FS20_SwitchMode(41047 /*[Wohnbereich-OG\Licht-Fernseher]*/, false);
}
?>

Hallo,

das kann nie so funktioniert haben:

$Variable = GetValue(21714);

Hallo

Danke schonmal aber mit GetValue habe ich schon gehabt unter v2.4 dann kommt
Warning: Wrong parameter type for getvalue() in [Wohnbereich-OG\Script-Licht-Küche] on line 2

die „“ dürfen da nicht sein

Vielen Dank Attain jetzt funkts wieder.

Hallo

Heute habe ich ein neues problem beim E-Mail zählen,wie muss ich statt den Namen der Variable die ID 19870 eintragen?

SetValueInteger(„Anzahl_Neue_Mails“,(integer)$articles[„count“]);

Warning: Wrong parameter type for setvalueinteger() in [E-Mail\E-Mail empfangen (POP3)\anzahl_neu_emails] on line 96
es sind 400 Nachrichten auf dem Server

so müsste es gehen:


SetValueInteger(19870 ,(integer)$articles["count"]);

Vielendank hätte es nicht alleine nicht hinbekommen


SetValueInteger(19870 ,(integer)$articles['count']);  

Index immer mit Hochkommas.

Heute wollte ich mein mp 3 orndner neu einlesen, da kam der Fehler

Warning: Wrong parameter count for ips_setvariableprofileassociation() in D:\IP-Symcon\scripts\36053.ips.php on line 16

IPS_SetVariableProfileAssociation($profil,$j,$verzeichniss,"");

Was muss geändert werden ?

Ein weiter Parameter Farbe (2.4 -> 2.5) könnte das Prob. sein.
Vergl. IPS_SetVariableProfileAssociation: IP-Symcon :: Automatisierungssoftware

Hallo habe es so geändert ,
IPS_SetVariableProfileAssociation("$profil,$j,$verzeichniss", 1, „“, „“, 0xFFFFFF);
und nun kommt
Warning: Variableprofile ‚Musikordner,0,Music VOL. 320_kbps mp3 by‘ does not exist in D:\IP-Symcon\scripts\36053.ips.php on line 16

Die Anführungszeichen sind nicht notwendig und führten hier ggf. zu einem Fehler, ansonsten sind das auch zuviele Parameter!

Hier mal ein funktionierendes Beispiel aus br_sonos:

			echo ("- creating VariableProfile ". $VarProfileName ." for setup or update!
");
			IPS_CreateVariableProfile($VarProfileName,1);
			IPS_SetVariableProfileAssociation($VarProfileName, 0, "|<","",-1);
		   IPS_SetVariableProfileAssociation($VarProfileName, 1, "Play","",-1);
		   IPS_SetVariableProfileAssociation($VarProfileName, 2, "Pause","",-1);
		   IPS_SetVariableProfileAssociation($VarProfileName, 3, "Stop","",-1);
			IPS_SetVariableProfileAssociation($VarProfileName, 4, "|>","",-1);

Vergl. die Online-Doku

Gerne PM / DM.
Grüße, Benjamin

Für die Nachwelt (wir hatten per PM Kontakt), die Lösung ist die Anpassung zu:

IPS_SetVariableProfileAssociation($profil,$j,$verzeichniss, "",-1);