Nefit easy support?

Forum about Domotiga Open Source Home Automation for Linux.

Moderator: RDNZL

Nefit easy support?

Postby Edwin » Wed Jan 06, 2016 11:54 am

Is this possible for domotiga too?
See link
https://www.domoticz.com/forum/viewtopi ... asy#p67563
Edwin
Member
Member
 
Posts: 447
Joined: October 2007
Location: Netherlands

Re: Nefit easy support?

Postby RDNZL » Wed Jan 06, 2016 1:28 pm

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.
Regards, Ron.
User avatar
RDNZL
Forum Moderator
Forum Moderator
 
Posts: 994
Joined: September 2006
Location: Dordrecht, The Netherlands

Re: Nefit easy support?

Postby Edwin » Wed Jan 06, 2016 2:47 pm

That is the problem i dont know how to that.
Have no scripting or program skils :-(
Edwin
Member
Member
 
Posts: 447
Joined: October 2007
Location: Netherlands

Re: Nefit easy support?

Postby RDNZL » Wed Jan 06, 2016 3:17 pm

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.
Regards, Ron.
User avatar
RDNZL
Forum Moderator
Forum Moderator
 
Posts: 994
Joined: September 2006
Location: Dordrecht, The Netherlands

Re: Nefit easy support?

Postby Edwin » Wed Jan 06, 2016 6:41 pm

;-)
i will thank for your support
Edwin
Member
Member
 
Posts: 447
Joined: October 2007
Location: Netherlands

Re: Nefit easy support?

Postby pepijn » Thu Jan 07, 2016 12:47 am

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
pepijn
Starting Member
Starting Member
 
Posts: 20
Joined: February 2011

Re: Nefit easy support?

Postby RDNZL » Sat Jan 09, 2016 3:55 pm

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
Regards, Ron.
User avatar
RDNZL
Forum Moderator
Forum Moderator
 
Posts: 994
Joined: September 2006
Location: Dordrecht, The Netherlands

Re: Nefit easy support?

Postby Edwin » Sat Jan 09, 2016 5:44 pm

Verry nice,
thank you
I will try it as soon i have the time
i let u know the results.
regards, edwin
Edwin
Member
Member
 
Posts: 447
Joined: October 2007
Location: Netherlands

Re: Nefit easy support?

Postby Edwin » Sat Jan 09, 2016 11:18 pm

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:~#
Edwin
Member
Member
 
Posts: 447
Joined: October 2007
Location: Netherlands

Re: Nefit easy support?

Postby pepijn » Sun Jan 10, 2016 9:28 am

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.
pepijn
Starting Member
Starting Member
 
Posts: 20
Joined: February 2011

Re: Nefit easy support?

Postby RDNZL » Sun Jan 10, 2016 11:51 am

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.
Regards, Ron.
User avatar
RDNZL
Forum Moderator
Forum Moderator
 
Posts: 994
Joined: September 2006
Location: Dordrecht, The Netherlands

Re: Nefit easy support?

Postby Edwin » Sun Jan 10, 2016 12:47 pm

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
Edwin
Member
Member
 
Posts: 447
Joined: October 2007
Location: Netherlands

Re: Nefit easy support?

Postby RDNZL » Sun Jan 10, 2016 1:57 pm

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
Regards, Ron.
User avatar
RDNZL
Forum Moderator
Forum Moderator
 
Posts: 994
Joined: September 2006
Location: Dordrecht, The Netherlands

Re: Nefit easy support?

Postby Edwin » Sun Jan 10, 2016 6:42 pm

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
Edwin
Member
Member
 
Posts: 447
Joined: October 2007
Location: Netherlands

Re: Nefit easy support?

Postby pepijn » Sun Jan 10, 2016 7:14 pm

Could you try
Code: Select all
node red.js -v
pepijn
Starting Member
Starting Member
 
Posts: 20
Joined: February 2011

Next

Return to DomotiGa Forum

Who is online

Users browsing this forum: No registered users and 1 guest