thing-it-device-plugwise
Advanced tools
Comparing version 0.0.12 to 0.0.13
@@ -80,3 +80,3 @@ module.exports = { | ||
if (this.isSimulated()) { | ||
setInterval(function () { | ||
this.simulationInterval = setInterval(function () { | ||
this.state.motion = new Date().getTime() % 2 * 100; | ||
@@ -103,2 +103,11 @@ this.state.lightPercentage = new Date().getTime() % 100; | ||
*/ | ||
MotionSensor.prototype.stop = function () { | ||
if (this.isSimulated()) { | ||
clearInterval(this.simulationInterval); | ||
} | ||
}; | ||
/** | ||
* | ||
*/ | ||
MotionSensor.prototype.setState = function (state) { | ||
@@ -105,0 +114,0 @@ this.state = state; |
@@ -81,3 +81,3 @@ module.exports = { | ||
if (this.isSimulated()) { | ||
setInterval(function () { | ||
this.simulationInterval = setInterval(function () { | ||
if (this.state.switch) { | ||
@@ -101,2 +101,11 @@ this.state.consumption += new Date().getTime() % 4; | ||
*/ | ||
Outlet.prototype.stop = function () { | ||
if (this.isSimulated()) { | ||
clearInterval(this.simulationInterval); | ||
} | ||
}; | ||
/** | ||
* | ||
*/ | ||
Outlet.prototype.setState = function (state) { | ||
@@ -103,0 +112,0 @@ this.state = state; |
{ | ||
"name": "thing-it-device-plugwise", | ||
"version": "0.0.12", | ||
"version": "0.0.13", | ||
"description": "[thing-it-node] Device Plugin for Plugwise © products.", | ||
@@ -5,0 +5,0 @@ "authors": "Marc Gille", |
@@ -17,2 +17,4 @@ # thing-it-device-plugwise | ||
# User Interface | ||
# User Interface | ||
<a href="./documentation/images/mobile-ui.png"><img src="./documentation/images/mobile-ui.png" width="80%" height="80%"></a> |
@@ -81,3 +81,3 @@ module.exports = { | ||
if (this.isSimulated()) { | ||
setInterval(function () { | ||
this.simulationInterval = setInterval(function () { | ||
if (this.state.switch) { | ||
@@ -101,2 +101,11 @@ this.state.consumption += new Date().getTime() % 4; | ||
*/ | ||
Switch.prototype.stop = function () { | ||
if (this.isSimulated()) { | ||
clearInterval(this.simulationInterval); | ||
} | ||
}; | ||
/** | ||
* | ||
*/ | ||
Switch.prototype.setState = function (state) { | ||
@@ -103,0 +112,0 @@ this.state = state; |
@@ -81,3 +81,3 @@ module.exports = { | ||
if (this.isSimulated()) { | ||
setInterval(function () { | ||
this.simulationInterval = setInterval(function () { | ||
if (this.state.boilerActive) { | ||
@@ -105,2 +105,11 @@ this.state.measuredTemperature += 1.0; | ||
*/ | ||
Thermostat.prototype.stop = function () { | ||
if (this.isSimulated()) { | ||
clearInterval(this.simulationInterval); | ||
} | ||
}; | ||
/** | ||
* | ||
*/ | ||
Thermostat.prototype.setState = function (state) { | ||
@@ -107,0 +116,0 @@ this.state = state; |
301913
14
522
19