Page 1 of 3

Nefit easy support?

Posted: Wed Jan 06, 2016 12:54 pm
by Edwin
Is this possible for domotiga too?
See link
https://www.domoticz.com/forum/viewtopi ... asy#p67563

Re: Nefit easy support?

Posted: Wed Jan 06, 2016 2:28 pm
by RDNZL
Not native.
You can alter the Python script from one of the first posts to gather the Nefit values and convert the output to json calls to set DomotiGa's device values.
Setting the temp is also possible this way using a 'Shell' type devices, or a script event action.

https://domotiga.nl/projects/domotiga/w ... RPC#Python
https://domotiga.nl/projects/domotiga/w ... C#valueset

If you need help let us know.

Re: Nefit easy support?

Posted: Wed Jan 06, 2016 3:47 pm
by Edwin
That is the problem i dont know how to that.
Have no scripting or program skils :-(

Re: Nefit easy support?

Posted: Wed Jan 06, 2016 4:17 pm
by RDNZL
And I haven't got a Nefit CV ;-)
Can you install the easy nefit command like described, make it output the data you want in the cli?
With that output I can code something.

Re: Nefit easy support?

Posted: Wed Jan 06, 2016 7:41 pm
by Edwin
;-)
i will thank for your support

Re: Nefit easy support?

Posted: Thu Jan 07, 2016 1:47 am
by pepijn
If you read the full topic, a Node RED node is also available, you could use Node RED to publish data. This is also the way they do it for Domoticz

Re: Nefit easy support?

Posted: Sat Jan 09, 2016 4:55 pm
by RDNZL
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

Re: Nefit easy support?

Posted: Sat Jan 09, 2016 6:44 pm
by Edwin
Verry nice,
thank you
I will try it as soon i have the time
i let u know the results.
regards, edwin

Re: Nefit easy support?

Posted: Sun Jan 10, 2016 12:18 am
by Edwin
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
node -v gives me: " segmentation fault" ?
see this:

root@raspberrypi:~# apt-get install -y nodejs
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
gambas3-examples gambas3-gb-jit libllvm3.1
Use 'apt-get autoremove' to remove them.
The following NEW packages will be installed:
nodejs
0 upgraded, 1 newly installed, 0 to remove and 132 not upgraded.
Need to get 0 B/762 kB of archives.
After this operation, 2,395 kB of additional disk space will be used.
Selecting previously unselected package nodejs.
(Reading database ... 86245 files and directories currently installed.)
Unpacking nodejs (from .../nodejs_0.6.19~dfsg1-6_armhf.deb) ...
Processing triggers for man-db ...
Setting up nodejs (0.6.19~dfsg1-6) ...
update-alternatives: using /usr/bin/nodejs to provide /usr/bin/js (js) in auto m ode
root@raspberrypi:~# node -v
Segmentation fault
root@raspberrypi:~#

Re: Nefit easy support?

Posted: Sun Jan 10, 2016 10:28 am
by pepijn
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.

Re: Nefit easy support?

Posted: Sun Jan 10, 2016 12:51 pm
by RDNZL
Which Debian version do you run on your Pi?

Code: Select all

$ cat /etc/debian_version 
jessie/sid

$ uname -a
Linux rdznl 3.19.0-39-generic #44~14.04.1-Ubuntu SMP Wed Dec 2 10:00:35 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
Maybe your distro is not suited to run 5.x nodejs, or something else is wrong, can you try nodejs 4.x version with these steps:

Remove 5.x nodejs:

Code: Select all

$ sudo apt-get purge nodejs
Remove 5.x source repo:

Code: Select all

$ sudo rm -f  /etc/apt/sources.list.d/nodesource.list*
$ sudo apt-get update
Install 4.x

Code: Select all

$ mkdir -p ~/install/nodejs
$ cd ~/install/nodejs
$ curl -sL https://deb.nodesource.com/setup_4.x | bash -
$ sudo apt-get install -y nodejs
Let me know how this works, so I can update the wiki page for your distro.

Re: Nefit easy support?

Posted: Sun Jan 10, 2016 1:47 pm
by Edwin
Hi, Ron
it doesnt work
i uninstalled version 5.x and installed 4.x
still the same problem, is it the version on my raspberry?
this is it: Linux raspberrypi 4.1.7+ #817 PREEMPT Sat Sep 19 15:25:36 BST 2015 armv6l GNU/Linux

sorry im a noob at this so i cant solve it my self :-(
thanks for youre help

Re: Nefit easy support?

Posted: Sun Jan 10, 2016 2:57 pm
by RDNZL
Another attempt:

Remove broken stuff:

Code: Select all

$ sudo apt-get purge nodejs
$ sudo rm -f  /etc/apt/sources.list.d/nodesource.list*
$ sudo apt-get update
Install Pi armv6l version:

Code: Select all

$ mkdir -p ~/install/nodejs
$ cd ~/install/nodejs
$ wget https://nodejs.org/dist/v5.3.0/node-v5.3.0-linux-armv6l.tar.gz
$ tar -xvf node-v5.3.0-linux-armv6l.tar.gz
$ cd node-v5.3.0-linux-armv6l
$ sudo cp -R * /usr/local/
$ node -v

Re: Nefit easy support?

Posted: Sun Jan 10, 2016 7:42 pm
by Edwin
Hi, Ron
this part is ok: :)
$ 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
what can be wrong?
thanksards Edwin
reg

Re: Nefit easy support?

Posted: Sun Jan 10, 2016 8:14 pm
by pepijn
Could you try

Code: Select all

node red.js -v