Documentation
SageGlass (BACnet)
Require: IP-Symcon >= 6.0
This module enables the integration of SageGlass SIM II controllers via BACnet/IP.
function scope
- Integrates the control of SageGlass zones and displays the current status including the transmitted lux values.
Requirements
- IP-Symcon Enterprise from version 6.0 with BACnet extension
Software Installation
- Via the Module Store install the 'SageGlass' module.
Setup in IP-Symcon
- It is recommended to have all BACnet objects automatically created on the SageGlass SIM II controller, making the individual data points available in IP-Symcon. In the second step, the following script can be used to create the SageGlass instances for the zones, which will prepare the information more nicely. It is also possible to do the linking manually by linking all properties to the correct BACnet objects. The names of the properties correspond to the descriptions of the BACnet objects and should be linked to the "Preset Value" variable.
<?php // Not every zone has a sensor - Normally each facade will have a vertical/horizontal sensor // Fill these arrays with the sensor -> zone information // e.g. Sensor 1 (Vertical) is used for Zone 10, Zone 20 and Zone 25 $sensorVertical = [ 1 => [10, 20, 25] ]; $sensorHorizontal = []; $zones = 250; for ($i = 1; $i <= $zones; $i++) { $variableTintID = searchBACnet(2 /* Analog Value */, $i + 1 /* Zone 1 = 2 */); $automodeStateID = searchBACnet(2 /* Analog Value */, $i + 2001 /* Zone 1 = 2002 */); $luxLevelSetPointID = searchBACnet(2 /* Analog Value */, $i + 4001 /* Zone 1 = 4002 */); $statusID = searchBACnet(0 /* Analog Input */, $i + 4000 /* Zone 1 = 4001 */); // Search for the our sensor the vertical sensor matrix $verticalSensorID = searchSensorID($i, $sensorVertical); if ($verticalSensorID) { $verticalSensorID = searchBACnet(0 /* Analog input */, $verticalSensorID + 2000 /* Sensor 1 = 2001 */); } // Search for the our sensor the vertical sensor matrix $horizontalSensorID = searchSensorID($i, $sensorHorizontal); if ($horizontalSensorID) { $horizontalSensorID = searchBACnet(0 /* Analog input */, $horizontalSensorID + 2000 /* Sensor 1 = 2001 */); } if (!@IPS_GetObjectIDByIdent("SageGlassZone" . $i)) { if ($variableTintID && $automodeStateID && $luxLevelSetPointID && $verticalSensorID && $horizontalSensorID && $statusID) { echo "Creating Zone " . $i . "..." . PHP_EOL; $id = IPS_CreateInstance("{67CEA419-A625-703E-2BE6-BF51B3C913B9}"); IPS_SetName($id, "Zone " . $i); IPS_SetIdent($id, "SageGlassZone" . $i); IPS_SetProperty($id, "VariableTint", $variableTintID); IPS_SetProperty($id, "AutomodeState", $automodeStateID); IPS_SetProperty($id, "LuxLevelSetPoint", $luxLevelSetPointID); IPS_SetProperty($id, "Status", $statusID); IPS_SetProperty($id, "SensorVertical", $verticalSensorID); IPS_SetProperty($id, "SensorHorizontal", $horizontalSensorID); IPS_ApplyChanges($id); } } } function searchSensorID($zone, $sensorMatrix) { foreach($sensorMatrix as $sensor => $matrix) { foreach($matrix as $sensorZone) { if ($zone == $sensorZone) { return $sensor; } } } return 0; } function searchBACnet($objectType, $instanceNumber) { $ids = IPS_GetInstanceListByModuleID("{CD5D5D10-3743-DA88-F16C-8B65CF4103F9}"); foreach ($ids as $id) { if ((IPS_GetProperty($id, "ObjectType") == $objectType) && (IPS_GetProperty($id, "InstanceNumber") == $instanceNumber)) { return IPS_GetObjectIDByIdent("PresentValue", $id); } } return 0; }