Seite 2 von 3
Re: Using a node.js module (node-robonect-api) for accessing robonect events in a Home Automation Scenario
Verfasst: Di 20. Jun 2017, 10:37
von Cloud
Thats what i got:
Code: Alles auswählen
pi@raspberrypi:~ $ cd ~/node_modules/node-robonect-api&&npm update
pi@raspberrypi:~/node_modules/node-robonect-api $
pi@raspberrypi:~/node_modules/node-robonect-api $ npm ls|grep robonect
node-robonect-api@0.0.1 (git://github.com/allan-gam/node-robonect-api.git#95abbb52f6a1a263ccc96fdbaf7af94172c2420e) /home/pi/node_modules/node-robonect-api
Re: Using a node.js module (node-robonect-api) for accessing robonect events in a Home Automation Scenario
Verfasst: Di 20. Jun 2017, 10:55
von msan
can you try
Code: Alles auswählen
npm update git+https://github.com/allan-gam/node-robonect-api.git
Then check the version.
In case it doesn't work, please also try this:
Code: Alles auswählen
npm update git://github.com/allan-gam/node-robonect-api.git
Then check the version.
If it's still on 0.0.1, can you please try this:
Code: Alles auswählen
cd ~/node_modules&&rm -rf node-robonect-api
npm install git://github.com/allan-gam/node-robonect-api.git
Thanks!
Re: Using a node.js module (node-robonect-api) for accessing robonect events in a Home Automation Scenario
Verfasst: Di 20. Jun 2017, 11:02
von Cloud
Thank you for your fast help, im happy to help testing
I got the new version with the last set of commands:
Code: Alles auswählen
pi@raspberrypi:~ $ npm update git+https://github.com/allan-gam/node-robonect-api.git
pi@raspberrypi:~ $ npm ls|grep robonect
├─┬ node-robonect-api@0.0.1 (git://github.com/allan-gam/node-robonect-api.git#95abbb52f6a1a263ccc96fdbaf7af94172c2420e)
pi@raspberrypi:~ $ npm update git://github.com/allan-gam/node-robonect-api.git
pi@raspberrypi:~ $ npm ls|grep robonect
├─┬ node-robonect-api@0.0.1 (git://github.com/allan-gam/node-robonect-api.git#95abbb52f6a1a263ccc96fdbaf7af94172c2420e)
pi@raspberrypi:~ $ cd ~/node_modules&&rm -rf node-robonect-api
pi@raspberrypi:~/node_modules $ npm install git://github.com/allan-gam/node-robonect-api.git
-
> ref@1.3.3 install /home/pi/node_modules/node-robonect-api/node_modules/net-keepalive/node_modules/ref
> node-gyp rebuild
make: Entering directory '/home/pi/node_modules/node-robonect-api/node_modules/net-keepalive/node_modules/ref/build'
CXX(target) Release/obj.target/binding/src/binding.o
SOLINK_MODULE(target) Release/obj.target/binding.node
COPY Release/binding.node
make: Leaving directory '/home/pi/node_modules/node-robonect-api/node_modules/net-keepalive/node_modules/ref/build'
> ffi@2.2.0 install /home/pi/node_modules/node-robonect-api/node_modules/net-keepalive/node_modules/ffi
> node-gyp rebuild
make: Entering directory '/home/pi/node_modules/node-robonect-api/node_modules/net-keepalive/node_modules/ffi/build'
CC(target) Release/obj.target/ffi/deps/libffi/src/prep_cif.o
CC(target) Release/obj.target/ffi/deps/libffi/src/types.o
CC(target) Release/obj.target/ffi/deps/libffi/src/raw_api.o
CC(target) Release/obj.target/ffi/deps/libffi/src/java_raw_api.o
CC(target) Release/obj.target/ffi/deps/libffi/src/closures.o
CC(target) Release/obj.target/ffi/deps/libffi/src/arm/ffi.o
../deps/libffi/src/arm/ffi.c: In function ‘ffi_prep_args’:
../deps/libffi/src/arm/ffi.c:72:10: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
&& vi < ecif->cif->vfp_nargs && vfp_type_p (*p_arg))
^
../deps/libffi/src/arm/ffi.c: In function ‘ffi_prep_incoming_args_SYSV’:
../deps/libffi/src/arm/ffi.c:335:10: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
&& vi < cif->vfp_nargs && vfp_type_p (*p_arg))
^
../deps/libffi/src/arm/ffi.c: In function ‘layout_vfp_args’:
../deps/libffi/src/arm/ffi.c:750:17: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (i = 0; i < cif->nargs; i++)
^
CC(target) Release/obj.target/ffi/deps/libffi/src/arm/sysv.o
AR(target) Release/obj.target/deps/libffi/libffi.a
COPY Release/libffi.a
CXX(target) Release/obj.target/ffi_bindings/src/ffi.o
../src/ffi.cc: In static member function ‘static void FFI::InitializeBindings(Nan::ADDON_REGISTER_FUNCTION_ARGS_TYPE)’:
../src/ffi.cc:111:153: warning: ‘bool v8::Object::ForceSet(v8::Local<v8::Value>, v8::Local<v8::Value>, v8::PropertyAttribute)’ is deprecated (declared at /home/pi/.node-gyp/7.10.0/include/node/v8.h:2955): Use CreateDataProperty / DefineOwnProperty [-Wdeprecated-declarations]
target->ForceSet(Nan::New<String>("RTLD_NEXT").ToLocalChecked(), WrapPointer((char *)RTLD_NEXT), static_cast<PropertyAttribute>(ReadOnly | DontDelete));
^
../src/ffi.cc:114:159: warning: ‘bool v8::Object::ForceSet(v8::Local<v8::Value>, v8::Local<v8::Value>, v8::PropertyAttribute)’ is deprecated (declared at /home/pi/.node-gyp/7.10.0/include/node/v8.h:2955): Use CreateDataProperty / DefineOwnProperty [-Wdeprecated-declarations]
target->ForceSet(Nan::New<String>("RTLD_DEFAULT").ToLocalChecked(), WrapPointer((char *)RTLD_DEFAULT), static_cast<PropertyAttribute>(ReadOnly | DontDelete));
^
../src/ffi.cc:123:167: warning: ‘bool v8::Object::ForceSet(v8::Local<v8::Value>, v8::Local<v8::Value>, v8::PropertyAttribute)’ is deprecated (declared at /home/pi/.node-gyp/7.10.0/include/node/v8.h:2955): Use CreateDataProperty / DefineOwnProperty [-Wdeprecated-declarations]
target->ForceSet(Nan::New<String>("FFI_ARG_SIZE").ToLocalChecked(), Nan::New<Uint32>((uint32_t)sizeof(ffi_arg)), static_cast<PropertyAttribute>(ReadOnly|DontDelete));
^
../src/ffi.cc:124:171: warning: ‘bool v8::Object::ForceSet(v8::Local<v8::Value>, v8::Local<v8::Value>, v8::PropertyAttribute)’ is deprecated (declared at /home/pi/.node-gyp/7.10.0/include/node/v8.h:2955): Use CreateDataProperty / DefineOwnProperty [-Wdeprecated-declarations]
target->ForceSet(Nan::New<String>("FFI_SARG_SIZE").ToLocalChecked(), Nan::New<Uint32>((uint32_t)sizeof(ffi_sarg)), static_cast<PropertyAttribute>(ReadOnly | DontDelete));
^
../src/ffi.cc:125:171: warning: ‘bool v8::Object::ForceSet(v8::Local<v8::Value>, v8::Local<v8::Value>, v8::PropertyAttribute)’ is deprecated (declared at /home/pi/.node-gyp/7.10.0/include/node/v8.h:2955): Use CreateDataProperty / DefineOwnProperty [-Wdeprecated-declarations]
target->ForceSet(Nan::New<String>("FFI_TYPE_SIZE").ToLocalChecked(), Nan::New<Uint32>((uint32_t)sizeof(ffi_type)), static_cast<PropertyAttribute>(ReadOnly | DontDelete));
^
../src/ffi.cc:126:169: warning: ‘bool v8::Object::ForceSet(v8::Local<v8::Value>, v8::Local<v8::Value>, v8::PropertyAttribute)’ is deprecated (declared at /home/pi/.node-gyp/7.10.0/include/node/v8.h:2955): Use CreateDataProperty / DefineOwnProperty [-Wdeprecated-declarations]
target->ForceSet(Nan::New<String>("FFI_CIF_SIZE").ToLocalChecked(), Nan::New<Uint32>((uint32_t)sizeof(ffi_cif)), static_cast<PropertyAttribute>(ReadOnly | DontDelete));
^
../src/ffi.cc:132:148: warning: ‘bool v8::Object::ForceSet(v8::Local<v8::Value>, v8::Local<v8::Value>, v8::PropertyAttribute)’ is deprecated (declared at /home/pi/.node-gyp/7.10.0/include/node/v8.h:2955): Use CreateDataProperty / DefineOwnProperty [-Wdeprecated-declarations]
target->ForceSet(Nan::New<String>("HAS_OBJC").ToLocalChecked(), Nan::New<Boolean>(hasObjc), static_cast<PropertyAttribute>(ReadOnly | DontDelete));
^
CXX(target) Release/obj.target/ffi_bindings/src/callback_info.o
CXX(target) Release/obj.target/ffi_bindings/src/threaded_callback_invokation.o
SOLINK_MODULE(target) Release/obj.target/ffi_bindings.node
COPY Release/ffi_bindings.node
make: Leaving directory '/home/pi/node_modules/node-robonect-api/node_modules/net-keepalive/node_modules/ffi/build'
node-robonect-api@0.9.0 node-robonect-api
├── xml2js@0.4.17 (sax@1.2.2, xmlbuilder@4.2.1)
└── net-keepalive@0.3.8 (bindings@1.2.1, ms@0.7.1, ref-struct@1.1.0, debug@2.2.0, nan@2.4.0, ref@1.3.3, ffi@2.2.0)
pi@raspberrypi:~/node_modules $ npm ls|grep robonect
├─┬ node-robonect-api@0.9.0 (git://github.com/allan-gam/node-robonect-api.git#656d06d6a558653c6a93b01fae783787687f933c)
pi@raspberrypi:~/node_modules $
Re: Using a node.js module (node-robonect-api) for accessing robonect events in a Home Automation Scenario
Verfasst: Di 20. Jun 2017, 11:18
von msan
Cloud hat geschrieben: ↑Di 20. Jun 2017, 11:02
Thank you for your fast help, im happy to help testing
I got the new version with the last set of commands:
Thanks again for your kind help. I will update the
installation instructions accordingly.
Cheers!
Re: Using a node.js module (node-robonect-api) for accessing robonect events in a Home Automation Scenario
Verfasst: Di 20. Jun 2017, 11:22
von Cloud
No problem, thats the smallest i can do. I understand some of the script but it takes me testing and googling to know how it really comes together
.
I have the following error with the new StatusCode feature:
Code: Alles auswählen
/home/pi/node_modules/node-robonect-api/robonect.js:36
self.emit("responseStatusCode", response.statusCode);
^
TypeError: Cannot read property 'statusCode' of undefined
at Request._callback (/home/pi/node_modules/node-robonect-api/robonect.js:36:44)
at self.callback (/home/pi/node_modules/request/request.js:188:22)
at emitOne (events.js:96:13)
at Request.emit (events.js:191:7)
at Request.onRequestError (/home/pi/node_modules/request/request.js:884:8)
at emitOne (events.js:96:13)
at ClientRequest.emit (events.js:191:7)
at Socket.socketErrorListener (_http_client.js:358:9)
at emitOne (events.js:96:13)
at Socket.emit (events.js:191:7)
Re: Using a node.js module (node-robonect-api) for accessing robonect events in a Home Automation Scenario
Verfasst: Di 20. Jun 2017, 11:41
von msan
Cloud hat geschrieben: ↑Di 20. Jun 2017, 11:22
...
I have the following error with the new StatusCode feature:
...
In version 0.9.1 I've added a test for the existence of that property. I've also updated the
Installation instruction a bit when it comes to updating.
Re: Using a node.js module (node-robonect-api) for accessing robonect events in a Home Automation Scenario
Verfasst: Do 22. Jun 2017, 10:52
von Cloud
Hi msan,
i have an other question regarding Domoticz, Its the first time i try to read virtual text devices in blockly events but i cant get it to work. How did you do it?
- 1.PNG (52.06 KiB) 3770 mal betrachtet
Re: Using a node.js module (node-robonect-api) for accessing robonect events in a Home Automation Scenario
Verfasst: Fr 23. Jun 2017, 14:40
von msan
Cloud hat geschrieben: ↑Do 22. Jun 2017, 10:52
Hi msan,
i have an other question regarding Domoticz, Its the first time i try to read virtual text devices in blockly events but i cant get it to work. How did you do it?
1.PNG
Hi @Cloud! I've never used blockly.
In a normal LUA script you can access a virtual Text Device's value like this:
In dzVents LUA scripts you can do
I believe that if you post your question at
http://www.domoticz.com/forum/ you'll get an answer.
Cheers!
Re: Using a node.js module (node-robonect-api) for accessing robonect events in a Home Automation Scenario
Verfasst: Fr 28. Jul 2017, 21:22
von Mosvold
Hi.
I got my Robonect today and now starting on the Domoticz.
I have followed your readme as best I could, but not sure what I have missed.
First I have noticed that "node" is "v0.12.1" and Not "v8.2.1" as in DaveJ guide. (I am on RPi 2, Does it matter?)
Then I have created the virtual text devices and updated script with devices and ip for robonect.
Then when I run the script i get:
Code: Alles auswählen
/home/pi/domoticz/scripts/js/mymowerscript.js:49
robonect.on('responseStatusCode', (statusCode) => {
^
SyntaxError: Unexpected token >
at Module._compile (module.js:439:25)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Function.Module.runMain (module.js:497:10)
at startup (node.js:119:16)
at node.js:935:3
What am I missing?
Re: Using a node.js module (node-robonect-api) for accessing robonect events in a Home Automation Scenario
Verfasst: Sa 29. Jul 2017, 09:22
von msan
Mosvold hat geschrieben: ↑Fr 28. Jul 2017, 21:22
What am I missing?
Hi Mosvold!
It's hard to say but if your node version is v0.12.1 I believe that's where you should look for the problem.
First check that You have followed
DaveJ's guide. Look for the heading that says
Install Node.js.
What did the command
tell you?
Could you successfully add Debian apt package repository to include the NodeSource packages? Check with command:
It should output something like
Code: Alles auswählen
deb https://deb.nodesource.com/node_8.x jessie main
deb-src https://deb.nodesource.com/node_8.x jessie main
Did You successfully run
Cheers!