(I am limited to 3 replies :-()
I will also be happy to get more information. Maybe I can help with my machine (370.95.t)
Can you share which hardware you are using to connect to the device?
(I am limited to 3 replies :-()
I will also be happy to get more information. Maybe I can help with my machine (370.95.t)
Can you share which hardware you are using to connect to the device?
Hey,
I actually just posted a response in the original thread: Controlling Delonghi Primadonna Elite through ST
Btw, I am using the Ubertooth sniffer, but you can use any Bluetooth adapter – I just happen to use it for all my projects).
Cheers.
I am planing to use raspberry pi to send the commands. I am not bluetooth expert, I hope I will succeed with it. Will continue to follow your work, hopefully I will be able to contribute once I will be able to create connection between the pi and the coffee machine.
Can you send a link to your github project?
do you have any python code / node js you can share so I will able to work on my side (and hopefully contribute)?
Sure. Will post the link tomorrow. I need to add a proper documentation to get started
I have downloaded your repo, build it, but get an error. Still don’t know why. I am trying to run it on RPI3
NODE: V 11.5.0
NPM: V 6.7.0
> usb@1.6.3 install /home/pi/node-ecam-coffee/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 @ /home/pi/.npm/_prebuilds/2b648a-usb-v1.6.3-node-v67-linux-arm.tar.gz
prebuild-install http request GET https://github.com/tessel/node-usb/releases/download/v1.6.3/usb-v1.6.3-node-v67-linux-arm.tar.gz
prebuild-install http 404 https://github.com/tessel/node-usb/releases/download/v1.6.3/usb-v1.6.3-node-v67-linux-arm.tar.gz
prebuild-install WARN install No prebuilt binaries found (target=11.15.0 runtime=node arch=arm libc= platform=linux)
make: Entering directory '/home/pi/node-ecam-coffee/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
AR(target) Release/obj.target/usb.a
COPY Release/usb.a
CXX(target) Release/obj.target/usb_bindings/src/node_usb.o
In file included from ../src/helpers.h:3,
from ../src/node_usb.h:21,
from ../src/node_usb.cc:1:
../node_modules/nan/nan.h: In function 'void Nan::AsyncQueueWorker(Nan::AsyncWorker*)':
../node_modules/nan/nan.h:2232: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)
^
In file included from ../src/node_usb.h:14,
from ../src/node_usb.cc:1:
../src/node_usb.cc: At global scope:
/home/pi/.node-gyp/11.15.0/include/node/node.h:544:43: warning: cast between incompatible function types from 'void (*)(v8::Local<v8::Object>)' to 'node::addon_register_func' {aka 'void (*)(v8::Local<v8::Object>, v8::Local<v8::Value>, void*)'} [-Wcast-function-type]
(node::addon_register_func) (regfunc), \
^
/home/pi/.node-gyp/11.15.0/include/node/node.h:578:3: note: in expansion of macro 'NODE_MODULE_X'
NODE_MODULE_X(modname, regfunc, NULL, 0) // NOLINT (readability/null_usage)
^~~~~~~~~~~~~
../src/node_usb.cc:95:1: note: in expansion of macro 'NODE_MODULE'
NODE_MODULE(usb_bindings, Initialize)
^~~~~~~~~~~
../src/node_usb.cc: In function 'void handleHotplug(std::pair<libusb_device*, libusb_hotplug_event>)':
../src/node_usb.cc:151:58: warning: 'v8::Local<v8::Value> Nan::MakeCallback(v8::Local<v8::Object>, const char*, int, v8::Local<v8::Value>*)' is deprecated [-Wdeprecated-declarations]
Nan::MakeCallback(Nan::New(hotplugThis), "emit", 2, argv);
^
In file included from ../src/helpers.h:3,
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::Local<v8::Value> MakeCallback(
^~~~~~~~~~~~
../src/node_usb.cc:151:58: warning: 'v8::Local<v8::Value> Nan::MakeCallback(v8::Local<v8::Object>, const char*, int, v8::Local<v8::Value>*)' is deprecated [-Wdeprecated-declarations]
Nan::MakeCallback(Nan::New(hotplugThis), "emit", 2, argv);
^
In file included from ../src/helpers.h:3,
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::Local<v8::Value> MakeCallback(
^~~~~~~~~~~~
In file included from ../src/node_usb.h:12,
from ../src/node_usb.cc:1:
/home/pi/.node-gyp/11.15.0/include/node/v8.h: In instantiation of 'void v8::PersistentBase<T>::SetWeak(P*, typename v8::WeakCallbackInfo<P>::Callback, v8::WeakCallbackType) [with P = node::ObjectWrap; T = v8::Object; typename v8::WeakCallbackInfo<P>::Callback = void (*)(const v8::WeakCallbackInfo<node::ObjectWrap>&)]':
/home/pi/.node-gyp/11.15.0/include/node/node_object_wrap.h:84:78: required from here
/home/pi/.node-gyp/11.15.0/include/node/v8.h:9710:16: warning: cast between incompatible function types from 'v8::WeakCallbackInfo<node::ObjectWrap>::Callback' {aka 'void (*)(const v8::WeakCallbackInfo<node::ObjectWrap>&)'} to 'Callback' {aka 'void (*)(const v8::WeakCallbackInfo<void>&)'} [-Wcast-function-type]
reinterpret_cast<Callback>(callback), type);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/pi/.node-gyp/11.15.0/include/node/v8.h: In instantiation of 'void v8::PersistentBase<T>::SetWeak(P*, typename v8::WeakCallbackInfo<P>::Callback, v8::WeakCallbackType) [with P = Nan::ObjectWrap; T = v8::Object; typename v8::WeakCallbackInfo<P>::Callback = void (*)(const v8::WeakCallbackInfo<Nan::ObjectWrap>&)]':
../node_modules/nan/nan_object_wrap.h:65:61: required from here
/home/pi/.node-gyp/11.15.0/include/node/v8.h:9710:16: warning: cast between incompatible function types from 'v8::WeakCallbackInfo<Nan::ObjectWrap>::Callback' {aka 'void (*)(const v8::WeakCallbackInfo<Nan::ObjectWrap>&)'} to 'Callback' {aka 'void (*)(const v8::WeakCallbackInfo<void>&)'} [-Wcast-function-type]
CXX(target) Release/obj.target/usb_bindings/src/device.o
In file included from ../src/helpers.h:3,
from ../src/node_usb.h:21,
from ../src/device.cc:1:
../node_modules/nan/nan.h: In function 'void Nan::AsyncQueueWorker(Nan::AsyncWorker*)':
../node_modules/nan/nan.h:2232: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/device.cc: In member function 'void Req::submit(Device*, v8::Local<v8::Function>, uv_work_cb, uv_work_cb)':
../src/device.cc:220:70: warning: cast between incompatible function types from 'uv_work_cb' {aka 'void (*)(uv_work_s*)'} to 'uv_after_work_cb' {aka 'void (*)(uv_work_s*, int)'} [-Wcast-function-type]
uv_queue_work(uv_default_loop(), &req, backend, (uv_after_work_cb) after);
^~~~~
../src/device.cc: In static member function 'static void Req::default_after(uv_work_t*)':
../src/device.cc:237:64: warning: 'v8::Local<v8::Value> Nan::MakeCallback(v8::Local<v8::Object>, v8::Local<v8::Function>, int, v8::Local<v8::Value>*)' is deprecated [-Wdeprecated-declarations]
Nan::MakeCallback(device, Nan::New(baton->callback), 1, argv);
^
In file included from ../src/helpers.h:3,
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::Local<v8::Value> MakeCallback(
^~~~~~~~~~~~
../src/device.cc:237:64: warning: 'v8::Local<v8::Value> Nan::MakeCallback(v8::Local<v8::Object>, v8::Local<v8::Function>, int, v8::Local<v8::Value>*)' is deprecated [-Wdeprecated-declarations]
Nan::MakeCallback(device, Nan::New(baton->callback), 1, argv);
^
In file included from ../src/helpers.h:3,
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::Local<v8::Value> MakeCallback(
^~~~~~~~~~~~
In file included from ../src/node_usb.h:12,
from ../src/device.cc:1:
/home/pi/.node-gyp/11.15.0/include/node/v8.h: In instantiation of 'void v8::PersistentBase<T>::SetWeak(P*, typename v8::WeakCallbackInfo<P>::Callback, v8::WeakCallbackType) [with P = node::ObjectWrap; T = v8::Object; typename v8::WeakCallbackInfo<P>::Callback = void (*)(const v8::WeakCallbackInfo<node::ObjectWrap>&)]':
/home/pi/.node-gyp/11.15.0/include/node/node_object_wrap.h:84:78: required from here
/home/pi/.node-gyp/11.15.0/include/node/v8.h:9710:16: warning: cast between incompatible function types from 'v8::WeakCallbackInfo<node::ObjectWrap>::Callback' {aka 'void (*)(const v8::WeakCallbackInfo<node::ObjectWrap>&)'} to 'Callback' {aka 'void (*)(const v8::WeakCallbackInfo<void>&)'} [-Wcast-function-type]
reinterpret_cast<Callback>(callback), type);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/pi/.node-gyp/11.15.0/include/node/v8.h: In instantiation of 'void v8::PersistentBase<T>::SetWeak(P*, typename v8::WeakCallbackInfo<P>::Callback, v8::WeakCallbackType) [with P = Nan::ObjectWrap; T = v8::Object; typename v8::WeakCallbackInfo<P>::Callback = void (*)(const v8::WeakCallbackInfo<Nan::ObjectWrap>&)]':
../node_modules/nan/nan_object_wrap.h:65:61: required from here
/home/pi/.node-gyp/11.15.0/include/node/v8.h:9710:16: warning: cast between incompatible function types from 'v8::WeakCallbackInfo<Nan::ObjectWrap>::Callback' {aka 'void (*)(const v8::WeakCallbackInfo<Nan::ObjectWrap>&)'} to 'Callback' {aka 'void (*)(const v8::WeakCallbackInfo<void>&)'} [-Wcast-function-type]
CXX(target) Release/obj.target/usb_bindings/src/transfer.o
In file included from ../src/helpers.h:3,
from ../src/node_usb.h:21,
from ../src/transfer.cc:1:
../node_modules/nan/nan.h: In function 'void Nan::AsyncQueueWorker(Nan::AsyncWorker*)':
../node_modules/nan/nan.h:2232: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/transfer.cc: In function 'void handleCompletion(Transfer*)':
../src/transfer.cc:126:72: warning: 'v8::Local<v8::Value> Nan::MakeCallback(v8::Local<v8::Object>, v8::Local<v8::Function>, int, v8::Local<v8::Value>*)' is deprecated [-Wdeprecated-declarations]
Nan::MakeCallback(self->handle(), Nan::New(self->v8callback), 3, argv);
^
In file included from ../src/helpers.h:3,
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::Local<v8::Value> MakeCallback(
^~~~~~~~~~~~
../src/transfer.cc:126:72: warning: 'v8::Local<v8::Value> Nan::MakeCallback(v8::Local<v8::Object>, v8::Local<v8::Function>, int, v8::Local<v8::Value>*)' is deprecated [-Wdeprecated-declarations]
Nan::MakeCallback(self->handle(), Nan::New(self->v8callback), 3, argv);
^
In file included from ../src/helpers.h:3,
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::Local<v8::Value> MakeCallback(
^~~~~~~~~~~~
In file included from ../src/node_usb.h:12,
from ../src/transfer.cc:1:
/home/pi/.node-gyp/11.15.0/include/node/v8.h: In instantiation of 'void v8::PersistentBase<T>::SetWeak(P*, typename v8::WeakCallbackInfo<P>::Callback, v8::WeakCallbackType) [with P = node::ObjectWrap; T = v8::Object; typename v8::WeakCallbackInfo<P>::Callback = void (*)(const v8::WeakCallbackInfo<node::ObjectWrap>&)]':
/home/pi/.node-gyp/11.15.0/include/node/node_object_wrap.h:84:78: required from here
/home/pi/.node-gyp/11.15.0/include/node/v8.h:9710:16: warning: cast between incompatible function types from 'v8::WeakCallbackInfo<node::ObjectWrap>::Callback' {aka 'void (*)(const v8::WeakCallbackInfo<node::ObjectWrap>&)'} to 'Callback' {aka 'void (*)(const v8::WeakCallbackInfo<void>&)'} [-Wcast-function-type]
reinterpret_cast<Callback>(callback), type);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/pi/.node-gyp/11.15.0/include/node/v8.h: In instantiation of 'void v8::PersistentBase<T>::SetWeak(P*, typename v8::WeakCallbackInfo<P>::Callback, v8::WeakCallbackType) [with P = Nan::ObjectWrap; T = v8::Object; typename v8::WeakCallbackInfo<P>::Callback = void (*)(const v8::WeakCallbackInfo<Nan::ObjectWrap>&)]':
../node_modules/nan/nan_object_wrap.h:65:61: required from here
/home/pi/.node-gyp/11.15.0/include/node/v8.h:9710:16: warning: cast between incompatible function types from 'v8::WeakCallbackInfo<Nan::ObjectWrap>::Callback' {aka 'void (*)(const v8::WeakCallbackInfo<Nan::ObjectWrap>&)'} to 'Callback' {aka 'void (*)(const v8::WeakCallbackInfo<void>&)'} [-Wcast-function-type]
SOLINK_MODULE(target) Release/obj.target/usb_bindings.node
COPY Release/usb_bindings.node
make: Leaving directory '/home/pi/node-ecam-coffee/node_modules/usb/build'
> @abandonware/bluetooth-hci-socket@0.5.3-6 install /home/pi/node-ecam-coffee/node_modules/@abandonware/bluetooth-hci-socket
> 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/abandonware/node-bluetooth-hci-socket/releases/download/0.5.3-6/bluetooth_hci_socket-0.5.3-6-node-v67-linux-arm.tar.gz
node-pre-gyp WARN Pre-built binaries not found for @abandonware/bluetooth-hci-socket@0.5.3-6 and node@11.15.0 (node-v67 ABI, glibc) (falling back to source compile with node-gyp)
make: Entering directory '/home/pi/node-ecam-coffee/node_modules/@abandonware/bluetooth-hci-socket/build'
CXX(target) Release/obj.target/bluetooth_hci_socket/src/BluetoothHciSocket.o
In file included from /home/pi/.node-gyp/11.15.0/include/node/node_buffer.h:25,
from ../src/BluetoothHciSocket.cpp:7:
/home/pi/.node-gyp/11.15.0/include/node/node.h:544: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]
(node::addon_register_func) (regfunc), \
^
/home/pi/.node-gyp/11.15.0/include/node/node.h:578:3: note: in expansion of macro 'NODE_MODULE_X'
NODE_MODULE_X(modname, regfunc, NULL, 0) // NOLINT (readability/null_usage)
^~~~~~~~~~~~~
../src/BluetoothHciSocket.cpp:578:1: note: in expansion of macro 'NODE_MODULE'
NODE_MODULE(binding, BluetoothHciSocket::Init);
^~~~~~~~~~~
In file included from /home/pi/.node-gyp/11.15.0/include/node/node.h:63,
from /home/pi/.node-gyp/11.15.0/include/node/node_buffer.h:25,
from ../src/BluetoothHciSocket.cpp:7:
/home/pi/.node-gyp/11.15.0/include/node/v8.h: In instantiation of 'void v8::PersistentBase<T>::SetWeak(P*, typename v8::WeakCallbackInfo<P>::Callback, v8::WeakCallbackType) [with P = node::ObjectWrap; T = v8::Object; typename v8::WeakCallbackInfo<P>::Callback = void (*)(const v8::WeakCallbackInfo<node::ObjectWrap>&)]':
/home/pi/.node-gyp/11.15.0/include/node/node_object_wrap.h:84:78: required from here
/home/pi/.node-gyp/11.15.0/include/node/v8.h:9710:16: warning: cast between incompatible function types from 'v8::WeakCallbackInfo<node::ObjectWrap>::Callback' {aka 'void (*)(const v8::WeakCallbackInfo<node::ObjectWrap>&)'} to 'Callback' {aka 'void (*)(const v8::WeakCallbackInfo<void>&)'} [-Wcast-function-type]
reinterpret_cast<Callback>(callback), type);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/pi/.node-gyp/11.15.0/include/node/v8.h: In instantiation of 'void v8::PersistentBase<T>::SetWeak(P*, typename v8::WeakCallbackInfo<P>::Callback, v8::WeakCallbackType) [with P = Nan::ObjectWrap; T = v8::Object; typename v8::WeakCallbackInfo<P>::Callback = void (*)(const v8::WeakCallbackInfo<Nan::ObjectWrap>&)]':
../../../nan/nan_object_wrap.h:65:61: required from here
/home/pi/.node-gyp/11.15.0/include/node/v8.h:9710:16: warning: cast between incompatible function types from 'v8::WeakCallbackInfo<Nan::ObjectWrap>::Callback' {aka 'void (*)(const v8::WeakCallbackInfo<Nan::ObjectWrap>&)'} to 'Callback' {aka 'void (*)(const v8::WeakCallbackInfo<void>&)'} [-Wcast-function-type]
SOLINK_MODULE(target) Release/obj.target/bluetooth_hci_socket.node
COPY Release/bluetooth_hci_socket.node
COPY /home/pi/node-ecam-coffee/node_modules/@abandonware/bluetooth-hci-socket/lib/binding/bluetooth_hci_socket.node
TOUCH Release/obj.target/action_after_build.stamp
make: Leaving directory '/home/pi/node-ecam-coffee/node_modules/@abandonware/bluetooth-hci-socket/build'
> @abandonware/noble@1.9.2-10 install /home/pi/node-ecam-coffee/node_modules/@abandonware/noble
> node-gyp rebuild
make: Entering directory '/home/pi/node-ecam-coffee/node_modules/@abandonware/noble/build'
SOLINK_MODULE(target) Release/obj.target/noble.node
COPY Release/noble.node
make: Leaving directory '/home/pi/node-ecam-coffee/node_modules/@abandonware/noble/build'
> husky@4.3.0 install /home/pi/node-ecam-coffee/node_modules/husky
> node husky install
husky > Setting up git hooks
husky > Done
> core-js@3.7.0 postinstall /home/pi/node-ecam-coffee/node_modules/core-js
> node -e "try{require('./postinstall')}catch(e){}"
Thank you for using core-js ( https://github.com/zloirock/core-js ) for polyfilling JavaScript standard library!
The project needs your help! Please consider supporting of core-js on Open Collective or Patreon:
> https://opencollective.com/core-js
> https://www.patreon.com/zloirock
Also, the author of core-js ( https://github.com/zloirock ) is looking for a good job -)
> husky@4.3.0 postinstall /home/pi/node-ecam-coffee/node_modules/husky
> opencollective-postinstall || exit 0
Thank you for using husky!
If you rely on this package, please consider supporting our open collective:
> https://opencollective.com/husky/donate
npm WARN node-ecam-coffee@1.0.0 No repository field.
added 321 packages from 271 contributors and audited 322 packages in 281.239s
found 0 vulnerabilities
Here is the error:
npm start
> node-ecam-coffee@1.0.0 start /home/pi/node-ecam-coffee
> npm run build && DEBUG=*,-noble node dist/index.js
> node-ecam-coffee@1.0.0 build /home/pi/node-ecam-coffee
> tsc
/home/pi/node-ecam-coffee/dist/classes/App.js:26
if (!this.machine?.characteristic) {
^
SyntaxError: Unexpected token .
at Module._compile (internal/modules/cjs/loader.js:760:23)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:827:10)
at Module.load (internal/modules/cjs/loader.js:685:32)
at Function.Module._load (internal/modules/cjs/loader.js:620:12)
at Module.require (internal/modules/cjs/loader.js:723:19)
at require (internal/modules/cjs/helpers.js:14:16)
at Object.<anonymous> (/home/pi/node-ecam-coffee/dist/index.js:3:15)
at Module._compile (internal/modules/cjs/loader.js:816:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:827:10)
at Module.load (internal/modules/cjs/loader.js:685:32)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! node-ecam-coffee@1.0.0 start: `npm run build && DEBUG=*,-noble node dist/index.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the node-ecam-coffee@1.0.0 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/pi/.npm/_logs/2020-11-23T22_48_54_079Z-debug.log
Hey, I am now working on a Web application to control the coffee machine. Will keep you posted.
Cheers.