homebridge-switchbot
homebridge-switchbot copied to clipboard
Bug: Installing version 2.12.0 404 error on abandonware...
Describe the Bug
Getting the following error during install:
@abandonware/[email protected] install node-pre-gyp install --fallback-to-build --update-binary
node-pre-gyp ERR! install response status 404 Not Found on 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 make: Entering directory '/var/lib/homebridge/node_modules/@switchbot/homebridge-switchbot/node_modules/@abandonware/bluetooth-hci-socket/build'
To Reproduce
Update
Expected Behavior
no error
Relevant Log 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-10/bluetooth_hci_socket-0.5.3-10-node-v115-linux-arm.tar.gz
make: Entering directory '/var/lib/homebridge/node_modules/@switchbot/homebridge-switchbot/node_modules/@abandonware/bluetooth-hci-socket/build'
Config for homebridge-switchbot
na
Screenshots
No response
Device and Model
Raspberry Pi 4
Node.js Version
20.9.0
NPM Version
10.1.0
Homebridge Version
1.7.0
Homebridge Switchbot Plugin Version
2.12
Homebridge Config UI X Plugin Version
4.52.3
Operating System
Raspbian
I think the url needs to be updated to: https://github.com/abandonware/node-bluetooth-hci-socket/archive/refs/tags/v0.5.3-10.tar.gz
I'm also hitting this.
will be resolved in next release.
Same issue here. I get errors on node-switchbot:[Object object] It can not establish the ble connection
Hey! Adding my two cents here: still an issue with v2.12.1 from a few hours ago.
Getting the following errors now with v.2.12.1
Running post-install scripts...
> @abandonware/[email protected] install
> node-pre-gyp install --fallback-to-build --update-binary
node-pre-gyp ERR! install response status 404 Not Found on 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
make: Entering directory '/var/lib/homebridge/node_modules/@switchbot/homebridge-switchbot/node_modules/@abandonware/bluetooth-hci-socket/build'
CXX(target) Release/obj.target/bluetooth_hci_socket/src/BluetoothHciSocket.o
In file included from ../src/BluetoothHciSocket.cpp:8:
../../../nan/nan.h: In function 'bool Nan::IdleNotification(int)':
../../../nan/nan.h:689:32: warning: 'bool v8::Isolate::IdleNotificationDeadline(double)' is deprecated: Use MemoryPressureNotification() to influence the GC schedule. [-Wdeprecated-declarations]
689 | idle_time_in_ms * 0.001);
| ^
In file included from /home/pi/.cache/node-gyp/20.10.0/include/node/v8-initialization.h:13,
from /home/pi/.cache/node-gyp/20.10.0/include/node/v8.h:34,
from /home/pi/.cache/node-gyp/20.10.0/include/node/node.h:73,
from /home/pi/.cache/node-gyp/20.10.0/include/node/node_buffer.h:25,
from ../src/BluetoothHciSocket.cpp:7:
/home/pi/.cache/node-gyp/20.10.0/include/node/v8-isolate.h:1293:8: note: declared here
1293 | bool IdleNotificationDeadline(double deadline_in_seconds);
| ^~~~~~~~~~~~~~~~~~~~~~~~
In file included from /home/pi/.cache/node-gyp/20.10.0/include/node/node_buffer.h:25,
from ../src/BluetoothHciSocket.cpp:7:
../src/BluetoothHciSocket.cpp: At global scope:
/home/pi/.cache/node-gyp/20.10.0/include/node/node.h:1172:7: 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]
1172 | (node::addon_register_func) (regfunc), \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/pi/.cache/node-gyp/20.10.0/include/node/node.h:1206:3: note: in expansion of macro 'NODE_MODULE_X'
1206 | NODE_MODULE_X(modname, regfunc, NULL, 0) // NOLINT (readability/null_usage)
| ^~~~~~~~~~~~~
../src/BluetoothHciSocket.cpp:740:1: note: in expansion of macro 'NODE_MODULE'
740 | NODE_MODULE(binding, BluetoothHciSocket::Init);
| ^~~~~~~~~~~
SOLINK_MODULE(target) Release/obj.target/bluetooth_hci_socket.node
COPY Release/bluetooth_hci_socket.node
COPY /var/lib/homebridge/node_modules/@switchbot/homebridge-switchbot/node_modules/@abandonware/bluetooth-hci-socket/lib/binding/bluetooth_hci_socket.node
TOUCH Release/obj.target/action_after_build.stamp
make: Leaving directory '/var/lib/homebridge/node_modules/@switchbot/homebridge-switchbot/node_modules/@abandonware/bluetooth-hci-socket/build'
> @abandonware/[email protected] install
> node-gyp-build
make: Entering directory '/var/lib/homebridge/node_modules/@switchbot/homebridge-switchbot/node_modules/@abandonware/noble/build'
SOLINK_MODULE(target) Release/obj.target/noble.node
COPY Release/noble.node
make: Leaving directory '/var/lib/homebridge/node_modules/@switchbot/homebridge-switchbot/node_modules/@abandonware/noble/build'
> [email protected] install
> node-gyp-build
make: Entering directory '/var/lib/homebridge/node_modules/@switchbot/homebridge-switchbot/node_modules/usb/build'
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
rm -f Release/obj.target/usb.a Release/obj.target/usb.a.ar-file-list; mkdir -p `dirname Release/obj.target/usb.a`
ar crs Release/obj.target/usb.a @Release/obj.target/usb.a.ar-file-list
COPY Release/usb.a
CXX(target) Release/obj.target/usb_bindings/src/node_usb.o
In file included from /home/pi/.cache/node-gyp/20.10.0/include/node/v8-object.h:9,
from /home/pi/.cache/node-gyp/20.10.0/include/node/v8-array-buffer.h:13,
from /home/pi/.cache/node-gyp/20.10.0/include/node/v8.h:24,
from /home/pi/.cache/node-gyp/20.10.0/include/node/node.h:73,
from /home/pi/.cache/node-gyp/20.10.0/include/node/node_buffer.h:25,
from ../src/node_usb.h:14,
from ../src/node_usb.cc:1:
/home/pi/.cache/node-gyp/20.10.0/include/node/v8-maybe.h:106:45: error: 'is_lvalue_reference_v' is not a member of 'std'; did you mean 'is_lvalue_reference'?
106 | template <class U, std::enable_if_t<!std::is_lvalue_reference_v<U>>*>
| ^~~~~~~~~~~~~~~~~~~~~
| is_lvalue_reference
/home/pi/.cache/node-gyp/20.10.0/include/node/v8-maybe.h:106:66: warning: logical not is only applied to the left hand side of comparison [-Wlogical-not-parentheses]
106 | template <class U, std::enable_if_t<!std::is_lvalue_reference_v<U>>*>
| ^
/home/pi/.cache/node-gyp/20.10.0/include/node/v8-maybe.h:106:67: error: template argument 1 is invalid
106 | template <class U, std::enable_if_t<!std::is_lvalue_reference_v<U>>*>
| ^
/home/pi/.cache/node-gyp/20.10.0/include/node/v8-maybe.h:106:71: error: expected unqualified-id before '>' token
106 | template <class U, std::enable_if_t<!std::is_lvalue_reference_v<U>>*>
| ^
/home/pi/.cache/node-gyp/20.10.0/include/node/v8-maybe.h:123:43: error: 'is_lvalue_reference_v' is not a member of 'std'; did you mean 'is_lvalue_reference'?
123 | template <class T, std::enable_if_t<!std::is_lvalue_reference_v<T>>* = nullptr>
| ^~~~~~~~~~~~~~~~~~~~~
| is_lvalue_reference
/home/pi/.cache/node-gyp/20.10.0/include/node/v8-maybe.h:123:64: warning: logical not is only applied to the left hand side of comparison [-Wlogical-not-parentheses]
123 | template <class T, std::enable_if_t<!std::is_lvalue_reference_v<T>>* = nullptr>
| ^
/home/pi/.cache/node-gyp/20.10.0/include/node/v8-maybe.h:123:65: error: template argument 1 is invalid
123 | template <class T, std::enable_if_t<!std::is_lvalue_reference_v<T>>* = nullptr>
| ^
/home/pi/.cache/node-gyp/20.10.0/include/node/v8-maybe.h:123:70: error: expected unqualified-id before '=' token
123 | emplate <class T, std::enable_if_t<!std::is_lvalue_reference_v<T>>* = nullptr>
| ^
In file included from /home/pi/.cache/node-gyp/20.10.0/include/node/node_buffer.h:25,
from ../src/node_usb.h:14,
from ../src/node_usb.cc:1:
/home/pi/.cache/node-gyp/20.10.0/include/node/node.h:711:28: error: 'std::string_view' has not been declared
711 | Environment* env, std::string_view main_script_source_utf8);
| ^~~~~~~~~~~
../src/node_usb.cc: In function 'Napi::Value SetDebugLevel(const Napi::CallbackInfo&)':
../src/node_usb.cc:118:71: warning: 'void libusb_set_debug(libusb_context*, int)' is deprecated: Use libusb_set_option instead [-Wdeprecated-declarations]
118 | libusb_set_debug(usb_context, info[0].As<Napi::Number>().Int32Value());
| ^
In file included from ../src/node_usb.h:11,
from ../src/node_usb.cc:1:
../libusb/libusb/libusb.h:1325:18: note: declared here
1325 | void LIBUSB_CALL libusb_set_debug(libusb_context *ctx, int level);
| ^~~~~~~~~~~~~~~~
make: *** [usb_bindings.target.mk:122: Release/obj.target/usb_bindings/src/node_usb.o] Error 1
make: Leaving directory '/var/lib/homebridge/node_modules/@switchbot/homebridge-switchbot/node_modules/usb/build'
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.<anonymous> (/opt/homebridge/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:209:23)
gyp ERR! System Linux 6.1.21-v8+
gyp ERR! command "/opt/homebridge/bin/node" "/opt/homebridge/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /var/lib/homebridge/node_modules/@switchbot/homebridge-switchbot/node_modules/usb
gyp ERR! node -v v20.10.0
gyp ERR! node-gyp -v v10.0.1
gyp ERR! not ok
npm ERR! code 1
npm ERR! path /var/lib/homebridge/node_modules/@switchbot/homebridge-switchbot/node_modules/usb
npm ERR! command failed
npm ERR! command sh -c node-gyp-build
npm ERR! A complete log of this run can be found in: /home/pi/.npm/_logs/2023-11-27T16_02_24_841Z-debug-0.log
Failed to rebuild.
Restoring previous version...
Restore Complete. Installation failed.
Bundled install / update could not complete. Trying regular install / update using npm.
USER: pi
DIR: /var/lib/homebridge
CMD: npm install --save @switchbot/[email protected]
Hello! I'm still having the same issue as of v2.13.0
Still having the issue with 2.13.1:
Running post-install scripts...
> @abandonware/[email protected] install
> node-pre-gyp install --fallback-to-build --update-binary
node-pre-gyp ERR! install response status 404 Not Found on 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
make: Entering directory '/var/lib/homebridge/node_modules/@switchbot/homebridge-switchbot/node_modules/@abandonware/bluetooth-hci-socket/build'
CXX(target) Release/obj.target/bluetooth_hci_socket/src/BluetoothHciSocket.o
In file included from ../src/BluetoothHciSocket.cpp:8:
../../../nan/nan.h: In function 'bool Nan::IdleNotification(int)':
../../../nan/nan.h:689:32: warning: 'bool v8::Isolate::IdleNotificationDeadline(double)' is deprecated: Use MemoryPressureNotification() to influence the GC schedule. [-Wdeprecated-declarations]
689 | idle_time_in_ms * 0.001);
| ^
In file included from /home/pi/.cache/node-gyp/20.10.0/include/node/v8-initialization.h:13,
from /home/pi/.cache/node-gyp/20.10.0/include/node/v8.h:34,
from /home/pi/.cache/node-gyp/20.10.0/include/node/node.h:73,
from /home/pi/.cache/node-gyp/20.10.0/include/node/node_buffer.h:25,
from ../src/BluetoothHciSocket.cpp:7:
/home/pi/.cache/node-gyp/20.10.0/include/node/v8-isolate.h:1293:8: note: declared here
1293 | bool IdleNotificationDeadline(double deadline_in_seconds);
| ^~~~~~~~~~~~~~~~~~~~~~~~
In file included from /home/pi/.cache/node-gyp/20.10.0/include/node/node_buffer.h:25,
from ../src/BluetoothHciSocket.cpp:7:
../src/BluetoothHciSocket.cpp: At global scope:
/home/pi/.cache/node-gyp/20.10.0/include/node/node.h:1172:7: 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]
1172 | (node::addon_register_func) (regfunc), \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/pi/.cache/node-gyp/20.10.0/include/node/node.h:1206:3: note: in expansion of macro 'NODE_MODULE_X'
1206 | NODE_MODULE_X(modname, regfunc, NULL, 0) // NOLINT (readability/null_usage)
| ^~~~~~~~~~~~~
../src/BluetoothHciSocket.cpp:740:1: note: in expansion of macro 'NODE_MODULE'
740 | NODE_MODULE(binding, BluetoothHciSocket::Init);
| ^~~~~~~~~~~
SOLINK_MODULE(target) Release/obj.target/bluetooth_hci_socket.node
COPY Release/bluetooth_hci_socket.node
COPY /var/lib/homebridge/node_modules/@switchbot/homebridge-switchbot/node_modules/@abandonware/bluetooth-hci-socket/lib/binding/bluetooth_hci_socket.node
TOUCH Release/obj.target/action_after_build.stamp
make: Leaving directory '/var/lib/homebridge/node_modules/@switchbot/homebridge-switchbot/node_modules/@abandonware/bluetooth-hci-socket/build'
> @abandonware/[email protected] install
> node-gyp-build
make: Entering directory '/var/lib/homebridge/node_modules/@switchbot/homebridge-switchbot/node_modules/@abandonware/noble/build'
SOLINK_MODULE(target) Release/obj.target/noble.node
COPY Release/noble.node
make: Leaving directory '/var/lib/homebridge/node_modules/@switchbot/homebridge-switchbot/node_modules/@abandonware/noble/build'
> [email protected] install
> node-gyp-build
make: Entering directory '/var/lib/homebridge/node_modules/@switchbot/homebridge-switchbot/node_modules/usb/build'
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
rm -f Release/obj.target/usb.a Release/obj.target/usb.a.ar-file-list; mkdir -p `dirname Release/obj.target/usb.a`
ar crs Release/obj.target/usb.a @Release/obj.target/usb.a.ar-file-list
COPY Release/usb.a
CXX(target) Release/obj.target/usb_bindings/src/node_usb.o
In file included from /home/pi/.cache/node-gyp/20.10.0/include/node/v8-object.h:9,
from /home/pi/.cache/node-gyp/20.10.0/include/node/v8-array-buffer.h:13,
from /home/pi/.cache/node-gyp/20.10.0/include/node/v8.h:24,
from /home/pi/.cache/node-gyp/20.10.0/include/node/node.h:73,
from /home/pi/.cache/node-gyp/20.10.0/include/node/node_buffer.h:25,
from ../src/node_usb.h:14,
from ../src/node_usb.cc:1:
/home/pi/.cache/node-gyp/20.10.0/include/node/v8-maybe.h:106:45: error: 'is_lvalue_reference_v' is not a member of 'std'; did you mean 'is_lvalue_reference'?
106 | template <class U, std::enable_if_t<!std::is_lvalue_reference_v<U>>*>
| ^~~~~~~~~~~~~~~~~~~~~
| is_lvalue_reference
/home/pi/.cache/node-gyp/20.10.0/include/node/v8-maybe.h:106:66: warning: logical not is only applied to the left hand side of comparison [-Wlogical-not-parentheses]
106 | template <class U, std::enable_if_t<!std::is_lvalue_reference_v<U>>*>
| ^
/home/pi/.cache/node-gyp/20.10.0/include/node/v8-maybe.h:106:67: error: template argument 1 is invalid
106 | template <class U, std::enable_if_t<!std::is_lvalue_reference_v<U>>*>
| ^
/home/pi/.cache/node-gyp/20.10.0/include/node/v8-maybe.h:106:71: error: expected unqualified-id before '>' token
106 | template <class U, std::enable_if_t<!std::is_lvalue_reference_v<U>>*>
| ^
/home/pi/.cache/node-gyp/20.10.0/include/node/v8-maybe.h:123:43: error: 'is_lvalue_reference_v' is not a member of 'std'; did you mean 'is_lvalue_reference'?
123 | template <class T, std::enable_if_t<!std::is_lvalue_reference_v<T>>* = nullptr>
| ^~~~~~~~~~~~~~~~~~~~~
| is_lvalue_reference
/home/pi/.cache/node-gyp/20.10.0/include/node/v8-maybe.h:123:64: warning: logical not is only applied to the left hand side of comparison [-Wlogical-not-parentheses]
123 | template <class T, std::enable_if_t<!std::is_lvalue_reference_v<T>>* = nullptr>
| ^
/home/pi/.cache/node-gyp/20.10.0/include/node/v8-maybe.h:123:65: error: template argument 1 is invalid
123 | template <class T, std::enable_if_t<!std::is_lvalue_reference_v<T>>* = nullptr>
| ^
/home/pi/.cache/node-gyp/20.10.0/include/node/v8-maybe.h:123:70: error: expected unqualified-id before '=' token
123 | emplate <class T, std::enable_if_t<!std::is_lvalue_reference_v<T>>* = nullptr>
| ^
In file included from /home/pi/.cache/node-gyp/20.10.0/include/node/node_buffer.h:25,
from ../src/node_usb.h:14,
from ../src/node_usb.cc:1:
/home/pi/.cache/node-gyp/20.10.0/include/node/node.h:711:28: error: 'std::string_view' has not been declared
711 | Environment* env, std::string_view main_script_source_utf8);
| ^~~~~~~~~~~
../src/node_usb.cc: In function 'Napi::Value SetDebugLevel(const Napi::CallbackInfo&)':
../src/node_usb.cc:118:71: warning: 'void libusb_set_debug(libusb_context*, int)' is deprecated: Use libusb_set_option instead [-Wdeprecated-declarations]
118 | libusb_set_debug(usb_context, info[0].As<Napi::Number>().Int32Value());
| ^
In file included from ../src/node_usb.h:11,
from ../src/node_usb.cc:1:
../libusb/libusb/libusb.h:1325:18: note: declared here
1325 | void LIBUSB_CALL libusb_set_debug(libusb_context *ctx, int level);
| ^~~~~~~~~~~~~~~~
make: *** [usb_bindings.target.mk:122: Release/obj.target/usb_bindings/src/node_usb.o] Error 1
make: Leaving directory '/var/lib/homebridge/node_modules/@switchbot/homebridge-switchbot/node_modules/usb/build'
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.<anonymous> (/opt/homebridge/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:209:23)
gyp ERR! System Linux 6.1.21-v8+
gyp ERR! command "/opt/homebridge/bin/node" "/opt/homebridge/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /var/lib/homebridge/node_modules/@switchbot/homebridge-switchbot/node_modules/usb
gyp ERR! node -v v20.10.0
gyp ERR! node-gyp -v v10.0.1
gyp ERR! not ok
npm ERR! code 1
npm ERR! path /var/lib/homebridge/node_modules/@switchbot/homebridge-switchbot/node_modules/usb
npm ERR! command failed
npm ERR! command sh -c node-gyp-build
npm ERR! A complete log of this run can be found in: /home/pi/.npm/_logs/2023-12-15T16_13_11_943Z-debug-0.log
Failed to rebuild.
Restoring previous version...
Restore Complete. Installation failed.
Bundled install / update could not complete. Trying regular install / update using npm.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Is there any way to work around this? I'm trying to use my Switchbot Bot with BLE...
Yes, please update.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Any word on why this is not being fixed?
@donavanbecker - looks like the fix was never pushed into the release as mentioned in Nov 2023. Any fix on the horizon?
Same error with v.3.0.0
node-pre-gyp ERR! install response status 404 Not Found on 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
make: Entering directory '/var/lib/homebridge/node_modules/@switchbot/homebridge-switchbot/node_modules/@abandonware/bluetooth-hci-socket/build'
CXX(target) Release/obj.target/bluetooth_hci_socket/src/BluetoothHciSocket.o
In file included from ../src/BluetoothHciSocket.cpp:8:
../../../nan/nan.h: In function ‘bool Nan::IdleNotification(int)’:
../../../nan/nan.h:689:32: warning: ‘bool v8::Isolate::IdleNotificationDeadline(double)’ is deprecated: Use MemoryPressureNotification() to influence the GC schedule. [-Wdeprecated-declarations]
689 | idle_time_in_ms * 0.001);
| ^
In file included from /home/pi/.cache/node-gyp/20.10.0/include/node/v8-initialization.h:13,
from /home/pi/.cache/node-gyp/20.10.0/include/node/v8.h:34,
from /home/pi/.cache/node-gyp/20.10.0/include/node/node.h:73,
from /home/pi/.cache/node-gyp/20.10.0/include/node/node_buffer.h:25,
from ../src/BluetoothHciSocket.cpp:7:
/home/pi/.cache/node-gyp/20.10.0/include/node/v8-isolate.h:1293:8: note: declared here
1293 | bool IdleNotificationDeadline(double deadline_in_seconds);
| ^~~~~~~~~~~~~~~~~~~~~~~~
In file included from /home/pi/.cache/node-gyp/20.10.0/include/node/node_buffer.h:25,
from ../src/BluetoothHciSocket.cpp:7:
../src/BluetoothHciSocket.cpp: At global scope:
/home/pi/.cache/node-gyp/20.10.0/include/node/node.h:1172:7: 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]
1172 | (node::addon_register_func) (regfunc), \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/pi/.cache/node-gyp/20.10.0/include/node/node.h:1206:3: note: in expansion of macro ‘NODE_MODULE_X’
1206 | NODE_MODULE_X(modname, regfunc, NULL, 0) // NOLINT (readability/null_usage)
| ^~~~~~~~~~~~~
../src/BluetoothHciSocket.cpp:740:1: note: in expansion of macro ‘NODE_MODULE’
740 | NODE_MODULE(binding, BluetoothHciSocket::Init);
| ^~~~~~~~~~~
SOLINK_MODULE(target) Release/obj.target/bluetooth_hci_socket.node
COPY Release/bluetooth_hci_socket.node
COPY /var/lib/homebridge/node_modules/@switchbot/homebridge-switchbot/node_modules/@abandonware/bluetooth-hci-socket/lib/binding/bluetooth_hci_socket.node
TOUCH Release/obj.target/action_after_build.stamp
make: Leaving directory '/var/lib/homebridge/node_modules/@switchbot/homebridge-switchbot/node_modules/@abandonware/bluetooth-hci-socket/build'
> @abandonware/[email protected] install
> node-gyp-build
make: Entering directory '/var/lib/homebridge/node_modules/@switchbot/homebridge-switchbot/node_modules/@abandonware/noble/build'
SOLINK_MODULE(target) Release/obj.target/noble.node
COPY Release/noble.node
make: Leaving directory '/var/lib/homebridge/node_modules/@switchbot/homebridge-switchbot/node_modules/@abandonware/noble/build'
> [email protected] install
> node-gyp-build
make: Entering directory '/var/lib/homebridge/node_modules/@switchbot/homebridge-switchbot/node_modules/usb/build'
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
rm -f Release/obj.target/usb.a Release/obj.target/usb.a.ar-file-list; mkdir -p `dirname Release/obj.target/usb.a`
ar crs Release/obj.target/usb.a @Release/obj.target/usb.a.ar-file-list
COPY Release/usb.a
CXX(target) Release/obj.target/usb_bindings/src/node_usb.o
In file included from /home/pi/.cache/node-gyp/20.10.0/include/node/v8-object.h:9,
from /home/pi/.cache/node-gyp/20.10.0/include/node/v8-array-buffer.h:13,
from /home/pi/.cache/node-gyp/20.10.0/include/node/v8.h:24,
from /home/pi/.cache/node-gyp/20.10.0/include/node/node.h:73,
from /home/pi/.cache/node-gyp/20.10.0/include/node/node_buffer.h:25,
from ../src/node_usb.h:14,
from ../src/node_usb.cc:1:
/home/pi/.cache/node-gyp/20.10.0/include/node/v8-maybe.h:106:45: error: ‘is_lvalue_reference_v’ is not a member of ‘std’; did you mean ‘is_lvalue_reference’?
106 | template <class U, std::enable_if_t<!std::is_lvalue_reference_v<U>>*>
| ^~~~~~~~~~~~~~~~~~~~~
| is_lvalue_reference
/home/pi/.cache/node-gyp/20.10.0/include/node/v8-maybe.h:106:66: warning: logical not is only applied to the left hand side of comparison [-Wlogical-not-parentheses]
106 | template <class U, std::enable_if_t<!std::is_lvalue_reference_v<U>>*>
| ^
/home/pi/.cache/node-gyp/20.10.0/include/node/v8-maybe.h:106:67: error: template argument 1 is invalid
106 | template <class U, std::enable_if_t<!std::is_lvalue_reference_v<U>>*>
| ^
/home/pi/.cache/node-gyp/20.10.0/include/node/v8-maybe.h:106:71: error: expected unqualified-id before ‘>’ token
106 | template <class U, std::enable_if_t<!std::is_lvalue_reference_v<U>>*>
| ^
/home/pi/.cache/node-gyp/20.10.0/include/node/v8-maybe.h:123:43: error: ‘is_lvalue_reference_v’ is not a member of ‘std’; did you mean ‘is_lvalue_reference’?
123 | template <class T, std::enable_if_t<!std::is_lvalue_reference_v<T>>* = nullptr>
| ^~~~~~~~~~~~~~~~~~~~~
| is_lvalue_reference
/home/pi/.cache/node-gyp/20.10.0/include/node/v8-maybe.h:123:64: warning: logical not is only applied to the left hand side of comparison [-Wlogical-not-parentheses]
123 | template <class T, std::enable_if_t<!std::is_lvalue_reference_v<T>>* = nullptr>
| ^
/home/pi/.cache/node-gyp/20.10.0/include/node/v8-maybe.h:123:65: error: template argument 1 is invalid
123 | template <class T, std::enable_if_t<!std::is_lvalue_reference_v<T>>* = nullptr>
| ^
/home/pi/.cache/node-gyp/20.10.0/include/node/v8-maybe.h:123:70: error: expected unqualified-id before ‘=’ token
123 | emplate <class T, std::enable_if_t<!std::is_lvalue_reference_v<T>>* = nullptr>
| ^
In file included from /home/pi/.cache/node-gyp/20.10.0/include/node/node_buffer.h:25,
from ../src/node_usb.h:14,
from ../src/node_usb.cc:1:
/home/pi/.cache/node-gyp/20.10.0/include/node/node.h:711:28: error: ‘std::string_view’ has not been declared
711 | Environment* env, std::string_view main_script_source_utf8);
| ^~~~~~~~~~~
../src/node_usb.cc: In function ‘Napi::Value SetDebugLevel(const Napi::CallbackInfo&)’:
../src/node_usb.cc:118:71: warning: ‘void libusb_set_debug(libusb_context*, int)’ is deprecated: Use libusb_set_option instead [-Wdeprecated-declarations]
118 | libusb_set_debug(usb_context, info[0].As<Napi::Number>().Int32Value());
| ^
In file included from ../src/node_usb.h:11,
from ../src/node_usb.cc:1:
../libusb/libusb/libusb.h:1325:18: note: declared here
1325 | void LIBUSB_CALL libusb_set_debug(libusb_context *ctx, int level);
| ^~~~~~~~~~~~~~~~
make: *** [usb_bindings.target.mk:122: Release/obj.target/usb_bindings/src/node_usb.o] Error 1
make: Leaving directory '/var/lib/homebridge/node_modules/@switchbot/homebridge-switchbot/node_modules/usb/build'
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.<anonymous> (/opt/homebridge/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:209:23)
gyp ERR! System Linux 6.1.21-v8+
gyp ERR! command "/opt/homebridge/bin/node" "/opt/homebridge/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /var/lib/homebridge/node_modules/@switchbot/homebridge-switchbot/node_modules/usb
gyp ERR! node -v v20.10.0
gyp ERR! node-gyp -v v10.0.1
gyp ERR! not ok
npm ERR! code 1
npm ERR! path /var/lib/homebridge/node_modules/@switchbot/homebridge-switchbot/node_modules/usb
npm ERR! command failed
npm ERR! command sh -c node-gyp-build
npm ERR! A complete log of this run can be found in: /home/pi/.npm/_logs/2024-01-31T23_03_59_678Z-debug-0.log
Failed to rebuild.
Restoring previous version...
Restore Complete. Installation failed.
Bundled install / update could not complete. Trying regular install / update using npm.
USER: pi
DIR: /var/lib/homebridge
CMD: npm install --save @switchbot/[email protected]
(⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂⠂) ⠴ idealTree: sill logfile start cleaning logs, removing 1 files
This error is benign, there is an attempt to download a non-existent binary but bluetooth-hci-socket
will always be built from the source.
https://github.com/abandonware/node-bluetooth-hci-socket/pull/54 should fix the issue.
@donavanbecker can you help with getting a release out?
The latest build attempting to fix this benign error completely wrecked the plugin. After the update my Homebridge instance doesn't start up.
The fix for this benign error hasn't landed yet in this project.
https://github.com/abandonware/noble/pull/321 needs to be merged and released first.
Migrated to home assistant. It seems to be a more stable and maintained platform. And switchbot BLE devices worked out of the box.
Is this going to be fixed, as of today:
node-pre-gyp ERR! install response status 404 Not Found on https://github.com/abandonware/node-bluetooth-hci-socket/releases/download/0.5.3-11/bluetooth_hci_socket-0.5.3-11-node-v115-linux-arm64.tar.gz
The most recent updates all have this issue and its killed my HB stability.
It's a abandonware/node-bluetooth-hci-socket issue.
Could try this: abandonware/node-bluetooth-hci-socket#42
It's a abandonware/node-bluetooth-hci-socket issue.
Could try this: abandonware/node-bluetooth-hci-socket#42
Running 'sudo apt-get install build-essential' says that build-essential "is already on the newest version (12.9)"
Unfortunately this is something that has to be fixed up stream.
Looks like there was a new version released up stream. Can you try reinstalling the plugin and see if that resolves this?
Looks like the install issue is fixed.
However, I’m getting this error now when trying operate curtain 3
The curtain 3 device and Pi4 are close proximity. Is there some way to get more details on the error?
Closing as that is a different issue. Please open another issue with info of your setup.
To be clear, on the current release (3.4.0). I still get the error:
> @abandonware/[email protected] install
> node-pre-gyp install --fallback-to-build --update-binary
node-pre-gyp ERR! install response status 404 Not Found on https://github.com/abandonware/node-bluetooth-hci-socket/releases/download/0.5.3-11/bluetooth_hci_socket-0.5.3-11-node-v115-linux-arm.tar.gz
make: Entering directory '/var/lib/homebridge/node_modules/@switchbot/homebridge-switchbot/node_modules/@abandonware/bluetooth-hci-socket/build'
CXX(target) Release/obj.target/bluetooth_hci_socket/src/BluetoothHciSocket.o
In file included from /home/pi/.cache/node-gyp/20.11.0/include/node/node_buffer.h:25,
from ../src/BluetoothHciSocket.cpp:7:
/home/pi/.cache/node-gyp/20.11.0/include/node/node.h:1172:7: 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]
1172 | (node::addon_register_func) (regfunc), \
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/pi/.cache/node-gyp/20.11.0/include/node/node.h:1206:3: note: in expansion of macro ‘NODE_MODULE_X’
1206 | NODE_MODULE_X(modname, regfunc, NULL, 0) // NOLINT (readability/null_usage)
| ^~~~~~~~~~~~~
../src/BluetoothHciSocket.cpp:860:1: note: in expansion of macro ‘NODE_MODULE’
860 | NODE_MODULE(binding, BluetoothHciSocket::Init);
| ^~~~~~~~~~~
On the latest Beta (3.5.0-beta.9) I never see "Running post-install scripts..." during install. I don't know if there is a way see longs form the past during install.