VariableID is not inside of the specified bounds (10000..59999)

Hallo Paresy,

bekomme folgende Fehlermeldung obwohl ID im Rahmen liegt.

Warning: Parameter for VariableID is not inside of the specified bounds (10000…59999) in D:\IP-Symcon\scripts\14356.ips.php on line 9


<?php

// https://www.symcon.de/forum/threads/31264-Connect-Modul-automatisiert-starten-und-stoppen

    $id_connect = 36908 /*[Connect]*/;
    
   if( $_IPS['SENDER'] == 'WebFront' OR $_IPS['SENDER'] == 'Execute' )
        {
              SetValue($_IPS['VARIABLE'], $_IPS['VALUE']);
        }
 
   if( $_IPS['VALUE'] == true)
        {
            IPS_SetProperty($id_connect, "Active", true); // Ein
            IPS_ApplyChanges($id_connect);
        }

    if( $_IPS['VALUE'] == false)
        {
            IPS_SetProperty($id_connect, "Active", false); // Aus
            IPS_ApplyChanges($id_connect);
        }

?>

Hast du im System denn IDs welche >59999 sind?

paresy

Bewusst sind mir keine bekannt, hab auch noch nie welche gesehen.

Der erste Listeneintrag ist 10018 und der letzte 59981

Magst du mal die „echte“ ausgeben, welche an die Funktion übergeben wird?

paresy

so kommt keine Fehlermeldung mehr.


<?php

// https://www.symcon.de/forum/threads/31264-Connect-Modul-automatisiert-starten-und-stoppen

    $id_connect = 36908 /*[Connect]*/;
    $st_value   = GetValue(15818);
/*
   if( $_IPS['SENDER'] == 'WebFront' OR $_IPS['SENDER'] == 'Execute' )
        {
              SetValue($_IPS['VARIABLE'], $_IPS['VALUE']);
        }
*/
    if( $st_value == true)
        {
            IPS_SetProperty($id_connect, "Active", true); // Ein
            IPS_ApplyChanges($id_connect);
        }

    if( $st_value == false)
        {
            IPS_SetProperty($id_connect, "Active", false); // Aus
            IPS_ApplyChanges($id_connect);
        }

?>