thing-it-device-enocean-ip
Advanced tools
Comparing version 0.1.23 to 0.1.24
@@ -13,10 +13,7 @@ module.exports = { | ||
id: "highCO2Concentration" | ||
}, { | ||
label: "Power Failure", | ||
id: "powerFailure" | ||
}], | ||
state: [{ | ||
label: "Humidity", | ||
id: "humidity", | ||
type: { | ||
id: "decimal" | ||
} | ||
}, { | ||
label: "CO2 Concentration", | ||
@@ -28,6 +25,6 @@ id: "co2Concentration", | ||
}, { | ||
label: "Temperature", | ||
id: "temperature", | ||
label:"Power Failure Detected", | ||
id: "powerFailureDetected", | ||
type: { | ||
id: "decimal" | ||
id:"boolean" | ||
} | ||
@@ -70,7 +67,3 @@ }], | ||
for(var n in body.state.functions){ | ||
if(body.state.functions[n].key === "humidity"){ | ||
this.state.humidity = body.state.functions[n].value; | ||
this.logDebug("Humidity: "+ this.state.humidity); | ||
} | ||
if (body.state.functions[n].key === "concentration") { | ||
if (body.state.functions[n].key === "co2") { | ||
this.state.co2Concentration = body.state.functions[n].value; | ||
@@ -80,6 +73,2 @@ if(telegram.functions[n].value > 1000) this.publishEvent("highCO2Concentration", {}); | ||
} | ||
if (body.state.functions[n].key === "temperature") { | ||
this.state.temperature = body.state.functions[n].value; | ||
this.logDebug("Temperature: " + this.state.temperature); | ||
} | ||
} | ||
@@ -97,7 +86,3 @@ this.publishStateChange(); | ||
for (var n in telegram.functions) { | ||
if (telegram.functions[n].key === "humidity") { | ||
this.state.humidity = telegram.functions[n].value; | ||
this.logDebug("Humidity: " + this.state.humidity) | ||
} | ||
if (telegram.functions[n].key === "concentration") { | ||
if (telegram.functions[n].key === "co2") { | ||
this.state.co2Concentration = telegram.functions[n].value; | ||
@@ -107,5 +92,9 @@ if(telegram.functions[n].value > 1000) this.publishEvent("highCO2Concentration", {}); | ||
} | ||
if (telegram.functions[n].key === "temperature") { | ||
this.state.temperature = telegram.functions[n].value; | ||
this.logDebug("Temperature: " + this.state.temperature); | ||
if (telegram.functions[n].key === "powerFailureDetected") { | ||
if(telegram.functions[n].value === "false") this.state.powerFailureDetected = false; | ||
else{ | ||
this.state.powerFailureDetected = true; | ||
this.publishEvent("powerFailure", {}); | ||
} | ||
this.logDebug("Power Failure Detected: " + this.state.powerFailureDetected); | ||
} | ||
@@ -112,0 +101,0 @@ } |
module.exports = { | ||
metadata: { | ||
plugin: "pressureSwitch", | ||
label: "Differential Pressure Switch", | ||
label: "EnOcean IP Differential Pressure Switch", | ||
role: "actor", | ||
@@ -56,2 +56,5 @@ family: "pressureSwitch", | ||
else { | ||
//due to limitation of using raw data there is no way of obtaining last state | ||
var dataArray = []; | ||
@@ -67,3 +70,3 @@ this.device.adapter.listeners.push(telegram => { | ||
console.log(this.state); | ||
//this.publishEvent('buttonPressed', {}); | ||
this.publishEvent('buttonPressed', {}); | ||
} | ||
@@ -73,3 +76,3 @@ else{ | ||
console.log(this.state); | ||
//this.publishEvent('buttonReleased', {}); | ||
this.publishEvent('buttonReleased', {}); | ||
} | ||
@@ -76,0 +79,0 @@ } |
module.exports = { | ||
metadata: { | ||
plugin: "rockerSwitch2Rocker", | ||
label: "Rocker Switch, 2 Rocker (EEP F6-02-01)", | ||
label: "EnOcean IP Rocker Switch, 2 Rocker", | ||
role: "actor", | ||
@@ -6,0 +6,0 @@ family: "rockerSwitch2Rocker", |
module.exports = { | ||
metadata: { | ||
plugin: "roomControl", | ||
label: "EnOcean SR06 2T+ RoomControl ", | ||
label: "EnOcean IP SR06 2T+ RoomControl ", | ||
role: "actor", | ||
@@ -6,0 +6,0 @@ family: "roomControl", |
{ | ||
"name": "thing-it-device-enocean-ip", | ||
"version": "0.1.23", | ||
"version": "0.1.24", | ||
"description": "[thing-it-node] Device Plugin for EnOcean IP products.", | ||
@@ -5,0 +5,0 @@ "authors": "Marc Gille", |
118671
40
2828