MQTT interface... time for some testing. Where are my experts?
-
Yep, mosquito is available in 7.32.
I’ve written my own broker because why not, and I’ve bridged my Vera to mqtt using the udp client posted by @akbooer. I’m slowly removing the logic from the Vera because I’ve incorporated a lot of thing into mqtt (Shelly, tasmota, ecovacs, LG tv, cams, notifications, fully kiosk) and I’m already using mqtt as the message bus of my system. I’m really looking forward to test this new feature.
-
Everyone, I'm going to hold off releasing this, not because it isn't ready, but because I'm not ready to handle install issues and questions for it (it's a separate add-on, and has its own all new configuration requirements, of course). The complication is that I'm travelling starting Friday morning on a college preview/visit for my older son, and I really need to give that (and him) my undivided attention.
So, I'll push this out when I return, either Sunday night or Monday morning. Sorry for the delay.
-
OK. MQTTController is now published. A few things to know:
- It's a separate component you need to download and install;
- Instructions for getting it, installing it, and configuring it are here;
- Please make sure your posts and new topics (especially questions and reports of possible bugs) follow the posting guidelines (see pinned post in this category).
-
Working on it, but not in that release.
-
Turns out, you can do it with a workaround for now...
After
source
, addoptions
, withusername
andpassword
, like this:... implementation: MQTTController config: source: "mqtt://127.0.0.1:1883/" options: username: whoever password: whatever
-
It's done. It's that. I didn't announce the release, but
init
is in 21326 of MQTTController, here: https://reactor.toggledbits.com/download/extras/MQTTController/ -
I have this in my custom template for temperature:
my_tasmota_sensor_temperature: type: ValueSensor capabilities: [temperature_sensor] primary_attribute: temperature_sensor.value init: - topic: "cmnd/%topic%/STATUS" payload: 10 type: raw events: "tele/%topic%/SENSOR": "temperature_sensor.value": expr: 'payload[ source ?? "Global" ]?.Temperature' "temperature_sensor.units": expr: payload.TempUnit "stat/%topic%/STATUS10": "temperature_sensor.value": expr: 'payload.StatusSNS[ source ?? "Global" ]?.Temperature' "temperature_sensor.units": expr: payload.StatusSNS.TempUnit
I can't figure out how to use
init
to acheive this using the stock template.
I actually updated to 21326 before posting, following the docs for installation/upgrade but the version number in the template file says 21321 and has no notes ofinit
-
The template file is not relevant for version number, look at MQTTController.js.
Can you show me the rest of your config for this entity/Tasmota node?
Also you don't need to make a custom template just to add
init
. You can use the stock template and putinit
in the configuration (e.g. next touses_template
). -
Ah, of cource.
For now it's"pooltemp": name: "Pooltemp" topic: "Pooltemp" source: "DS18B20" uses_template: my_tasmota_sensor_temperature
Best guessing I've tried this
"pooltemp": name: "Pooltemp" topic: "Pooltemp" source: "DS18B20" init: - topic: "cmnd/%topic%/STATUS" payload: 10 type: raw uses_template: tasmota_sensor_temperature
-
You need to make sure the response to that command actually includes the data you want. I've found that some Tasmota devices return incomplete state on this query. For example, I have a node set up with two relays, and this query does not provide the state of the two relays. The alternate choice, then, is to send
cmnd/%topic%Power
with no payload, and the node replies with aRESULT
topic and the current state (which the template understands).My guess is this issue is moot, however, if you're using an MQTT broker that supports QoS and retain.
-
You need to make sure the response to that command actually includes the data you want. I've found that some Tasmota devices return incomplete state on this query. For example, I have a node set up with two relays, and this query does not provide the state of the two relays. The alternate choice, then, is to send
cmnd/%topic%Power
with no payload, and the node replies with aRESULT
topic and the current state (which the template understands).My guess is this issue is moot, however, if you're using an MQTT broker that supports QoS and retain.
I'm really sorry but I'm failing getting this running - It seems to not be able to find the MQTT files on startup. Running in Docker and have created the correct directory structure with files. It can read my edited config yaml files from home/kevin/reactor/config OK. Permissions are OK.
Have a lot of MQTT experience but not so hot on Linux/Docker this was my run command
docker run --name reactor -d --restart on-failure -p 8111:8111 -v /home/kevin/reactor:/var/reactor --mount type=bind,src=/etc/localtime,target=/etc/localtime toggledbits/reactor:latest-generic-amd64
[latest-22004]2022-01-07T02:08:16.554Z <Structure:INFO> Structure#1 loading controller interface mqtt (MQTTController) [latest-22004]2022-01-07T02:08:16.560Z <MQTTController:null> Module MQTTController v21361 [latest-22004]2022-01-07T02:08:16.561Z <Controller:CRIT> Controller: failed to load mqtt implementation file:///var/reactor/ext/MQTTController/MQTTController.js: [Error]Error: Cannot find module 'mqtt' Require stack: - /var/reactor/ext/MQTTController/MQTTController.js [latest-22004]2022-01-07T02:08:16.562Z <Controller:CRIT> Error: Cannot find module 'mqtt' Require stack: - /var/reactor/ext/MQTTController/MQTTController.js Error: Cannot find module 'mqtt' Require stack: - /var/reactor/ext/MQTTController/MQTTController.js ...
-
Did you just drop it in the folder, or did you go through all the installation steps? The message logged suggests that step 5 wasn't completed.
-
I followed the instructions. Including step 5. I have a feeling I saw an error at some stage in that install so I will revisit that step and report back.
This is what I see when running step5 ./install.sh
Installing dependencies... make: Entering directory '/home/kevin/reactor/ext/MQTTController/node_modules/in otify/build' CXX(target) Release/obj.target/inotify/src/bindings.o In file included from ../src/bindings.cc:2:0: ../src/bindings.h:10:27: error: ‘Handle’ has not been declared static void Initialize(Handle<Object> target); ^~~~~~ ../src/bindings.h:10:33: error: expected ‘,’ or ‘...’ before ‘<’ token static void Initialize(Handle<Object> target); ^ ../src/bindings.cc:11:27: error: variable or field ‘Initialize’ declared void void Inotify::Initialize(Handle<Object> exports) { ^~~~~~ ../src/bindings.cc:11:27: error: ‘Handle’ was not declared in this scope ../src/bindings.cc:11:27: note: suggested alternative: ‘rand_r’ void Inotify::Initialize(Handle<Object> exports) { ^~~~~~ rand_r ../src/bindings.cc:11:40: error: expected primary-expression before ‘>’ token void Inotify::Initialize(Handle<Object> exports) { ^ ../src/bindings.cc:11:42: error: ‘exports’ was not declared in this scope void Inotify::Initialize(Handle<Object> exports) { ^~~~~~~ ../src/bindings.cc: In static member function ‘static Nan::NAN_METHOD_RETURN_TYP E NodeInotify::Inotify::AddWatch(Nan::NAN_METHOD_ARGS_TYPE)’: ../src/bindings.cc:146:43: error: no matching function for call to ‘v8::Value::T oObject()’ Local<Object> args_ = info[0]->ToObject(); ^ In file included from /home/kevin/.cache/node-gyp/12.20.0/include/node/node.h:67 :0, from ../src/node_inotify.h:5, from ../src/bindings.h:4, from ../src/bindings.cc:2: /home/kevin/.cache/node-gyp/12.20.0/include/node/v8.h:2672:44: note: candidate: v8::MaybeLocal<v8::Object> v8::Value::ToObject(v8::Local<v8::Context>) const V8_WARN_UNUSED_RESULT MaybeLocal<Object> ToObject( ^~~~~~~~ /home/kevin/.cache/node-gyp/12.20.0/include/node/v8.h:2672:44: note: candidate expects 1 argument, 0 provided In file included from /home/kevin/.cache/node-gyp/12.20.0/include/node/v8-intern al.h:14:0, from /home/kevin/.cache/node-gyp/12.20.0/include/node/v8.h:27, from /home/kevin/.cache/node-gyp/12.20.0/include/node/node.h:6 , from ../src/node_inotify.h:5, from ../src/bindings.h:4, from ../src/bindings.cc:2: /home/kevin/.cache/node-gyp/12.20.0/include/node/v8.h:2686:31: note: candidate: v8::Local<v8::Object> v8::Value::ToObject(v8::Isolate*) const Local<Object> ToObject(Isolate* isolate) const); ^ /home/kevin/.cache/node-gyp/12.20.0/include/node/v8config.h:328:3: note: in defi nition of macro ‘V8_DEPRECATED’ declarator __attribute__((deprecated(message))) ^~~~~~~~~~ /home/kevin/.cache/node-gyp/12.20.0/include/node/v8.h:2686:31: note: candidate expects 1 argument, 0 provided Local<Object> ToObject(Isolate* isolate) const); ^ /home/kevin/.cache/node-gyp/12.20.0/include/node/v8config.h:328:3: note: in defi nition of macro ‘V8_DEPRECATED’ declarator __attribute__((deprecated(message))) ^~~~~~~~~~ ../src/bindings.cc:149:27: error: no matching function for call to ‘v8::Object:: Has(v8::Local<v8::String>&)’ if (!args_->Has(path_sym)) { ^ In file included from /home/kevin/.cache/node-gyp/12.20.0/include/node/node.h:67 :0, from ../src/node_inotify.h:5, from ../src/bindings.h:4, from ../src/bindings.cc:2: /home/kevin/.cache/node-gyp/12.20.0/include/node/v8.h:3590:37: note: candidate: v8::Maybe<bool> v8::Object::Has(v8::Local<v8::Context>, v8::Local<v8::Value>) V8_WARN_UNUSED_RESULT Maybe<bool> Has(Local<Context> context, ^~~ /home/kevin/.cache/node-gyp/12.20.0/include/node/v8.h:3590:37: note: candidate expects 2 arguments, 1 provided /home/kevin/.cache/node-gyp/12.20.0/include/node/v8.h:3596:37: note: candidate: v8::Maybe<bool> v8::Object::Has(v8::Local<v8::Context>, uint32_t) V8_WARN_UNUSED_RESULT Maybe<bool> Has(Local<Context> context, uint32_t index) ; ^~~ /home/kevin/.cache/node-gyp/12.20.0/include/node/v8.h:3596:37: note: candidate expects 2 arguments, 1 provided ../src/bindings.cc:154:31: error: no matching function for call to ‘v8::Object:: Has(v8::Local<v8::String>&)’ if (!args_->Has(callback_sym) || ^ In file included from /home/kevin/.cache/node-gyp/12.20.0/include/node/node.h:67 :0, from ../src/node_inotify.h:5, from ../src/bindings.h:4, from ../src/bindings.cc:2: /home/kevin/.cache/node-gyp/12.20.0/include/node/v8.h:3590:37: note: candidate: v8::Maybe<bool> v8::Object::Has(v8::Local<v8::Context>, v8::Local<v8::Value>) V8_WARN_UNUSED_RESULT Maybe<bool> Has(Local<Context> context, ^~~ /home/kevin/.cache/node-gyp/12.20.0/include/node/v8.h:3590:37: note: candidate expects 2 arguments, 1 provided /home/kevin/.cache/node-gyp/12.20.0/include/node/v8.h:3596:37: note: candidate: v8::Maybe<bool> v8::Object::Has(v8::Local<v8::Context>, uint32_t) V8_WARN_UNUSED_RESULT Maybe<bool> Has(Local<Context> context, uint32_t index) ; ^~~ /home/kevin/.cache/node-gyp/12.20.0/include/node/v8.h:3596:37: note: candidate expects 2 arguments, 1 provided ../src/bindings.cc:155:28: warning: ‘v8::Local<v8::Value> v8::Object::Get(v8::Lo cal<v8::Value>)’ is deprecated: Use maybe version [-Wdeprecated-declarations] !args_->Get(callback_sym)->IsFunction()) { ^ In file included from /home/kevin/.cache/node-gyp/12.20.0/include/node/v8-intern al.h:14:0, from /home/kevin/.cache/node-gyp/12.20.0/include/node/v8.h:27, from /home/kevin/.cache/node-gyp/12.20.0/include/node/node.h:6 , from ../src/node_inotify.h:5, from ../src/bindings.h:4, from ../src/bindings.cc:2: /home/kevin/.cache/node-gyp/12.20.0/include/node/v8.h:3553:51: note: declared he re V8_DEPRECATED("Use maybe version", Local<Value> Get(Local<Value> key)); ^ /home/kevin/.cache/node-gyp/12.20.0/include/node/v8config.h:328:3: note: in defi nition of macro ‘V8_DEPRECATED’ declarator __attribute__((deprecated(message))) ^~~~~~~~~~ ../src/bindings.cc:160:32: error: no matching function for call to ‘v8::Object:: Has(v8::Local<v8::String>&)’ if (!args_->Has(watch_for_sym)) { ^ In file included from /home/kevin/.cache/node-gyp/12.20.0/include/node/node.h:67 :0, from ../src/node_inotify.h:5, from ../src/bindings.h:4, from ../src/bindings.cc:2: /home/kevin/.cache/node-gyp/12.20.0/include/node/v8.h:3590:37: note: candidate: v8::Maybe<bool> v8::Object::Has(v8::Local<v8::Context>, v8::Local<v8::Value>) V8_WARN_UNUSED_RESULT Maybe<bool> Has(Local<Context> context, ^~~ /home/kevin/.cache/node-gyp/12.20.0/include/node/v8.h:3590:37: note: candidate expects 2 arguments, 1 provided /home/kevin/.cache/node-gyp/12.20.0/include/node/v8.h:3596:37: note: candidate: v8::Maybe<bool> v8::Object::Has(v8::Local<v8::Context>, uint32_t) V8_WARN_UNUSED_RESULT Maybe<bool> Has(Local<Context> context, uint32_t index) ; ^~~ /home/kevin/.cache/node-gyp/12.20.0/include/node/v8.h:3596:37: note: candidate expects 2 arguments, 1 provided ../src/bindings.cc:163:33: warning: ‘v8::Local<v8::Value> v8::Object::Get(v8::Lo cal<v8::Value>)’ is deprecated: Use maybe version [-Wdeprecated-declarations] if (!args_->Get(watch_for_sym)->IsInt32()) { ^ In file included from /home/kevin/.cache/node-gyp/12.20.0/include/node/v8-intern al.h:14:0, from /home/kevin/.cache/node-gyp/12.20.0/include/node/v8.h:27, from /home/kevin/.cache/node-gyp/12.20.0/include/node/node.h:6 , from ../src/node_inotify.h:5, from ../src/bindings.h:4, from ../src/bindings.cc:2: /home/kevin/.cache/node-gyp/12.20.0/include/node/v8.h:3553:51: note: declared he re V8_DEPRECATED("Use maybe version", Local<Value> Get(Local<Value> key)); ^ /home/kevin/.cache/node-gyp/12.20.0/include/node/v8config.h:328:3: note: in defi nition of macro ‘V8_DEPRECATED’ declarator __attribute__((deprecated(message))) ^~~~~~~~~~ ../src/bindings.cc:166:36: warning: ‘v8::Local<v8::Value> v8::Object::Get(v8::Lo cal<v8::Value>)’ is deprecated: Use maybe version [-Wdeprecated-declarations] mask |= args_->Get(watch_for_sym)->Int32Value(); ^ In file included from /home/kevin/.cache/node-gyp/12.20.0/include/node/v8-intern al.h:14:0, from /home/kevin/.cache/node-gyp/12.20.0/include/node/v8.h:27, from /home/kevin/.cache/node-gyp/12.20.0/include/node/node.h:6 , from ../src/node_inotify.h:5, from ../src/bindings.h:4, from ../src/bindings.cc:2: /home/kevin/.cache/node-gyp/12.20.0/include/node/v8.h:3553:51: note: declared he re V8_DEPRECATED("Use maybe version", Local<Value> Get(Local<Value> key)); ^ /home/kevin/.cache/node-gyp/12.20.0/include/node/v8config.h:328:3: note: in defi nition of macro ‘V8_DEPRECATED’ declarator __attribute__((deprecated(message))) ^~~~~~~~~~ ../src/bindings.cc:166:50: error: no matching function for call to ‘v8::Value::I nt32Value()’ mask |= args_->Get(watch_for_sym)->Int32Value(); ^ In file included from /home/kevin/.cache/node-gyp/12.20.0/include/node/node.h:67 :0, from ../src/node_inotify.h:5, from ../src/bindings.h:4, from ../src/bindings.cc:2: /home/kevin/.cache/node-gyp/12.20.0/include/node/v8.h:2709:40: note: candidate: v8::Maybe<int> v8::Value::Int32Value(v8::Local<v8::Context>) const V8_WARN_UNUSED_RESULT Maybe<int32_t> Int32Value(Local<Context> context) const ; ^~~~~~~~~~ /home/kevin/.cache/node-gyp/12.20.0/include/node/v8.h:2709:40: note: candidate expects 1 argument, 0 provided ../src/bindings.cc:172:45: warning: ‘v8::Local<v8::Value> v8::Object::Get(v8::Lo cal<v8::Value>)’ is deprecated: Use maybe version [-Wdeprecated-declarations] String::Utf8Value path(args_->Get(path_sym)); ^ In file included from /home/kevin/.cache/node-gyp/12.20.0/include/node/v8-intern al.h:14:0, from /home/kevin/.cache/node-gyp/12.20.0/include/node/v8.h:27, from /home/kevin/.cache/node-gyp/12.20.0/include/node/node.h:6 , from ../src/node_inotify.h:5, from ../src/bindings.h:4, from ../src/bindings.cc:2: /home/kevin/.cache/node-gyp/12.20.0/include/node/v8.h:3553:51: note: declared he re V8_DEPRECATED("Use maybe version", Local<Value> Get(Local<Value> key)); ^ /home/kevin/.cache/node-gyp/12.20.0/include/node/v8config.h:328:3: note: in defi nition of macro ‘V8_DEPRECATED’ declarator __attribute__((deprecated(message))) ^~~~~~~~~~ ../src/bindings.cc:172:46: error: no matching function for call to ‘v8::String:: Utf8Value::Utf8Value(v8::Local<v8::Value>)’ String::Utf8Value path(args_->Get(path_sym)); ^ In file included from /home/kevin/.cache/node-gyp/12.20.0/include/node/node.h:67 :0, from ../src/node_inotify.h:5, from ../src/bindings.h:4, from ../src/bindings.cc:2: /home/kevin/.cache/node-gyp/12.20.0/include/node/v8.h:3135:5: note: candidate: v 8::String::Utf8Value::Utf8Value(v8::Isolate*, v8::Local<v8::Value>) Utf8Value(Isolate* isolate, Local<v8::Value> obj); ^~~~~~~~~ /home/kevin/.cache/node-gyp/12.20.0/include/node/v8.h:3135:5: note: candidate expects 2 arguments, 1 provided ../src/bindings.cc:182:61: warning: ‘v8::Local<v8::Value> v8::Object::Get(v8::Lo cal<v8::Value>)’ is deprecated: Use maybe version [-Wdeprecated-declarations] inotify->handle()->Set(descriptor, args_->Get(callback_sym)); ^
-
This is what I see when running step5 ./install.sh
Installing dependencies... make: Entering directory '/home/kevin/reactor/ext/MQTTController/node_modules/in otify/build' CXX(target) Release/obj.target/inotify/src/bindings.o In file included from ../src/bindings.cc:2:0: ../src/bindings.h:10:27: error: ‘Handle’ has not been declared static void Initialize(Handle<Object> target); ^~~~~~ ../src/bindings.h:10:33: error: expected ‘,’ or ‘...’ before ‘<’ token static void Initialize(Handle<Object> target); ^ ../src/bindings.cc:11:27: error: variable or field ‘Initialize’ declared void void Inotify::Initialize(Handle<Object> exports) { ^~~~~~ ../src/bindings.cc:11:27: error: ‘Handle’ was not declared in this scope ../src/bindings.cc:11:27: note: suggested alternative: ‘rand_r’ void Inotify::Initialize(Handle<Object> exports) { ^~~~~~ rand_r ../src/bindings.cc:11:40: error: expected primary-expression before ‘>’ token void Inotify::Initialize(Handle<Object> exports) { ^ ../src/bindings.cc:11:42: error: ‘exports’ was not declared in this scope void Inotify::Initialize(Handle<Object> exports) { ^~~~~~~ ../src/bindings.cc: In static member function ‘static Nan::NAN_METHOD_RETURN_TYP E NodeInotify::Inotify::AddWatch(Nan::NAN_METHOD_ARGS_TYPE)’: ../src/bindings.cc:146:43: error: no matching function for call to ‘v8::Value::T oObject()’ Local<Object> args_ = info[0]->ToObject(); ^ In file included from /home/kevin/.cache/node-gyp/12.20.0/include/node/node.h:67 :0, from ../src/node_inotify.h:5, from ../src/bindings.h:4, from ../src/bindings.cc:2: /home/kevin/.cache/node-gyp/12.20.0/include/node/v8.h:2672:44: note: candidate: v8::MaybeLocal<v8::Object> v8::Value::ToObject(v8::Local<v8::Context>) const V8_WARN_UNUSED_RESULT MaybeLocal<Object> ToObject( ^~~~~~~~ /home/kevin/.cache/node-gyp/12.20.0/include/node/v8.h:2672:44: note: candidate expects 1 argument, 0 provided In file included from /home/kevin/.cache/node-gyp/12.20.0/include/node/v8-intern al.h:14:0, from /home/kevin/.cache/node-gyp/12.20.0/include/node/v8.h:27, from /home/kevin/.cache/node-gyp/12.20.0/include/node/node.h:6 , from ../src/node_inotify.h:5, from ../src/bindings.h:4, from ../src/bindings.cc:2: /home/kevin/.cache/node-gyp/12.20.0/include/node/v8.h:2686:31: note: candidate: v8::Local<v8::Object> v8::Value::ToObject(v8::Isolate*) const Local<Object> ToObject(Isolate* isolate) const); ^ /home/kevin/.cache/node-gyp/12.20.0/include/node/v8config.h:328:3: note: in defi nition of macro ‘V8_DEPRECATED’ declarator __attribute__((deprecated(message))) ^~~~~~~~~~ /home/kevin/.cache/node-gyp/12.20.0/include/node/v8.h:2686:31: note: candidate expects 1 argument, 0 provided Local<Object> ToObject(Isolate* isolate) const); ^ /home/kevin/.cache/node-gyp/12.20.0/include/node/v8config.h:328:3: note: in defi nition of macro ‘V8_DEPRECATED’ declarator __attribute__((deprecated(message))) ^~~~~~~~~~ ../src/bindings.cc:149:27: error: no matching function for call to ‘v8::Object:: Has(v8::Local<v8::String>&)’ if (!args_->Has(path_sym)) { ^ In file included from /home/kevin/.cache/node-gyp/12.20.0/include/node/node.h:67 :0, from ../src/node_inotify.h:5, from ../src/bindings.h:4, from ../src/bindings.cc:2: /home/kevin/.cache/node-gyp/12.20.0/include/node/v8.h:3590:37: note: candidate: v8::Maybe<bool> v8::Object::Has(v8::Local<v8::Context>, v8::Local<v8::Value>) V8_WARN_UNUSED_RESULT Maybe<bool> Has(Local<Context> context, ^~~ /home/kevin/.cache/node-gyp/12.20.0/include/node/v8.h:3590:37: note: candidate expects 2 arguments, 1 provided /home/kevin/.cache/node-gyp/12.20.0/include/node/v8.h:3596:37: note: candidate: v8::Maybe<bool> v8::Object::Has(v8::Local<v8::Context>, uint32_t) V8_WARN_UNUSED_RESULT Maybe<bool> Has(Local<Context> context, uint32_t index) ; ^~~ /home/kevin/.cache/node-gyp/12.20.0/include/node/v8.h:3596:37: note: candidate expects 2 arguments, 1 provided ../src/bindings.cc:154:31: error: no matching function for call to ‘v8::Object:: Has(v8::Local<v8::String>&)’ if (!args_->Has(callback_sym) || ^ In file included from /home/kevin/.cache/node-gyp/12.20.0/include/node/node.h:67 :0, from ../src/node_inotify.h:5, from ../src/bindings.h:4, from ../src/bindings.cc:2: /home/kevin/.cache/node-gyp/12.20.0/include/node/v8.h:3590:37: note: candidate: v8::Maybe<bool> v8::Object::Has(v8::Local<v8::Context>, v8::Local<v8::Value>) V8_WARN_UNUSED_RESULT Maybe<bool> Has(Local<Context> context, ^~~ /home/kevin/.cache/node-gyp/12.20.0/include/node/v8.h:3590:37: note: candidate expects 2 arguments, 1 provided /home/kevin/.cache/node-gyp/12.20.0/include/node/v8.h:3596:37: note: candidate: v8::Maybe<bool> v8::Object::Has(v8::Local<v8::Context>, uint32_t) V8_WARN_UNUSED_RESULT Maybe<bool> Has(Local<Context> context, uint32_t index) ; ^~~ /home/kevin/.cache/node-gyp/12.20.0/include/node/v8.h:3596:37: note: candidate expects 2 arguments, 1 provided ../src/bindings.cc:155:28: warning: ‘v8::Local<v8::Value> v8::Object::Get(v8::Lo cal<v8::Value>)’ is deprecated: Use maybe version [-Wdeprecated-declarations] !args_->Get(callback_sym)->IsFunction()) { ^ In file included from /home/kevin/.cache/node-gyp/12.20.0/include/node/v8-intern al.h:14:0, from /home/kevin/.cache/node-gyp/12.20.0/include/node/v8.h:27, from /home/kevin/.cache/node-gyp/12.20.0/include/node/node.h:6 , from ../src/node_inotify.h:5, from ../src/bindings.h:4, from ../src/bindings.cc:2: /home/kevin/.cache/node-gyp/12.20.0/include/node/v8.h:3553:51: note: declared he re V8_DEPRECATED("Use maybe version", Local<Value> Get(Local<Value> key)); ^ /home/kevin/.cache/node-gyp/12.20.0/include/node/v8config.h:328:3: note: in defi nition of macro ‘V8_DEPRECATED’ declarator __attribute__((deprecated(message))) ^~~~~~~~~~ ../src/bindings.cc:160:32: error: no matching function for call to ‘v8::Object:: Has(v8::Local<v8::String>&)’ if (!args_->Has(watch_for_sym)) { ^ In file included from /home/kevin/.cache/node-gyp/12.20.0/include/node/node.h:67 :0, from ../src/node_inotify.h:5, from ../src/bindings.h:4, from ../src/bindings.cc:2: /home/kevin/.cache/node-gyp/12.20.0/include/node/v8.h:3590:37: note: candidate: v8::Maybe<bool> v8::Object::Has(v8::Local<v8::Context>, v8::Local<v8::Value>) V8_WARN_UNUSED_RESULT Maybe<bool> Has(Local<Context> context, ^~~ /home/kevin/.cache/node-gyp/12.20.0/include/node/v8.h:3590:37: note: candidate expects 2 arguments, 1 provided /home/kevin/.cache/node-gyp/12.20.0/include/node/v8.h:3596:37: note: candidate: v8::Maybe<bool> v8::Object::Has(v8::Local<v8::Context>, uint32_t) V8_WARN_UNUSED_RESULT Maybe<bool> Has(Local<Context> context, uint32_t index) ; ^~~ /home/kevin/.cache/node-gyp/12.20.0/include/node/v8.h:3596:37: note: candidate expects 2 arguments, 1 provided ../src/bindings.cc:163:33: warning: ‘v8::Local<v8::Value> v8::Object::Get(v8::Lo cal<v8::Value>)’ is deprecated: Use maybe version [-Wdeprecated-declarations] if (!args_->Get(watch_for_sym)->IsInt32()) { ^ In file included from /home/kevin/.cache/node-gyp/12.20.0/include/node/v8-intern al.h:14:0, from /home/kevin/.cache/node-gyp/12.20.0/include/node/v8.h:27, from /home/kevin/.cache/node-gyp/12.20.0/include/node/node.h:6 , from ../src/node_inotify.h:5, from ../src/bindings.h:4, from ../src/bindings.cc:2: /home/kevin/.cache/node-gyp/12.20.0/include/node/v8.h:3553:51: note: declared he re V8_DEPRECATED("Use maybe version", Local<Value> Get(Local<Value> key)); ^ /home/kevin/.cache/node-gyp/12.20.0/include/node/v8config.h:328:3: note: in defi nition of macro ‘V8_DEPRECATED’ declarator __attribute__((deprecated(message))) ^~~~~~~~~~ ../src/bindings.cc:166:36: warning: ‘v8::Local<v8::Value> v8::Object::Get(v8::Lo cal<v8::Value>)’ is deprecated: Use maybe version [-Wdeprecated-declarations] mask |= args_->Get(watch_for_sym)->Int32Value(); ^ In file included from /home/kevin/.cache/node-gyp/12.20.0/include/node/v8-intern al.h:14:0, from /home/kevin/.cache/node-gyp/12.20.0/include/node/v8.h:27, from /home/kevin/.cache/node-gyp/12.20.0/include/node/node.h:6 , from ../src/node_inotify.h:5, from ../src/bindings.h:4, from ../src/bindings.cc:2: /home/kevin/.cache/node-gyp/12.20.0/include/node/v8.h:3553:51: note: declared he re V8_DEPRECATED("Use maybe version", Local<Value> Get(Local<Value> key)); ^ /home/kevin/.cache/node-gyp/12.20.0/include/node/v8config.h:328:3: note: in defi nition of macro ‘V8_DEPRECATED’ declarator __attribute__((deprecated(message))) ^~~~~~~~~~ ../src/bindings.cc:166:50: error: no matching function for call to ‘v8::Value::I nt32Value()’ mask |= args_->Get(watch_for_sym)->Int32Value(); ^ In file included from /home/kevin/.cache/node-gyp/12.20.0/include/node/node.h:67 :0, from ../src/node_inotify.h:5, from ../src/bindings.h:4, from ../src/bindings.cc:2: /home/kevin/.cache/node-gyp/12.20.0/include/node/v8.h:2709:40: note: candidate: v8::Maybe<int> v8::Value::Int32Value(v8::Local<v8::Context>) const V8_WARN_UNUSED_RESULT Maybe<int32_t> Int32Value(Local<Context> context) const ; ^~~~~~~~~~ /home/kevin/.cache/node-gyp/12.20.0/include/node/v8.h:2709:40: note: candidate expects 1 argument, 0 provided ../src/bindings.cc:172:45: warning: ‘v8::Local<v8::Value> v8::Object::Get(v8::Lo cal<v8::Value>)’ is deprecated: Use maybe version [-Wdeprecated-declarations] String::Utf8Value path(args_->Get(path_sym)); ^ In file included from /home/kevin/.cache/node-gyp/12.20.0/include/node/v8-intern al.h:14:0, from /home/kevin/.cache/node-gyp/12.20.0/include/node/v8.h:27, from /home/kevin/.cache/node-gyp/12.20.0/include/node/node.h:6 , from ../src/node_inotify.h:5, from ../src/bindings.h:4, from ../src/bindings.cc:2: /home/kevin/.cache/node-gyp/12.20.0/include/node/v8.h:3553:51: note: declared he re V8_DEPRECATED("Use maybe version", Local<Value> Get(Local<Value> key)); ^ /home/kevin/.cache/node-gyp/12.20.0/include/node/v8config.h:328:3: note: in defi nition of macro ‘V8_DEPRECATED’ declarator __attribute__((deprecated(message))) ^~~~~~~~~~ ../src/bindings.cc:172:46: error: no matching function for call to ‘v8::String:: Utf8Value::Utf8Value(v8::Local<v8::Value>)’ String::Utf8Value path(args_->Get(path_sym)); ^ In file included from /home/kevin/.cache/node-gyp/12.20.0/include/node/node.h:67 :0, from ../src/node_inotify.h:5, from ../src/bindings.h:4, from ../src/bindings.cc:2: /home/kevin/.cache/node-gyp/12.20.0/include/node/v8.h:3135:5: note: candidate: v 8::String::Utf8Value::Utf8Value(v8::Isolate*, v8::Local<v8::Value>) Utf8Value(Isolate* isolate, Local<v8::Value> obj); ^~~~~~~~~ /home/kevin/.cache/node-gyp/12.20.0/include/node/v8.h:3135:5: note: candidate expects 2 arguments, 1 provided ../src/bindings.cc:182:61: warning: ‘v8::Local<v8::Value> v8::Object::Get(v8::Lo cal<v8::Value>)’ is deprecated: Use maybe version [-Wdeprecated-declarations] inotify->handle()->Set(descriptor, args_->Get(callback_sym)); ^
IN two posts because was too long - sorry
In file included from /home/kevin/.cache/node-gyp/12.20.0/include/node/v8-intern al.h:14:0, from /home/kevin/.cache/node-gyp/12.20.0/include/node/v8.h:27, from /home/kevin/.cache/node-gyp/12.20.0/include/node/node.h:6 , from ../src/node_inotify.h:5, from ../src/bindings.h:4, from ../src/bindings.cc:2: /home/kevin/.cache/node-gyp/12.20.0/include/node/v8.h:3553:51: note: declared he re V8_DEPRECATED("Use maybe version", Local<Value> Get(Local<Value> key)); ^ /home/kevin/.cache/node-gyp/12.20.0/include/node/v8config.h:328:3: note: in defi nition of macro ‘V8_DEPRECATED’ declarator __attribute__((deprecated(message))) ^~~~~~~~~~ ../src/bindings.cc:182:62: warning: ‘bool v8::Object::Set(v8::Local<v8::Value>, v8::Local<v8::Value>)’ is deprecated: Use maybe version [-Wdeprecated-declaratio ns] inotify->handle()->Set(descriptor, args_->Get(callback_sym)); ^ In file included from /home/kevin/.cache/node-gyp/12.20.0/include/node/v8-intern al.h:14:0, from /home/kevin/.cache/node-gyp/12.20.0/include/node/v8.h:27, from /home/kevin/.cache/node-gyp/12.20.0/include/node/node.h:6 , from ../src/node_inotify.h:5, from ../src/bindings.h:4, from ../src/bindings.cc:2: /home/kevin/.cache/node-gyp/12.20.0/include/node/v8.h:3499:22: note: declared he re bool Set(Local<Value> key, Local<Value> value)); ^ /home/kevin/.cache/node-gyp/12.20.0/include/node/v8config.h:328:3: note: in defi nition of macro ‘V8_DEPRECATED’ declarator __attribute__((deprecated(message))) ^~~~~~~~~~ ../src/bindings.cc: In static member function ‘static Nan::NAN_METHOD_RETURN_TYP E NodeInotify::Inotify::RemoveWatch(Nan::NAN_METHOD_ARGS_TYPE)’: ../src/bindings.cc:195:31: error: no matching function for call to ‘v8::Value::I nt32Value()’ watch = info[0]->Int32Value(); ^ In file included from /home/kevin/.cache/node-gyp/12.20.0/include/node/node.h:67 :0, from ../src/node_inotify.h:5, from ../src/bindings.h:4, from ../src/bindings.cc:2: /home/kevin/.cache/node-gyp/12.20.0/include/node/v8.h:2709:40: note: candidate: v8::Maybe<int> v8::Value::Int32Value(v8::Local<v8::Context>) const V8_WARN_UNUSED_RESULT Maybe<int32_t> Int32Value(Local<Context> context) const ; ^~~~~~~~~~ /home/kevin/.cache/node-gyp/12.20.0/include/node/v8.h:2709:40: note: candidate expects 1 argument, 0 provided ../src/bindings.cc: In static member function ‘static void NodeInotify::Inotify: :Callback(uv_poll_t*, int, int)’: ../src/bindings.cc:262:86: warning: ‘bool v8::Object::Set(v8::Local<v8::Value>, v8::Local<v8::Value>)’ is deprecated: Use maybe version [-Wdeprecated-declaratio ns] >Set(Nan::New<String>("watch").ToLocalChecked(), Nan::New<Integer>(event->wd)); ^ In file included from /home/kevin/.cache/node-gyp/12.20.0/include/node/v8-intern al.h:14:0, from /home/kevin/.cache/node-gyp/12.20.0/include/node/v8.h:27, from /home/kevin/.cache/node-gyp/12.20.0/include/node/node.h:6 , from ../src/node_inotify.h:5, from ../src/bindings.h:4, from ../src/bindings.cc:2: /home/kevin/.cache/node-gyp/12.20.0/include/node/v8.h:3499:22: note: declared he re bool Set(Local<Value> key, Local<Value> value)); ^ /home/kevin/.cache/node-gyp/12.20.0/include/node/v8config.h:328:3: note: in defi nition of macro ‘V8_DEPRECATED’ declarator __attribute__((deprecated(message))) ^~~~~~~~~~ ../src/bindings.cc:263:87: warning: ‘bool v8::Object::Set(v8::Local<v8::Value>, v8::Local<v8::Value>)’ is deprecated: Use maybe version [-Wdeprecated-declaratio ns] Set(Nan::New<String>("mask").ToLocalChecked(), Nan::New<Integer>(event->mask)); ^ In file included from /home/kevin/.cache/node-gyp/12.20.0/include/node/v8-intern al.h:14:0, from /home/kevin/.cache/node-gyp/12.20.0/include/node/v8.h:27, from /home/kevin/.cache/node-gyp/12.20.0/include/node/node.h:6 , from ../src/node_inotify.h:5, from ../src/bindings.h:4, from ../src/bindings.cc:2: /home/kevin/.cache/node-gyp/12.20.0/include/node/v8.h:3499:22: note: declared he re bool Set(Local<Value> key, Local<Value> value)); ^ /home/kevin/.cache/node-gyp/12.20.0/include/node/v8config.h:328:3: note: in defi nition of macro ‘V8_DEPRECATED’ declarator __attribute__((deprecated(message))) ^~~~~~~~~~ ../src/bindings.cc:264:91: warning: ‘bool v8::Object::Set(v8::Local<v8::Value>, v8::Local<v8::Value>)’ is deprecated: Use maybe version [-Wdeprecated-declaratio ns] Nan::New<String>("cookie").ToLocalChecked(), Nan::New<Integer>(event->cookie)); ^ In file included from /home/kevin/.cache/node-gyp/12.20.0/include/node/v8-intern al.h:14:0, from /home/kevin/.cache/node-gyp/12.20.0/include/node/v8.h:27, from /home/kevin/.cache/node-gyp/12.20.0/include/node/node.h:6 , from ../src/node_inotify.h:5, from ../src/bindings.h:4, from ../src/bindings.cc:2: /home/kevin/.cache/node-gyp/12.20.0/include/node/v8.h:3499:22: note: declared he re bool Set(Local<Value> key, Local<Value> value)); ^ /home/kevin/.cache/node-gyp/12.20.0/include/node/v8config.h:328:3: note: in defi nition of macro ‘V8_DEPRECATED’ declarator __attribute__((deprecated(message))) ^~~~~~~~~~ ../src/bindings.cc:267:104: warning: ‘bool v8::Object::Set(v8::Local<v8::Value>, v8::Local<v8::Value>)’ is deprecated: Use maybe version [-Wdeprecated-declarati ons] ing>("name").ToLocalChecked(), Nan::New<String>(event->name).ToLocalChecked()); ^ In file included from /home/kevin/.cache/node-gyp/12.20.0/include/node/v8-intern al.h:14:0, from /home/kevin/.cache/node-gyp/12.20.0/include/node/v8.h:27, from /home/kevin/.cache/node-gyp/12.20.0/include/node/node.h:6 , from ../src/node_inotify.h:5, from ../src/bindings.h:4, from ../src/bindings.cc:2: /home/kevin/.cache/node-gyp/12.20.0/include/node/v8.h:3499:22: note: declared he re bool Set(Local<Value> key, Local<Value> value)); ^ /home/kevin/.cache/node-gyp/12.20.0/include/node/v8config.h:328:3: note: in defi nition of macro ‘V8_DEPRECATED’ declarator __attribute__((deprecated(message))) ^~~~~~~~~~ ../src/bindings.cc:275:66: warning: ‘v8::Local<v8::Value> v8::Object::Get(v8::Lo cal<v8::Value>)’ is deprecated: Use maybe version [-Wdeprecated-declarations] Local<Value> value = handle->Get(Nan::New<Integer>(event->wd)); ^ In file included from /home/kevin/.cache/node-gyp/12.20.0/include/node/v8-intern al.h:14:0, from /home/kevin/.cache/node-gyp/12.20.0/include/node/v8.h:27, from /home/kevin/.cache/node-gyp/12.20.0/include/node/node.h:6 , from ../src/node_inotify.h:5, from ../src/bindings.h:4, from ../src/bindings.cc:2: /home/kevin/.cache/node-gyp/12.20.0/include/node/v8.h:3553:51: note: declared he re V8_DEPRECATED("Use maybe version", Local<Value> Get(Local<Value> key)); ^ /home/kevin/.cache/node-gyp/12.20.0/include/node/v8config.h:328:3: note: in defi nition of macro ‘V8_DEPRECATED’ declarator __attribute__((deprecated(message))) ^~~~~~~~~~ ../src/bindings.cc:279:34: warning: ‘v8::Local<v8::Value> Nan::Callback::Call(v8 ::Local<v8::Object>, int, v8::Local<v8::Value>*) const’ is deprecated [-Wdepreca ted-declarations] callback.Call(handle, 1, argv); ^ In file included from ../src/node_inotify.h:14:0, from ../src/bindings.h:4, from ../src/bindings.cc:2: ../../nan/nan.h:1722:3: note: declared here Call(v8::Local<v8::Object> target ^~~~ ../src/bindings.cc:285:34: error: no matching function for call to ‘v8::Value::T oString()’ handle->Delete(wd->ToString()); ^ In file included from /home/kevin/.cache/node-gyp/12.20.0/include/node/node.h:67 :0, from ../src/node_inotify.h:5, from ../src/bindings.h:4, from ../src/bindings.cc:2: /home/kevin/.cache/node-gyp/12.20.0/include/node/v8.h:2668:44: note: candidate: v8::MaybeLocal<v8::String> v8::Value::ToString(v8::Local<v8::Context>) const V8_WARN_UNUSED_RESULT MaybeLocal<String> ToString( ^~~~~~~~ /home/kevin/.cache/node-gyp/12.20.0/include/node/v8.h:2668:44: note: candidate expects 1 argument, 0 provided In file included from /home/kevin/.cache/node-gyp/12.20.0/include/node/v8-intern al.h:14:0, from /home/kevin/.cache/node-gyp/12.20.0/include/node/v8.h:27, from /home/kevin/.cache/node-gyp/12.20.0/include/node/node.h:6 , from ../src/node_inotify.h:5, from ../src/bindings.h:4, from ../src/bindings.cc:2: /home/kevin/.cache/node-gyp/12.20.0/include/node/v8.h:2684:31: note: candidate: v8::Local<v8::String> v8::Value::ToString(v8::Isolate*) const Local<String> ToString(Isolate* isolate) const); ^ /home/kevin/.cache/node-gyp/12.20.0/include/node/v8config.h:328:3: note: in defi nition of macro ‘V8_DEPRECATED’ declarator __attribute__((deprecated(message))) ^~~~~~~~~~ /home/kevin/.cache/node-gyp/12.20.0/include/node/v8.h:2684:31: note: candidate expects 1 argument, 0 provided Local<String> ToString(Isolate* isolate) const); ^ /home/kevin/.cache/node-gyp/12.20.0/include/node/v8config.h:328:3: note: in defi nition of macro ‘V8_DEPRECATED’ declarator __attribute__((deprecated(message))) ^~~~~~~~~~ inotify.target.mk:112: recipe for target 'Release/obj.target/inotify/src/binding s.o' failed make: *** [Release/obj.target/inotify/src/bindings.o] Error 1 make: Leaving directory '/home/kevin/reactor/ext/MQTTController/node_modules/ino tify/build' kevin@NUC50:~/reactor/ext/MQTTController$
-
Seems like something is broken or out of date in your nodejs installation. How did you install node? And what version is it (run
node -v
)