private static function IncludeClassByName($className) { $pos = strpos($className, '_'); if ($pos===false) { return; } $componentType = substr($className, 0, $pos); $componentType = str_replace('IPSModule','IPSComponent', $componentType); IPSUtils_Include ($className.'.class.php', 'IPSLibrary::app::core::IPSComponent::'.$componentType); }
/** * @public * * Initialisierung des IPSComponentPlayer_Sonos Players * * @param string $address IP Addresse des Sonos Players */ public function __construct( $address ) { if (file_exists(IPS_GetKernelDir().'scripts\\PHPSonos.inc.php')) { include_once IPS_GetKernelDir().'scripts\\PHPSonos.inc.php'; } else { IPSUtils_Include ('PHPSonos.class.php', 'IPSLibrary::app::hardware::Sonos'); } $this->address = $address; $this->sonos = new PHPSonos($address); }
/**@defgroup ipsmodulemanagergui IPSModuleManagerGUI * @ingroup modules * @{ * * @file IPSModuleManagerGUI.inc.php * @author Andreas Brauneis * @version * Version 2.50.1, 09.08.2012<br/> * * IPSModuleManagerGUI API * */ IPSUtils_Include ("IPSLogger.inc.php", "IPSLibrary::app::core::IPSLogger"); IPSUtils_Include ("IPSModuleManagerGUI_Constants.inc.php", "IPSLibrary::app::modules::IPSModuleManagerGUI"); IPSUtils_Include ("IPSModuleManagerGUI_Utils.inc.php", "IPSLibrary::app::modules::IPSModuleManagerGUI"); /** * Setz eine bestimmte Seite in der IPSModuleManagerGUI * * @param string $action Action String * @param string $module optionaler Module String * @param string $info optionaler Info String */ function IPSModuleManagerGUI_SetPage($action, $module='', $info='') { $baseId = IPSUtil_ObjectIDByPath('Program.IPSLibrary.data.modules.IPSModuleManagerGUI'); SetValue(IPS_GetObjectIDByIdent(IPSMMG_VAR_ACTION, $baseId), $action); SetValue(IPS_GetObjectIDByIdent(IPSMMG_VAR_MODULE, $baseId), $module); SetValue(IPS_GetObjectIDByIdent(IPSMMG_VAR_INFO, $baseId), $info); }
* @author Andreas Brauneis * * */ /** * @class IPSComponentRGB_IPS868 * * Definiert ein IPSComponentRGB_IPS868 Object, das ein IPSComponentRGB Object für Homematic implementiert. * * @author Andreas Brauneis * @version * Version 2.50.1, 31.01.2012<br/> */ IPSUtils_Include ('IPSComponentRGB.class.php', 'IPSLibrary::app::core::IPSComponent::IPSComponentRGB'); class IPSComponentRGB_IPS868 extends IPSComponentRGB { private $instanceId; /** * @public * * Initialisierung eines IPSComponentRGB_IPS868 Objektes * * @param integer $instanceId InstanceId des IPS-RGBW868 Devices */ public function __construct($instanceId) { $this->instanceId = IPSUtil_ObjectIDByPath($instanceId); }
* @{ * * Dieses Script aktualisiert die Wetterdaten in IPS * * @file IPSWeatherForcastAT_Refresh.ips.php * @author Andreas Brauneis * @version * Version 2.50.1, 15.02.2012<br/> * */ IPSUtils_Include ("IPSWeatherForcastAT_Constants.inc.php", "IPSLibrary::app::modules::Weather::IPSWeatherForcastAT"); IPSUtils_Include ("IPSWeatherForcastAT_Configuration.inc.php", "IPSLibrary::config::modules::Weather::IPSWeatherForcastAT"); IPSUtils_Include ("IPSWeatherForcastAT_Utils.inc.php", "IPSLibrary::app::modules::Weather::IPSWeatherForcastAT"); IPSUtils_Include ("IPSLogger.inc.php", "IPSLibrary::app::core::IPSLogger"); if (Sys_Ping(IPSWEATHERFAT_EXTERNAL_IP, 100)) { IPSLogger_Trc(__file__, "Refresh Weather Data"); $stationGoogle = IPSWEATHERFAT_GOOGLE_PLACE."-".IPSWEATHERFAT_GOOGLE_COUNTRY; $urlGoogle = "http://www.google.com/ig/api?weather=".$stationGoogle."&hl=".IPSWEATHERFAT_GOOGLE_LANG; $DaySourceArray = array('Mo.','Di.','Mi.','Do.','Fr.','Sa.','So.'); $DayDisplayArray = array('Montag','Dienstag','Mittwoch','Donnerstag','Freitag','Samstag','Sonntag'); $api = simplexml_load_string(utf8_encode(@Sys_GetURLContent($urlGoogle))); echo $urlGoogle; IPSWeatherFAT_SetValue('LastRefreshDateTime', date("Y-m-j H:i:s")); IPSWeatherFAT_SetValue('LastRefreshTime', date("H:i"));
* * */ /** * @class IPSModuleSensor * * Definiert ein IPSModuleSensor Object, das als Wrapper für Sensoren in der IPSLibrary * verwendet werden kann. * * @author Andreas Brauneis * @version * Version 2.50.1, 09.06.2012<br/> */ IPSUtils_Include ('IPSModule.class.php', 'IPSLibrary::app::core::IPSComponent'); abstract class IPSModuleSensor extends IPSModule { /** * @public * * Ermöglicht die Synchronisation von Sensorwerten mit Modulen * * @param string $value Sensorwert * @param IPSComponentSensor $component Sensor Komponente */ abstract public function SyncButton($value, IPSComponentSensor $component); /** * @public
<? /**@addtogroup ipscomponent * @{ * * @file IPSModuleAVControl_Entertainment.class.php * @author Andreas Brauneis * */ IPSUtils_Include ("Entertainment_InterfaceIPSComponentAVControl.inc.php", "IPSLibrary::app::modules::Entertainment"); IPSUtils_Include ('IPSModuleAVControl.class.php', 'IPSLibrary::app::core::IPSComponent::IPSComponentAVControl'); /** * @class IPSModuleAVControl_Entertainment * * Klasse zur Rückmeldung von Audio/Video Receivern an die Entertainment Steuerung * * @author Andreas Brauneis * @version * Version 2.50.1, 31.01.2012<br/> */ class IPSModuleAVControl_Entertainment extends IPSModuleAVControl { /** * @public * * Initialisierung des IPSModuleAVControl_Entertainment * */ public function __construct() {
<? /**@addtogroup ipsmodulemanager * @{ * * Deinstallations Script für IPSModuleManager * * @file IPSModuleManager_Deinstallation.ips.php * @author Andreas Brauneis * @version * Version 2.50.1, 28.02.2012<br/> * * */ if (!isset($moduleManager)) { IPSUtils_Include ('IPSModuleManager.class.php', 'IPSLibrary::install::IPSModuleManager'); echo 'ModuleManager Variable not set --> Create "default" ModuleManager'; $moduleManager = new IPSModuleManager('IPSModuleManager'); } /** @}*/ ?>
*/ if (!isset($moduleManager)) { IPSUtils_Include ('IPSModuleManager.class.php', 'IPSLibrary::install::IPSModuleManager'); echo 'ModuleManager Variable not set --> Create "default" ModuleManager'."\n"; $moduleManager = new IPSModuleManager('IPSEDIP'); } $moduleManager->VersionHandler()->CheckModuleVersion('IPS','2.50'); $moduleManager->VersionHandler()->CheckModuleVersion('IPSLogger','2.50.1'); $moduleManager->VersionHandler()->CheckModuleVersion('IPSModuleManager','2.50.1'); IPSUtils_Include ("IPSInstaller.inc.php", "IPSLibrary::install::IPSInstaller"); IPSUtils_Include ("IPSEDIP_Constants.inc.php", "IPSLibrary::app::hardware::IPSEDIP"); IPSUtils_Include ("IPSEDIP_Configuration.inc.php", "IPSLibrary::config::hardware::IPSEDIP"); $AppPath = "Program.IPSLibrary.app.hardware.IPSEDIP"; $DataPath = "Program.IPSLibrary.data.hardware.IPSEDIP"; $ConfigPath = "Program.IPSLibrary.config.hardware.IPSEDIP"; $HardwarePath = "Hardware.EDIP"; $IgnoreIOPortInstanceError = $moduleManager->GetConfigValueBoolDef('IgnoreIOPortInstanceError', '', true); /* ---------------------------------------------------------------------- */ /* EDIP Program Installation */ /* ---------------------------------------------------------------------- */ $CategoryIdData = CreateCategoryPath($DataPath); $CategoryIdApp = CreateCategoryPath($AppPath); $CategoryIdHW = CreateCategoryPath($HardwarePath);
SetVariableConstant ('"NP_ID_CDALBUM"', $albumId, 'NetPlayer_IDs.inc.php', 'IPSLibrary::app::modules::NetPlayer'); SetVariableConstant ("NP_ID_CDINTERPRET", $interpretId, 'NetPlayer_IDs.inc.php', 'IPSLibrary::app::modules::NetPlayer'); SetVariableConstant ("NP_ID_CATEGORYLIST", $categoryId, 'NetPlayer_IDs.inc.php', 'IPSLibrary::app::modules::NetPlayer'); SetVariableConstant ("NP_ID_CDALBUMLIST", $cdAlbumListId, 'NetPlayer_IDs.inc.php', 'IPSLibrary::app::modules::NetPlayer'); SetVariableConstant ("NP_ID_CDALBUMNAV", $cdAlbumNavId, 'NetPlayer_IDs.inc.php', 'IPSLibrary::app::modules::NetPlayer'); SetVariableConstant ('"NP_ID_CDTRACKLIST"', $cdTrackListId, 'NetPlayer_IDs.inc.php', 'IPSLibrary::app::modules::NetPlayer'); SetVariableConstant ("NP_ID_CDTRACKNAV", $cdTrackNavId, 'NetPlayer_IDs.inc.php', 'IPSLibrary::app::modules::NetPlayer'); SetVariableConstant ("NP_ID_RADIOLIST", $radioListId, 'NetPlayer_IDs.inc.php', 'IPSLibrary::app::modules::NetPlayer'); SetVariableConstant ("NP_ID_RADIONAV", $radioNavId, 'NetPlayer_IDs.inc.php', 'IPSLibrary::app::modules::NetPlayer'); SetVariableConstant ("NP_ID_SOURCE", $sourceId, 'NetPlayer_IDs.inc.php', 'IPSLibrary::app::modules::NetPlayer'); SetVariableConstant ('"NP_ID_CONTROL"', $controlId, 'NetPlayer_IDs.inc.php', 'IPSLibrary::app::modules::NetPlayer'); // Installation of Components IPSUtils_Include ("NetPlayer_Constants.inc.php", "IPSLibrary::app::modules::NetPlayer"); IPSUtils_Include ("NetPlayer_Configuration.inc.php", "IPSLibrary::config::modules::NetPlayer"); $params = explode(',',NETPLAYER_COMPONENT); if ($params[0] == 'IPSComponentPlayer_Mediaplayer') { if (!is_numeric($params[1])) { $pathItems = explode('.',$params[1]); $mediaPlayerName = $pathItems[count($pathItems)-1]; unset($pathItems[count($pathItems)-1]); $path = implode('.', $pathItems); $categoryId = CreateCategoryPath($path); // Create MediaPlayer $mediaPlayerInstanceId = CreateMediaPlayer($mediaPlayerName, $categoryId, 0); $mediaPlayerTitel = IPS_GetVariableIDByName('Titel', $mediaPlayerInstanceId); // Register Message Handler
$NauticBeg = CreateVariable("NauticBegin", 3 /*String*/, $categoryId_DataValues, 310, '~String', $scriptId_Refresh, ''); $NauticEnd = CreateVariable("NauticEnd", 3 /*String*/, $categoryId_DataValues, 320, '~String', $scriptId_Refresh, ''); $NauticBegLim = CreateVariable("NauticBeginLimited", 3 /*String*/, $categoryId_DataValues, 330, '~String', $scriptId_Refresh, ''); $NauticEndLim = CreateVariable("NauticEndLimited", 3 /*String*/, $categoryId_DataValues, 340, '~String', $scriptId_Refresh, ''); $NauticDisplay = CreateVariable("NauticDisplay", 3 /*String*/, $categoryId_DataValues, 350, '~String', null, '00:00 - 00:00'); $NauticLimits = CreateVariable("NauticLimits", 3 /*String*/, $categoryId_DataValues, 360, '~String', $scriptId_Refresh, '04:30-06:30/19:30-21:30'); $AstronomicBeg = CreateVariable("AstronomicBegin", 3 /*String*/, $categoryId_DataValues, 410, '~String', $scriptId_Refresh, ''); $AstronomicEnd = CreateVariable("AstronomicEnd", 3 /*String*/, $categoryId_DataValues, 420, '~String', $scriptId_Refresh, ''); $AstronomicBegLim = CreateVariable("AstronomicBeginLimited", 3 /*String*/, $categoryId_DataValues, 430, '~String', $scriptId_Refresh, ''); $AstronomicEndLim = CreateVariable("AstronomicEndLimited", 3 /*String*/, $categoryId_DataValues, 440, '~String', $scriptId_Refresh, ''); $AstronomicDisplay = CreateVariable("AstronomicDisplay", 3 /*String*/, $categoryId_DataValues, 450, '~String', null, '00:00 - 00:00'); $AstronomicLimits = CreateVariable("AstronomicLimits", 3 /*String*/, $categoryId_DataValues, 460, '~String', $scriptId_Refresh, '04:00-06:00/20:00-22:00'); IPSUtils_Include ("IPSTwilight.ips.php", "IPSLibrary::app::modules::Weather::IPSTwilight"); // ---------------------------------------------------------------------------------------------------------------------------- // WebFront Installation // ---------------------------------------------------------------------------------------------------------------------------- if ($WFC10_Enabled) { $categoryId_WebFront = CreateCategoryPath($WFC10_Path); $categoryId_WebFrontTopLeft = CreateCategory( 'TopLeft', $categoryId_WebFront, 10); $categoryId_WebFrontTopRight = CreateCategory( 'TopRight', $categoryId_WebFront, 20); $categoryId_WebFrontBottom = CreateCategory( 'Bottom', $categoryId_WebFront, 30); $categoryId_WebFrontRight = CreateCategory( 'Right', $categoryId_WebFront, 40); CreateLinkByDestination('Sonnen-Aufgang/Untergang', $SunriseDisplay, $categoryId_WebFrontTopLeft, 10); CreateLinkByDestination('Limits', $SunriseLimits, $categoryId_WebFrontTopRight, 10); CreateLinkByDestination('Zivile Dämmerung', $CivilDisplay, $categoryId_WebFrontTopLeft, 20); CreateLinkByDestination('Limits', $CivilLimits, $categoryId_WebFrontTopRight, 20);
* * @file IPSLogger_Deinstallation.ips.php * @author Andreas Brauneis * @version * Version 2.50.1, 25.02.2012<br/> * */ if (!isset($moduleManager)) { IPSUtils_Include ('IPSModuleManager.class.php', 'IPSLibrary::install::IPSModuleManager'); echo 'ModuleManager Variable not set --> Create "default" ModuleManager'.PHP_EOL; $moduleManager = new IPSModuleManager('IPSLogger'); } IPSUtils_Include ("IPSInstaller.inc.php", "IPSLibrary::install::IPSInstaller"); $WFC10_ConfigId = $moduleManager->GetConfigValueIntDef('ID', 'WFC10', GetWFCIdDefault()); DeleteWFCItems ($WFC10_ConfigId, 'IPSLogger_Widget'); Unregister_PhpErrorHandler($moduleManager); // ------------------------------------------------------------------------------------------------ function Unregister_PhpErrorHandler($moduleManager) { $file = IPS_GetKernelDir().'scripts\\__autoload.php'; if (!file_exists($file)) { return; } $FileContent = file_get_contents($file); $includeCommand = 'IPSUtils_Include("IPSLogger_PhpErrorHandler.inc.php", "IPSLibrary::app::core::IPSLogger");';
* * Dieses File inkludiert alle benötigten Files der Entertainment Steuerung um alle wesentlichen * Funktionen der Entertainment Steuerung ansteueren zu können. */ IPSUtils_Include ("IPSLogger.inc.php", "IPSLibrary::app::core::IPSLogger"); include_once "Entertainment_Constants.inc.php"; IPSUtils_Include ("Entertainment_IDs.inc.php", "IPSLibrary::app::modules::Entertainment"); IPSUtils_Include ("Entertainment_Configuration.inc.php", "IPSLibrary::config::modules::Entertainment"); include_once "Entertainment_Communication.inc.php"; include_once "Entertainment_Control.inc.php"; include_once "Entertainment_Room.inc.php"; include_once "Entertainment_Power.inc.php"; include_once "Entertainment_Device.inc.php"; include_once "Entertainment_Source.inc.php"; IPSUtils_Include ("Entertainment_Custom.inc.php", "IPSLibrary::config::modules::Entertainment"); include_once "Entertainment_Connect.inc.php"; include_once "Entertainment_RemoteControl.inc.php"; /** @}*/ /**@defgroup entertainment_visu Entertainment Visualisierung * @ingroup entertainment * @{ * *@page visu_entertainment_webfront Entertainment WebFront Visualisierung * * Alle Funktionen der Entertainment Steuerung können auch über WebFront Interface bedient werden. * * Die Visualisierung bietet eine Übersicht mit dem Zustand aller Räume und Geräte *@image html Entertainment_WebFrontOverview.png "Übersicht" *
$Forecast3DayOfWeek = CreateVariable("Tomorrow2Day", 3 /*String*/, $categoryId_Data, 400, '~String', null, ''); $Forecast3TempMin = CreateVariable("Tomorrow2TempMin", 1 /*Integer*/, $categoryId_Data, 410, null, null, 0); $Forecast3TempMax = CreateVariable("Tomorrow2TempMax", 1 /*Integer*/, $categoryId_Data, 420, null, null, 0); $Forecast3TextShort = CreateVariable("Tomorrow2ForecastLong", 3 /*String*/, $categoryId_Data, 430, '~String', null, ''); $Forecast3TextLong = CreateVariable("Tomorrow2ForecastShort",3 /*String*/, $categoryId_Data, 440, '~String', null, ''); $Forecast3Icon = CreateVariable("Tomorrow2Icon", 3 /*String*/, $categoryId_Data, 450, '~String', null, ''); $iForecast = CreateVariable("iForecast", 3 /*String*/, $categoryId_Data, 1000, '~HTMLBox', null, '<iframe frameborder="0" width="100%" height="4000px" src="../user/Weather/Weather.php"</iframe>'); // Webfront Installation if ($WFC10_Enabled) { DeleteWFCItems($WFC10_ConfigId, $WFC10_TabPaneItem.$WFC10_TabItem); CreateWFCItemTabPane ($WFC10_ConfigId, $WFC10_TabPaneItem, $WFC10_TabPaneParent, $WFC10_TabPaneOrder, $WFC10_TabPaneName, $WFC10_TabPaneIcon); CreateWFCItemExternalPage ($WFC10_ConfigId, $WFC10_TabPaneItem.$WFC10_TabItem, $WFC10_TabPaneItem, $WFC10_TabOrder, $WFC10_TabName, $WFC10_TabIcon, "user\/IPSWeatherForcastAT\/Weather.php", 'false' /*BarBottomVisible*/); ReloadAllWebFronts(); } // iPhone Installation if ($Mobile_Enabled) { $mobileId = CreateCategoryPath($Mobile_Path, $Mobile_PathOrder, $Mobile_PathIcon); $mobileId = CreateCategoryPath($Mobile_Path.'.'.$Mobile_Name, $Mobile_Order, $Mobile_Icon); CreateLink('Vorhersage', $iForecast, $mobileId, 10); } // Execute Data Refresh IPSUtils_Include ("IPSWeatherForcastAT_Refresh.ips.php", "IPSLibrary::app::modules::Weather::IPSWeatherForcastAT"); /** @}*/ ?>
function SearchLastRepositories() { IPSUtils_Include ("IPSModuleManager.class.php", "IPSLibrary::install::IPSModuleManager"); $moduleManager = $_IPS['MODULEMANAGER']; $infos = $moduleManager->GetModuleInfos(); $modules = $moduleManager->GetInstalledModules(); //print_r($modules); foreach ($modules as $module=>$data) { $downloadFile = IPS_GetKernelDir().'scripts\\IPSLibrary\\install\\DownloadListFiles\\'.$module.'_FileList.ini'; $configFile = IPS_GetKernelDir().'scripts\\IPSLibrary\\install\\InitializationFiles\\'.$module.'.ini'; if (!file_exists($downloadFile) or !file_exists($configFile)) { $moduleManager->LogHandler()->Debug('Remove Module "'.$module.'" from InstalledModules (No Ini Files found)'); $versionHandler = new IPSFileVersionHandler($module); $versionHandler->DeleteModule(); } else { $moduleManager = new IPSModuleManager($module, '', sys_get_temp_dir(), true); $versionHandler = $moduleManager->VersionHandler(); $repository = $versionHandler->GetModuleRepository(); // Search current Repository if ($repository=='') { $files = scandir(IPS_GetKernelDir().'\\logs\\', 1); foreach ($files as $file) { // Found LogFile if ($repository<>'') { break; } elseif (strpos($file,'IPSModuleManager_')!==false) { $fileContent = file_get_contents(IPS_GetKernelDir().'\\logs\\'.$file); $lines = explode(PHP_EOL, $fileContent); $line1 = ''; $line2 = ''; if (count($lines)>0) { $line1 = $lines[0]; } if (count($lines)>1) { $line2 = $lines[1]; } // Found LogFile for Module if ( strpos($line1,'Set Version '.$module.'=')!==false or strpos($line2,''.$module.'_FileList.ini')!==false) { //echo 'found '.$module; //return; // Search Repository foreach ($lines as $idx=>$line) { // Found Repository if (strpos($line,' --> '.IPS_GetKernelDir().'scripts\\IPSLibrary\\install\\DownloadListFiles\\'.$module.'_FileList.ini')!==false) { $start = strpos($line,'Copy ')+5; $end = strpos($line,'IPSLibrary',strpos($line,'IPSLibrary')+1); $repository = substr($line, $start, $end-$start); break; } } } } } $moduleManager->LogHandler()->Debug('Add Last Repository: '.$module.'='.$repository); $versionHandler->SetModuleRepository($repository); } echo $module.'='.$repository.PHP_EOL; } } }
* - astronomische Dämmerung - ist der Zeitpunkt, an dem die Sonne 18 Grad unter dem Horizont ist. * * Das Einsetzen der Dämmerung hängt vom Längengrand und somit vom jeweiligen Ort ab. Dazu muß im File "IPSTwilight_Configuraiton.inc.php" * der jeweilige Breiten und Längengrad gesetzt werden.''' * * @file IPSTwilight.ips.php * @author Andreas Brauneis * @version * Version 2.50.1, 13.02.2012<br/> * */ IPSUtils_Include ("IPSLogger.inc.php", "IPSLibrary::app::core::IPSLogger"); IPSUtils_Include ("IPSInstaller.inc.php", "IPSLibrary::install::IPSInstaller"); IPSUtils_Include ("IPSTwilight_Configuration.inc.php", "IPSLibrary::config::modules::Weather::IPSTwilight"); IPSUtils_Include ("IPSTwilight_Custom.inc.php", "IPSLibrary::config::modules::Weather::IPSTwilight"); // ---------------------------------------------------------------------------------------------------------------------------- // Settings for Twilight Calculation // ---------------------------------------------------------------------------------------------------------------------------- $categoryId_Twilight = IPSUtil_ObjectIDByPath('Program.IPSLibrary.data.modules.Weather.IPSTwilight'); $categoryId_Scripts = IPSUtil_ObjectIDByPath('Program.IPSLibrary.app.modules.Weather.IPSTwilight'); $categoryId_Values = IPS_GetObjectIDByIdent('Values',$categoryId_Twilight); $categoryId_Graphics = IPS_GetObjectIDByIdent('Graphics',$categoryId_Twilight); $variableId_Display = IPS_GetObjectIDByIdent('Display',$categoryId_Values); $scriptId_Refresh = IPS_GetObjectIDByIdent('IPSTwilight',$categoryId_Scripts); switch ($_IPS['SENDER']) { case 'WebFront': SetValue($_IPS['VARIABLE'], $_IPS['VALUE']); if ($IPS_VARIABLE==$variableId_Display) {
* laut Intervall berechnet. * * @file IPSWatering.inc.php * @author Andreas Brauneis * @version * Version 2.50.1, 11.03.2012<br/> * */ IPSUtils_Include ("IPSLogger.inc.php", "IPSLibrary::app::core::IPSLogger"); IPSUtils_Include ("IPSInstaller.inc.php", "IPSLibrary::install::IPSInstaller"); IPSUtils_Include ("IPSComponent.class.php", "IPSLibrary::app::core::IPSComponent"); IPSUtils_Include ("IPSWatering_Constants.inc.php", "IPSLibrary::app::modules::IPSWatering"); IPSUtils_Include ("IPSWatering_Configuration.inc.php", "IPSLibrary::config::modules::IPSWatering"); IPSUtils_Include ("IPSWatering_Custom.inc.php", "IPSLibrary::config::modules::IPSWatering"); IPSUtils_Include ("IPSWatering_Logging.inc.php", "IPSLibrary::app::modules::IPSWatering"); // ---------------------------------------------------------------------------------------------------------------------------- function IPSWatering_ActivateWatering($CycleId, $Value, $Mode) { $WaterConfig = get_WateringConfiguration(); $CircleIdent = IPS_GetName($CycleId); $ComponentParams = $WaterConfig[$CircleIdent][c_Property_Component]; if (!IPSWatering_BeforeActivateWatering($CycleId, $Value, $Mode)) { return false; } $component = IPSComponent::CreateObjectByParams($ComponentParams); $component->SetState($Value); IPSWatering_AfterActivateWatering($CycleId, $Value, $Mode);
* * @file IPSModuleManagerGUI_LogFile.php * @author Andreas Brauneis * @version * Version 2.50.1, 01.11.2012<br/> * * Anzeige eines LogFile's des IPSModuleManager's * */ /** @}*/ ?> <table border=1 style="font-family:courier; font-size:11px;"> <tr><th>App</th><th>Type</th><th>Context</th><th>Date/Time</th><th>Message</th></tr> <?php IPSUtils_Include("IPSModuleManager.class.php", "IPSLibrary::install::IPSModuleManager"); $moduleManager = new IPSModuleManager(); $logLines = $moduleManager->LogHandler()->GetLogFileContent($info); $html = ''; foreach ($logLines as $idx => $line) { $pos1 = strpos($line, '-'); if ($pos1 !== false) { $pos2 = strpos($line, '-', $pos1 + 1); $pos3 = $pos2 + 30; $app = substr($line, 0, $pos1); $logtype = substr($line, $pos1 + 1, $pos2 - $pos1 - 1); $function = substr($line, $pos2 + 1, $pos3 - $pos2 - 1); $date = substr($line, $pos3 + 1, 22); $msg = substr($line, $pos3 + 23); } else { $app = '';
* * The IPSLibrary is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published * by the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * The IPSLibrary is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with the IPSLibrary. If not, see http://www.gnu.org/licenses/gpl.txt. */ IPSUtils_Include ("IPSWatering_Constants.inc.php", "IPSLibrary::app::modules::IPSWatering"); function get_WateringConfiguration() { return array( c_WateringCircle_1 => array( c_Property_Name => 'Rasen Links', c_Property_Component => 'IPSComponentSwitch_Dummy,12345', c_Property_Sensor => '', ), c_WateringCircle_2 => array( c_Property_Name => 'Rasen Rechts', c_Property_Component => 'IPSComponentSwitch_Dummy,12345', c_Property_Sensor => '', ), c_WateringCircle_3 => array( c_Property_Name => 'Vorgarten',
* */ /** * @class IPSModuleSensor_IRTrans * * Definiert ein IPSModuleSensor Object, das als Wrapper für Sensoren in der IPSLibrary * verwendet werden kann. * * @author Andreas Brauneis * @version * Version 2.50.1, 09.06.2012<br/> */ IPSUtils_Include ("IRTrans_InterfaceIPSComponentSensor.inc.php", "IPSLibrary::app::modules::IRTrans"); IPSUtils_Include ('IPSModuleSensor.class.php', 'IPSLibrary::app::core::IPSComponent::IPSComponentSensor'); class IPSModuleSensor_IRTrans extends IPSModuleSensor { private $instanceId; private $device; private $button; /** * @public * * Initialisierung eines IPSModuleSensor_IRTrans Objektes * * @param integer $instanceId InstanceId * @param string $device Device * @param string $button Button
<? /**@addtogroup ipsmessagehandler * @{ * * @file IPSMessageHandler_Event.ips.php * @author Andreas Brauneis * @version * Version 2.50.1, 31.01.2012<br/> * * Script dient als EventScript um den IPSMessageHandler über Variablen Änderungen der Componenten zu informieren * */ $variable = $_IPS['VARIABLE']; $value = $_IPS['VALUE']; IPSUtils_Include ('IPSMessageHandler.class.php', 'IPSLibrary::app::core::IPSMessageHandler'); $messageHandler = new IPSMessageHandler(); $messageHandler->HandleEvent($variable, $value); /** @}*/ ?>
<? /**@addtogroup ipsmodulemanager * @{ * * * @file IPSBackupHandler.class.php * @author Andreas Brauneis * */ IPSUtils_Include ("IPSLogHandler.class.php", "IPSLibrary::install::IPSModuleManager::IPSLogHandler"); IPSUtils_Include ("IPSConfigHandler.class.php", "IPSLibrary::app::core::IPSConfigHandler"); /** * @class IPSBackupHandler * * BackupHandler der IPSLibrary * * @author Andreas Brauneis * @version * Version 2.50.1, 31.01.2012<br/> */ class IPSBackupHandler { private $backupBaseDirectory = ''; private $backupDirectory = ''; private $logHandler = null; /** * @public
* @author Andreas Brauneis * * */ /** * @class IPSComponentShutter_Homematic * * Definiert ein IPSComponentShutter_Homematic Object, das ein IPSComponentShutter Object für Homematic implementiert. * * @author Andreas Brauneis * @version * Version 2.50.1, 31.01.2012<br/> */ IPSUtils_Include ('IPSComponentShutter.class.php', 'IPSLibrary::app::core::IPSComponent::IPSComponentShutter'); class IPSComponentShutter_Homematic extends IPSComponentShutter { private $instanceId; private $reverseControl; /** * @public * * Initialisierung eines IPSComponentShutter_Homematic Objektes * * @param integer $instanceId InstanceId des Homematic Devices * @param boolean $reverseControl Reverse Ansteuerung des Devices */ public function __construct($instanceId, $reverseControl=false) {
<? /**@addtogroup ipscomponent * @{ * * @file IPSComponentAVControl_AudioMax.class.php * @author Andreas Brauneis * */ IPSUtils_Include ('IPSComponentAVControl.class.php', 'IPSLibrary::app::core::IPSComponent::IPSComponentAVControl'); IPSUtils_Include ("AudioMax.inc.php", 'IPSLibrary::app::hardware::AudioMax'); /** * @class IPSComponentAVControl_AudioMax * * Definiert ein IPSComponentAVControl_AudioMax Object, das ein IPSComponentAVControl Object mit Hilfe der * AudioMax MultiRoom Steuerung e-Service Online implementiert * * @author Andreas Brauneis * @version * Version 2.50.1, 31.01.2012<br/> */ class IPSComponentAVControl_AudioMax extends IPSComponentAVControl{ private $instanceId; /** * @public * * Initialisierung des IPSComponentAVControl_AudioMax
* @author Andreas Brauneis * * */ /** * @class IPSComponentSwitch_Homematic * * Definiert ein IPSComponentSwitch_Homematic Object, das ein IPSComponentSwitch Object für Homematic implementiert. * * @author Andreas Brauneis * @version * Version 2.50.1, 31.01.2012<br/> */ IPSUtils_Include ('IPSComponentSwitch.class.php', 'IPSLibrary::app::core::IPSComponent::IPSComponentSwitch'); class IPSComponentSwitch_Homematic extends IPSComponentSwitch { private $instanceId; /** * @public * * Initialisierung eines IPSComponentSwitch_Homematic Objektes * * @param integer $instanceId InstanceId des Homematic Devices */ public function __construct($instanceId) { $this->instanceId = IPSUtil_ObjectIDByPath($instanceId); }
<? /**@addtogroup entertainment * @{ * * @file Entertainment_Custom.inc.php * @author Andreas Brauneis * @version * Version 2.50.1, 31.01.2012<br/> * * Callback Methoden der Entertainment Steuerung */ IPSUtils_Include ("Entertainment_InterfaceWinLIRCSnd.inc.php", "IPSLibrary::app::modules::Entertainment"); IPSUtils_Include ("Entertainment.inc.php", "IPSLibrary::app::modules::Entertainment"); // --------------------------------------------------------------------------------------------------------------------------- function Entertainment_Before_SendData($Parameters) { return true; } // --------------------------------------------------------------------------------------------------------------------------- function Entertainment_After_SendData($Parameters) { } // --------------------------------------------------------------------------------------------------------------------------- function Entertainment_Before_ReceiveData($Parameters, $MessageType) { return true; } // --------------------------------------------------------------------------------------------------------------------------- function Entertainment_After_ReceiveData($Parameters, $MessageType) {
* Die Definition der Radio Sender mit zugehöriger URL wird im File NetPlayer_Configuration.ips.php vorgenommen. * */ /** @}*/ ?> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <meta http-equiv="Content-Style-Type" content="text/css"> <meta http-equiv="Cache-Control" content="no-store, no-cache, must-revalidate"> <meta http-equiv="Pragma" content="no-cache"> <meta http-equiv="Expires" content="0"> <link rel="stylesheet" type="text/css" href="NetPlayer.css" /> <? IPSUtils_Include ("NetPlayer.inc.php", "IPSLibrary::app::modules::NetPlayer"); include_once "NetPlayer_Sender.php"; include_once "NetPlayer_Utils.php"; ?> <script> $(function(){$(".containerControlButton").click(refresh_radio);}); $(function() {refresh_radio();}); </script> </head> <body> <div id="containerRadioSelect" class="containerRadioSelect"> <div id="containerControlLine0" class="containerControlLine"> <? $left = true; $idx = 0;
if (!isset($moduleManager)) { IPSUtils_Include ('IPSModuleManager.class.php', 'IPSLibrary::install::IPSModuleManager'); echo 'ModuleManager Variable not set --> Create "default" ModuleManager'; $moduleManager = new IPSModuleManager('IPSWatering'); } $moduleManager->VersionHandler()->CheckModuleVersion('IPS','2.50'); $moduleManager->VersionHandler()->CheckModuleVersion('IPSModuleManager','2.50.2'); $moduleManager->VersionHandler()->CheckModuleVersion('IPSLogger','2.50.1'); $moduleManager->VersionHandler()->CheckModuleVersion('IPSComponent','2.50.1'); $moduleManager->VersionHandler()->CheckModuleVersion('IPSMessageHandler','2.50.1'); IPSUtils_Include ("IPSInstaller.inc.php", "IPSLibrary::install::IPSInstaller"); IPSUtils_Include ("IPSWatering_Configuration.inc.php", "IPSLibrary::config::modules::IPSWatering"); $WFC10_Enabled = $moduleManager->GetConfigValue('Enabled', 'WFC10'); $WFC10_ConfigId = $moduleManager->GetConfigValueIntDef('ID', 'WFC10', GetWFCIdDefault()); $WFC10_Path = $moduleManager->GetConfigValue('Path', 'WFC10'); $WFC10_TabPaneItem = $moduleManager->GetConfigValue('TabPaneItem', 'WFC10'); $WFC10_TabPaneParent = $moduleManager->GetConfigValue('TabPaneParent', 'WFC10'); $WFC10_TabPaneName = $moduleManager->GetConfigValue('TabPaneName', 'WFC10'); $WFC10_TabPaneIcon = $moduleManager->GetConfigValue('TabPaneIcon', 'WFC10'); $WFC10_TabPaneOrder = $moduleManager->GetConfigValueInt('TabPaneOrder', 'WFC10'); $WFC10_TabName1 = $moduleManager->GetConfigValue('TabName1', 'WFC10'); $WFC10_TabIcon1 = $moduleManager->GetConfigValue('TabIcon1', 'WFC10'); $Mobile_Enabled = $moduleManager->GetConfigValue('Enabled', 'Mobile'); $Mobile_Path = $moduleManager->GetConfigValue('Path', 'Mobile'); $Mobile_PathOrder = $moduleManager->GetConfigValueInt('PathOrder', 'Mobile');