Comments (6)
Hmm, there was a similar report about a month ago on the home-assistant community thread about this project (here, with a solution a few posts down)
Such extra work really shouldn't be needed, but I haven't been able to reproduce this with a fresh install from NPM, though I've yet to get around to trying it on a completely new raspbian install.
Can you share the command line output from your npm install command (or uninstall and run it again)? I'm hoping that will maybe point to something.
from soma-ctrl.
from soma-ctrl.
With the first command you missed the hyphen, so this is to be expected; it should be soma-ctrl
not somactrl
Can you share the output from the global install once more with the right package name?
I will try to find a separate SD card to install cleanly in attempt to reproduce.
That npm output actually looks ok, though it will have only installed locally with this attempt (i.e. your somactrl tool would be at /home/pi/soma-ctrl/node_modules/.bin/somactrl
)
from soma-ctrl.
Ah sorry, I'm an idiot.
Below is the output from the correct command.
And this now seems to be working!
I started again with a clean Raspbian image, and then followed the steps from the link you mentioned above (https://community.home-assistant.io/t/soma-blind-control-via-mqtt/52422/68?u=andersonshatch), manually installing node 8.9.0 compiled for armv6l even though I'm on a Pi 3 B+ (i.e. armv7l), and manually installing noble. I get the "(node:3466) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 characteristicsDiscover listeners added. Use emitter.setMaxListeners() to increase limit" others have seen, but it seems to work nonetheless. So I suspect this was an issue with interaction with the versions of node I had installed, or perhaps where they were installed.
Now I just need to find a Homebridge package that can pass the right POST commands!
pi@raspberrypi:~/node-v8.9.0-linux-armv6l $ sudo npm install -g soma-ctrl --unsafe-perm
/usr/local/bin/somactrl -> /usr/local/lib/node_modules/soma-ctrl/index.js
[email protected] install /usr/local/lib/node_modules/soma-ctrl/node_modules/usb
prebuild-install --verbose || node-gyp rebuild
prebuild-install info begin Prebuild-install version 5.3.0
prebuild-install info looking for cached prebuild @ /root/.npm/_prebuilds/d16678-usb-v1.6.0-node-v57-linux-arm.tar.gz
prebuild-install http request GET https://github.com/tessel/node-usb/releases/download/v1.6.0/usb-v1.6.0-node-v57-linux-arm.tar.gz
prebuild-install http 404 https://github.com/tessel/node-usb/releases/download/v1.6.0/usb-v1.6.0-node-v57-linux-arm.tar.gz
prebuild-install WARN install No prebuilt binaries found (target=8.9.0 runtime=node arch=arm libc= platform=linux)
make: Entering directory '/usr/local/lib/node_modules/soma-ctrl/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
../libusb/libusb/os/linux_udev.c:40:10: fatal error: libudev.h: No such file or directory
#include <libudev.h>
^~~~~~~~~~~
compilation terminated.
make: *** [libusb.target.mk:132: Release/obj.target/libusb/libusb/libusb/os/linux_udev.o] Error 1
make: Leaving directory '/usr/local/lib/node_modules/soma-ctrl/node_modules/usb/build'
gyp ERR! build error
gyp ERR! stack Error: make
failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:258:23)
gyp ERR! stack at emitTwo (events.js:126:13)
gyp ERR! stack at ChildProcess.emit (events.js:214:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12)
gyp ERR! System Linux 4.19.57-v7+
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /usr/local/lib/node_modules/soma-ctrl/node_modules/usb
gyp ERR! node -v v8.9.0
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
[email protected] install /usr/local/lib/node_modules/soma-ctrl/node_modules/bluetooth-hci-socket
node-gyp rebuild
make: Entering directory '/usr/local/lib/node_modules/soma-ctrl/node_modules/bluetooth-hci-socket/build'
CXX(target) Release/obj.target/binding/src/BluetoothHciSocket.o
In file included from /root/.node-gyp/8.9.0/include/node/node.h:63,
from /root/.node-gyp/8.9.0/include/node/node_buffer.h:25,
from ../src/BluetoothHciSocket.cpp:7:
/root/.node-gyp/8.9.0/include/node/v8.h: In static member function ‘static void v8::V8::SetAllowCodeGenerationFromStringsCallback(v8::DeprecatedAllowCodeGenerationFromStringsCallback)’:
/root/.node-gyp/8.9.0/include/node/v8.h:10177:19: warning: cast between incompatible function types from ‘v8::DeprecatedAllowCodeGenerationFromStringsCallback’ {aka ‘bool ()(v8::Localv8::Context)’} to ‘v8::FreshNewAllowCodeGenerationFromStringsCallback’ {aka ‘bool ()(v8::Localv8::Context, v8::Localv8::String)’} [-Wcast-function-type]
callback));
^
/root/.node-gyp/8.9.0/include/node/v8.h: In static member function ‘static void v8::V8::RemoveGCPrologueCallback(v8::GCCallback)’:
/root/.node-gyp/8.9.0/include/node/v8.h:10222:53: warning: cast between incompatible function types from ‘v8::GCCallback’ {aka ‘void ()(v8::GCType, v8::GCCallbackFlags)’} to ‘v8::Isolate::GCCallback’ {aka ‘void ()(v8::Isolate*, v8::GCType, v8::GCCallbackFlags)’} [-Wcast-function-type]
reinterpret_castIsolate::GCCallback(callback));
^
/root/.node-gyp/8.9.0/include/node/v8.h: In static member function ‘static void v8::V8::RemoveGCEpilogueCallback(v8::GCCallback)’:
/root/.node-gyp/8.9.0/include/node/v8.h:10229:53: warning: cast between incompatible function types from ‘v8::GCCallback’ {aka ‘void ()(v8::GCType, v8::GCCallbackFlags)’} to ‘v8::Isolate::GCCallback’ {aka ‘void ()(v8::Isolate*, v8::GCType, v8::GCCallbackFlags)’} [-Wcast-function-type]
reinterpret_castIsolate::GCCallback(callback));
^
In file included from ../src/BluetoothHciSocket.cpp:8:
../../nan/nan.h: In function ‘void Nan::AsyncQueueWorker(Nan::AsyncWorker*)’:
../../nan/nan.h:2298:62: warning: cast between incompatible function types from ‘void ()(uv_work_t)’ {aka ‘void ()(uv_work_s)’} to ‘uv_after_work_cb’ {aka ‘void ()(uv_work_s, int)’} [-Wcast-function-type]
, reinterpret_cast<uv_after_work_cb>(AsyncExecuteComplete)
^
../src/BluetoothHciSocket.cpp: In member function ‘void BluetoothHciSocket::poll()’:
../src/BluetoothHciSocket.cpp:251:95: warning: ‘v8::Localv8::Value Nan::MakeCallback(v8::Localv8::Object, v8::Localv8::String, int, v8::Localv8::Value)’ is deprecated [-Wdeprecated-declarations]
Nan::MakeCallback(Nan::New(this->This), Nan::New("emit").ToLocalChecked(), 2, argv);
^
In file included from ../src/BluetoothHciSocket.cpp:8:
../../nan/nan.h:1045:46: note: declared here
NAN_DEPRECATED inline v8::Localv8::Value MakeCallback(
^~~~~~~~~~~~
../src/BluetoothHciSocket.cpp:251:95: warning: ‘v8::Localv8::Value Nan::MakeCallback(v8::Localv8::Object, v8::Localv8::String, int, v8::Localv8::Value)’ is deprecated [-Wdeprecated-declarations]
Nan::MakeCallback(Nan::New(this->This), Nan::New("emit").ToLocalChecked(), 2, argv);
^
In file included from ../src/BluetoothHciSocket.cpp:8:
../../nan/nan.h:1045:46: note: declared here
NAN_DEPRECATED inline v8::Localv8::Value MakeCallback(
^~~~~~~~~~~~
../src/BluetoothHciSocket.cpp: In member function ‘void BluetoothHciSocket::emitErrnoError()’:
../src/BluetoothHciSocket.cpp:275:72: warning: ‘v8::Localv8::Object v8::Function::NewInstance(int, v8::Localv8::Value) const’ is deprecated: Use maybe version [-Wdeprecated-declarations]
Local error = errorConstructor->NewInstance(1, constructorArgs);
^
In file included from /root/.node-gyp/8.9.0/include/node/v8.h:26,
from /root/.node-gyp/8.9.0/include/node/node.h:63,
from /root/.node-gyp/8.9.0/include/node/node_buffer.h:25,
from ../src/BluetoothHciSocket.cpp:7:
/root/.node-gyp/8.9.0/include/node/v8.h:3832:31: note: declared here
Local NewInstance(int argc, Local argv[]) const);
^~~~~~~~~~~
/root/.node-gyp/8.9.0/include/node/v8config.h:318:3: note: in definition of macro ‘V8_DEPRECATED’
declarator attribute((deprecated(message)))
^~~~~~~~~~
../src/BluetoothHciSocket.cpp:282:93: warning: ‘v8::Localv8::Value Nan::MakeCallback(v8::Localv8::Object, v8::Localv8::String, int, v8::Localv8::Value)’ is deprecated [-Wdeprecated-declarations]
Nan::MakeCallback(Nan::New(this->This), Nan::New("emit").ToLocalChecked(), 2, argv);
^
In file included from ../src/BluetoothHciSocket.cpp:8:
../../nan/nan.h:1045:46: note: declared here
NAN_DEPRECATED inline v8::Localv8::Value MakeCallback(
^~~~~~~~~~~~
../src/BluetoothHciSocket.cpp:282:93: warning: ‘v8::Localv8::Value Nan::MakeCallback(v8::Localv8::Object, v8::Localv8::String, int, v8::Localv8::Value)’ is deprecated [-Wdeprecated-declarations]
Nan::MakeCallback(Nan::New(this->This), Nan::New("emit").ToLocalChecked(), 2, argv);
^
In file included from ../src/BluetoothHciSocket.cpp:8:
../../nan/nan.h:1045:46: note: declared here
NAN_DEPRECATED inline v8::Localv8::Value MakeCallback(
^~~~~~~~~~~~
In file included from /root/.node-gyp/8.9.0/include/node/node_buffer.h:25,
from ../src/BluetoothHciSocket.cpp:7:
../src/BluetoothHciSocket.cpp: At global scope:
/root/.node-gyp/8.9.0/include/node/node.h:475:43: warning: cast between incompatible function types from ‘void ()(Nan::ADDON_REGISTER_FUNCTION_ARGS_TYPE)’ {aka ‘void ()(v8::Localv8::Object)’} to ‘node::addon_register_func’ {aka ‘void ()(v8::Localv8::Object, v8::Localv8::Value, void*)’} [-Wcast-function-type]
(node::addon_register_func) (regfunc),
^
/root/.node-gyp/8.9.0/include/node/node.h:506:3: note: in expansion of macro ‘NODE_MODULE_X’
NODE_MODULE_X(modname, regfunc, NULL, 0)
^~~~~~~~~~~~~
../src/BluetoothHciSocket.cpp:499:1: note: in expansion of macro ‘NODE_MODULE’
NODE_MODULE(binding, BluetoothHciSocket::Init);
^~~~~~~~~~~
In file included from /root/.node-gyp/8.9.0/include/node/node.h:63,
from /root/.node-gyp/8.9.0/include/node/node_buffer.h:25,
from ../src/BluetoothHciSocket.cpp:7:
/root/.node-gyp/8.9.0/include/node/v8.h: In instantiation of ‘void v8::PersistentBase::SetWeak(P*, typename v8::WeakCallbackInfo
::Callback, v8::WeakCallbackType) [with P = node::ObjectWrap; T = v8::Object; typename v8::WeakCallbackInfo
::Callback = void ()(const v8::WeakCallbackInfonode::ObjectWrap&)]’:
/root/.node-gyp/8.9.0/include/node/node_object_wrap.h:85:78: required from here
/root/.node-gyp/8.9.0/include/node/v8.h:9200:16: warning: cast between incompatible function types from ‘v8::WeakCallbackInfonode::ObjectWrap::Callback’ {aka ‘void ()(const v8::WeakCallbackInfonode::ObjectWrap&)’} to ‘Callback’ {aka ‘void ()(const v8::WeakCallbackInfo&)’} [-Wcast-function-type]
reinterpret_cast(callback), type);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/root/.node-gyp/8.9.0/include/node/v8.h: In instantiation of ‘void v8::PersistentBase::SetWeak(P, typename v8::WeakCallbackInfo
::Callback, v8::WeakCallbackType) [with P = Nan::ObjectWrap; T = v8::Object; typename v8::WeakCallbackInfo
::Callback = void ()(const v8::WeakCallbackInfoNan::ObjectWrap&)]’:
../../nan/nan_object_wrap.h:65:61: required from here
/root/.node-gyp/8.9.0/include/node/v8.h:9200:16: warning: cast between incompatible function types from ‘v8::WeakCallbackInfoNan::ObjectWrap::Callback’ {aka ‘void ()(const v8::WeakCallbackInfoNan::ObjectWrap&)’} to ‘Callback’ {aka ‘void (*)(const v8::WeakCallbackInfo&)’} [-Wcast-function-type]
SOLINK_MODULE(target) Release/obj.target/binding.node
COPY Release/binding.node
make: Leaving directory '/usr/local/lib/node_modules/soma-ctrl/node_modules/bluetooth-hci-socket/build'
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/soma-ctrl/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/soma-ctrl/node_modules/usb):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] install: prebuild-install --verbose || node-gyp rebuild
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1
- [email protected]
added 222 packages in 50.344s
from soma-ctrl.
Hmm, well that's good news!
I'll leave this open for now as I did find a spare SD card and want to try this out myself. I've also seen a version of noble somewhere that would allow more recent versions of node to be used, which would be nice.
from soma-ctrl.
Closing now newer versions of node are supported by the move to @abandonware/noble
from soma-ctrl.
Related Issues (11)
- TypeError: Cannot read property 'subscribe' of undefined HOT 5
- Latest Soma blinds not detecting HOT 17
- Hassio
- Latest version only connect to one device HOT 3
- trying to make this work for HomeBridge... HOT 3
- Command Disallowed 0xc causes a device to become unresponsive HOT 9
- Issues installing - directory not created HOT 1
- TypeError: Cannot read property 'valueHandle' of undefined HOT 3
- “state” does not update HOT 5
- Somactrl throwing MTU error, stops responding HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from soma-ctrl.