-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5 from TedTolboom/development
Development to Master for app store release
- Loading branch information
Showing
48 changed files
with
2,857 additions
and
1,014 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
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
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,43 @@ | ||
[{ | ||
"id": "onoff_turn_on", | ||
"title": { | ||
"en": "Turn on", | ||
"nl": "Zet aan" | ||
}, | ||
"args": [ | ||
{ | ||
"type": "device", | ||
"name": "device", | ||
"filter": "driver_id=IS_140_2|L_810L_810_LED_iHF|RS_LED_D2|XLED_home_2" | ||
} | ||
] | ||
}, | ||
{ | ||
"id": "onoff_turn_off", | ||
"title": { | ||
"en": "Turn off", | ||
"nl": "Zet uit" | ||
}, | ||
"args": [ | ||
{ | ||
"type": "device", | ||
"name": "device", | ||
"filter": "driver_id=IS_140_2|L_810L_810_LED_iHF|RS_LED_D2|XLED_home_2" | ||
} | ||
] | ||
}, | ||
{ | ||
"id": "onoff_turn_on_off", | ||
"title": { | ||
"en": "Toggle on or off", | ||
"nl": "Schakel aan of uit" | ||
}, | ||
"args": [ | ||
{ | ||
"type": "device", | ||
"name": "device", | ||
"filter": "driver_id=IS_140_2|L_810L_810_LED_iHF|RS_LED_D2|XLED_home_2" | ||
} | ||
] | ||
} | ||
] |
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,16 @@ | ||
[ | ||
{ | ||
"id": "sensor_alarm_motion_is_on", | ||
"title": { | ||
"en": "The motion alarm is !{{on|off}}", | ||
"nl": "De bewegingsmelder is !{{aan|uit}}" | ||
}, | ||
"args": [ | ||
{ | ||
"type": "device", | ||
"name": "device", | ||
"filter": "driver_id=IS_140_2|L_810L_810_LED_iHF|RS_LED_D2|XLED_home_2" | ||
} | ||
] | ||
} | ||
] |
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,54 @@ | ||
[{ | ||
"id": "sensor_alarm_motion_on", | ||
"title": { | ||
"en": "The motion alarm turned on", | ||
"nl": "De bewegingsmelder gaat aan" | ||
}, | ||
"args": [ | ||
{ | ||
"type": "device", | ||
"name": "device", | ||
"filter": "driver_id=IS_140_2|L_810L_810_LED_iHF|RS_LED_D2|XLED_home_2" | ||
} | ||
] | ||
}, | ||
{ | ||
"id": "sensor_alarm_motion_off", | ||
"title": { | ||
"en": "The motion alarm turned off", | ||
"nl": "De bewegingsmelder gaat uit" | ||
}, | ||
"args": [ | ||
{ | ||
"type": "device", | ||
"name": "device", | ||
"filter": "driver_id=IS_140_2|L_810L_810_LED_iHF|RS_LED_D2|XLED_home_2" | ||
} | ||
] | ||
}, | ||
{ | ||
"id": "sensor_measure_luminance", | ||
"title": { | ||
"en": "The luminance changed", | ||
"nl": "De helderheid is veranderd" | ||
}, | ||
"args": [ | ||
{ | ||
"type": "device", | ||
"name": "device", | ||
"filter": "driver_id=IS_140_2|L_810L_810_LED_iHF|RS_LED_D2|XLED_home_2" | ||
} | ||
], | ||
"tokens": [ | ||
{ | ||
"name": "luminance", | ||
"type": "number", | ||
"title": { | ||
"en": "luminance", | ||
"nl": "helderheid" | ||
}, | ||
"example": 100 | ||
} | ||
] | ||
} | ||
] |
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 |
---|---|---|
@@ -1,14 +1,70 @@ | ||
'use strict'; | ||
const Homey = require('homey'); | ||
|
||
const ZwaveDevice = require('homey-meshdriver').ZwaveDevice; | ||
|
||
// Documentation: https://Products.Z-WaveAlliance.org/ProductManual/File?folder=&filename=Manuals/2310/IS140-2Z-Wave_5spr_110050437_11.04.17.pdf | ||
|
||
class SteinelIS1402 extends ZwaveDevice { | ||
onMeshInit() { | ||
|
||
// enable debugging | ||
this.enableDebug(); | ||
|
||
// print the node's info to the console | ||
this.printNode(); | ||
|
||
this.registerCapability('onoff', 'SWITCH_BINARY'); | ||
this.registerCapability('measure_luminance', 'SENSOR_MULTILEVEL'); | ||
this.registerCapability('alarm_motion', 'NOTIFICATION'); | ||
|
||
// Register triggers for flows | ||
this.triggerAlarmMotionOn = new Homey.FlowCardTriggerDevice('sensor_alarm_motion_on') | ||
this.triggerAlarmMotionOn | ||
.register(); | ||
|
||
this.triggerAlarmMotionOff = new Homey.FlowCardTriggerDevice('sensor_alarm_motion_off') | ||
this.triggerAlarmMotionOff | ||
.register(); | ||
|
||
this.triggerMeasureLuminance = new Homey.FlowCardTriggerDevice('sensor_measure_luminance') | ||
this.triggerMeasureLuminance | ||
.register(); | ||
|
||
// Register conditions for flows | ||
this.conditionAlarmMotionIsOn = new Homey.FlowCardCondition("sensor_alarm_motion_is_on") | ||
this.conditionAlarmMotionIsOn | ||
.register() | ||
.registerRunListener((args, state) => { | ||
return Promise.resolve(this.getCapabilityValue('alarm_motion')); | ||
}) | ||
|
||
// this.registerCapabilityListener('alarm_motion', this._onCapabilityAlarmMotion.bind(this)) | ||
|
||
// register a report listener | ||
this.registerReportListener('NOTIFICATION', 'NOTIFICATION_REPORT', this._onCapabilityAlarmMotion.bind(this)); | ||
|
||
// this.registerCapabilityListener('measure_luminance', this._onCapabilityMeasureLuminance.bind(this)) | ||
|
||
// register a report listener | ||
this.registerReportListener('SENSOR_MULTILEVEL', 'SENSOR_MULTILEVEL_REPORT', this._onCapabilityMeasureLuminance.bind(this)); | ||
|
||
} | ||
|
||
_onCapabilityAlarmMotion(rawReport, parsedReport) { | ||
if (parsedReport != undefined) { | ||
this.log('_onCapabilityAlarmMotion', parsedReport, `triggerAlarmMotion${parsedReport ? 'On' : 'Off'}`); | ||
this[`triggerAlarmMotion${parsedReport ? 'On' : 'Off'}`].trigger(this, null, null) | ||
} | ||
return true; | ||
} | ||
|
||
_onCapabilityMeasureLuminance(rawReport, parsedReport) { | ||
this.log('_onCapabilityMeasureLuminance', parsedReport); | ||
this.triggerMeasureLuminance.trigger(this, { | ||
luminance: parsedReport, | ||
}, null) | ||
return true; | ||
} | ||
} | ||
module.exports = SteinelIS1402; |
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 |
---|---|---|
@@ -1,14 +1,71 @@ | ||
'use strict'; | ||
const Homey = require('homey'); | ||
|
||
const ZwaveDevice = require('homey-meshdriver').ZwaveDevice; | ||
|
||
// Documentation: https://Products.Z-WaveAlliance.org/ProductManual/File?folder=&filename=Manuals/2309/110050438 BDAL L 810 LED IHF SMARTHOME D-GB-F-I-NL.pdf | ||
|
||
class SteinelL810LED extends ZwaveDevice { | ||
onMeshInit() { | ||
|
||
// enable debugging | ||
this.enableDebug(); | ||
|
||
// print the node's info to the console | ||
this.printNode(); | ||
|
||
this.registerCapability('onoff', 'SWITCH_BINARY'); | ||
this.registerCapability('dim', 'SWITCH_MULTILEVEL'); | ||
this.registerCapability('measure_luminance', 'SENSOR_MULTILEVEL'); | ||
this.registerCapability('alarm_motion', 'NOTIFICATION'); | ||
|
||
// Register triggers for flows | ||
this.triggerAlarmMotionOn = new Homey.FlowCardTriggerDevice('sensor_alarm_motion_on') | ||
this.triggerAlarmMotionOn | ||
.register(); | ||
|
||
this.triggerAlarmMotionOff = new Homey.FlowCardTriggerDevice('sensor_alarm_motion_off') | ||
this.triggerAlarmMotionOff | ||
.register(); | ||
|
||
this.triggerMeasureLuminance = new Homey.FlowCardTriggerDevice('sensor_measure_luminance') | ||
this.triggerMeasureLuminance | ||
.register(); | ||
|
||
// Register conditions for flows | ||
this.conditionAlarmMotionIsOn = new Homey.FlowCardCondition("sensor_alarm_motion_is_on") | ||
this.conditionAlarmMotionIsOn | ||
.register() | ||
.registerRunListener((args, state) => { | ||
return Promise.resolve(this.getCapabilityValue('alarm_motion')); | ||
}) | ||
|
||
// this.registerCapabilityListener('alarm_motion', this._onCapabilityAlarmMotion.bind(this)) | ||
|
||
// register a report listener | ||
this.registerReportListener('NOTIFICATION', 'NOTIFICATION_REPORT', this._onCapabilityAlarmMotion.bind(this)); | ||
|
||
// this.registerCapabilityListener('measure_luminance', this._onCapabilityMeasureLuminance.bind(this)) | ||
|
||
// register a report listener | ||
this.registerReportListener('SENSOR_MULTILEVEL', 'SENSOR_MULTILEVEL_REPORT', this._onCapabilityMeasureLuminance.bind(this)); | ||
|
||
} | ||
|
||
_onCapabilityAlarmMotion(rawReport, parsedReport) { | ||
if (parsedReport != undefined) { | ||
this.log('_onCapabilityAlarmMotion', parsedReport, `triggerAlarmMotion${parsedReport ? 'On' : 'Off'}`); | ||
this[`triggerAlarmMotion${parsedReport ? 'On' : 'Off'}`].trigger(this, null, null) | ||
} | ||
return true; | ||
} | ||
|
||
_onCapabilityMeasureLuminance(rawReport, parsedReport) { | ||
this.log('_onCapabilityMeasureLuminance', parsedReport); | ||
this.triggerMeasureLuminance.trigger(this, { | ||
luminance: parsedReport, | ||
}, null) | ||
return true; | ||
} | ||
} | ||
module.exports = SteinelL810LED; |
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 |
---|---|---|
@@ -1,14 +1,70 @@ | ||
'use strict'; | ||
const Homey = require('homey'); | ||
|
||
const ZwaveDevice = require('homey-meshdriver').ZwaveDevice; | ||
|
||
// Documentation: https://Products.Z-WaveAlliance.org/ProductManual/File?folder=&filename=Manuals/2243/RSLEDD2Z-Wave_5spr_110054844_11.04.17.pdf | ||
|
||
class SteinhelRSLEDD2 extends ZwaveDevice { | ||
onMeshInit() { | ||
|
||
// enable debugging | ||
this.enableDebug(); | ||
|
||
// print the node's info to the console | ||
this.printNode(); | ||
|
||
this.registerCapability('onoff', 'SWITCH_BINARY'); | ||
this.registerCapability('measure_luminance', 'SENSOR_MULTILEVEL'); | ||
this.registerCapability('alarm_motion', 'NOTIFICATION'); | ||
|
||
// Register triggers for flows | ||
this.triggerAlarmMotionOn = new Homey.FlowCardTriggerDevice('sensor_alarm_motion_on') | ||
this.triggerAlarmMotionOn | ||
.register(); | ||
|
||
this.triggerAlarmMotionOff = new Homey.FlowCardTriggerDevice('sensor_alarm_motion_off') | ||
this.triggerAlarmMotionOff | ||
.register(); | ||
|
||
this.triggerMeasureLuminance = new Homey.FlowCardTriggerDevice('sensor_measure_luminance') | ||
this.triggerMeasureLuminance | ||
.register(); | ||
|
||
// Register conditions for flows | ||
this.conditionAlarmMotionIsOn = new Homey.FlowCardCondition("sensor_alarm_motion_is_on") | ||
this.conditionAlarmMotionIsOn | ||
.register() | ||
.registerRunListener((args, state) => { | ||
return Promise.resolve(this.getCapabilityValue('alarm_motion')); | ||
}) | ||
|
||
// this.registerCapabilityListener('alarm_motion', this._onCapabilityAlarmMotion.bind(this)) | ||
|
||
// register a report listener | ||
this.registerReportListener('NOTIFICATION', 'NOTIFICATION_REPORT', this._onCapabilityAlarmMotion.bind(this)); | ||
|
||
// this.registerCapabilityListener('measure_luminance', this._onCapabilityMeasureLuminance.bind(this)) | ||
|
||
// register a report listener | ||
this.registerReportListener('SENSOR_MULTILEVEL', 'SENSOR_MULTILEVEL_REPORT', this._onCapabilityMeasureLuminance.bind(this)); | ||
|
||
} | ||
|
||
_onCapabilityAlarmMotion(rawReport, parsedReport) { | ||
if (parsedReport != undefined) { | ||
this.log('_onCapabilityAlarmMotion', parsedReport, `triggerAlarmMotion${parsedReport ? 'On' : 'Off'}`); | ||
this[`triggerAlarmMotion${parsedReport ? 'On' : 'Off'}`].trigger(this, null, null) | ||
} | ||
return true; | ||
} | ||
|
||
_onCapabilityMeasureLuminance(rawReport, parsedReport) { | ||
this.log('_onCapabilityMeasureLuminance', parsedReport); | ||
this.triggerMeasureLuminance.trigger(this, { | ||
luminance: parsedReport, | ||
}, null) | ||
return true; | ||
} | ||
} | ||
module.exports = SteinhelRSLEDD2; |
Binary file not shown.
Oops, something went wrong.