-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
4 changed files
with
265 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,200 @@ | ||
<?php | ||
|
||
/* | ||
mit folgendem können die Schaltflächen beschriftet werden | ||
"label":"Text kurz,Text lang" | ||
ist der Text leer wird die Schaltfläche nicht angezeigt. (hier kurz) | ||
"label":",Text lang" | ||
*/ | ||
|
||
|
||
function CUX2804($component) { | ||
$modalId = mt_rand(); | ||
if ($component['parent_device_interface'] == 'CUxD' && $component['visible'] == 'true' && isset($component['PRESS_SHORT'])) { | ||
if (!isset($component['color'])) $component['color'] = '#595959'; | ||
// ShowTime - Uhrzeit der letzten Änderung anzeigen | ||
if(isset($component['showtime'])) | ||
{ | ||
if($component['showtime'] == "true") { $ShowTime = '<span class="info" data-id="' . $component['ise_id'] . 't" data-component="showtime" data-datapoint="showtime"></span> ' ; } | ||
else { $ShowTime = ''; } | ||
} | ||
else { $ShowTime = ''; } | ||
if(isset($component['label'])) | ||
{ | ||
$Label = explode(",",$component['label']); | ||
if($Label[0] <> "") { $LabelKurz = '<span class="set btn-text" data-set-id="' . $component['PRESS_SHORT'] . '" data-set-value="1">'.$Label[0].'</span>'; } | ||
else { $LabelKurz = ''; } | ||
if($Label[1] <> "") { $LabelLang = '<span class="set btn-text" data-set-id="' . $component['PRESS_LONG'] . '" data-set-value="1">'.$Label[1].'</span>'; } | ||
else { $LabelLang = ''; } | ||
} | ||
else | ||
{ | ||
$LabelKurz = '<span class="set btn-text" data-set-id="' . $component['PRESS_SHORT'] . '" data-set-value="1">Kurz</span>'; | ||
$LabelLang = '<span class="set btn-text" data-set-id="' . $component['PRESS_LONG'] . '" data-set-value="1">Lang</span>'; | ||
} | ||
|
||
return '<div class="hh" style=\'border-left-color: '.$component['color'].'; border-left-style: solid;\'>' | ||
. '<div class="pull-left"><img src="icon/' . $component["icon"] . '" class="icon">' . $component['name'] . '</div>' | ||
. '<div class="pull-right">' | ||
. $ShowTime | ||
. $LabelKurz | ||
. $LabelLang | ||
. '</div>' | ||
. '<div class="clearfix"></div>' | ||
. '</div>'; | ||
} | ||
|
||
if ($component['parent_device_interface'] == 'CUxD' && $component['visible'] == 'true' && isset($component['STATE'])) { | ||
|
||
global $export; | ||
$obj = $export; | ||
$key = array_search(substr($component['address'], 0, -1)."2", array_column($obj['channels'], 'address')); | ||
foreach($obj['channels'][$key]['datapoints'] as $datapoint) | ||
{ $status_component[$datapoint['type']] = $datapoint['ise_id']; } | ||
|
||
|
||
if (!isset($component['color'])) $component['color'] = '#595959'; | ||
// ShowTime - Uhrzeit der letzten Änderung anzeigen | ||
if(isset($component['showtime'])) | ||
{ | ||
if($component['showtime'] == "true") { $ShowTime = '<span class="info" data-id="' . $component['ise_id'] . 't" data-component="showtime" data-datapoint="showtime"></span> ' ; } | ||
else { $ShowTime = ''; } | ||
} | ||
else { $ShowTime = ''; } | ||
return '<div class="hh" style=\'border-left-color: '.$component['color'].'; border-left-style: solid;\'>' | ||
. '<div data-toggle="collapse" data-target="#' . $modalId . '">' | ||
. '<div class="pull-left"><img src="icon/' . $component["icon"] . '" class="icon">' . $component['name'] . '</div>' | ||
. '</div>' | ||
. '<div class="pull-right">' | ||
. $ShowTime | ||
. '<span class="info set" data-id="' . $component['STATE'] . '" data-component="' . $component['component'] . '" data-datapoint="STATE" data-set-id="' . $component['STATE'] . '" data-set-value=""></span>' | ||
. '</div>' | ||
. '<div class="clearfix"></div>' | ||
. '<div class="hh2 collapse" id="' . $modalId . '"> | ||
<div class="row text-center">' | ||
. '<span class="info" data-id="' . $status_component['CURRENT'] . '" data-component="' . $component['component'] . '" data-datapoint="CURRENT"></span>' | ||
. '<span class="info" data-id="' . $status_component['POWER'] . '" data-component="' . $component['component'] . '" data-datapoint="POWER"></span>' | ||
. '<span class="info" data-id="' . $status_component['ENERGY_COUNTER'] . '" data-component="' . $component['component'] . '" data-datapoint="ENERGY_COUNTER"></span>' | ||
. '</div>' | ||
. '</div>' | ||
. '</div>'; | ||
} | ||
|
||
if ($component['parent_device_interface'] == 'CUxD' && $component['visible'] == 'true' && isset($component['LEVEL']) && isset($component['STOP'])) { | ||
$modalId = mt_rand(); | ||
|
||
if (!isset($component['color'])) $component['color'] = '#595959'; | ||
// ShowTime - Uhrzeit der letzten Änderung anzeigen | ||
if(isset($component['showtime'])) | ||
{ | ||
if($component['showtime'] == "true") { $ShowTime = '<span class="info" data-id="' . $component['ise_id'] . 't" data-component="showtime" data-datapoint="showtime"></span> ' ; } | ||
else { $ShowTime = ''; } | ||
} | ||
else { $ShowTime = ''; } | ||
return '<div class="hh" style=\'border-left-color: '.$component['color'].'; border-left-style: solid;\'>' | ||
. '<div data-toggle="collapse" data-target="#' . $modalId . '">' | ||
. '<div class="pull-left"><img src="icon/' . $component["icon"] . '" class="icon">' . $component['name'] . '</div>' | ||
. '<div class="pull-right">' | ||
. $ShowTime | ||
. '<span class="info" data-id="' . $component['LEVEL'] . '" data-component="' . $component['component'] . '" data-datapoint="BLIND_LEVEL"></span>' | ||
. '</div>' | ||
. '<div class="clearfix"></div>' | ||
. '</div>' | ||
. '<div class="hh2 collapse" id="' . $modalId . '">' | ||
. '<div class="row text-center">' | ||
. '<div class="btn-group">' | ||
. '<button type="button" class="btn btn-primary set" data-set-id="' . $component['LEVEL'] . '" data-set-value="1.0">' | ||
. '<img src="icon/fts_window_2w.png" />' | ||
. '</button>' | ||
. '<button type="button" class="btn btn-primary set" data-set-id="' . $component['LEVEL'] . '" data-set-value="0.8">' | ||
. '<img src="icon/fts_shutter_20.png" />' | ||
. '</button>' | ||
. '<button type="button" class="btn btn-primary set" data-set-id="' . $component['LEVEL'] . '" data-set-value="0.6">' | ||
. '<img src="icon/fts_shutter_40.png" />' | ||
. '</button>' | ||
. '<button type="button" class="btn btn-primary set" data-set-id="' . $component['LEVEL'] . '" data-set-value="0.4">' | ||
. '<img src="icon/fts_shutter_60.png" />' | ||
. '</button>' | ||
. '<button type="button" class="btn btn-primary set" data-set-id="' . $component['LEVEL'] . '" data-set-value="0.2">' | ||
. '<img src="icon/fts_shutter_80.png" />' | ||
. '</button>' | ||
. '<button type="button" class="btn btn-primary set" data-set-id="' . $component['LEVEL'] . '" data-set-value="0.0">' | ||
. '<img src="icon/fts_shutter_100.png" />' | ||
. '</button>' | ||
. '</div>' | ||
. '</div>' | ||
. '</div>' | ||
. '</div>'; | ||
} | ||
|
||
if ($component['parent_device_interface'] == 'CUxD' && $component['visible'] == 'true' && isset($component['LEVEL']) && isset($component['OLD_LEVEL'])) { | ||
$modalId = mt_rand(); | ||
|
||
if (!isset($component['color'])) $component['color'] = '#595959'; | ||
// ShowTime - Uhrzeit der letzten Änderung anzeigen | ||
if(isset($component['showtime'])) | ||
{ | ||
if($component['showtime'] == "true") { $ShowTime = '<span class="info" data-id="' . $component['ise_id'] . 't" data-component="showtime" data-datapoint="showtime"></span> ' ; } | ||
else { $ShowTime = ''; } | ||
} | ||
else { $ShowTime = ''; } | ||
return '<div class="hh" style=\'border-left-color: '.$component['color'].'; border-left-style: solid;\'>' | ||
. '<div data-toggle="collapse" data-target="#' . $modalId . '">' | ||
. '<div class="pull-left"><img src="icon/' . $component["icon"] . '" class="icon">' . $component['name'] . '</div>' | ||
. '<div class="pull-right">' | ||
. $ShowTime | ||
. '<span class="info" data-id="' . $component['LEVEL'] . '" data-component="' . $component['component'] . '" data-datapoint="DIMMER_LEVEL"></span>' | ||
. '</div>' | ||
. '<div class="clearfix"></div>' | ||
. '</div>' | ||
. '<div class="hh2 collapse" id="' . $modalId . '">' | ||
. '<div class="row text-center">' | ||
. '<div class="btn-group">' | ||
. '<button type="button" class="btn btn-primary set" data-set-id="' . $component['LEVEL'] . '" data-set-value="1.0">' | ||
. '<img src="icon/light_light_dim_100.png" />' | ||
. '</button>' | ||
. '<button type="button" class="btn btn-primary set" data-set-id="' . $component['LEVEL'] . '" data-set-value="0.8">' | ||
. '<img src="icon/light_light_dim_80.png" />' | ||
. '</button>' | ||
. '<button type="button" class="btn btn-primary set" data-set-id="' . $component['LEVEL'] . '" data-set-value="0.6">' | ||
. '<img src="icon/light_light_dim_60.png" />' | ||
. '</button>' | ||
. '<button type="button" class="btn btn-primary set" data-set-id="' . $component['LEVEL'] . '" data-set-value="0.4">' | ||
. '<img src="icon/light_light_dim_40.png" />' | ||
. '</button>' | ||
. '<button type="button" class="btn btn-primary set" data-set-id="' . $component['LEVEL'] . '" data-set-value="0.2">' | ||
. '<img src="icon/light_light_dim_20.png" />' | ||
. '</button>' | ||
. '<button type="button" class="btn btn-primary set" data-set-id="' . $component['LEVEL'] . '" data-set-value="0.0">' | ||
. '<img src="icon/light_light_dim_00.png" />' | ||
. '</button>' | ||
. '</div>' | ||
. '</div>' | ||
. '<div class="row text-center top15">' | ||
. '<div class="row text-center">' | ||
. '<div class="form-inline">' | ||
. '<div class="input-group">' | ||
. '<input type="number" name="' . $component['LEVEL'] . '" min="0" max="100" class="form-control" placeholder="Zahl eingeben">' | ||
. '<span class="input-group-btn">' | ||
. '<button class="btn btn-primary set" data-datapoint="4" data-set-id="' . $component['LEVEL'] . '" data-set-value="">OK</button>' | ||
. '</span>' | ||
. '</div>' | ||
. '<div class="btn-group">' | ||
. '<button type="button" class="btn btn-primary set" data-set-id="' . $component['LEVEL'] . '" data-set-value="1.0">' | ||
. 'An' | ||
. '</button>' | ||
. '<button type="button" class="btn btn-primary set" data-set-id="' . $component['LEVEL'] . '" data-set-value="0.0">' | ||
. 'Aus' | ||
. '</button>' | ||
. '</div>' | ||
. '</div>' | ||
. '</div>' | ||
. '</div>' | ||
. '</div>' | ||
. '</div>'; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<?php | ||
function HM_Sen_LI_O($component) { | ||
if ($component['parent_device_interface'] == 'BidCos-RF' && $component['visible'] == 'true' && isset($component['LUX'])) { | ||
|
||
global $export; | ||
$obj = $export; | ||
$key = array_search(substr($component['address'], 0, -1)."0", array_column($obj['channels'], 'address')); | ||
foreach($obj['channels'][$key]['datapoints'] as $datapoint) | ||
{ $status_component[$datapoint['type']] = $datapoint['ise_id']; } | ||
|
||
|
||
if (!isset($component['color'])) $component['color'] = '#595959'; | ||
return '<div class="hh" style=\'border-left-color: '.$component['color'].'; border-left-style: solid;\'>' | ||
. '<div class="pull-left"><img src="icon/' . $component["icon"] . '" class="icon">' . $component['name'] . '</div>' | ||
. '<div class="pull-right">' | ||
. '<span class="info" data-id="' . $status_component['LOWBAT'] . '" data-component="' . $component['component'] . '" data-datapoint="LOWBAT"></span>' | ||
. '<span class="info" data-id="' . $component['LUX'] . '" data-component="' . $component['component'] . '" data-datapoint="LUX"></span>' | ||
. '</div>' | ||
. '<div class="clearfix"></div>' | ||
. '</div>'; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters