/** * @public * * Ermöglicht das Verarbeiten eines Taster Signals * */ public function ExecuteButton () { $device = new IPSShadowing_Device($this->instanceId); $movementId = GetValue(IPS_GetObjectIDByIdent(c_Control_Movement, $this->instanceId)); if ($movementId==c_MovementId_MovingIn or $movementId==c_MovementId_MovingOut or $movementId==c_MovementId_Up or $movementId==c_MovementId_Down) { $device->MoveByControl(c_MovementId_Stop); } else { $device->MoveByControl($this->movementId); } }
/** * @public * * Ermöglicht die Synchronisation der aktuellen Position der Beschattung * * @param string $position Aktuelle Position der Beschattung (Wertebereich 0-100) */ public function SyncPosition($position, IPSComponentShutter $componentToSync) { $componentParamsToSync = $componentToSync->GetComponentParams(); $deviceConfig = get_ShadowingConfiguration(); foreach ($deviceConfig as $deviceIdent=>$deviceData) { $componentConfig = IPSComponent::CreateObjectByParams($deviceData[c_Property_Component]); $componentParamsConfig = $componentConfig->GetComponentParams(); if ($componentParamsConfig==$componentParamsToSync) { $categoryIdDevices = IPSUtil_ObjectIDByPath('Program.IPSLibrary.data.modules.IPSShadowing.Devices'); $deviceId = IPS_GetObjectIDByIdent($deviceIdent, $categoryIdDevices); $device = new IPSShadowing_Device($deviceId); $device->MoveByEvent($position); } } }