sjroe / node-red-contrib-ble-scan Goto Github PK
View Code? Open in Web Editor NEWA Node-Red node that continously scans for broadcast messages via noble.js
License: MIT License
A Node-Red node that continously scans for broadcast messages via noble.js
License: MIT License
When does the node get triggered?
I only see an output when I deploy the new added node to my flow. After the first deploy and output they won't coming any new messages any time later.
Hey,
i ran into a problem with lacking of necessary privileges to run the ble scan, so i got everytime the noble error:
adapter state unauthorized, please run as root or with sudo or see README for information on running without root/sudo: https://github.com/sandeepmistry/noble#running-on-linux
But the suggested solution didn't work for me because setcap doesn't work with a F2FS filesystem.
The solution:
Stop the node red service
sudo systemctl stop nodered.service
Edit the node red service (Raspberry Pi path):
sudo nano /lib/systemd/system/nodered.service
and add after WorkingDirectory:
AmbientCapabilities=CAP_NET_RAW
so it looks like:
....
[Service]
Type=simple
# Run as normal pi user - change to the user name you wish to run Node-RED as
User=pi
Group=pi
WorkingDirectory=/home/pi
AmbientCapabilities=CAP_NET_RAW
.....
then:
sudo systemctl daemon-reload
and
sudo systemctl start nodered.service
now the error message should be gone an the node should work.
@sjroe Please add this to the installation README.md ^^
EDIT:
I'm closing this issue. I found a third party noble library that had a ton of bug fixes and all sorts. The fixes I listed below also stopped working completely after a few restarts and I don't know why. I really wish I had have saved the third party Noble library to post here, but I haven't. It's not on npm or anything, I had to install manually. Everything just works flawlessly now, so it's clear the actual issue is the noble library is buggy as hell.
Hi All,
What does "powered off" mean on this node.
When my neighbour uses his JLB radio it send 10 ad packets a second, this seems to be overloading something and the node goes to powered off.
This is the first time I caught this that I had a few minutes to try and debug it. I tried these commands in the terminal to get it going again with no avail:
SUBSYSTEM=="bluetooth", KERNEL=="hci0", RUN+="/usr/local/bin/hciconfig hci0 up
And also:
sudo systemctl disable bluetooth
sudo systemctl enable bluetooth
I then restarted node red and it was fixed. However I can't tell if it was the Node red restart or a combination of the above commands and the node red restart that fixed it.
My current plan, since this is a bit of a distaster, is just to restart the server if it sees now BLE messages for 5 minutes. Obviously this is a terrible solution, but this node not working kills my heating, which is a disaster in the winter.
Can anyone shed any light on this?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.