homebridge-syntex-magichome
Advanced tools
Comparing version 1.0.0-b46 to 1.0.0-b47
{ | ||
"name": "homebridge-syntex-magichome", | ||
"version": "1.0.0-b46", | ||
"version": "1.0.0-b47", | ||
"description": "Homebridge Plugin for MagicHome LED Strips with preset scenes", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -57,2 +57,4 @@ const LightBulb = require('./accessories/lightBulb'); | ||
{ | ||
var found = false; | ||
for(var i = 0; i < this.lights.length; i++) | ||
@@ -62,2 +64,4 @@ { | ||
{ | ||
found = true; | ||
if(params.power) | ||
@@ -85,7 +89,7 @@ { | ||
response.write('Success'); | ||
response.write(found ? 'Success' : 'Error'); | ||
} | ||
else | ||
{ | ||
response.write('Keine Mac!'); | ||
response.write('Keine IP angegeben!'); | ||
} | ||
@@ -95,2 +99,26 @@ | ||
}); | ||
server.addPage('/get-device', (response, params) => { | ||
if(params.ip) | ||
{ | ||
var found = null; | ||
for(var i = 0; i < this.lights.length; i++) | ||
{ | ||
if(this.lights[i].ip == params.ip) | ||
{ | ||
found = this.lights[i].color; | ||
} | ||
} | ||
response.write(found != null ? found : 'Error'); | ||
} | ||
else | ||
{ | ||
response.write('Keine IP angegeben!'); | ||
} | ||
response.end(); | ||
}); | ||
@@ -97,0 +125,0 @@ lightAgent.setLogger(logger); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
108026
1085