mirror of
https://github.com/node-red/node-red-nodes.git
synced 2025-03-01 10:37:43 +00:00
parent
98d44004c9
commit
a8ec48553f
@ -49,7 +49,7 @@ module.exports = function(RED) {
|
||||
node.log("connected to sensor tag: " + sensorTag._peripheral.uuid);
|
||||
node.status({fill:"green", shape:"dot", text:"connected"});
|
||||
|
||||
sensorTag.on('disconnect', function() {
|
||||
sensorTag.once('disconnect', function() {
|
||||
node.discovering = false;
|
||||
node.status({fill:"red", shape:"ring", text:"disconnected"});
|
||||
node.log("disconnected ",node.uuid);
|
||||
@ -102,7 +102,6 @@ module.exports = function(RED) {
|
||||
msg.payload = {'left': left, 'right': right, 'magnet': mag};
|
||||
node.send(msg);
|
||||
});
|
||||
|
||||
sensorTag.on('luxometerChange', function(lux) {
|
||||
var msg = {'topic': node.topic + '/luxometer'};
|
||||
msg.payload = {'lux': parseInt(lux)};
|
||||
|
@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "node-red-node-sensortag",
|
||||
"description": "A Node-RED node to read data from a TI SensorTag",
|
||||
"version": "0.0.13",
|
||||
"version": "0.0.14",
|
||||
"keywords": [
|
||||
"node-red",
|
||||
"sensortag",
|
||||
|
Loading…
x
Reference in New Issue
Block a user