eschava / node-red-contrib-xiaomi-ble Goto Github PK
View Code? Open in Web Editor NEWXiaomi Bluetooth4 (BLE) sensors
License: MIT License
Xiaomi Bluetooth4 (BLE) sensors
License: MIT License
Hi,
I'd want to know if the values are red passively from the sensors or if the plugin explicitly connect to them for updating values.
Thanks.
When a message object comes through these nodes the same message object should be modified and returned instead of creating a new message and sending that.
The reason for this is a lot of nodes will store data in other attributes that need to be read later down the flow. If you are crafting a new message object these variables will not propagate down the flow.
A good example of why this is a problem is if you wire up an http node, the Xiaomi BLE node, then a http response node the response will not be able to be sent because the request information got deleted from the message object.
First Thanks for a great node/project.
I am having a lot of problems installing this node, I started with a brand new install of raspbian-lite on a 16gb sd card and after config and update/upgrade I installed and configured mosquitto and the installed node red with the advised script as found on the nodered.org pi page (build-essentials were upto date btw)
all well and good untill i tried to install the node-red-xiaomi-ble node through the pallet manager
it failed,
npm audits point to a known issue of version2.x.x of noble.debug,
https://www.npmjs.com/advisories/534
npm list indicates
├─┬ [email protected]
│ └─┬ [email protected]
│ ├─┬ UNMET OPTIONAL DEPENDENCY [email protected]
│ │ ├─┬ UNMET OPTIONAL DEPENDENCY [email protected]
│ │ │ └── UNMET OPTIONAL DEPENDENCY [email protected]
│ │ ├── [email protected] deduped
│ │ └── [email protected] deduped
│ ├── [email protected]
│ ├─┬ [email protected]
│ │ └── [email protected]
│ └─┬ UNMET OPTIONAL DEPENDENCY [email protected]
│ └── [email protected] dedupe
that the suggested version failed to get installed and the buggy version was the fallback.
and that the 404 failure to find the web resources
node-pre-gyp WARN Using needle for node-pre-gyp https download
node-pre-gyp WARN Tried to download(404): https://github.com/tessel/node-usb/releases/download/1.5.0/usb_bindings-v1.5.0-node-v64-linux-arm.tar.gz
node-pre-gyp WARN Pre-built binaries not found for [email protected] and [email protected] (node-v64 ABI, glibc) (falling back to source compile with node-gyp)
Is the real culprit?
browsing for similar problems with solutions ive tried 3 versions of node red and attempted to install V1.2.1 of this node, all fail after attempting to rebuild without any available resources?
my last attempt involved using Pete Scargills "The Script" which took over an hour to run and installed an earlier release of node and node red. and 1st the pallet manager failed to install V1.2.3 then cli npm install failed with a cascading roll back on the failure to find the resources listed above . As did an attempt to clone and install V1.2.1.
while i appreciate this is probably not a problem with your node, but i am suffering it attempting to install your node, and have done all i can think of by tracking down any and all required resources and installed them in advance of need when identified.
thanks in advance,,
Hi, I installed your great node today, but as soon as the temperature dropped to below 0 degree Centigrade I received the following message: "Incorrect data: T=-1.9 H=35.1". Could there be something in the code that does not like negative temperatures?
Thank you for a useful node. Unfortunately im having problems.
I am hosting Node red on a Raspberry Pi 3B on a sandisk A1 64gb sd card
Using an injection node with a payload generated with the Json editor to contain the address property.
the Xiaomi-Ble-node simply reports "address not specified
[{"id":"ed350590.9b2ca8","type":"inject","z":"a4bfa3cc.61328","name":"Query Prompt","topic":"AnyTopic","payload":"{\"address\":\"4c:65:a8:d0:40:7c\"}","payloadType":"json","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":110,"y":120,"wires":[["b0b9c9aa.f01ef8"]]},{"id":"b0b9c9aa.f01ef8","type":"Xiaomi BLE","z":"a4bfa3cc.61328","name":"","address":"","scanningTimeout":60,"x":390,"y":120,"wires":[["f8a2ac1f.f784d"]]},{"id":"f8a2ac1f.f784d","type":"debug","z":"a4bfa3cc.61328","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":670,"y":120,"wires":[]}]
If i include a Json node to change the payload to a js object type, same result..
[{"id":"ed350590.9b2ca8","type":"inject","z":"a4bfa3cc.61328","name":"Query Prompt","topic":"AnyTopic","payload":"{\"address\":\"4c:65:a8:d0:40:7c\"}","payloadType":"json","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":110,"y":120,"wires":[["9ea47804.4a60a8"]]},{"id":"b0b9c9aa.f01ef8","type":"Xiaomi BLE","z":"a4bfa3cc.61328","name":"","address":"","scanningTimeout":60,"x":470,"y":120,"wires":[["f8a2ac1f.f784d"]]},{"id":"f8a2ac1f.f784d","type":"debug","z":"a4bfa3cc.61328","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":670,"y":120,"wires":[]},{"id":"9ea47804.4a60a8","type":"json","z":"a4bfa3cc.61328","name":"","property":"payload","action":"obj","pretty":false,"x":260,"y":120,"wires":[["b0b9c9aa.f01ef8"]]}]
I have had to resort to dedicating a Xiaomi-Ble node to each sensor i wish to query ok wit 1-2x but i currently query 11x with plans to include more..
I installed node red with the curl script found on the node-red Pi instructions page onto a fresh Buster install after updating and upgrading. Mariadb, sqlite, influxDb . Mosquitto, and Grafana were also installed and set to run as servers/services along with node red.
The xiaomi-ble node was installed via the node red palette
I also installed ?reinstalled? Nobel when first experiencing the unexpected behaviour, this had no effect.
Thank you for you attention.
I am getting an error
- node-red-contrib-xiaomi-ble:Xiaomi BLE : Error: Cannot find module 'bluetooth-hci-socket'
Hi,
are also planning to integrate mor Xiaomi Sensor? I have the lywsd02 and i get only the Battery status
bg Patrick
Hi Eschava,
today i install your node on my pi3+ with NodeRed an get after installation the message and Flow Deploy:
Flows stopped due to missing node types
See Information below: How can i fix that?
BR
Quito
pi@quitos_rpi3:~ $ npm install node-red-contrib-xiaomi-ble
[email protected] install /home/pi/node_modules/usb
node-pre-gyp install --fallback-to-build
node-pre-gyp WARN Using needle for node-pre-gyp https download
node-pre-gyp WARN Tried to download(404): https://github.com/tessel/node-usb/releases/download/1.5.0/usb_bindings-v1.5.0-node-v64-linux-arm.tar.gz
node-pre-gyp WARN Pre-built binaries not found for [email protected] and [email protected] (node-v64 ABI, glibc) (falling back to source compile with node-gyp)
make: Verzeichnis ?/home/pi/node_modules/usb/build? wird betreten
CC(target) Release/obj.target/libusb/libusb/libusb/core.o
CC(target) Release/obj.target/libusb/libusb/libusb/descriptor.o
CC(target) Release/obj.target/libusb/libusb/libusb/hotplug.o
CC(target) Release/obj.target/libusb/libusb/libusb/io.o
CC(target) Release/obj.target/libusb/libusb/libusb/strerror.o
CC(target) Release/obj.target/libusb/libusb/libusb/sync.o
CC(target) Release/obj.target/libusb/libusb/libusb/os/poll_posix.o
CC(target) Release/obj.target/libusb/libusb/libusb/os/threads_posix.o
CC(target) Release/obj.target/libusb/libusb/libusb/os/linux_usbfs.o
CC(target) Release/obj.target/libusb/libusb/libusb/os/linux_udev.o
AR(target) Release/obj.target/usb.a
COPY Release/usb.a
CXX(target) Release/obj.target/usb_bindings/src/node_usb.o
../src/node_usb.cc: In function 'Nan::NAN_METHOD_RETURN_TYPE SetDebugLevel(Nan::NAN_METHOD_ARGS_TYPE)':
../src/node_usb.cc:99:73: warning: 'uint32_t v8::Value::Uint32Value() const' is deprecated: Use maybe version [-Wdeprecated-declarations]
if (info.Length() != 1 || !info[0]->IsUint32() || info[0]->Uint32Value() > 4) {
^
In file included from /home/pi/.node-gyp/10.15.0/include/node/v8.h:26:0,
from ../src/node_usb.h:12,
from ../src/node_usb.cc:1:
/home/pi/.node-gyp/10.15.0/include/node/v8.h:2477:47: note: declared here
V8_DEPRECATED("Use maybe version", uint32_t Uint32Value() const);
^
/home/pi/.node-gyp/10.15.0/include/node/v8config.h:324:3: note: in definition of macro 'V8_DEPRECATED'
declarator attribute((deprecated(message)))
^~~~~~~~~~
../src/node_usb.cc:103:53: warning: 'uint32_t v8::Value::Uint32Value() const' is deprecated: Use maybe version [-Wdeprecated-declarations]
libusb_set_debug(usb_context, info[0]->Uint32Value());
^
In file included from /home/pi/.node-gyp/10.15.0/include/node/v8.h:26:0,
from ../src/node_usb.h:12,
from ../src/node_usb.cc:1:
/home/pi/.node-gyp/10.15.0/include/node/v8.h:2477:47: note: declared here
V8_DEPRECATED("Use maybe version", uint32_t Uint32Value() const);
^
/home/pi/.node-gyp/10.15.0/include/node/v8config.h:324:3: note: in definition of macro 'V8_DEPRECATED'
declarator attribute((deprecated(message)))
^~~~~~~~~~
../src/node_usb.cc: In function 'void handleHotplug(std::pair<libusb_device*, libusb_hotplug_event>)':
../src/node_usb.cc:151:58: warning: 'v8::Localv8::Value Nan::MakeCallback(v8::Localv8::Object, const char*, int, v8::Localv8::Value)' is deprecated [-Wdeprecated-declarations]
Nan::MakeCallback(Nan::New(hotplugThis), "emit", 2, argv);
^
In file included from ../src/helpers.h:3:0,
from ../src/node_usb.h:21,
from ../src/node_usb.cc:1:
../node_modules/nan/nan.h:1001:46: note: declared here
NAN_DEPRECATED inline v8::Localv8::Value MakeCallback(
^~~~~~~~~~~~
../src/node_usb.cc: In function 'v8::Localv8::Value libusbException(int)':
../src/node_usb.cc:301:14: warning: 'v8::Localv8::Object v8::Value::ToObject() const' is deprecated: Use maybe version [-Wdeprecated-declarations]
e->ToObject()->Set(Nan::New("errno").ToLocalChecked(), Nan::New(errorno));
^
In file included from ../src/node_usb.h:12:0,
from ../src/node_usb.cc:1:
/home/pi/.node-gyp/10.15.0/include/node/v8.h:10046:15: note: declared here
Local Value::ToObject() const {
^~~~~
CXX(target) Release/obj.target/usb_bindings/src/device.o
../src/device.cc: In static member function 'static void Req::default_after(uv_work_t)':
../src/device.cc:237:64: warning: 'v8::Localv8::Value Nan::MakeCallback(v8::Localv8::Object, v8::Localv8::Function, int, v8::Localv8::Value)' is deprecated [-Wdeprecated-declarations]
Nan::MakeCallback(device, Nan::New(baton->callback), 1, argv);
^
In file included from ../src/helpers.h:3:0,
from ../src/node_usb.h:21,
from ../src/device.cc:1:
../node_modules/nan/nan.h:959:46: note: declared here
NAN_DEPRECATED inline v8::Localv8::Value MakeCallback(
^~~~~~~~~~~~
CXX(target) Release/obj.target/usb_bindings/src/transfer.o
../src/transfer.cc: In function 'Nan::NAN_METHOD_RETURN_TYPE Transfer_Submit(Nan::NAN_METHOD_ARGS_TYPE)':
../src/transfer.cc:58:47: warning: 'v8::Localv8::Object v8::Value::ToObject() const' is deprecated: Use maybe version [-Wdeprecated-declarations]
Local buffer_obj = info[0]->ToObject();
^
In file included from ../src/node_usb.h:12:0,
from ../src/transfer.cc:1:
/home/pi/.node-gyp/10.15.0/include/node/v8.h:10046:15: note: declared here
Local Value::ToObject() const {
^~~~~
../src/transfer.cc: In function 'void handleCompletion(Transfer)':
../src/transfer.cc:126:72: warning: 'v8::Localv8::Value Nan::MakeCallback(v8::Localv8::Object, v8::Localv8::Function, int, v8::Localv8::Value*)' is deprecated [-Wdeprecated-declarations]
Nan::MakeCallback(self->handle(), Nan::New(self->v8callback), 3, argv);
^
In file included from ../src/helpers.h:3:0,
from ../src/node_usb.h:21,
from ../src/transfer.cc:1:
../node_modules/nan/nan.h:959:46: note: declared here
NAN_DEPRECATED inline v8::Localv8::Value MakeCallback(
^~~~~~~~~~~~
SOLINK_MODULE(target) Release/obj.target/usb_bindings.node
COPY Release/usb_bindings.node
COPY /home/pi/node_modules/usb/src/binding/usb_bindings.node
TOUCH Release/obj.target/action_after_build.stamp
make: Verzeichnis ?/home/pi/node_modules/usb/build? wird verlassen
[email protected] install /home/pi/node_modules/bluetooth-hci-socket
node-gyp rebuild
make: Verzeichnis ?/home/pi/node_modules/bluetooth-hci-socket/build? wird betreten
CXX(target) Release/obj.target/binding/src/BluetoothHciSocket.o
In file included from ../../nan/nan.h:190:0,
from ../src/BluetoothHciSocket.cpp:8:
../../nan/nan_maybe_43_inl.h: In function 'Nan::Maybe Nan::ForceSet(v8::Localv8::Object, v8::Localv8::Value, v8::Localv8::Value, v8::PropertyAttribute)':
../../nan/nan_maybe_43_inl.h:88:15: error: 'class v8::Object' has no member named 'ForceSet'
return obj->ForceSet(GetCurrentContext(), key, value, attribs);
^~~~~~~~
In file included from ../src/BluetoothHciSocket.cpp:8:0:
../../nan/nan.h: In function 'v8::Localv8::Value Nan::MakeCallback(v8::Localv8::Object, v8::Localv8::Function, int, v8::Localv8::Value)':
../../nan/nan.h:817:60: warning: 'v8::Localv8::Value node::MakeCallback(v8::Isolate, v8::Localv8::Object, v8::Localv8::Function, int, v8::Localv8::Value)' is deprecated: Use MakeCallback(..., async_context) [-Wdeprecated-declarations]
v8::Isolate::GetCurrent(), target, func, argc, argv);
^
In file included from /home/pi/.node-gyp/10.15.0/include/node/node_buffer.h:25:0,
from ../src/BluetoothHciSocket.cpp:7:
/home/pi/.node-gyp/10.15.0/include/node/node.h:177:50: note: declared here
NODE_EXTERN v8::Localv8::Value MakeCallback(
^
/home/pi/.node-gyp/10.15.0/include/node/node.h:91:42: note: in definition of macro 'NODE_DEPRECATED'
attribute((deprecated(message))) declarator
^~~~~~~~~~
In file included from ../src/BluetoothHciSocket.cpp:8:0:
../../nan/nan.h: In function 'v8::Localv8::Value Nan::MakeCallback(v8::Localv8::Object, v8::Localv8::String, int, v8::Localv8::Value)':
../../nan/nan.h:831:62: warning: 'v8::Localv8::Value node::MakeCallback(v8::Isolate*, v8::Localv8::Object, v8::Localv8::String, int, v8::Localv8::Value)' is deprecated: Use MakeCallback(..., async_context) [-Wdeprecated-declarations]
v8::Isolate::GetCurrent(), target, symbol, argc, argv);
^
In file included from /home/pi/.node-gyp/10.15.0/include/node/node_buffer.h:25:0,
from ../src/BluetoothHciSocket.cpp:7:
/home/pi/.node-gyp/10.15.0/include/node/node.h:170:50: note: declared here
NODE_EXTERN v8::Localv8::Value MakeCallback(
^
/home/pi/.node-gyp/10.15.0/include/node/node.h:91:42: note: in definition of macro 'NODE_DEPRECATED'
attribute((deprecated(message))) declarator
^~~~~~~~~~
In file included from ../src/BluetoothHciSocket.cpp:8:0:
../../nan/nan.h: In function 'v8::Localv8::Value Nan::MakeCallback(v8::Localv8::Object, const char, int, v8::Localv8::Value)':
../../nan/nan.h:845:62: warning: 'v8::Localv8::Value node::MakeCallback(v8::Isolate, v8::Localv8::Object, const char*, int, v8::Localv8::Value)' is deprecated: Use MakeCallback(..., async_context) [-Wdeprecated-declarations]
v8::Isolate::GetCurrent(), target, method, argc, argv);
^
In file included from /home/pi/.node-gyp/10.15.0/include/node/node_buffer.h:25:0,
from ../src/BluetoothHciSocket.cpp:7:
/home/pi/.node-gyp/10.15.0/include/node/node.h:163:50: note: declared here
NODE_EXTERN v8::Localv8::Value MakeCallback(
^
/home/pi/.node-gyp/10.15.0/include/node/node.h:91:42: note: in definition of macro 'NODE_DEPRECATED'
attribute((deprecated(message))) declarator
^~~~~~~~~~
In file included from ../src/BluetoothHciSocket.cpp:8:0:
../../nan/nan.h: In member function 'v8::Localv8::Value Nan::Callback::Call_(v8::Isolate, v8::Localv8::Object, int, v8::Localv8::Value) const':
../../nan/nan.h:1463:5: warning: 'v8::Localv8::Value node::MakeCallback(v8::Isolate, v8::Localv8::Object, v8::Localv8::Function, int, v8::Localv8::Value)' is deprecated: Use MakeCallback(..., async_context) [-Wdeprecated-declarations]
));
^
In file included from /home/pi/.node-gyp/10.15.0/include/node/node_buffer.h:25:0,
from ../src/BluetoothHciSocket.cpp:7:
/home/pi/.node-gyp/10.15.0/include/node/node.h:177:50: note: declared here
NODE_EXTERN v8::Localv8::Value MakeCallback(
^
/home/pi/.node-gyp/10.15.0/include/node/node.h:91:42: note: in definition of macro 'NODE_DEPRECATED'
attribute((deprecated(message))) declarator
^~~~~~~~~~
../src/BluetoothHciSocket.cpp: In member function 'void BluetoothHciSocket::emitErrnoError()':
../src/BluetoothHciSocket.cpp:275:72: error: no matching function for call to 'v8::Function::NewInstance(int, v8::Localv8::Value [1])'
Local error = errorConstructor->NewInstance(1, constructorArgs);
^
In file included from /home/pi/.node-gyp/10.15.0/include/node/node.h:63:0,
from /home/pi/.node-gyp/10.15.0/include/node/node_buffer.h:25,
from ../src/BluetoothHciSocket.cpp:7:
/home/pi/.node-gyp/10.15.0/include/node/v8.h:3993:44: note: candidate: v8::MaybeLocalv8::Object v8::Function::NewInstance(v8::Localv8::Context, int, v8::Localv8::Value) const
V8_WARN_UNUSED_RESULT MaybeLocal NewInstance(
^~~~~~~~~~~
/home/pi/.node-gyp/10.15.0/include/node/v8.h:3993:44: note: candidate expects 3 arguments, 2 provided
/home/pi/.node-gyp/10.15.0/include/node/v8.h:3996:44: note: candidate: v8::MaybeLocalv8::Object v8::Function::NewInstance(v8::Localv8::Context) const
V8_WARN_UNUSED_RESULT MaybeLocal NewInstance(
^~~~~~~~~~~
/home/pi/.node-gyp/10.15.0/include/node/v8.h:3996:44: note: candidate expects 1 argument, 2 provided
../src/BluetoothHciSocket.cpp: In static member function 'static Nan::NAN_METHOD_RETURN_TYPE BluetoothHciSocket::BindRaw(Nan::NAN_METHOD_ARGS_TYPE)':
../src/BluetoothHciSocket.cpp:395:34: warning: 'int64_t v8::Value::IntegerValue() const' is deprecated: Use maybe version [-Wdeprecated-declarations]
devId = arg0->IntegerValue();
^
In file included from /home/pi/.node-gyp/10.15.0/include/node/v8.h:26:0,
from /home/pi/.node-gyp/10.15.0/include/node/node.h:63,
from /home/pi/.node-gyp/10.15.0/include/node/node_buffer.h:25,
from ../src/BluetoothHciSocket.cpp:7:
/home/pi/.node-gyp/10.15.0/include/node/v8.h:2476:46: note: declared here
V8_DEPRECATED("Use maybe version", int64_t IntegerValue() const);
^
/home/pi/.node-gyp/10.15.0/include/node/v8config.h:324:3: note: in definition of macro 'V8_DEPRECATED'
declarator attribute((deprecated(message)))
^~~~~~~~~~
../src/BluetoothHciSocket.cpp: In static member function 'static Nan::NAN_METHOD_RETURN_TYPE BluetoothHciSocket::BindUser(Nan::NAN_METHOD_ARGS_TYPE)':
../src/BluetoothHciSocket.cpp:417:34: warning: 'int64_t v8::Value::IntegerValue() const' is deprecated: Use maybe version [-Wdeprecated-declarations]
devId = arg0->IntegerValue();
^
In file included from /home/pi/.node-gyp/10.15.0/include/node/v8.h:26:0,
from /home/pi/.node-gyp/10.15.0/include/node/node.h:63,
from /home/pi/.node-gyp/10.15.0/include/node/node_buffer.h:25,
from ../src/BluetoothHciSocket.cpp:7:
/home/pi/.node-gyp/10.15.0/include/node/v8.h:2476:46: note: declared here
V8_DEPRECATED("Use maybe version", int64_t IntegerValue() const);
^
/home/pi/.node-gyp/10.15.0/include/node/v8config.h:324:3: note: in definition of macro 'V8_DEPRECATED'
declarator attribute((deprecated(message)))
^~~~~~~~~~
binding.target.mk:99: die Regel f?r Ziel ?Release/obj.target/binding/src/BluetoothHciSocket.o? scheiterte
make: *** [Release/obj.target/binding/src/BluetoothHciSocket.o] Fehler 1
make: Verzeichnis ?/home/pi/node_modules/bluetooth-hci-socket/build? wird verlassen
gyp ERR! build error
gyp ERR! stack Error: make
failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:262:23)
gyp ERR! stack at ChildProcess.emit (events.js:182:13)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:240:12)
gyp ERR! System Linux 4.14.93-v7+
gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/pi/node_modules/bluetooth-hci-socket
gyp ERR! node -v v10.15.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
npm WARN [email protected] No description
npm WARN [email protected] No repository field.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/xpc-connection):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"arm"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/bluetooth-hci-socket):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] install: node-gyp rebuild
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1
npm audit fix
to fix them, or npm audit
for detailsI (now) have multiple Temperature/Humidity sensors I wish to read. My guess is that they need to be read in sequence. Is that correct?
If so, is the best way to do this to create multiple nodes and sequence them or use the same BLE node and inject the address each time?
I am getting a type error msg if trying to inject a msg.address
value into the node.
It is because node.peripheral
can be null
at this point (I think).
node-red-contrib-xiaomi-ble/xiaomi-ble.js
Line 143 in e433c6c
Are the foundDevices
persisted across calls to the node (not familiar enough with javascript / node-red)? If so should the scanning only be done if the device is not in the foundDevices
array?
Hi,
Today I checked my NodeRed flows and the element "Xiaomi BLE" is marked as unknown and package dissapeared from pallet. When I try to install it back agian (even though it's still in the folder with modules) I get this error in error log:
" error Could not install from "node_modules/node-red-contrib-xiaomi-ble" as it does not contain a package.json file. "
What might be the problem?
BR,
I'm using one of the supported Intel-based adapters on Windows 10.
Possibly because there's a long distance between the PC and the sensors, I sometimes don't get a result. I would be willing to try again and retrigger the node, but that's not possible. I realized that when I get to a timeout, the code gets stuck in line 162 (stopScanning). I tried to put another node.status after this line and it doesn't get there. And so it doesn't let me call the node again (probably node.scanningActive is still true). Is there a way to forcibly stop the scan somehow?
Just tried installing the pallete in Node Red and it errors:
Seems that the Get request is hitting a 404 for the binary.
Error Log:
2021-01-19T11:29:52.043Z Install : node-red-contrib-xiaomi-ble 1.3.1
2021-01-19T11:29:52.133Z npm install --no-audit --no-update-notifier --no-fund --save --save-prefix=~ --production [email protected]
2021-01-19T11:30:12.306Z [out]
2021-01-19T11:30:12.306Z [out] > [email protected] install /config/node-red/node_modules/usb
2021-01-19T11:30:12.306Z [out] > prebuild-install --verbose || node-gyp rebuild
2021-01-19T11:30:12.306Z [out]
2021-01-19T11:30:13.058Z [err] prebuild-install
2021-01-19T11:30:13.060Z [err]
2021-01-19T11:30:13.060Z [err] info begin Prebuild-install version 5.3.6
2021-01-19T11:30:13.075Z [err] prebuild-install
2021-01-19T11:30:13.075Z [err] info looking for cached prebuild @
2021-01-19T11:30:13.075Z [err] /root/.npm/_prebuilds/37f3e2-usb-v1.6.3-node-v72-linuxmusl-arm64.tar.gz
2021-01-19T11:30:13.077Z [err] prebuild-install
2021-01-19T11:30:13.077Z [err] http request GET https://github.com/tessel/node-usb/releases/download/v1.6.3/usb-v1.6.3-node-v72-linuxmusl-arm64.tar.gz
2021-01-19T11:30:13.571Z [err] prebuild-install
2021-01-19T11:30:13.572Z [err] http 404 https://github.com/tessel/node-usb/releases/download/v1.6.3/usb-v1.6.3-node-v72-linuxmusl-arm64.tar.gz
2021-01-19T11:30:13.586Z [err] prebuild-install
2021-01-19T11:30:13.586Z [err] WARN install No prebuilt binaries found (target=12.18.4 runtime=node arch=arm64 libc=musl platform=linux)
2021-01-19T11:30:15.647Z [err] gyp
2021-01-19T11:30:15.649Z [err]
2021-01-19T11:30:15.649Z [err] ERR!
2021-01-19T11:30:15.650Z [err]
2021-01-19T11:30:15.650Z [err] build error
2021-01-19T11:30:15.650Z [err]
2021-01-19T11:30:15.652Z [err] gyp
2021-01-19T11:30:15.653Z [err]
2021-01-19T11:30:15.653Z [err] ERR!
2021-01-19T11:30:15.653Z [err]
2021-01-19T11:30:15.654Z [err] stack
2021-01-19T11:30:15.654Z [err] Error: not found: make
2021-01-19T11:30:15.654Z [err] gyp
2021-01-19T11:30:15.655Z [err]
2021-01-19T11:30:15.655Z [err] ERR!
2021-01-19T11:30:15.655Z [err]
2021-01-19T11:30:15.656Z [err] stack
2021-01-19T11:30:15.656Z [err] at getNotFoundError (/usr/lib/node_modules/npm/node_modules/which/which.js:13:12)
2021-01-19T11:30:15.656Z [err] gyp
2021-01-19T11:30:15.656Z [err]
2021-01-19T11:30:15.657Z [err] ERR!
2021-01-19T11:30:15.657Z [err]
2021-01-19T11:30:15.657Z [err] stack
2021-01-19T11:30:15.658Z [err] at F (/usr/lib/node_modules/npm/node_modules/which/which.js:68:19)
2021-01-19T11:30:15.658Z [err] gyp
2021-01-19T11:30:15.658Z [err]
2021-01-19T11:30:15.658Z [err] ERR!
2021-01-19T11:30:15.659Z [err]
2021-01-19T11:30:15.659Z [err] stack
2021-01-19T11:30:15.659Z [err] at E (/usr/lib/node_modules/npm/node_modules/which/which.js:80:29)
2021-01-19T11:30:15.659Z [err] gyp
2021-01-19T11:30:15.660Z [err]
2021-01-19T11:30:15.660Z [err] ERR!
2021-01-19T11:30:15.660Z [err]
2021-01-19T11:30:15.661Z [err] stack
2021-01-19T11:30:15.661Z [err] at /usr/lib/node_modules/npm/node_modules/which/which.js:89:16
2021-01-19T11:30:15.661Z [err] gyp
2021-01-19T11:30:15.661Z [err]
2021-01-19T11:30:15.662Z [err] ERR!
2021-01-19T11:30:15.662Z [err]
2021-01-19T11:30:15.662Z [err] stack
2021-01-19T11:30:15.662Z [err] at /usr/lib/node_modules/npm/node_modules/isexe/index.js:42:5
2021-01-19T11:30:15.663Z [err] gyp
2021-01-19T11:30:15.663Z [err]
2021-01-19T11:30:15.664Z [err] ERR!
2021-01-19T11:30:15.664Z [err]
2021-01-19T11:30:15.664Z [err] stack
2021-01-19T11:30:15.664Z [err] at /usr/lib/node_modules/npm/node_modules/isexe/mode.js:8:5
2021-01-19T11:30:15.665Z [err] gyp
2021-01-19T11:30:15.665Z [err]
2021-01-19T11:30:15.665Z [err] ERR!
2021-01-19T11:30:15.666Z [err]
2021-01-19T11:30:15.666Z [err] stack
2021-01-19T11:30:15.669Z [err] at FSReqCallback.oncomplete (fs.js:168:21)
2021-01-19T11:30:15.669Z [err] gyp ERR! System Linux 5.4.79-v8
2021-01-19T11:30:15.669Z [err] gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
2021-01-19T11:30:15.669Z [err] gyp ERR! cwd /config/node-red/node_modules/usb
2021-01-19T11:30:15.669Z [err] gyp ERR! node -v v12.18.4
2021-01-19T11:30:15.669Z [err] gyp ERR! node-gyp -v v5.1.0
2021-01-19T11:30:15.669Z [err] gyp ERR! not ok
2021-01-19T11:30:15.709Z [out]
2021-01-19T11:30:15.709Z [out] > @abandonware/[email protected] install /config/node-red/node_modules/@abandonware/bluetooth-hci-socket
2021-01-19T11:30:15.709Z [out] > node-pre-gyp install --fallback-to-build
2021-01-19T11:30:15.709Z [out]
2021-01-19T11:30:16.772Z [err] node-pre-gyp
2021-01-19T11:30:16.774Z [err]
2021-01-19T11:30:16.774Z [err] WARN Using request for node-pre-gyp https download
2021-01-19T11:30:17.273Z [err] node-pre-gyp
2021-01-19T11:30:17.273Z [err] WARN
2021-01-19T11:30:17.273Z [err] Tried to download(404): https://github.com/abandonware/node-bluetooth-hci-socket/releases/download/0.5.3-6/bluetooth_hci_socket-0.5.3-6-node-v72-linux-arm64.tar.gz
2021-01-19T11:30:17.273Z [err] node-pre-gyp WARN
2021-01-19T11:30:17.274Z [err] Pre-built binaries not found for @abandonware/[email protected] and [email protected] (node-v72 ABI, musl) (falling back to source compile with node-gyp)
2021-01-19T11:30:17.274Z [err]
2021-01-19T11:30:20.237Z [err] gyp
2021-01-19T11:30:20.239Z [err]
2021-01-19T11:30:20.239Z [err] ERR! build error
2021-01-19T11:30:20.241Z [err] gyp
2021-01-19T11:30:20.241Z [err] ERR!
2021-01-19T11:30:20.241Z [err] stack Error: not found: make
2021-01-19T11:30:20.241Z [err] gyp
2021-01-19T11:30:20.241Z [err] ERR! stack at getNotFoundError (/usr/lib/node_modules/npm/node_modules/which/which.js:13:12)
2021-01-19T11:30:20.242Z [err] gyp ERR!
2021-01-19T11:30:20.242Z [err] stack at F (/usr/lib/node_modules/npm/node_modules/which/which.js:68:19)
2021-01-19T11:30:20.242Z [err] gyp
2021-01-19T11:30:20.242Z [err] ERR! stack at E (/usr/lib/node_modules/npm/node_modules/which/which.js:80:29)
2021-01-19T11:30:20.242Z [err] gyp
2021-01-19T11:30:20.242Z [err] ERR! stack at /usr/lib/node_modules/npm/node_modules/which/which.js:89:16
2021-01-19T11:30:20.242Z [err] gyp
2021-01-19T11:30:20.242Z [err] ERR! stack at /usr/lib/node_modules/npm/node_modules/isexe/index.js:42:5
2021-01-19T11:30:20.242Z [err] gyp ERR!
2021-01-19T11:30:20.243Z [err] stack at /usr/lib/node_modules/npm/node_modules/isexe/mode.js:8:5
2021-01-19T11:30:20.243Z [err] gyp ERR!
2021-01-19T11:30:20.243Z [err] stack at FSReqCallback.oncomplete (fs.js:168:21)
2021-01-19T11:30:20.244Z [err] gyp
2021-01-19T11:30:20.244Z [err] ERR! System Linux 5.4.79-v8
2021-01-19T11:30:20.244Z [err] gyp ERR! command
2021-01-19T11:30:20.244Z [err] "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--module=/config/node-red/node_modules/@abandonware/bluetooth-hci-socket/lib/binding/bluetooth_hci_socket.node" "--module_name=bluetooth_hci_socket" "--module_path=/config/node-red/node_modules/@abandonware/bluetooth-hci-socket/lib/binding" "--napi_version=6" "--node_abi_napi=napi" "--napi_build_version=0" "--node_napi_label=node-v72"
2021-01-19T11:30:20.244Z [err] gyp ERR!
2021-01-19T11:30:20.244Z [err] cwd /config/node-red/node_modules/@abandonware/bluetooth-hci-socket
2021-01-19T11:30:20.244Z [err] gyp
2021-01-19T11:30:20.245Z [err] ERR! node -v v12.18.4
2021-01-19T11:30:20.245Z [err] gyp ERR! node-gyp -v v5.1.0
2021-01-19T11:30:20.245Z [err] gyp ERR! not ok
2021-01-19T11:30:20.252Z [err] node-pre-gyp
2021-01-19T11:30:20.253Z [err] ERR! build error
2021-01-19T11:30:20.253Z [err]
2021-01-19T11:30:20.255Z [err] node-pre-gyp
2021-01-19T11:30:20.255Z [err] ERR! stack Error: Failed to execute '/usr/bin/node /usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/config/node-red/node_modules/@abandonware/bluetooth-hci-socket/lib/binding/bluetooth_hci_socket.node --module_name=bluetooth_hci_socket --module_path=/config/node-red/node_modules/@abandonware/bluetooth-hci-socket/lib/binding --napi_version=6 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v72' (1)
2021-01-19T11:30:20.255Z [err] node-pre-gyp ERR! stack at ChildProcess. (/config/node-red/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
2021-01-19T11:30:20.255Z [err] node-pre-gyp ERR! stack at ChildProcess.emit (events.js:315:20)
2021-01-19T11:30:20.256Z [err] node-pre-gyp ERR!
2021-01-19T11:30:20.256Z [err] stack at maybeClose (internal/child_process.js:1021:16)
2021-01-19T11:30:20.256Z [err] node-pre-gyp ERR!
2021-01-19T11:30:20.256Z [err] stack at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5)
2021-01-19T11:30:20.257Z [err] node-pre-gyp
2021-01-19T11:30:20.257Z [err] ERR! System Linux 5.4.79-v8
2021-01-19T11:30:20.257Z [err] node-pre-gyp ERR!
2021-01-19T11:30:20.258Z [err] command "/usr/bin/node" "/config/node-red/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
2021-01-19T11:30:20.258Z [err] node-pre-gyp
2021-01-19T11:30:20.258Z [err] ERR! cwd /config/node-red/node_modules/@abandonware/bluetooth-hci-socket
2021-01-19T11:30:20.258Z [err] node-pre-gyp
2021-01-19T11:30:20.258Z [err] ERR! node -v
2021-01-19T11:30:20.259Z [err] v12.18.4
2021-01-19T11:30:20.259Z [err] node-pre-gyp
2021-01-19T11:30:20.259Z [err] ERR! node-pre-gyp -v v0.15.0
2021-01-19T11:30:20.263Z [err] node-pre-gyp ERR! not ok
2021-01-19T11:30:20.264Z [out] Failed to execute '/usr/bin/node /usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/config/node-red/node_modules/@abandonware/bluetooth-hci-socket/lib/binding/bluetooth_hci_socket.node --module_name=bluetooth_hci_socket --module_path=/config/node-red/node_modules/@abandonware/bluetooth-hci-socket/lib/binding --napi_version=6 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v72' (1)
2021-01-19T11:30:20.289Z [out]
2021-01-19T11:30:20.289Z [out] > @abandonware/[email protected] install /config/node-red/node_modules/@abandonware/noble
2021-01-19T11:30:20.289Z [out] > node-gyp rebuild
2021-01-19T11:30:20.289Z [out]
2021-01-19T11:30:22.101Z [err] gyp
2021-01-19T11:30:22.102Z [err]
2021-01-19T11:30:22.102Z [err] ERR! build error
2021-01-19T11:30:22.102Z [err]
2021-01-19T11:30:22.104Z [err] gyp
2021-01-19T11:30:22.104Z [err] ERR!
2021-01-19T11:30:22.104Z [err] stack Error: not found: make
2021-01-19T11:30:22.104Z [err] gyp
2021-01-19T11:30:22.104Z [err] ERR! stack
2021-01-19T11:30:22.104Z [err] at getNotFoundError (/usr/lib/node_modules/npm/node_modules/which/which.js:13:12)
2021-01-19T11:30:22.104Z [err] gyp
2021-01-19T11:30:22.105Z [err] ERR! stack
2021-01-19T11:30:22.105Z [err] at F (/usr/lib/node_modules/npm/node_modules/which/which.js:68:19)
2021-01-19T11:30:22.105Z [err] gyp
2021-01-19T11:30:22.105Z [err] ERR! stack
2021-01-19T11:30:22.105Z [err] at E (/usr/lib/node_modules/npm/node_modules/which/which.js:80:29)
2021-01-19T11:30:22.105Z [err] gyp ERR!
2021-01-19T11:30:22.105Z [err] stack at /usr/lib/node_modules/npm/node_modules/which/which.js:89:16
2021-01-19T11:30:22.105Z [err] gyp
2021-01-19T11:30:22.105Z [err] ERR! stack at /usr/lib/node_modules/npm/node_modules/isexe/index.js:42:5
2021-01-19T11:30:22.106Z [err] gyp ERR!
2021-01-19T11:30:22.106Z [err] stack at /usr/lib/node_modules/npm/node_modules/isexe/mode.js:8:5
2021-01-19T11:30:22.106Z [err] gyp ERR!
2021-01-19T11:30:22.106Z [err] stack at FSReqCallback.oncomplete (fs.js:168:21)
2021-01-19T11:30:22.106Z [err] gyp
2021-01-19T11:30:22.107Z [err] ERR! System Linux 5.4.79-v8
2021-01-19T11:30:22.107Z [err] gyp ERR!
2021-01-19T11:30:22.107Z [err] command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
2021-01-19T11:30:22.107Z [err] gyp
2021-01-19T11:30:22.107Z [err] ERR! cwd /config/node-red/node_modules/@abandonware/noble
2021-01-19T11:30:22.107Z [err] gyp ERR! node -v
2021-01-19T11:30:22.107Z [err] v12.18.4
2021-01-19T11:30:22.107Z [err] gyp ERR!
2021-01-19T11:30:22.108Z [err] node-gyp -v v5.1.0
2021-01-19T11:30:22.108Z [err] gyp
2021-01-19T11:30:22.108Z [err] ERR! not ok
2021-01-19T11:30:23.153Z [err] npm
2021-01-19T11:30:23.153Z [err] WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/usb):
2021-01-19T11:30:23.153Z [err] npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] install: prebuild-install --verbose || node-gyp rebuild
2021-01-19T11:30:23.153Z [err] npm
2021-01-19T11:30:23.153Z [err] WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1
2021-01-19T11:30:23.160Z [err] npm
2021-01-19T11:30:23.161Z [err] WARN optional SKIPPING OPTIONAL DEPENDENCY: @abandonware/[email protected] (node_modules/@abandonware/bluetooth-hci-socket):
2021-01-19T11:30:23.161Z [err] npm WARN
2021-01-19T11:30:23.161Z [err] optional SKIPPING OPTIONAL DEPENDENCY: @abandonware/[email protected] install: node-pre-gyp install --fallback-to-build
2021-01-19T11:30:23.161Z [err] npm WARN
2021-01-19T11:30:23.161Z [err] optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1
2021-01-19T11:30:23.162Z [err]
2021-01-19T11:30:23.187Z [err] npm
2021-01-19T11:30:23.188Z [err] ERR! code ELIFECYCLE
2021-01-19T11:30:23.188Z [err] npm
2021-01-19T11:30:23.188Z [err] ERR! errno 1
2021-01-19T11:30:23.197Z [err] npm
2021-01-19T11:30:23.197Z [err] ERR! @abandonware/[email protected] install: node-gyp rebuild
2021-01-19T11:30:23.197Z [err] npm ERR! Exit status 1
2021-01-19T11:30:23.198Z [err] npm ERR!
2021-01-19T11:30:23.198Z [err] npm
2021-01-19T11:30:23.198Z [err] ERR! Failed at the @abandonware/[email protected] install script.
2021-01-19T11:30:23.198Z [err] npm ERR!
2021-01-19T11:30:23.198Z [err] This is probably not a problem with npm. There is likely additional logging output above.
2021-01-19T11:30:23.237Z [err]
2021-01-19T11:30:23.237Z [err] npm ERR! A complete log of this run can be found in:
2021-01-19T11:30:23.237Z [err] npm ERR! /root/.npm/_logs/2021-01-19T11_30_23_223Z-debug.log
2021-01-19T11:30:23.268Z rc=1
2021-01-19T11:35:53.730Z Install : node-red-contrib-xiaomi-ble 1.3.1
2021-01-19T11:35:53.779Z npm install --no-audit --no-update-notifier --no-fund --save --save-prefix=~ --production [email protected]
2021-01-19T11:36:09.640Z [out]
2021-01-19T11:36:09.640Z [out] > [email protected] install /config/node-red/node_modules/usb
2021-01-19T11:36:09.640Z [out] > prebuild-install --verbose || node-gyp rebuild
2021-01-19T11:36:09.640Z [out]
2021-01-19T11:36:10.330Z [err] prebuild-install
2021-01-19T11:36:10.332Z [err]
2021-01-19T11:36:10.333Z [err] info
2021-01-19T11:36:10.333Z [err]
2021-01-19T11:36:10.334Z [err] begin
2021-01-19T11:36:10.334Z [err] Prebuild-install version 5.3.6
2021-01-19T11:36:10.349Z [err] prebuild-install
2021-01-19T11:36:10.349Z [err]
2021-01-19T11:36:10.350Z [err] info
2021-01-19T11:36:10.350Z [err]
2021-01-19T11:36:10.350Z [err] looking for cached prebuild @
2021-01-19T11:36:10.351Z [err] /root/.npm/_prebuilds/37f3e2-usb-v1.6.3-node-v72-linuxmusl-arm64.tar.gz
2021-01-19T11:36:10.352Z [err] prebuild-install
2021-01-19T11:36:10.353Z [err]
2021-01-19T11:36:10.353Z [err] http
2021-01-19T11:36:10.353Z [err]
2021-01-19T11:36:10.354Z [err] request
2021-01-19T11:36:10.354Z [err] GET https://github.com/tessel/node-usb/releases/download/v1.6.3/usb-v1.6.3-node-v72-linuxmusl-arm64.tar.gz
2021-01-19T11:36:10.859Z [err] prebuild-install
2021-01-19T11:36:10.860Z [err] http 404 https://github.com/tessel/node-usb/releases/download/v1.6.3/usb-v1.6.3-node-v72-linuxmusl-arm64.tar.gz
2021-01-19T11:36:10.874Z [err] prebuild-install
2021-01-19T11:36:10.874Z [err] WARN install No prebuilt binaries found (target=12.18.4 runtime=node arch=arm64 libc=musl platform=linux)
2021-01-19T11:36:12.914Z [err] gyp
2021-01-19T11:36:12.914Z [err]
2021-01-19T11:36:12.915Z [err] ERR! build error
2021-01-19T11:36:12.916Z [err] gyp
2021-01-19T11:36:12.916Z [err] ERR!
2021-01-19T11:36:12.916Z [err] stack Error: not found: make
2021-01-19T11:36:12.916Z [err] gyp
2021-01-19T11:36:12.917Z [err] ERR!
2021-01-19T11:36:12.917Z [err] stack at getNotFoundError (/usr/lib/node_modules/npm/node_modules/which/which.js:13:12)
2021-01-19T11:36:12.917Z [err] gyp
2021-01-19T11:36:12.917Z [err] ERR!
2021-01-19T11:36:12.917Z [err] stack at F (/usr/lib/node_modules/npm/node_modules/which/which.js:68:19)
2021-01-19T11:36:12.917Z [err] gyp ERR! stack
2021-01-19T11:36:12.918Z [err] at E (/usr/lib/node_modules/npm/node_modules/which/which.js:80:29)
2021-01-19T11:36:12.918Z [err] gyp ERR!
2021-01-19T11:36:12.918Z [err] stack at /usr/lib/node_modules/npm/node_modules/which/which.js:89:16
2021-01-19T11:36:12.918Z [err] gyp
2021-01-19T11:36:12.918Z [err] ERR! stack at /usr/lib/node_modules/npm/node_modules/isexe/index.js:42:5
2021-01-19T11:36:12.918Z [err] gyp ERR!
2021-01-19T11:36:12.918Z [err] stack at /usr/lib/node_modules/npm/node_modules/isexe/mode.js:8:5
2021-01-19T11:36:12.918Z [err] gyp
2021-01-19T11:36:12.918Z [err] ERR! stack at FSReqCallback.oncomplete (fs.js:168:21)
2021-01-19T11:36:12.919Z [err] gyp
2021-01-19T11:36:12.919Z [err] ERR! System Linux 5.4.79-v8
2021-01-19T11:36:12.919Z [err] gyp ERR!
2021-01-19T11:36:12.919Z [err] command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
2021-01-19T11:36:12.919Z [err] gyp
2021-01-19T11:36:12.920Z [err] ERR! cwd /config/node-red/node_modules/usb
2021-01-19T11:36:12.920Z [err] gyp ERR! node -v
2021-01-19T11:36:12.920Z [err] v12.18.4
2021-01-19T11:36:12.920Z [err] gyp
2021-01-19T11:36:12.920Z [err] ERR! node-gyp -v v5.1.0
2021-01-19T11:36:12.920Z [err] gyp
2021-01-19T11:36:12.920Z [err] ERR! not ok
2021-01-19T11:36:12.953Z [out]
2021-01-19T11:36:12.953Z [out] > @abandonware/[email protected] install /config/node-red/node_modules/@abandonware/bluetooth-hci-socket
2021-01-19T11:36:12.953Z [out] > node-pre-gyp install --fallback-to-build
2021-01-19T11:36:12.953Z [out]
2021-01-19T11:36:14.001Z [err] node-pre-gyp
2021-01-19T11:36:14.006Z [err]
2021-01-19T11:36:14.006Z [err] WARN
2021-01-19T11:36:14.006Z [err] Using request for node-pre-gyp https download
2021-01-19T11:36:14.484Z [err] node-pre-gyp
2021-01-19T11:36:14.484Z [err]
2021-01-19T11:36:14.484Z [err] WARN Tried to download(404): https://github.com/abandonware/node-bluetooth-hci-socket/releases/download/0.5.3-6/bluetooth_hci_socket-0.5.3-6-node-v72-linux-arm64.tar.gz
2021-01-19T11:36:14.484Z [err]
2021-01-19T11:36:14.485Z [err] node-pre-gyp WARN
2021-01-19T11:36:14.485Z [err] Pre-built binaries not found for @abandonware/[email protected] and [email protected] (node-v72 ABI, musl) (falling back to source compile with node-gyp)
2021-01-19T11:36:17.474Z [err] gyp
2021-01-19T11:36:17.476Z [err]
2021-01-19T11:36:17.477Z [err] ERR!
2021-01-19T11:36:17.477Z [err]
2021-01-19T11:36:17.477Z [err] build error
2021-01-19T11:36:17.477Z [err]
2021-01-19T11:36:17.480Z [err] gyp
2021-01-19T11:36:17.480Z [err]
2021-01-19T11:36:17.481Z [err] ERR!
2021-01-19T11:36:17.481Z [err]
2021-01-19T11:36:17.481Z [err] stack
2021-01-19T11:36:17.481Z [err] Error: not found: make
2021-01-19T11:36:17.482Z [err] gyp
2021-01-19T11:36:17.482Z [err]
2021-01-19T11:36:17.482Z [err] ERR!
2021-01-19T11:36:17.482Z [err]
2021-01-19T11:36:17.483Z [err] stack
2021-01-19T11:36:17.483Z [err] at getNotFoundError (/usr/lib/node_modules/npm/node_modules/which/which.js:13:12)
2021-01-19T11:36:17.483Z [err] gyp
2021-01-19T11:36:17.484Z [err]
2021-01-19T11:36:17.484Z [err] ERR!
2021-01-19T11:36:17.484Z [err] stack at F (/usr/lib/node_modules/npm/node_modules/which/which.js:68:19)
2021-01-19T11:36:17.484Z [err] gyp ERR!
2021-01-19T11:36:17.484Z [err] stack at E (/usr/lib/node_modules/npm/node_modules/which/which.js:80:29)
2021-01-19T11:36:17.484Z [err] gyp
2021-01-19T11:36:17.485Z [err] ERR! stack
2021-01-19T11:36:17.485Z [err] at /usr/lib/node_modules/npm/node_modules/which/which.js:89:16
2021-01-19T11:36:17.485Z [err] gyp ERR!
2021-01-19T11:36:17.485Z [err] stack at /usr/lib/node_modules/npm/node_modules/isexe/index.js:42:5
2021-01-19T11:36:17.485Z [err] gyp
2021-01-19T11:36:17.485Z [err] ERR!
2021-01-19T11:36:17.485Z [err] stack at /usr/lib/node_modules/npm/node_modules/isexe/mode.js:8:5
2021-01-19T11:36:17.485Z [err] gyp ERR!
2021-01-19T11:36:17.485Z [err] stack at FSReqCallback.oncomplete (fs.js:168:21)
2021-01-19T11:36:17.486Z [err] gyp
2021-01-19T11:36:17.486Z [err] ERR! System Linux 5.4.79-v8
2021-01-19T11:36:17.486Z [err] gyp
2021-01-19T11:36:17.486Z [err] ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--module=/config/node-red/node_modules/@abandonware/bluetooth-hci-socket/lib/binding/bluetooth_hci_socket.node" "--module_name=bluetooth_hci_socket" "--module_path=/config/node-red/node_modules/@abandonware/bluetooth-hci-socket/lib/binding" "--napi_version=6" "--node_abi_napi=napi" "--napi_build_version=0" "--node_napi_label=node-v72"
2021-01-19T11:36:17.487Z [err] gyp ERR!
2021-01-19T11:36:17.487Z [err] cwd /config/node-red/node_modules/@abandonware/bluetooth-hci-socket
2021-01-19T11:36:17.487Z [err] gyp
2021-01-19T11:36:17.487Z [err] ERR! node -v
2021-01-19T11:36:17.487Z [err] v12.18.4
2021-01-19T11:36:17.487Z [err] gyp ERR!
2021-01-19T11:36:17.487Z [err] node-gyp -v v5.1.0
2021-01-19T11:36:17.487Z [err] gyp
2021-01-19T11:36:17.487Z [err] ERR! not ok
2021-01-19T11:36:17.496Z [err] node-pre-gyp
2021-01-19T11:36:17.497Z [err] ERR!
2021-01-19T11:36:17.497Z [err] build error
2021-01-19T11:36:17.499Z [err] node-pre-gyp ERR!
2021-01-19T11:36:17.499Z [err] stack Error: Failed to execute '/usr/bin/node /usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/config/node-red/node_modules/@abandonware/bluetooth-hci-socket/lib/binding/bluetooth_hci_socket.node --module_name=bluetooth_hci_socket --module_path=/config/node-red/node_modules/@abandonware/bluetooth-hci-socket/lib/binding --napi_version=6 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v72' (1)
2021-01-19T11:36:17.499Z [err] node-pre-gyp ERR! stack
2021-01-19T11:36:17.499Z [err] at ChildProcess. (/config/node-red/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
2021-01-19T11:36:17.499Z [err] node-pre-gyp ERR! stack
2021-01-19T11:36:17.499Z [err] at ChildProcess.emit (events.js:315:20)
2021-01-19T11:36:17.499Z [err] node-pre-gyp
2021-01-19T11:36:17.500Z [err] ERR! stack at maybeClose (internal/child_process.js:1021:16)
2021-01-19T11:36:17.500Z [err] node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5)
2021-01-19T11:36:17.501Z [err] node-pre-gyp
2021-01-19T11:36:17.501Z [err] ERR! System Linux 5.4.79-v8
2021-01-19T11:36:17.501Z [err] node-pre-gyp ERR!
2021-01-19T11:36:17.501Z [err] command "/usr/bin/node" "/config/node-red/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
2021-01-19T11:36:17.502Z [err] node-pre-gyp ERR! cwd /config/node-red/node_modules/@abandonware/bluetooth-hci-socket
2021-01-19T11:36:17.502Z [err] node-pre-gyp ERR!
2021-01-19T11:36:17.502Z [err] node -v v12.18.4
2021-01-19T11:36:17.502Z [err] node-pre-gyp ERR!
2021-01-19T11:36:17.503Z [err] node-pre-gyp -v v0.15.0
2021-01-19T11:36:17.503Z [err] node-pre-gyp ERR! not ok
2021-01-19T11:36:17.503Z [err]
2021-01-19T11:36:17.504Z [out] Failed to execute '/usr/bin/node /usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/config/node-red/node_modules/@abandonware/bluetooth-hci-socket/lib/binding/bluetooth_hci_socket.node --module_name=bluetooth_hci_socket --module_path=/config/node-red/node_modules/@abandonware/bluetooth-hci-socket/lib/binding --napi_version=6 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v72' (1)
2021-01-19T11:36:17.536Z [out]
2021-01-19T11:36:17.536Z [out] > @abandonware/[email protected] install /config/node-red/node_modules/@abandonware/noble
2021-01-19T11:36:17.536Z [out] > node-gyp rebuild
2021-01-19T11:36:17.536Z [out]
2021-01-19T11:36:19.332Z [err] gyp
2021-01-19T11:36:19.333Z [err]
2021-01-19T11:36:19.333Z [err] ERR! build error
2021-01-19T11:36:19.335Z [err] gyp
2021-01-19T11:36:19.335Z [err] ERR!
2021-01-19T11:36:19.335Z [err] stack Error: not found: make
2021-01-19T11:36:19.335Z [err] gyp ERR!
2021-01-19T11:36:19.335Z [err] stack at getNotFoundError (/usr/lib/node_modules/npm/node_modules/which/which.js:13:12)
2021-01-19T11:36:19.335Z [err] gyp
2021-01-19T11:36:19.335Z [err] ERR!
2021-01-19T11:36:19.336Z [err] stack at F (/usr/lib/node_modules/npm/node_modules/which/which.js:68:19)
2021-01-19T11:36:19.336Z [err] gyp ERR!
2021-01-19T11:36:19.336Z [err] stack at E (/usr/lib/node_modules/npm/node_modules/which/which.js:80:29)
2021-01-19T11:36:19.336Z [err] gyp ERR!
2021-01-19T11:36:19.336Z [err] stack at /usr/lib/node_modules/npm/node_modules/which/which.js:89:16
2021-01-19T11:36:19.336Z [err] gyp
2021-01-19T11:36:19.336Z [err] ERR! stack at /usr/lib/node_modules/npm/node_modules/isexe/index.js:42:5
2021-01-19T11:36:19.336Z [err] gyp ERR!
2021-01-19T11:36:19.337Z [err] stack at /usr/lib/node_modules/npm/node_modules/isexe/mode.js:8:5
2021-01-19T11:36:19.337Z [err] gyp
2021-01-19T11:36:19.337Z [err] ERR! stack at FSReqCallback.oncomplete (fs.js:168:21)
2021-01-19T11:36:19.338Z [err] gyp
2021-01-19T11:36:19.338Z [err] ERR! System Linux 5.4.79-v8
2021-01-19T11:36:19.338Z [err] gyp ERR!
2021-01-19T11:36:19.338Z [err] command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
2021-01-19T11:36:19.338Z [err] gyp
2021-01-19T11:36:19.338Z [err] ERR! cwd /config/node-red/node_modules/@abandonware/noble
2021-01-19T11:36:19.338Z [err] gyp ERR! node -v
2021-01-19T11:36:19.339Z [err] v12.18.4
2021-01-19T11:36:19.339Z [err] gyp
2021-01-19T11:36:19.339Z [err] ERR! node-gyp -v v5.1.0
2021-01-19T11:36:19.339Z [err] gyp ERR! not ok
2021-01-19T11:36:20.298Z [err] npm
2021-01-19T11:36:20.298Z [err] WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/usb):
2021-01-19T11:36:20.298Z [err] npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] install: prebuild-install --verbose || node-gyp rebuild
2021-01-19T11:36:20.298Z [err] npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1
2021-01-19T11:36:20.305Z [err] npm
2021-01-19T11:36:20.305Z [err] WARN optional SKIPPING OPTIONAL DEPENDENCY: @abandonware/[email protected] (node_modules/@abandonware/bluetooth-hci-socket):
2021-01-19T11:36:20.305Z [err] npm WARN
2021-01-19T11:36:20.305Z [err] optional SKIPPING OPTIONAL DEPENDENCY: @abandonware/[email protected] install: node-pre-gyp install --fallback-to-build
2021-01-19T11:36:20.305Z [err] npm
2021-01-19T11:36:20.305Z [err] WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1
2021-01-19T11:36:20.307Z [err]
2021-01-19T11:36:20.331Z [err] npm
2021-01-19T11:36:20.332Z [err] ERR! code ELIFECYCLE
2021-01-19T11:36:20.332Z [err] npm ERR! errno
2021-01-19T11:36:20.332Z [err] 1
2021-01-19T11:36:20.341Z [err] npm
2021-01-19T11:36:20.341Z [err] ERR! @abandonware/[email protected] install: node-gyp rebuild
2021-01-19T11:36:20.341Z [err] npm ERR! Exit status 1
2021-01-19T11:36:20.341Z [err] npm
2021-01-19T11:36:20.341Z [err] ERR!
2021-01-19T11:36:20.341Z [err] npm ERR!
2021-01-19T11:36:20.341Z [err] Failed at the @abandonware/[email protected] install script.
2021-01-19T11:36:20.341Z [err] npm ERR!
2021-01-19T11:36:20.342Z [err] This is probably not a problem with npm. There is likely additional logging output above.
2021-01-19T11:36:20.378Z [err]
2021-01-19T11:36:20.378Z [err] npm ERR! A complete log of this run can be found in:
2021-01-19T11:36:20.378Z [err] npm ERR!
2021-01-19T11:36:20.378Z [err] /root/.npm/_logs/2021-01-19T11_36_20_365Z-debug.log
2021-01-19T11:36:20.406Z rc=1
I see this error in the manage palette view;
Where would there be a log of this error? There is nothing in the node-red log. It does work though.
I am using another Bluetooth node that uses l2ping
I am seeing a lot of these errors in the node-red log
noble warning: unknown handle 11 disconnected!
I managed to install this node dependency using this solution
noble/node-bluetooth-hci-socket#91 (comment)
Thanks for this node! I've tested with both Flora and Temperature devices and it works great.
It would be useful if it was possible to configure the timeout for scanning, and also to be able to pass the address as an input to the node, so it's possible to automate a loop doing scans for different devices.
When i try to retrieve data from the sensor, the first time it fails in about 5 seconds, the "requesting" status on the node has a green dot.
Then, the little bluetooth indicator on the sensor lights up and when trying to get data again, this time the "requesting" pill has a yellow color and it lasts for about 20 seconds, after which the bluetooth indicator on the sensor turns off and the node returns only the battery status, nothing more
Do i need to do something with the sensor? Do I have to connect it in some way to the pi before running the node?
I'm using a Pi 3A+, maybe that's the problem? I also just tried on the Pi 4 B and didn't work.
Hello,
I have node-red 1.1.2 on Raspberry Pi 4B. I used node-red-contrib-xiaomi-ble 1.3.0 and it worked fine till I "apt update && apt upgrade" packeges on my Rasbian. I can see just searching status now, without any information in debug.
From command line of my Raspberry I can see MACs of my devices.
Maybe I need downgrade any packeges? But i dont know which, Or maybe any others ideas?
Hi,
my tempsensors always show 109% of battery which in my eys can't be correct value here, or?
msg : Object object payload: object battery: 109 temperature: 20.9 humidity: 51 address: "a4:c1:xx:xx:xx:xx" _msgid: "ef91c9b2.cf4118"
This is now shown for some month so I even don't see any change in that value.
Can you check if your using the correct hex for the battery value here?
Kind regards
Ocean
Hello, I used 2 old LYWSDCGQ/01ZM sensors with LCD displays. I have a problem after update to 1.3.3 - i recive just a bettery status without temperature and humidity. With 1.3.0 everithing works fine.
http 404 https://github.com/tessel/node-usb/releases/download/v1.6.4/usb-v1.6.4-node-v72-linux-arm64.tar.gz
npm install node-red-contrib-xiaomi-bleill resolveWithNewModule [email protected] checking installable status
[email protected] install /root/.node-red/node_modules/usb
prebuild-install --verbose || node-gyp rebuild
prebuild-install info begin Prebuild-install version 5.3.6
prebuild-install info looking for cached prebuild @ /root/.npm/_prebuilds/b0d04e-usb-v1.6.4-node-v72-linux-arm64.tar.gz
prebuild-install http request GET https://github.com/tessel/node-usb/releases/download/v1.6.4/usb-v1.6.4-node-v72-linux-arm64.tar.gz
prebuild-install http 404 https://github.com/tessel/node-usb/releases/download/v1.6.4/usb-v1.6.4-node-v72-linux-arm64.tar.gz
prebuild-install WARN install No prebuilt binaries found (target=12.20.2 runtime=node arch=arm64 libc= platform=linux)
Traceback (most recent call last):
File "/usr/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py", line 47, in
import gyp
File "/usr/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/init.py", line 10, in
import gyp.input
File "/usr/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/input.py", line 7, in
import ast
ImportError: No module named ast
gyp ERR! configure error
gyp ERR! stack Error: gyp
failed with exit code: 1
gyp ERR! stack at ChildProcess.onCpExit (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:351:16)
gyp ERR! stack at ChildProcess.emit (events.js:314:20)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:276:12)
gyp ERR! System Linux 5.1.0-aml-s905
gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /root/.node-red/node_modules/usb
gyp ERR! node -v v12.20.2
gyp ERR! node-gyp -v v5.1.0
gyp ERR! not ok
If BLE is enabled, will this "just" work?
I have a standard RPi 3B+ running Node-red and today I use a ESP32 BLE device to "snatch" the information from my Xiaomi devices.
So my question, will this run "out of the box"?
The bluetooth library noble has not been updated in a year, has many open issues, and does not work with the latest version of Node LTS, which Node-Red will install by default, (possibly causing this issue? #10)
The fork abandonware/noble is actively maintained, and works with Node 10. It uses a forked version of bluetooth-hci-socket as well, which might fix this issue: #4 .
I think the API is the same, but I don't know JS well enough to check sorry.
Since I'm using an Intel NUC internal bluetooth, I added another bluetooth dongle, Asus BT400, connected with a USB extension cable, because distance is an issue for me. Now, how do I choose which BT device the node calls? I want to force the node to call the BT400 instead of the built in BT.
Is it possible?
There are 2 new versions of a sensor which also works in the Mi Home app and has e-ink:
One is the upgraded LCD version:
https://cleargrass.com/cg_temp_rh_monitor/overview
Manufacturer Name: Qingping Technology (Beijing) Co., Ltd.
Model Number: CGG1
Using the current node does work but only returns battery value.
somebody got it to work with noble: https://github.com/alexvenom/XiaomiCleargrassInkDislpay
Second one is one with a clock:
https://www.aliexpress.com/item/32997941031.html
Did nout found any more info about this one yet.
Can these be supported?
Hi there. I put my Mi Flora sensor in water and the max moist i got was 60, is this ok?
Thanks!
Hi,
thank you for your module.
The Temp./Hum Sensor is working fine, but flower care give me only "no data".
Have of course double checked the address - it is ok.
Any idea - or can I send to you any additional information?
Thanks!
Michael
Recently, I added 4 square temperature and humidity sensors (LYWSD03MMC) to my setup with 2 older round sensors. This works well for a while, but after some time, the LYWSD03MMC nodes go one by one into an error state "Peripheral already connected". In a couple of hours, I loose connection to all square sensors, while the older round sensors continue to work.
Restarting my raspberry pi seems to be the only trick to make them work again. For a short while...
I have used node red managed palette menu to install node-red-contrib-xiaomi-ble but I have an error message that seems to indicate that this file is missing: node-pre-gyp
2020-02-05T22:39:53.564Z [err] WARN Tried to download(404): https://github.com/abandonware/node-bluetooth-hci-socket/releases/download/0.5.3-4/binding-0.5.3-4-node-v72-win32-x64.tar.gz
The complete log file is attached
2020-02-05T22_39_59_037Z-debug.log
any clue on how to fix that?
Please be advised .. this node does not work if you upgrade Node-Red to 0.20.5 which automatically installs node.js 10.15.3, I had to reverted back to Node-Red 0.19.5 & node 8.11.3 to get it to works again.
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.