1
0
mirror of https://github.com/node-red/node-red-nodes.git synced 2023-10-10 13:36:58 +02:00
node-red-nodes/hardware/physical-web
Nathanaël Lécaudé 263031d6c7
node-red-node-physical-web: make it work with newer versions (#799)
* Added msg.advertising = true/false to enable/disable advertising

* Fixed comparison with bool

* physical- web: Added status
Added status (lost, updated, found) as msg.topic.  Added checkbox to allow duplicates or not.

* Re-added optional topic to avoid breaking compatibility

* Cleaner topic slection

* node-red-node-wol: added address field

* node-red-node-wol: remove warning

* node-red-node-wol: bump version

* node-red-node-wol: typo in version

* Ensure service is stopped before being created

* Bump version of node-red-node-discovery to 0.0.19

* node-red-node-discovery: correction to Readme

* node-red-node-discovery: Add stop method and show status

* node-red-node-discovery: bump version to 0.0.20

* node-red-node-discovery: remove status text

* serial: ensure serialReconnectTime has a default value

* physical-web: update dependencies to make it work with recent node versions

* physical-web: update package.json
2021-05-06 15:06:57 +01:00
..
icons add validation to physical web node fields 2016-03-03 09:18:57 +00:00
LICENSE Update licenses and packages for all nodes 2016-11-06 20:26:19 +00:00
package.json node-red-node-physical-web: make it work with newer versions (#799) 2021-05-06 15:06:57 +01:00
physical-web.html Update licenses and packages for all nodes 2016-11-06 20:26:19 +00:00
physical-web.js node-red-node-physical-web: make it work with newer versions (#799) 2021-05-06 15:06:57 +01:00
README.md Update physical web node 2016-03-02 21:57:53 +00:00

node-red-node-physical-web

Nodes to allow Node-RED to act as an Eddystone BLE beacon.

Prerequisites

You will need a suitable Bluetooth Low Energy (BLE) stack and drivers for your hardware

  • for example Bluez 5.2.x or better.

Raspberry Pi

Install Bluetooth drivers and bluez stack, and set executeable 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`)

Linux / OSX / Windows

Follow just the pre-reqs for noble here.

Install

Run the following command in your Node-RED user directory - typically ~/.node-red

npm i node-red-node-physical-web

Then on Linux follow these instructions:

https://github.com/sandeepmistry/bleno#running-on-linux

Usage

Physical-Web Out

A node to allow Node-RED to act as an Eddystone beacon broadcasting URLs

The config window lets you set the initial URL, announcement power and period for the Eddystone.

Any messages received will update the advertised URL from the msg.payload

Physical-Web In

A node to scan for local Eddystones and output information about discovered URLs and TLM data.

Two types of messages will be emitted:

  • URL

    • type - Eddystone type
    • txPower - Received power at 0m in dBm
    • url - The URL the beacon is broadcasting
    • tlm - TLM data, if the device is interleaving broadcasts
    • rssi - RSSI of the beacon
    • distance - Estimated distance to the beacon
  • UID

    • type - Eddystone type
    • txPower - Received power at 0m in dBm
    • namespace - 10-byte ID of namespace
    • instance - 6-byte ID instance
    • tlm - TLM data, if the device is interleaving broadcasts
    • rssi - RSSI of the beacon
    • distance - Estimated distance to the beacon

Where the tlm data will be in the following format

  • tlm
    • version - TLM version
    • vbatt - Battery Voltage
    • temp - Temperature
    • advCnt - Advertising PDU count
    • secCnt - Time since power on or reboot
    • rssi - RSSI of the beacon
    • distance - Estimated distance to the beacon