thing-it-device-enocean-ip
Advanced tools
Comparing version
@@ -21,2 +21,5 @@ module.exports = { | ||
} | ||
}, { | ||
label: 'Last Operation Timestamp', | ||
id: 'lastOperationTimestamp' | ||
}], | ||
@@ -70,6 +73,7 @@ events: [{ | ||
dataArray = telegram.telegramInfo.data.match(/.{1,2}/g); | ||
console.log("Data bits: ", dataArray[2]); | ||
//console.log("Data bits: ", dataArray[2]); | ||
if(dataArray[2] === "11") { | ||
this.state.lastOperation = "Button Pressed"; | ||
this.state.pressed = true; | ||
this.state.lastOperationTimestamp = moment().toISOString(); | ||
console.log(this.state); | ||
@@ -81,5 +85,7 @@ this.publishEvent('buttonPressed', {}); | ||
this.state.pressed = false; | ||
this.state.lastOperationTimestamp = moment().toISOString(); | ||
console.log(this.state); | ||
this.publishEvent('buttonReleased', {}); | ||
} | ||
this.publishStateChange(); | ||
} | ||
@@ -86,0 +92,0 @@ }); |
{ | ||
"name": "thing-it-device-enocean-ip", | ||
"version": "0.2.22", | ||
"version": "0.2.23", | ||
"description": "[thing-it-node] Device Plugin for EnOcean IP products.", | ||
@@ -5,0 +5,0 @@ "authors": "Marc Gille", |
186198
0.17%4733
0.13%