mirror of
https://github.com/node-red/node-red-nodes.git
synced 2025-12-26 23:16:47 +01:00
More BLE node doc/info updates
for Sensortag and physical-web nodes. Added info, and node Status.
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
<!--
|
||||
Copyright 2014.2015 IBM Corp.
|
||||
Copyright 2014.2016 IBM Corp.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
@@ -49,14 +49,11 @@
|
||||
|
||||
<script type="text/x-red" data-help-name="sensorTag">
|
||||
<p>Node to read from the Ti SensorTag</p>
|
||||
<p>For this node to work correctly on Linux, Node-Red needs to be run as
|
||||
<i>root</i>, this due to how Bluetooth 4.0 support is currently implemented
|
||||
in Linux.</p>
|
||||
<p>The UUID field is the bluetooth mac address of the sensor tag, this is optional
|
||||
and can be used to bind to a specific SensorTag if you have more than one
|
||||
active in range at the same time. <b>Note</b>:you can only have one SensorTag
|
||||
per node-red instance at the moment.</p>
|
||||
<p>The topic setting is a prefix that will be pre-pended to the name of the
|
||||
per Node-RED instance at the moment.</p>
|
||||
<p>The <i>topic</i> setting is a prefix that will be pre-pended to the name of the
|
||||
sensor that creates the reading. e.g. <i>sensorTag/temperature</i>. If
|
||||
blank it will be set to the UUID of the sensor tag.</p>
|
||||
<p><strong>NOTE:</strong> Only 1 sensorTag can be read from at a time,
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* Copyright 2014,2015 IBM Corp.
|
||||
* Copyright 2014,2016 IBM Corp.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -34,7 +34,7 @@ module.exports = function(RED) {
|
||||
if (this.uuid === "") { this.uuid = undefined; }
|
||||
var node = this;
|
||||
|
||||
if ( typeof node.stag === "undefined") {
|
||||
if (typeof node.stag === "undefined") {
|
||||
node.status({fill:"blue", shape:"dot", text:"discovering..."});
|
||||
|
||||
SensorTag.discover(function(sensorTag) {
|
||||
|
||||
@@ -11,7 +11,7 @@ You will need a suitable Bluetooth Low Energy (BLE) stack and drivers for your h
|
||||
|
||||
#### Raspberry Pi
|
||||
|
||||
Install Bluetooth drivers and bluez stack, and set executeable by non-root user
|
||||
Install Bluetooth drivers and bluez stack, and set executable by non-root user
|
||||
|
||||
sudo apt-get install libbluetooth-dev libudev-dev pi-bluetooth
|
||||
sudo setcap cap_net_raw+eip $(eval readlink -f `which node`)
|
||||
@@ -23,7 +23,7 @@ Install
|
||||
Run the following command in your Node-RED user directory - typically `~/.node-red`
|
||||
|
||||
npm i node-red-node-sensortag
|
||||
|
||||
|
||||
|
||||
Usage
|
||||
-----
|
||||
@@ -51,6 +51,4 @@ these sensors will be sent as a JSON object payload with the sensor name appende
|
||||
* Luxometer - { topic: [topic_prefix]/luxometer , payload: { lux: 212 } }
|
||||
* Buttons - { topic: [topic_prefix]/keys , payload: { left: true, right: false} }
|
||||
|
||||
The sensorTag library used by this node only supports using 1 SensorTag at a time.
|
||||
|
||||
**NOTE:** On Linux Node-RED needs to be run as root in order or access the Linux Bluetooth 4.0 system calls
|
||||
**Note**: This sensorTag library only supports using 1 SensorTag at a time.
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "node-red-node-sensortag",
|
||||
"description": "A Node-RED node to read data from a TI SensorTag",
|
||||
"version": "0.0.11",
|
||||
"version": "0.0.12",
|
||||
"keywords": [
|
||||
"node-red",
|
||||
"sensortag",
|
||||
|
||||
Reference in New Issue
Block a user