homebridge-mi-hygrothermograph
homebridge-mi-hygrothermograph copied to clipboard
Missing dependency 404 (nonexistent)
Just in case, want to inform that the dependency https://github.com/abandonware/node-bluetooth-hci-socket/releases/download/0.5.3-8/bluetooth_hci_socket-0.5.3-8-node-v93-linux-x64.tar.gz
is nonexistent
Homebridge Log / Command Output
node-pre-gyp ERR! install response status 404 Not Found on https://github.com/abandonware/node-bluetooth-hci-socket/releases/download/0.5.3-8/bluetooth_hci_socket-0.5.3-8-node-v93-linux-x64.tar.gz
Hmm, looks like a node-gyp error, are you sure that you have run apt-get install build-essential
to get all the needed build-tools?
I would like to see the full logs if possible.
Edit: AFAIK node-bluetooth-hci-socket
does not release prebuilt binaries so you'll need to build it on your machine, that makes me think that the 404 is not the real error but rather missing build tools.
Okay, build-essential
only updates the image:
build-essential is already the newest version (12.8ubuntu1.1).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] y
Setting up linux-image-5.4.0-124-generic (5.4.0-124.140) ...
Processing triggers for linux-image-5.4.0-124-generic (5.4.0-124.140) ...
/etc/kernel/postinst.d/dkms:
* dkms: running auto installation service for kernel 5.4.0-124-generic
...done.
But trying to install node-bluetooth-hci-socket
results in a broaden error.
homebridge@home-server:/var/lib/homebridge $ npm install bluetooth-hci-socket
npm ERR! code 1
npm ERR! path /var/lib/homebridge/node_modules/bluetooth-hci-socket
npm ERR! command failed
npm ERR! command sh -c node-gyp rebuild
npm ERR! make: Entering directory '/var/lib/homebridge/node_modules/bluetooth-hci-socket/build'
npm ERR! CXX(target) Release/obj.target/binding/src/BluetoothHciSocket.o
npm ERR! make: Leaving directory '/var/lib/homebridge/node_modules/bluetooth-hci-socket/build'
npm ERR! ../src/BluetoothHciSocket.cpp: In static member function ‘static void BluetoothHciSocket::Init(Nan::ADDON_REGISTER_FUNCTION_ARGS_TYPE)’:
npm ERR! ../src/BluetoothHciSocket.cpp:128:82: error: no matching function for call to ‘v8::FunctionTemplate::GetFunction()’
npm ERR! 128 | target->Set(Nan::New("BluetoothHciSocket").ToLocalChecked(), tmpl->GetFunction());
npm ERR! | ^
npm ERR! In file included from /home/homebridge/.cache/node-gyp/16.16.0/include/node/node.h:63,
npm ERR! from /home/homebridge/.cache/node-gyp/16.16.0/include/node/node_buffer.h:25,
npm ERR! from ../src/BluetoothHciSocket.cpp:7:
npm ERR! /home/homebridge/.cache/node-gyp/16.16.0/include/node/v8.h:6802:46: note: candidate: ‘v8::MaybeLocal<v8::Function> v8::FunctionTemplate::GetFunction(v8::Local<v8::Context>)’
npm ERR! 6802 | V8_WARN_UNUSED_RESULT MaybeLocal<Function> GetFunction(
npm ERR! | ^~~~~~~~~~~
npm ERR! /home/homebridge/.cache/node-gyp/16.16.0/include/node/v8.h:6802:46: note: candidate expects 1 argument, 0 provided
npm ERR! ../src/BluetoothHciSocket.cpp: In member function ‘void BluetoothHciSocket::poll()’:
npm ERR! ../src/BluetoothHciSocket.cpp:251:95: warning: ‘v8::Local<v8::Value> Nan::MakeCallback(v8::Local<v8::Object>, v8::Local<v8::String>, int, v8::Local<v8::Value>*)’ is deprecated [-Wdeprecated-declarations]
npm ERR! 251 | Nan::MakeCallback(Nan::New<Object>(this->This), Nan::New("emit").ToLocalChecked(), 2, argv);
npm ERR! | ^
npm ERR! In file included from ../src/BluetoothHciSocket.cpp:8:
npm ERR! ../node_modules/nan/nan.h:1051:46: note: declared here
npm ERR! 1051 | NAN_DEPRECATED inline v8::Local<v8::Value> MakeCallback(
npm ERR! | ^~~~~~~~~~~~
npm ERR! ../src/BluetoothHciSocket.cpp:251:95: warning: ‘v8::Local<v8::Value> Nan::MakeCallback(v8::Local<v8::Object>, v8::Local<v8::String>, int, v8::Local<v8::Value>*)’ is deprecated [-Wdeprecated-declarations]
npm ERR! 251 | Nan::MakeCallback(Nan::New<Object>(this->This), Nan::New("emit").ToLocalChecked(), 2, argv);
npm ERR! | ^
npm ERR! In file included from ../src/BluetoothHciSocket.cpp:8:
npm ERR! ../node_modules/nan/nan.h:1051:46: note: declared here
npm ERR! 1051 | NAN_DEPRECATED inline v8::Local<v8::Value> MakeCallback(
npm ERR! | ^~~~~~~~~~~~
npm ERR! ../src/BluetoothHciSocket.cpp: In member function ‘void BluetoothHciSocket::emitErrnoError()’:
npm ERR! ../src/BluetoothHciSocket.cpp:269:109: error: no matching function for call to ‘v8::Object::Get(v8::Local<v8::String>)’
npm ERR! 269 | Local<Function> errorConstructor = Local<Function>::Cast(globalObj->Get(Nan::New("Error").ToLocalChecked()));
npm ERR! | ^
npm ERR! In file included from /home/homebridge/.cache/node-gyp/16.16.0/include/node/node.h:63,
npm ERR! from /home/homebridge/.cache/node-gyp/16.16.0/include/node/node_buffer.h:25,
npm ERR! from ../src/BluetoothHciSocket.cpp:7:
npm ERR! /home/homebridge/.cache/node-gyp/16.16.0/include/node/v8.h:4007:43: note: candidate: ‘v8::MaybeLocal<v8::Value> v8::Object::Get(v8::Local<v8::Context>, v8::Local<v8::Value>)’
npm ERR! 4007 | V8_WARN_UNUSED_RESULT MaybeLocal<Value> Get(Local<Context> context,
npm ERR! | ^~~
npm ERR! /home/homebridge/.cache/node-gyp/16.16.0/include/node/v8.h:4007:43: note: candidate expects 2 arguments, 1 provided
npm ERR! /home/homebridge/.cache/node-gyp/16.16.0/include/node/v8.h:4010:43: note: candidate: ‘v8::MaybeLocal<v8::Value> v8::Object::Get(v8::Local<v8::Context>, uint32_t)’
npm ERR! 4010 | V8_WARN_UNUSED_RESULT MaybeLocal<Value> Get(Local<Context> context,
npm ERR! | ^~~
npm ERR! /home/homebridge/.cache/node-gyp/16.16.0/include/node/v8.h:4010:43: note: candidate expects 2 arguments, 1 provided
npm ERR! ../src/BluetoothHciSocket.cpp:275:72: error: no matching function for call to ‘v8::Function::NewInstance(int, v8::Local<v8::Value> [1])’
npm ERR! 275 | Local<Value> error = errorConstructor->NewInstance(1, constructorArgs);
npm ERR! | ^
npm ERR! In file included from /home/homebridge/.cache/node-gyp/16.16.0/include/node/node.h:63,
npm ERR! from /home/homebridge/.cache/node-gyp/16.16.0/include/node/node_buffer.h:25,
npm ERR! from ../src/BluetoothHciSocket.cpp:7:
npm ERR! /home/homebridge/.cache/node-gyp/16.16.0/include/node/v8.h:4759:44: note: candidate: ‘v8::MaybeLocal<v8::Object> v8::Function::NewInstance(v8::Local<v8::Context>, int, v8::Local<v8::Value>*) const’
npm ERR! 4759 | V8_WARN_UNUSED_RESULT MaybeLocal<Object> NewInstance(
npm ERR! | ^~~~~~~~~~~
npm ERR! /home/homebridge/.cache/node-gyp/16.16.0/include/node/v8.h:4759:44: note: candidate expects 3 arguments, 2 provided
npm ERR! /home/homebridge/.cache/node-gyp/16.16.0/include/node/v8.h:4762:44: note: candidate: ‘v8::MaybeLocal<v8::Object> v8::Function::NewInstance(v8::Local<v8::Context>) const’
npm ERR! 4762 | V8_WARN_UNUSED_RESULT MaybeLocal<Object> NewInstance(
npm ERR! | ^~~~~~~~~~~
npm ERR! /home/homebridge/.cache/node-gyp/16.16.0/include/node/v8.h:4762:44: note: candidate expects 1 argument, 2 provided
npm ERR! ../src/BluetoothHciSocket.cpp:282:93: warning: ‘v8::Local<v8::Value> Nan::MakeCallback(v8::Local<v8::Object>, v8::Local<v8::String>, int, v8::Local<v8::Value>*)’ is deprecated [-Wdeprecated-declarations]
npm ERR! 282 | Nan::MakeCallback(Nan::New<Object>(this->This), Nan::New("emit").ToLocalChecked(), 2, argv);
npm ERR! | ^
npm ERR! In file included from ../src/BluetoothHciSocket.cpp:8:
npm ERR! ../node_modules/nan/nan.h:1051:46: note: declared here
npm ERR! 1051 | NAN_DEPRECATED inline v8::Local<v8::Value> MakeCallback(
npm ERR! | ^~~~~~~~~~~~
npm ERR! ../src/BluetoothHciSocket.cpp:282:93: warning: ‘v8::Local<v8::Value> Nan::MakeCallback(v8::Local<v8::Object>, v8::Local<v8::String>, int, v8::Local<v8::Value>*)’ is deprecated [-Wdeprecated-declarations]
npm ERR! 282 | Nan::MakeCallback(Nan::New<Object>(this->This), Nan::New("emit").ToLocalChecked(), 2, argv);
npm ERR! | ^
npm ERR! In file included from ../src/BluetoothHciSocket.cpp:8:
npm ERR! ../node_modules/nan/nan.h:1051:46: note: declared here
npm ERR! 1051 | NAN_DEPRECATED inline v8::Local<v8::Value> MakeCallback(
npm ERR! | ^~~~~~~~~~~~
npm ERR! ../src/BluetoothHciSocket.cpp: In static member function ‘static Nan::NAN_METHOD_RETURN_TYPE BluetoothHciSocket::BindRaw(Nan::NAN_METHOD_ARGS_TYPE)’:
npm ERR! ../src/BluetoothHciSocket.cpp:395:34: error: no matching function for call to ‘v8::Value::IntegerValue()’
npm ERR! 395 | devId = arg0->IntegerValue();
npm ERR! | ^
npm ERR! In file included from /home/homebridge/.cache/node-gyp/16.16.0/include/node/node.h:63,
npm ERR! from /home/homebridge/.cache/node-gyp/16.16.0/include/node/node_buffer.h:25,
npm ERR! from ../src/BluetoothHciSocket.cpp:7:
npm ERR! /home/homebridge/.cache/node-gyp/16.16.0/include/node/v8.h:3101:40: note: candidate: ‘v8::Maybe<long int> v8::Value::IntegerValue(v8::Local<v8::Context>) const’
npm ERR! 3101 | V8_WARN_UNUSED_RESULT Maybe<int64_t> IntegerValue(
npm ERR! | ^~~~~~~~~~~~
npm ERR! /home/homebridge/.cache/node-gyp/16.16.0/include/node/v8.h:3101:40: note: candidate expects 1 argument, 0 provided
npm ERR! ../src/BluetoothHciSocket.cpp: In static member function ‘static Nan::NAN_METHOD_RETURN_TYPE BluetoothHciSocket::BindUser(Nan::NAN_METHOD_ARGS_TYPE)’:
npm ERR! ../src/BluetoothHciSocket.cpp:417:34: error: no matching function for call to ‘v8::Value::IntegerValue()’
npm ERR! 417 | devId = arg0->IntegerValue();
npm ERR! | ^
npm ERR! In file included from /home/homebridge/.cache/node-gyp/16.16.0/include/node/node.h:63,
npm ERR! from /home/homebridge/.cache/node-gyp/16.16.0/include/node/node_buffer.h:25,
npm ERR! from ../src/BluetoothHciSocket.cpp:7:
npm ERR! /home/homebridge/.cache/node-gyp/16.16.0/include/node/v8.h:3101:40: note: candidate: ‘v8::Maybe<long int> v8::Value::IntegerValue(v8::Local<v8::Context>) const’
npm ERR! 3101 | V8_WARN_UNUSED_RESULT Maybe<int64_t> IntegerValue(
npm ERR! | ^~~~~~~~~~~~
npm ERR! /home/homebridge/.cache/node-gyp/16.16.0/include/node/v8.h:3101:40: note: candidate expects 1 argument, 0 provided
npm ERR! In file included from /home/homebridge/.cache/node-gyp/16.16.0/include/node/node_buffer.h:25,
npm ERR! from ../src/BluetoothHciSocket.cpp:7:
npm ERR! ../src/BluetoothHciSocket.cpp: At global scope:
npm ERR! /home/homebridge/.cache/node-gyp/16.16.0/include/node/node.h:847:43: warning: cast between incompatible function types from ‘void (*)(Nan::ADDON_REGISTER_FUNCTION_ARGS_TYPE)’ {aka ‘void (*)(v8::Local<v8::Object>)’} to ‘node::addon_register_func’ {aka ‘void (*)(v8::Local<v8::Object>, v8::Local<v8::Value>, void*)’} [-Wcast-function-type]
npm ERR! 847 | (node::addon_register_func) (regfunc), \
npm ERR! | ^
npm ERR! /home/homebridge/.cache/node-gyp/16.16.0/include/node/node.h:881:3: note: in expansion of macro ‘NODE_MODULE_X’
npm ERR! 881 | NODE_MODULE_X(modname, regfunc, NULL, 0) // NOLINT (readability/null_usage)
npm ERR! | ^~~~~~~~~~~~~
npm ERR! ../src/BluetoothHciSocket.cpp:499:1: note: in expansion of macro ‘NODE_MODULE’
npm ERR! 499 | NODE_MODULE(binding, BluetoothHciSocket::Init);
npm ERR! | ^~~~~~~~~~~
npm ERR! make: *** [binding.target.mk:113: Release/obj.target/binding/src/BluetoothHciSocket.o] Error 1
npm ERR! gyp ERR! build error
npm ERR! gyp ERR! stack Error: `make` failed with exit code: 2
npm ERR! gyp ERR! stack at ChildProcess.onExit (/opt/homebridge/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23)
npm ERR! gyp ERR! stack at ChildProcess.emit (node:events:527:28)
npm ERR! gyp ERR! stack at Process.ChildProcess._handle.onexit (node:internal/child_process:291:12)
npm ERR! gyp ERR! System Linux 5.4.0-122-generic
npm ERR! gyp ERR! command "/opt/homebridge/bin/node" "/opt/homebridge/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
npm ERR! gyp ERR! cwd /var/lib/homebridge/node_modules/bluetooth-hci-socket
npm ERR! gyp ERR! node -v v16.16.0
npm ERR! gyp ERR! node-gyp -v v9.0.0
npm ERR! gyp ERR! not ok```
Succeeded in exact version install npm install @abandonware/[email protected]
, but this has not changed much for homebridge-mi-hygrothermograph
for some reason, package-lock points to this tgz file, which doesn't exist https://github.com/hannseman/homebridge-mi-hygrothermograph/blob/23dc5738718db78bc40ca9682f150926cf8b1cd4/package-lock.json#L4764
Same here.
Any solution?
same
after updating homebridge UI that required NodeJS to bump up - everything went bananas (( (
I encountered this 404 error today when upgrading node, but was able to resolve it manually installing:
npm install @abandonware/bluetooth-hci-socket
I encountered this 404 error today when upgrading node, but was able to resolve it manually installing:
npm install @abandonware/bluetooth-hci-socket
That seems to work. I encountered that the plugin didn't load today after the Node update, and that allowed it to rebuild using the newer version.
@the-man-machine do you use Node >=18? Im stuck on Node 16.20.2 because of this issue. Tried lots of things but nothing helped.
@mkarras yes, I am currently on v20.9.0 and temperature and humidity are reading correctly.
@the-man-machine on witch device you are running Homebridge? I'm using a raspberry pi.
@mkarras generic x86_64 box with a bluetooth dongle, Homebridge itself is running in Docker.
I'm experiencing the same problem on my Raspberry Pi Model B Rev 2.
The issue appears to originate from this repository: https://github.com/abandonware/node-bluetooth-hci-socket/. It seems likely to be fixed soon, as there's a pending pull request: https://github.com/abandonware/node-bluetooth-hci-socket/pull/55.
Let's wait a few days for the new version of node-bluetooth-hci-socket.
Or has anyone found a workaround?
Seems the error is still the same after I install the plugin.
Error while installing:
Error after homebridge restart (because it was not installed with the plugin because of the error before):
The URL which is trying to access is nonexistent when i copy it ( https://github.com/abandonware/node-bluetooth-hci-socket/releases/download/0.5.3-10/bluetooth_hci_socket-0.5.3-10-node-v115-linux-arm.tar.gz ) so it seems to be missing for the plugin in homebridge. I cant figure out from where is this link called or build from, but i think if we could just replace it by working one, it would be fine.
Maybe the link should be taken from here? https://github.com/abandonware/node-bluetooth-hci-socket/tags
It should propably call the newest version which is: https://github.com/abandonware/node-bluetooth-hci-socket/archive/refs/tags/v0.5.3-11.tar.gz
Not sure, if its the right solution.
EDIT: Could it be worth trying to change this URL in here? From newer version in here? https://www.npmjs.com/package/@abandonware/bluetooth-hci-socket?activeTab=versions
@EnTonyH I just published 3.4.1 on npm with the fix from https://github.com/abandonware/node-bluetooth-hci-socket/pull/55 included. Please give it a try and let me know if it helps.
@hannseman I just tried it. It seems there might be a deeper problem. I would recommend rolling back to the previous version, 3.4.0, to prevent people from ending up with a failed installation.
Error with terminated installation:
Log: 2024-02-13T21_48_50_099Z-debug-0.log
I will try to look into it over the weekend.
@EnTonyH It installs fine for me, took around 1 minute to complete on a RPI4 4GB RAM. By looking at your logs it appears to have been trying to install for over 20 minutes?
npm Completed in 1273410ms
What hardware are you trying to install on? Can you try and install it manually into a temporary folder and see what happens?
npm install homebridge-mi-hygrothermograph
TLDR: I figured out a solution. Run the plugin installation as the pi
user, preferably via SSH.
At first, i tried running it from restricted shell in homebridge terminal and got this error after installing it:
I did a fresh install. Raspberry Pi 1 Model B Rev (old and slow) 32 GB SD card U1 Installed Homebridge image 32-bit
IMPORTANT STEPS BELOW
-
Logged via terminal to ssh as a pi user.
ssh [email protected]
-
Updated raspbian (propably not necessary):
sudo apt-get update && sudo apt-get upgrade -y
-
Installed npm to run it globally as a pi user (not from homebridge website terminal!):
sudo apt install npm
-
Run 2 commands to install plugin in the right folder:
pi@homebridge: $ cd /var/lib/homebridge/node_modules
pi@homebridge:/var/lib/homebridge/node_modules $ npm install homebridge-mi-hygrothermograph
Now this seemed successful:
-
Check homebridge - the plugin shows up.
-
Restarted homebridge.
Plugin loaded successfully:
So far so good, no error :-)