Nefit easy support?

Forum about Domotiga Open Source Home Automation for Linux.

Moderator: RDNZL

pepijn
Starting Member
Starting Member
Posts: 20
Joined: Tue Feb 15, 2011 9:15 pm

Re: Nefit easy support?

Post by pepijn »

pepijn wrote:
RDNZL wrote:Nice suggestion Pepijn!
I played with it, and create the following wiki page describing how to implement this for DomotiGa.
It can be optimized taking out the whole MQTT part, but maybe I will do this later.
Since I don't have a Nefit CV, I tested the flow by having the scripts return hardcoded JSON test data.

Edwin, maybe the installation notes of the nefit-easy-cli package are not correct, please test and let me know.

https://domotiga.nl/projects/domotiga/wiki/Node-RED
That's quick :)

In see you use the the nefit-easy-client commandline tools. In then meanwhile a 'native' node-red node has been developed (npm -g i node-red-contrib-nefit-easy)

You could also check the thread on the Domoticz forum for more information.
To complete this info:
flows.nodered.org/node/node-red-contrib ... nefit-easy
Edwin
Member
Member
Posts: 447
Joined: Sat Oct 20, 2007 6:37 am
Location: Netherlands

Re: Nefit easy support?

Post by Edwin »

pepijn wrote:Could you try

Code: Select all

node red.js -v
Gives : could not find module
Looks like it isnt installed?
Strange

I hear from you
Thank for youre support
Regards edwin
pepijn
Starting Member
Starting Member
Posts: 20
Joined: Tue Feb 15, 2011 9:15 pm

Re: Nefit easy support?

Post by pepijn »

Today i released a new version of the node-red node. Please check the Domoticz forum for an example flow. It should work on any MQTT supported system.
pepijn
Starting Member
Starting Member
Posts: 20
Joined: Tue Feb 15, 2011 9:15 pm

Re: Nefit easy support?

Post by pepijn »

Edwin wrote:
pepijn wrote:Could you try

Code: Select all

node red.js -v
Gives : could not find module
Looks like it isnt installed?
Strange

I hear from you
Thank for youre support
Regards edwin
I'm not running on a Pi myself so it's hard to replicate your problem. It seems Node(red) is not installed correctly
Edwin
Member
Member
Posts: 447
Joined: Sat Oct 20, 2007 6:37 am
Location: Netherlands

Re: Nefit easy support?

Post by Edwin »

node-red is still not working
reinstalled it but i get warnings:


npm WARN deprecated i18next-client@1.10.3: you can use npm install i18next from version 2.0.0
npm WARN deprecated lodash@0.9.2: lodash@<2.0.0 is no longer maintained. Upgrade to lodash@^3.0.0
npm WARN deprecated lodash@1.0.2: lodash@<2.0.0 is no longer maintained. Upgrade to lodash@^3.0.0
npm WARN install Couldn't install optional dependency: Unsupported
npm WARN deprecated npmconf@2.1.2: this package has been reintegrated into npm a nd is now out of date with respect to npm
generateActionsToTake → d ▄ ╢███████████████████████████████████████████████████████░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░╟



node red.js -v
Gives : could not find module

$ node -v
v5.3.0
$ npm -v
3.3.12

but node red doesnt start with: $ node-red gives error: node-red: command not found

this is in the install directory: root@raspberrypi:~/install# dir
libk8055 nodejs node-red
and in node-red directory:
bin Gruntfile.js locales package.json red.js
CONTRIBUTING.md lib node_modules README.md settings.js
editor LICENSE nodes red test
pepijn
Starting Member
Starting Member
Posts: 20
Joined: Tue Feb 15, 2011 9:15 pm

Re: Nefit easy support?

Post by pepijn »

Edwin wrote:node-red is still not working
reinstalled it but i get warnings:


npm WARN deprecated i18next-client@1.10.3: you can use npm install i18next from version 2.0.0
npm WARN deprecated lodash@0.9.2: lodash@<2.0.0 is no longer maintained. Upgrade to lodash@^3.0.0
npm WARN deprecated lodash@1.0.2: lodash@<2.0.0 is no longer maintained. Upgrade to lodash@^3.0.0
npm WARN install Couldn't install optional dependency: Unsupported
npm WARN deprecated npmconf@2.1.2: this package has been reintegrated into npm a nd is now out of date with respect to npm
generateActionsToTake → d ▄ ╢███████████████████████████████████████████████████████░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░╟



