Skip to content

Commit

Permalink
add SENSOR datapoint to possible sensors (#42)
Browse files Browse the repository at this point in the history
  • Loading branch information
hobbyquaker committed Feb 18, 2019
1 parent 5624e4d commit bf0cef3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions nodes/redmatic-homekit-homematic-garage.html
Original file line number Diff line number Diff line change
Expand Up @@ -134,15 +134,14 @@
$nodeInputIfaceSensor.html('');
Object.keys(d).forEach(i => {
if (i !== 'ReGaHSS' && i !== 'VirtualDevices') {
console.log('append', i)
$nodeInputIfaceActuator.append('<option' + (d[i].enabled ? '' : ' disabled') + (i === this.ifaceActuator ? ' selected' : '') + '>' + i + '</option>');
$nodeInputIfaceSensor.append('<option' + (d[i].enabled ? '' : ' disabled') + (i === this.ifaceSensor ? ' selected' : '') + '>' + i + '</option>');
}
});
cb();
});
}
}
};

function paramsetName(iface, device, paramset) {
let cType = '';
Expand Down Expand Up @@ -196,6 +195,7 @@
if (
(ps && ps.STATE && !(ps.STATE.OPERATIONS & 2))
|| (ps && ps.MOTION)
|| (ps && ps.SENSOR)
) {
let name = addr;
if (data.channelNames[addr]) {
Expand Down
4 changes: 2 additions & 2 deletions nodes/redmatic-homekit-homematic-garage.js
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ module.exports = function (RED) {
this.idSubSensorClosed = this.ccu.subscribe({
iface: config.ifaceSensor,
channel: config.channelSensorClosed.split(' ')[0],
datapoint: /STATE|MOTION/
datapoint: /STATE|MOTION|SENSOR/
}, msg => {
this.closed = config.directionClosed ? msg.value : !msg.value;
this.log(config.channelSensorClosed + ' ' + msg.value + ' ' + this.closed);
Expand All @@ -161,7 +161,7 @@ module.exports = function (RED) {
this.idSubSensorOpened = this.ccu.subscribe({
iface: config.ifaceSensor,
channel: config.channelSensorOpened.split(' ')[0],
datapoint: /STATE|MOTION/
datapoint: /STATE|MOTION|SENSOR/
}, msg => {
this.opened = config.directionOpened ? msg.value : !msg.value;
this.log(config.channelSensorOpened + ' ' + msg.value + ' ' + this.opened);
Expand Down

0 comments on commit bf0cef3

Please sign in to comment.