Skip to content

Commit

Permalink
Merge branch 'homematic-community:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
etofi authored Sep 18, 2024
2 parents e5fc44a + 57f6ea1 commit 48f3068
Show file tree
Hide file tree
Showing 4 changed files with 138 additions and 5 deletions.
75 changes: 75 additions & 0 deletions components/HmIP-eTRV-3.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
<?php
function HmIP_eTRV_3($component) {

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 ($component['parent_device_interface'] == 'HmIP-RF' && $component['visible'] == 'true' && isset($component['CONTROL_MODE'])) {
$modalId = mt_rand();
if (!isset($component['color'])) $component['color'] = '#00CC33';
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">'
. '<span class="info" data-id="' . $status_component['LOW_BAT'] . '" data-component="' . $component['component'] . '" data-datapoint="LOW_BAT"></span>'
. '<span class="info" data-id="' . $component['ACTUAL_TEMPERATURE'] . '" data-component="' . $component['component'] . '" data-datapoint="ACTUAL_TEMPERATURE"></span>'
. '<span class="info" data-id="' . $component['SET_POINT_TEMPERATURE'] . '" data-component="' . $component['component'] . '" data-datapoint="SET_POINT_TEMPERATURE"></span>'
. '<span class="info" data-id="' . $component['LEVEL'] . '" data-component="' . $component['component'] . '" data-datapoint="LEVEL"></span>'
. '<span class="info" data-id="' . $component['WINDOW_STATE'] . '" data-component="' . $component['component'] . '" data-datapoint="WINDOW_STATE"></span>'
. '<span class="info set btn-icon" data-id="' . $component['SET_POINT_MODE'] . '" data-component="' . $component['component'] . '" data-datapoint="SET_POINT_MODE" data-set-id="" data-set-value=""></span>'
. '<span class="info set btn-icon" data-id="' . $component['ACTIVE_PROFILE'] . '" data-component="' . $component['component'] . '" data-datapoint="ACTIVE_PROFILE" data-set-id="" data-set-value=""></span>'
. '</div>'
. '<div class="clearfix"></div>'
. '</div>'
. '<div class="hh2 collapse" id="' . $modalId . '">
<div class="row text-center">'
. '<div class="form-inline">Temperatur: '
. '<div class="input-group">'
. '<input type="number" name="' . $component['SET_POINT_TEMPERATURE'] . '" min="4.5" max="30.5" step="0.5" class="form-control" placeholder="Zahl eingeben">'
. '<span class="input-group-btn">'
. '<button class="btn btn-primary set" data-datapoint="4" data-set-id="' . $component['SET_POINT_TEMPERATURE'] . '" data-set-value="">OK</button>'
. '</span>'
. '</div>'
. '&nbsp;&nbsp;&nbsp;Heizprofil: '
. '<div class="btn-group">'
. '<button type="button" class="btn btn-primary set" data-set-id="' . $component['ACTIVE_PROFILE'] . '" data-set-value="1">'
. '1'
. '</button>'
. '<button type="button" class="btn btn-primary set" data-set-id="' . $component['ACTIVE_PROFILE'] . '" data-set-value="2">'
. '2'
. '</button>'
. '<button type="button" class="btn btn-primary set" data-set-id="' . $component['ACTIVE_PROFILE'] . '" data-set-value="3">'
. '3'
. '</button>'
. '</div>'
. '&nbsp;&nbsp;&nbsp;K&uuml;hlprofil: '
. '<div class="btn-group">'
. '<button type="button" class="btn btn-primary set" data-set-id="' . $component['ACTIVE_PROFILE'] . '" data-set-value="4">'
. '4'
. '</button>'
. '<button type="button" class="btn btn-primary set" data-set-id="' . $component['ACTIVE_PROFILE'] . '" data-set-value="5">'
. '5'
. '</button>'
. '<button type="button" class="btn btn-primary set" data-set-id="' . $component['ACTIVE_PROFILE'] . '" data-set-value="6">'
. '6'
. '</button>'
. '</div>'
. '</div>'
. '</div>'
. '<div class="row text-center top15">'
. '<div class="btn-group">'
. '<button type="button" class="btn btn-primary set" data-set-id="' . $component['CONTROL_MODE'] . '" data-set-value="0">'
. 'Auto'
. '</button>'
. '<button type="button" class="btn btn-primary set" data-set-id="' . $component['CONTROL_MODE'] . '" data-set-value="1">'
. 'Manu'
. '</button>'
. '</div>'
. '</div>'
. '</div>'
. '</div>';
}
}
18 changes: 15 additions & 3 deletions components/HmIP-eTRV-F.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ function HmIP_eTRV_F($component) {
. '<button class="btn btn-primary set" data-datapoint="4" data-set-id="' . $component['SET_POINT_TEMPERATURE'] . '" data-set-value="">OK</button>'
. '</span>'
. '</div>'
. '&nbsp;&nbsp;&nbsp;Profil: '
. '&nbsp;&nbsp;&nbsp;Heizprofil: '
. '<div class="btn-group">'
. '<button type="button" class="btn btn-primary set" data-set-id="' . $component['ACTIVE_PROFILE'] . '" data-set-value="1">'
. '1'
Expand All @@ -44,8 +44,20 @@ function HmIP_eTRV_F($component) {
. '<button type="button" class="btn btn-primary set" data-set-id="' . $component['ACTIVE_PROFILE'] . '" data-set-value="3">'
. '3'
. '</button>'
. '</div>'
. '</div>'
. '</div>'
. '&nbsp;&nbsp;&nbsp;K&uuml;hlprofil: '
. '<div class="btn-group">'
. '<button type="button" class="btn btn-primary set" data-set-id="' . $component['ACTIVE_PROFILE'] . '" data-set-value="4">'
. '4'
. '</button>'
. '<button type="button" class="btn btn-primary set" data-set-id="' . $component['ACTIVE_PROFILE'] . '" data-set-value="5">'
. '5'
. '</button>'
. '<button type="button" class="btn btn-primary set" data-set-id="' . $component['ACTIVE_PROFILE'] . '" data-set-value="6">'
. '6'
. '</button>'
. '</div>'
. '</div>'
. '</div>'
. '<div class="row text-center top15">'
. '<div class="btn-group">'
Expand Down
4 changes: 4 additions & 0 deletions config/mapping.json
Original file line number Diff line number Diff line change
Expand Up @@ -481,6 +481,10 @@
"name": "HmIP-eTRV-F",
"icon": "sani_heating.png"
},
{
"name": "HmIP-eTRV-3",
"icon": "sani_heating.png"
},
{
"name": "HmIP-eTRV-2I9F",
"icon": "sani_heating.png"
Expand Down
46 changes: 44 additions & 2 deletions js/script.js.php
Original file line number Diff line number Diff line change
Expand Up @@ -729,8 +729,7 @@
case 'HmIP-eTRV-E-S':
case 'HmIP-eTRV-CL':
case 'HmIP-eTRV-C':
case 'HmIP-eTRV-C-2':
case 'HmIP-eTRV-F':
case 'HmIP-eTRV-C-2':
switch (datapoint) {
case 'ACTUAL_TEMPERATURE':
$('[data-id="' + ise_id + '"]').html('<img src="icon/ist_temperatur.png" /> ' + (Math.round(value * 10) / 10).toFixed(1) + ' &deg;C&nbsp;&nbsp;&nbsp;&nbsp;');
Expand Down Expand Up @@ -771,6 +770,49 @@
$('[data-id="' + ise_id + '"]').html(value);
}
break;
case 'HmIP-eTRV-F':
case 'HmIP-eTRV-3':
switch (datapoint) {
case 'ACTUAL_TEMPERATURE':
$('[data-id="' + ise_id + '"]').html('<img src="icon/ist_temperatur.png" /> ' + (Math.round(value * 10) / 10).toFixed(1) + ' &deg;C&nbsp;&nbsp;&nbsp;&nbsp;');
break;
case 'SET_POINT_MODE':
if (value === '0') {
$('[data-id="' + ise_id + '"]').html('<img src="icon/time_automatic.png" />');
$('[data-id="' + ise_id + '"]').attr('data-set-id', parseInt(ise_id)-10); //MANU_MODE
$('[data-id="' + ise_id + '"]').attr('data-set-value', '1');
} else {
$('[data-id="' + ise_id + '"]').html('<img src="icon/time_manual_mode.png" />');
$('[data-id="' + ise_id + '"]').attr('data-set-id', parseInt(ise_id)-10); //AUTO_MODE
$('[data-id="' + ise_id + '"]').attr('data-set-value', '0');
}
break;
case 'ACTIVE_PROFILE':
if (value < 4) $('[data-id="' + ise_id + '"]').html(value + '&nbsp;<img src="icon/heating.png"/>');
else $('[data-id="' + ise_id + '"]').html(value + '&nbsp;<img src="icon/cooling.png"/>');
break;
case 'SET_POINT_TEMPERATURE':
$('[data-id="' + ise_id + '"]').html('<img src="icon/soll_temperatur.png" /> ' + (Math.round(value * 10) / 10).toFixed(1) + ' &deg;C');
break;
case 'LEVEL':
$('[data-id="' + ise_id + '"]').html('&nbsp;&nbsp;&nbsp;&nbsp;<img src="icon/ventil.png" /> ' + (Math.round(value * 1000) / 10) + ' %');
break;
case 'WINDOW_STATE':
if (value === '0') {
$('[data-id="' + ise_id + '"]').html('<img src="icon/fts_window_1w.png" />');
} else {
$('[data-id="' + ise_id + '"]').html('<img src="icon/fts_window_1w_open.png" />');
}
break;
case 'LOW_BAT':
if (value === 'true') {
$('[data-id="' + ise_id + '"]').html('<img src="icon/measure_battery_25.png" />');
}
break;
default:
$('[data-id="' + ise_id + '"]').html(value);
}
break;
case 'HmIP-FALMOT-C12':
switch (datapoint) {
case 'LEVEL':
Expand Down

0 comments on commit 48f3068

Please sign in to comment.