node red.js -v
Gives : could not find module

$ node -v
v5.3.0
$ npm -v
3.3.12

but node red doesnt start with: $ node-red gives error: node-red: command not found

this is in the install directory: root@raspberrypi:~/install# dir
libk8055 nodejs node-red
and in node-red directory:
bin Gruntfile.js locales package.json red.js
CONTRIBUTING.md lib node_modules README.md settings.js
editor LICENSE nodes red test
How did you install node-red?

Code: Select all

npm -g install node-red
Edwin
Member
Member
Posts: 447
Joined: Sat Oct 20, 2007 6:37 am
Location: Netherlands

Re: Nefit easy support?

Post by Edwin »

I installed it with the wiki provided:

We have successfully configured Node.js, we can now download Node-RED.
The latest Node-RED version can be fetched from it's GIT repository so that we can work on it's most recent version updated with any new commits.

To download from GIT, you must make sure that you have GIT package installed.
If it is not there, run the following command to get the GIT installed on your system.

$ sudo apt-get install git-core

After successfully installing GIT, navigate to your home directory to continue with Node-RED installation.
I’ll now list out the steps that you will be executing to first clone the Node-RED repository and then install it using the “npm” command which is the Node Package Manager that we had earlier setup during Node.js installation.

$ cd ~
$ mkdir -f install
$ cd install
$ git clone https://github.com/node-red/node-red.git
$ cd node-red
$ sudo npm install

Is this the wrong way?
pepijn
Starting Member
Starting Member
Posts: 20
Joined: Tue Feb 15, 2011 9:15 pm

Re: Nefit easy support?

Post by pepijn »

I would try npm -g install node-red
Edwin
Member
Member
Posts: 447
Joined: Sat Oct 20, 2007 6:37 am
Location: Netherlands

Re: Nefit easy support?

Post by Edwin »

I will try it.
I let u know the results
Thanks
pepijn
Starting Member
Starting Member
Posts: 20
Joined: Tue Feb 15, 2011 9:15 pm

Re: Nefit easy support?

Post by pepijn »

Edwin wrote:I will try it.
I let u know the results
Thanks
Did you get it to work?
Edwin
Member
Member
Posts: 447
Joined: Sat Oct 20, 2007 6:37 am
Location: Netherlands

Re: Nefit easy support?

Post by Edwin »

