IPS_Execute ?

Mache ich da was falsch oder hab ich etwas nicht mitbekommen ?

<?
// aus https://www.symcon.de/service/dokumentation/befehlsreferenz/ablaufsteuerung/ips-execute/
//Eine Batchdatei starten
//IPS_Execute("C:/autoexec.bat", "", false, false);
  IPS_Execute("/usr/share/symcon/scripts/Lescan.sh", "", false, false);
//             /usr/share/symcon/scripts/    (Pfad aus der Fehlermeldung)

?>


Fatal error: Call to undefined function IPS_Execute() in /usr/share/symcon/scripts/16514.ips.php on line 5


Ich hab die Suchfunktion bemüht und nur die Beschreibung der Funktion gefunden.
Und IPS_Execute war doch nicht in der Liste der Funktionen, die in der Beta-Version für RaspberryPi „ohne wirkliche Funktion“ sind (?).

Viele Grüsse
Harald

Alternative kannst du exec benutzen.


<?
exec('sh ' . __dir__ . '/Lescan.sh &');
?>

PHP: exec - Manual

Ich hab mir mal ein kleines Skript geschrieben, das definitiv klärt, dass ‚IPS_Execute‘ nicht in der Linux-Version von IPS enthalten ist:

Untersuche IPS Version 3.50

1. Folgende mir wichtigen Funktionen fehlen:
IPS_GetScriptThreads
IPS_Execute
IPS_ExecuteEx
Sys_GetProcessInfo
Sys_GetMemoryInfo
Sys_GetCPUInfo
Sys_GetHardDiskInfo
Sys_GetNetworkInfo
Sys_GetSpooler
Sys_GetBattery
Sys_GetURLHeaders

2. Folgende mir wichtigen Funktionen sind 'ohne wirkliche Funktion':
IPS_SemaphoreEnter
IPS_SemaphoreLeave
IPS_Sleep
Sys_Ping
Sys_GetURLContent
Sys_GetURLContentEx

Falls es jemand nachvollziehen will:

<?
$MeineMirWichtigenFunktionen = array ('IPS_SemaphoreEnter', 'IPS_SemaphoreLeave', 'IPS_FunctionExists', 'IPS_GetFunction', 'IPS_GetFunctionList', 'IPS_ScriptThreadExists', 'IPS_GetScriptThread', 'IPS_GetScriptThreads', 'IPS_GetScriptThreadList', 'IPS_GetSnapshot', 'IPS_GetSnapshotChanges', 'IPS_SetOption', 'IPS_GetOption', 'IPS_SetLicense', 'IPS_CreateVariableProfile', 'IPS_DeleteVariableProfile', 'IPS_SetVariableProfileText', 'IPS_SetVariableProfileValues', 'IPS_SetVariableProfileDigits', 'IPS_SetVariableProfileIcon', 'IPS_SetVariableProfileAssociation', 'IPS_VariableProfileExists', 'IPS_GetVariableProfile', 'IPS_GetVariableProfileList', 'IPS_GetVariableProfileListByType', 'IPS_SetParent', 'IPS_SetIdent', 'IPS_SetName', 'IPS_SetInfo', 'IPS_SetIcon', 'IPS_SetPosition', 'IPS_SetHidden', 'IPS_ObjectExists', 'IPS_GetObject', 'IPS_GetObjectList', 'IPS_GetObjectIDByName', 'IPS_GetObjectIDByIdent', 'IPS_HasChildren', 'IPS_IsChild', 'IPS_GetChildrenIDs', 'IPS_GetName', 'IPS_GetParent', 'IPS_GetLocation', 'IPS_CreateCategory', 'IPS_DeleteCategory', 'IPS_CategoryExists', 'IPS_GetCategoryList', 'IPS_GetCategoryIDByName', 'IPS_CreateInstance', 'IPS_DeleteInstance', 'IPS_InstanceExists', 'IPS_GetInstance', 'IPS_GetInstanceList', 'IPS_GetInstanceListByModuleType', 'IPS_GetInstanceListByModuleID', 'IPS_GetInstanceIDByName', 'IPS_IsInstanceCompatible', 'IPS_GetCompatibleInstances', 'IPS_CreateEvent', 'IPS_DeleteEvent', 'IPS_SetEventActive', 'IPS_SetEventLimit', 'IPS_SetEventScript', 'IPS_SetEventTrigger', 'IPS_SetEventTriggerValue', 'IPS_SetEventTriggerSubsequentExecution', 'IPS_SetEventCyclic', 'IPS_SetEventCyclicDateFrom', 'IPS_SetEventCyclicDateTo', 'IPS_SetEventCyclicTimeFrom', 'IPS_SetEventCyclicTimeTo', 'IPS_SetEventScheduleAction', 'IPS_SetEventScheduleGroup', 'IPS_SetEventScheduleGroupPoint', 'IPS_EventExists', 'IPS_GetEvent', 'IPS_GetEventList', 'IPS_GetEventListByType', 'IPS_GetEventIDByName', 'IPS_GetVariableEventList', 'IPS_GetScriptEventList', 'IPS_CreateScript', 'IPS_DeleteScript', 'IPS_SetScriptFile', 'IPS_ScriptExists', 'IPS_GetScript', 'IPS_GetScriptList', 'IPS_GetScriptIDByName', 'IPS_GetScriptIDByFile', 'IPS_GetScriptFile', 'IPS_GetScriptContent', 'IPS_SetScriptContent', 'IPS_CreateVariable', 'IPS_DeleteVariable', 'IPS_VariableExists', 'IPS_GetVariable', 'IPS_GetVariableList', 'IPS_GetVariableIDByName', 'IPS_SetVariableCustomProfile', 'IPS_SetVariableCustomAction', 'IPS_CreateMedia', 'IPS_DeleteMedia', 'IPS_SetMediaFile', 'IPS_MediaExists', 'IPS_GetMedia', 'IPS_GetMediaList', 'IPS_GetMediaListByType', 'IPS_GetMediaIDByName', 'IPS_GetMediaIDByFile', 'IPS_SendMediaEvent', 'IPS_GetMediaContent', 'IPS_SetMediaContent', 'IPS_CreateLink', 'IPS_DeleteLink', 'IPS_SetLinkTargetID', 'IPS_LinkExists', 'IPS_GetLink', 'IPS_GetLinkList', 'IPS_GetLinkIDByName', 'IPS_ConnectInstance', 'IPS_DisconnectInstance', 'IPS_LibraryExists', 'IPS_GetLibrary', 'IPS_GetLibraryList', 'IPS_GetLibraryModules', 'IPS_ModuleExists', 'IPS_GetModule', 'IPS_GetModuleList', 'IPS_GetModuleListByType', 'IPS_IsModuleCompatible', 'IPS_GetCompatibleModules', 'HM_ReadServiceMessages', 'HM_WriteValueBoolean', 'HM_WriteValueInteger', 'HM_WriteValueFloat', 'HM_WriteValueString', 'HM_RequestStatus', 'HM_LoadDevices', 'HM_GetKnownDevices', 'RegVar_SendText', 'RegVar_GetBuffer', 'RegVar_SetBuffer', 'Cutter_ClearBuffer', 'ModBus_WriteCoil', 'ModBus_WriteRegister', 'ModBus_WriteRegisterByte', 'ModBus_WriteRegisterWord', 'ModBus_WriteRegisterDWord', 'ModBus_WriteRegisterShortInt', 'ModBus_WriteRegisterSmallInt', 'ModBus_WriteRegisterInteger', 'ModBus_WriteRegisterReal', 'ModBus_WriteRegisterInt64', 'SMTP_SendMail', 'SMTP_SendMailEx', 'SMTP_SendMailAttachment', 'SMTP_SendMailAttachmentEx', 'IMAP_UpdateCache', 'IMAP_GetCachedMails', 'IMAP_GetMailEx', 'POP3_UpdateCache', 'POP3_GetCachedMails', 'POP3_GetMailEx', 'SMS_Send', 'SMS_RequestBalance', 'SMS_RequestStatus', 'IPS_SetProperty', 'IPS_GetProperty', 'IPS_SetConfiguration', 'IPS_GetConfiguration', 'IPS_GetConfigurationForm', 'IPS_HasChanges', 'IPS_ResetChanges', 'IPS_ApplyChanges', 'GetValueBoolean', 'SetValueBoolean', 'GetValueInteger', 'SetValueInteger', 'GetValueFloat', 'SetValueFloat', 'GetValueString', 'SetValueString', 'GetValue', 'GetValueFormatted', 'SetValue', 'IPS_GetKernelDir', 'IPS_GetKernelVersion', 'IPS_GetUptime', 'IPS_LogMessage', 'IPS_Execute', 'IPS_ExecuteEx', 'IPS_Sleep', 'IPS_RunScript', 'IPS_RunScriptWait', 'IPS_RunScriptEx', 'IPS_RunScriptWaitEx', 'IPS_RunScriptText', 'IPS_RunScriptTextWait', 'IPS_SetScriptTimer', 'IPS_GetScriptTimer', 'Sys_GetProcessInfo', 'Sys_GetMemoryInfo', 'Sys_GetCPUInfo', 'Sys_GetHardDiskInfo', 'Sys_GetNetworkInfo', 'Sys_Ping', 'Sys_GetSpooler', 'Sys_GetBattery', 'Sys_GetURLHeaders', 'Sys_GetURLContent', 'Sys_GetURLContentEx',);

print("Untersuche IPS Version ");
print(IPS_GetKernelVersion ());

print("

1. Folgende mir wichtigen Funktionen fehlen:");
foreach ($MeineMirWichtigenFunktionen as $Funktion) {
    if ( ! function_exists ($Funktion)) {
        print("
$Funktion");
    }
}

print("

2. Folgende mir wichtigen Funktionen sind 'ohne wirkliche Funktion':");
foreach ($MeineMirWichtigenFunktionen as $Funktion) {
    if (function_exists ($Funktion)) {
        @$Detail = IPS_GetFunction ($Funktion);
        if ($Detail == '')
            print("
$Funktion");
    }
}
?>

Im Array $MeineMirWichtigenFunktionen habe ich nicht alle in der Windows-Version gelisteten Funktionen aufgeführt, sondern eben nur die ‚mir wichtigen Funktionen‘.

Viele Grüsse
Harald