Skip to content

Commit

Permalink
Homey-Dev added
Browse files Browse the repository at this point in the history
  • Loading branch information
cgHome committed Dec 9, 2018
1 parent c05a899 commit 1c95e63
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
8 changes: 5 additions & 3 deletions app.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,6 @@ const dns = require('dns');
const dgram = require('dgram');
const bonjour = require('bonjour')();

// Start Node.js debugger
// require('inspector').open(9229, '0.0.0.0', true);

module.exports = class MyStromApp extends WifiApp {
constructor(...args) {
super(...args);
Expand All @@ -27,6 +24,11 @@ module.exports = class MyStromApp extends WifiApp {
};

onInit() {
this.log(`${ this.id } on init...(debug mode ${ DEBUG ? 'on' : 'off' })`);
if (DEBUG) {
require('inspector').open(9229, '0.0.0.0');
};

const browser = bonjour.find({ type: 'hap' }, (service) => {
if (service.host.match('myStrom-')) {
const deviceName = service.host.slice(0, service.host.indexOf('.'));
Expand Down
2 changes: 1 addition & 1 deletion app.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
],
"author": {
"name": "Chris Gross",
"email": "cgHome@gmx.net"
"email": "cgHome@cflat-inc.org"
},
"drivers": [
{
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"Smart Home",
"athom"
],
"author": "Chris Gross <cgHome@gmx.net>",
"author": "Chris Gross <cgHome@cflat-inc.org>",
"license": "ISC",
"dependencies": {
"bonjour": "^3.5.0",
Expand All @@ -39,5 +39,5 @@
"bugs": {
"url": "https://github.com/cgHome/ch.mystrom.smarthome/issues"
},
"homepage": "https://apps.athom.com/app/ch.mystrom.smarthome"
"homepage": "https://apps.athom.com/app/ch.mystrom.smarthome",
}

0 comments on commit 1c95e63

Please sign in to comment.