No, tried many times
But still it doesnt work :-(

npm ERR! Linux 4.1.7+
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "npm" "-g"
npm ERR! node v5.3.0
npm ERR! npm v3.3.12
npm ERR! path /usr/local/lib/node_modules/.staging/npm-50a4982228b2af3f85663ed45ae26391/package.json
npm ERR! code ENOENT
npm ERR! errno -2
npm ERR! syscall open

npm ERR! enoent ENOENT: no such file or directory, open '/usr/local/lib/node_modules/.staging/npm-50a4982228b2af3f85663ed45ae26391/package.json'
npm ERR! enoent This is most likely not a problem with npm itself
npm ERR! enoent and is related to npm not being able to find a file.
npm ERR! enoent

npm ERR! Please include the following file with any support request:
npm ERR! /root/npm-debug.log
root@raspberrypi:~# npm install -g --unsafe-perm node-red
npm WARN deprecated i18next-client@1.10.3: you can use npm install i18next from version 2.0.0
npm WARN install:mime@1.3.4 ENOENT: no such file or directory, chmod '/usr/local/lib/node_modules/node-red/node_modules/serialport/node_modules/node-pre-gyp- github/node_modules/mime/cli.js'
npm WARN install:har-validator@2.0.3 ENOENT: no such file or directory, chmod '/usr/local/lib/node_modules/node-red/node_modules/serialport/node_modules/node -pre-gyp-github/node_modules/request/node_modules/har-validator/bin/har-validator'
npm WARN install:sshpk@1.7.1 ENOENT: no such file or directory, chmod '/usr/local/lib/node_modules/node-red/node_modules/serialport/node_modules/node-pre-gyp -github/node_modules/request/node_modules/http-signature/node_modules/sshpk/bin/sshpk-conv'
npm WARN install:node-uuid@1.4.7 ENOENT: no such file or directory, chmod '/usr/local/lib/node_modules/node-red/node_modules/serialport/node_modules/node-pre -gyp-github/node_modules/request/node_modules/node-uuid/bin/uuid'
npm WARN install:mkdirp@0.5.1 ENOENT: no such file or directory, chmod '/usr/local/lib/node_modules/node-red/node_modules/serialport/node_modules/node-pre-gy p/node_modules/mkdirp/bin/cmd.js'
npm WARN install:nopt@3.0.6 ENOENT: no such file or directory, chmod '/usr/local/lib/node_modules/node-red/node_modules/serialport/node_modules/node-pre-gyp/ node_modules/nopt/bin/nopt.js'
npm WARN install:strip-json-comments@1.0.4 ENOENT: no such file or directory, chmod '/usr/local/lib/node_modules/node-red/node_modules/serialport/node_module s/node-pre-gyp/node_modules/rc/node_modules/strip-json-comments/cli.js'
npm WARN install:har-validator@2.0.3 ENOENT: no such file or directory, chmod '/usr/local/lib/node_modules/node-red/node_modules/serialport/node_modules/node -pre-gyp/node_modules/request/node_modules/har-validator/bin/har-validator'
npm WARN install:sshpk@1.7.1 ENOENT: no such file or directory, chmod '/usr/local/lib/node_modules/node-red/node_modules/serialport/node_modules/node-pre-gyp /node_modules/request/node_modules/http-signature/node_modules/sshpk/bin/sshpk-conv'
npm WARN install:node-uuid@1.4.7 ENOENT: no such file or directory, chmod '/usr/local/lib/node_modules/node-red/node_modules/serialport/node_modules/node-pre -gyp/node_modules/request/node_modules/node-uuid/bin/uuid'
npm WARN install:rimraf@2.4.4 ENOENT: no such file or directory, chmod '/usr/local/lib/node_modules/node-red/node_modules/serialport/node_modules/node-pre-gy p/node_modules/rimraf/bin.js'
npm WARN install:semver@5.1.0 ENOENT: no such file or directory, chmod '/usr/local/lib/node_modules/node-red/node_modules/serialport/node_modules/node-pre-gy p/node_modules/semver/bin/semver'
/usr/local/bin/node-red -> /usr/local/lib/node_modules/node-red/red.js
/usr/local/bin/node-red-pi -> /usr/local/lib/node_modules/node-red/bin/node-red-pi
/usr/local/lib
└── node-red@0.12.5

root@raspberrypi:~# node-red
Node-RED has not been built. See README.md for details
pepijn
Starting Member
Starting Member
Posts: 20
Joined: Tue Feb 15, 2011 9:15 pm

Nefit easy support?

Post by pepijn »

Could you uninstall node and install it from the node source repositories

Code: Select all

curl -sL https://deb.nodesource.com/setup_4.x | sudo -E bash -
sudo apt-get install -y nodejs
Edwin
Member
Member
Posts: 447
Joined: Sat Oct 20, 2007 6:37 am
Location: Netherlands

Re: Nefit easy support?

Post by Edwin »

i will
i let you know the results.
thanks
Edwin
Member
Member
Posts: 447
Joined: Sat Oct 20, 2007 6:37 am
Location: Netherlands

Re: Nefit easy support?

Post by Edwin »

get this error:

root@raspberrypi:~# sudo apt-get install -y nodejs
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
nodejs : Depends: libc6 (>= 2.16) but 2.13-38+rpi2+deb7u8 is to be installed
Depends: libstdc++6 (>= 5.2) but 4.8.2-21~rpi3rpi1 is to be installed
E: Unable to correct problems, you have held broken packages.
root@raspberrypi:~#
pepijn
Starting Member
Starting Member
Posts: 20
Joined: Tue Feb 15, 2011 9:15 pm

Re: Nefit easy support?

Post by pepijn »

Assuming you have a model A

Code: Select all

wget https://nodejs.org/dist/v4.1.1/node-v4.1.1-linux-armv6l.tar.gz 
tar -xvf node-v4.1.1-linux-armv6l.tar.gz 
cd node-v4.1.1-linux-armv6l
If you have a pi2 replace armv6l by armv7l
Post Reply

Return to “DomotiGa Forum”