Nefit Easy™
Moderator: leecollings
Re: Nefit Easy™
@pepijn: is it also possible to pull the amount of m3 of gas and put this in a meter of somekind. Would love yo pull this data and put it into a chart.
-
- Posts: 251
- Joined: Friday 12 July 2013 13:19
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Location: The Netherlands
- Contact:
Re: Nefit Easy™
Yes it is, i'am working on that but have two issues:knights wrote:@pepijn: is it also possible to pull the amount of m3 of gas and put this in a meter of somekind. Would love yo pull this data and put it into a chart.
1) time
2) the easy has 2 gas recordings yearly total and daily split by usage type (heating/hot water) i want to use the split data but this a day behind and only showing daily usage.
-
- Posts: 251
- Joined: Friday 12 July 2013 13:19
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Location: The Netherlands
- Contact:
Re: Nefit Easy™
Nefit easy server binds to the localhost by default. So you need to add the --host parameter as described in the documentation.Holland wrote:Question related to the nefit http server functionality of Domoticz. I tried to use another Domoticz server (in my case 10.58.60.84 and port 3000) as the remote server and it didn't work. Whereas locally, using 127.0.0.1 port 3000, it works without a problem. So a bit strange. Is this a known limitation?
https://github.com/robertklep/nefit-eas ... /README.md
So not strange but as designed
Re: Nefit Easy™
will follow this thread for any new developments then. I am very happy with getting readouts from the nefit btw! Good luck with the project.pepijn wrote:Yes it is, i'am working on that but have two issues:knights wrote:@pepijn: is it also possible to pull the amount of m3 of gas and put this in a meter of somekind. Would love yo pull this data and put it into a chart.
1) time
2) the easy has 2 gas recordings yearly total and daily split by usage type (heating/hot water) i want to use the split data but this a day behind and only showing daily usage.
-
- Posts: 14
- Joined: Friday 15 January 2016 23:07
- Target OS: Raspberry Pi / ODroid
- Domoticz version: beta
- Location: Netherlands
- Contact:
Re: Nefit Easy™
Hi all,
I reinstalled my Rpi with Jessie and updated node(v5.6.0) and NPM(v3.6.0), but can't the get Easy-server started up from a cronfile. My Linux-knowledge is (still) limited...I hope someone can help me out:
The script Sweetpants created (sligthly adapted, located in /home/pi/scripts) is working fine:
It doesn't matter if I'm running this script as 'pi' or as root: it works just fine.
But:when I try to fire the script from a cron-file with this content:
...there is something going wrong: the output in cron.err:
Any idea on how to fix this?
Cheers,
Niels
I reinstalled my Rpi with Jessie and updated node(v5.6.0) and NPM(v3.6.0), but can't the get Easy-server started up from a cronfile. My Linux-knowledge is (still) limited...I hope someone can help me out:
The script Sweetpants created (sligthly adapted, located in /home/pi/scripts) is working fine:
Code: Select all
#!/bin/bash
NEFIT_SERIAL_NUMBER=1234
NEFIT_ACCESS_KEY=abcd
NEFIT_PASSWORD=xyz
echo "running Easy Server"
/usr/local/bin/easy-server --serial=$NEFIT_SERIAL_NUMBER --access-key=$NEFIT_ACCESS_KEY --password=$NEFIT_PASSWORD >/tmp/easiest.log
But:when I try to fire the script from a cron-file with this content:
Code: Select all
@reboot /home/pi/scripts/easiest > /tmp/cron.log 2> /tmp/cron.err
Code: Select all
/usr/local/lib/node_modules/nefit-easy-http-server/lib/cli/index.js:32
return client.connect().then(() => {
^
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 Module.require (module.js:364:17)
at require (module.js:380:17)
at Object.<anonymous> (/usr/local/lib/node_modules/nefit-easy-http-server/bin/easy-server:3:1)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
Cheers,
Niels
Re: Nefit Easy™
Does the cron entry works when using:
@reboot /home/pi/scripts/easiest > /dev/null 2>&1
@reboot /home/pi/scripts/easiest > /dev/null 2>&1
-
- Posts: 142
- Joined: Friday 31 July 2015 21:02
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Beta
- Location: Sint-Oedenrode, Netherlands
- Contact:
Re: Nefit Easy™
I too just switched to Jessie and followed the instructions on http://nodered.org/docs/hardware/raspberrypi.html, scroll down to chapter "Adding Autostart capability using SystemD" and follow instructions there to install the service and make it auto-start (not using cron).Niels wrote:Hi all,
I reinstalled my Rpi with Jessie and updated node(v5.6.0) and NPM(v3.6.0), but can't the get Easy-server started up from a cronfile. My Linux-knowledge is (still) limited...I hope someone can help me out:
The script Sweetpants created (sligthly adapted, located in /home/pi/scripts) is working fine:It doesn't matter if I'm running this script as 'pi' or as root: it works just fine.Code: Select all
#!/bin/bash NEFIT_SERIAL_NUMBER=1234 NEFIT_ACCESS_KEY=abcd NEFIT_PASSWORD=xyz echo "running Easy Server" /usr/local/bin/easy-server --serial=$NEFIT_SERIAL_NUMBER --access-key=$NEFIT_ACCESS_KEY --password=$NEFIT_PASSWORD >/tmp/easiest.log
But:when I try to fire the script from a cron-file with this content:...there is something going wrong: the output in cron.err:Code: Select all
@reboot /home/pi/scripts/easiest > /tmp/cron.log 2> /tmp/cron.err
Any idea on how to fix this?Code: Select all
/usr/local/lib/node_modules/nefit-easy-http-server/lib/cli/index.js:32 return client.connect().then(() => { ^ 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 Module.require (module.js:364:17) at require (module.js:380:17) at Object.<anonymous> (/usr/local/lib/node_modules/nefit-easy-http-server/bin/easy-server:3:1) at Module._compile (module.js:456:26) at Object.Module._extensions..js (module.js:474:10) at Module.load (module.js:356:32)
Cheers,
Niels
Worked for me.
Mark: Domoticz Beta on Raspberry Pi 4 running Debian Bookworm - Z-Stick 7 - RFXCom - P1 - MySensors - SolarEdge - Dahua - Philips Hue - Docker - Zigbee2mqtt (plugin) - Zwave-js-ui - dzVents - Nodered
-
- Posts: 179
- Joined: Friday 12 July 2013 13:53
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Beta Ch
- Location: The Netherlands
- Contact:
Re: Nefit Easy™
Experienced exactly the same problem, and to be honest I'm tired of fighting with cron. Cron is just a real pain.... So I dropped cron, and I now use PM2.
PM2 is similar to Forever, but I prefer PM2
After installing PM2, just run ; pm2 start nefiteasyhttpserver.sh
See below the script
#!/bin/bash
/usr/local/bin/easy-server --serial=asdasdasdasd --access-key=asdasdasdasd --password=asdasdasd > /dev/null
PM2 is similar to Forever, but I prefer PM2
After installing PM2, just run ; pm2 start nefiteasyhttpserver.sh
See below the script
#!/bin/bash
/usr/local/bin/easy-server --serial=asdasdasdasd --access-key=asdasdasdasd --password=asdasdasd > /dev/null
-
- Posts: 14
- Joined: Friday 15 January 2016 23:07
- Target OS: Raspberry Pi / ODroid
- Domoticz version: beta
- Location: Netherlands
- Contact:
Re: Nefit Easy™
Thanks for your responses!
@SweetPants: Unfortunately not. No errorfile of course (because > null), but also no http-server running
@Doler: I'm not using node-red (yet), but will keep this suggestion in mind.
@Holland: I'll try this first...Glad to hear there is an alternative to cron.
I'll keep you posted. Thanks again!
Niels
@SweetPants: Unfortunately not. No errorfile of course (because > null), but also no http-server running
@Doler: I'm not using node-red (yet), but will keep this suggestion in mind.
@Holland: I'll try this first...Glad to hear there is an alternative to cron.
I'll keep you posted. Thanks again!
Niels
Re: Nefit Easy™
It's complaining over line 32 in index.js
I use node v 4.3.1, maybe there is where your problem is
I use node v 4.3.1, maybe there is where your problem is
-
- Posts: 14
- Joined: Friday 15 January 2016 23:07
- Target OS: Raspberry Pi / ODroid
- Domoticz version: beta
- Location: Netherlands
- Contact:
Re: Nefit Easy™
PM2 seems to do the job. Next step is to auto-start PM2 at reboot...suggestions appreciated!
-
- Posts: 142
- Joined: Friday 31 July 2015 21:02
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Beta
- Location: Sint-Oedenrode, Netherlands
- Contact:
Re: Nefit Easy™
pm2 start nefiteasyhttpserver.sh toevoegen aan /etc/rc.local (vóór de regel met exit 0)?Niels wrote:PM2 seems to do the job. Next step is to auto-start PM2 at reboot...suggestions appreciated!
Mark: Domoticz Beta on Raspberry Pi 4 running Debian Bookworm - Z-Stick 7 - RFXCom - P1 - MySensors - SolarEdge - Dahua - Philips Hue - Docker - Zigbee2mqtt (plugin) - Zwave-js-ui - dzVents - Nodered
-
- Posts: 251
- Joined: Friday 12 July 2013 13:19
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Location: The Netherlands
- Contact:
Re: Nefit Easy™
Please keep it in EnglishDoler wrote:pm2 start nefiteasyhttpserver.sh toevoegen aan /etc/rc.local (vóór de regel met exit 0)?Niels wrote:PM2 seems to do the job. Next step is to auto-start PM2 at reboot...suggestions appreciated!
You must execute
Code: Select all
pm2 startup
See https://github.com/Unitech/pm2/blob/master/README.md
-
- Posts: 179
- Joined: Friday 12 July 2013 13:53
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Beta Ch
- Location: The Netherlands
- Contact:
Re: Nefit Easy™
For PM2, you need to do 2 things, to make apps restart at reboot
First as Pepijn mentioned;
secondly
See also the docs pm2 -h
and
http://pm2.keymetrics.io/docs/usage/startup/
First as Pepijn mentioned;
Code: Select all
sudo pm2 startup
Code: Select all
sudo pm2 save
See also the docs pm2 -h
and
http://pm2.keymetrics.io/docs/usage/startup/
-
- Posts: 17
- Joined: Wednesday 24 February 2016 11:50
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Beta
- Contact:
Re: Nefit Easy™
Hi,
Beïng new in the Domoticz I read the Nefit Easy with interest.
I wonder if and how it would be possible to controll the nefit easy from my domoticz running on my Synology NAS.
Can someone shine a light on this?
Beïng new in the Domoticz I read the Nefit Easy with interest.
I wonder if and how it would be possible to controll the nefit easy from my domoticz running on my Synology NAS.
Can someone shine a light on this?
-
- Posts: 179
- Joined: Friday 12 July 2013 13:53
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Beta Ch
- Location: The Netherlands
- Contact:
Re: Nefit Easy™
To add a little color to PM2 thingy. I had myself some issues to let it autostart. (used the work perfectly)
Only if you are using Jessie (check via hostnamectl) the following workaround solves the autostart issue;
1. Delete the pm2*.sh file in /etc/init.d
2. sudo pm2 startup systemd –u pi
3. pm2 start nefiteasyhttpserver.sh
4. pm2 save
Then reboot the machine to check if it works
* credits to this guy: http://tech.scargill.net/pm2-node-red-and-the-rock/
Only if you are using Jessie (check via hostnamectl) the following workaround solves the autostart issue;
1. Delete the pm2*.sh file in /etc/init.d
2. sudo pm2 startup systemd –u pi
3. pm2 start nefiteasyhttpserver.sh
4. pm2 save
Then reboot the machine to check if it works
* credits to this guy: http://tech.scargill.net/pm2-node-red-and-the-rock/
-
- Posts: 179
- Joined: Friday 12 July 2013 13:53
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Beta Ch
- Location: The Netherlands
- Contact:
Re: Nefit Easy™
Thanks. Got it working nowNefit easy server binds to the localhost by default. So you need to add the --host parameter as described in the documentation.
https://github.com/robertklep/nefit-eas ... /README.md
So not strange but as designed
-
- Posts: 14
- Joined: Friday 15 January 2016 23:07
- Target OS: Raspberry Pi / ODroid
- Domoticz version: beta
- Location: Netherlands
- Contact:
Re: Nefit Easy™
Thanks for the walkthrough Holland, works flawlessly!
-
- Posts: 24
- Joined: Tuesday 01 March 2016 11:08
- Target OS: Windows
- Domoticz version: 2020.2
- Location: Netherlands
- Contact:
Re: Nefit Easy™
Hi,
I have got my Rasberry Pi 0 running with Raspbian and Domoticz. All latest versions and working fine. But I can't get this installation for Nefit Easy get to work. I'll gues it is going wrong in the first stage. Tough I managed to install node v5.3.0 I get a 'Segmentation fault' as a reaction to the command node -v. When i ignore this fault and move on to installing the nefit client, I also get the samen notification on npm install. Any ideas of what is going wrong?
I have got my Rasberry Pi 0 running with Raspbian and Domoticz. All latest versions and working fine. But I can't get this installation for Nefit Easy get to work. I'll gues it is going wrong in the first stage. Tough I managed to install node v5.3.0 I get a 'Segmentation fault' as a reaction to the command node -v. When i ignore this fault and move on to installing the nefit client, I also get the samen notification on npm install. Any ideas of what is going wrong?
-
- Posts: 251
- Joined: Friday 12 July 2013 13:19
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Location: The Netherlands
- Contact:
Re: Nefit Easy™
Did you install the armv7 binaries instead of the armv6 needed for the 1st generation Pi'sHenk wrote:Hi,
I have got my Rasberry Pi 0 running with Raspbian and Domoticz. All latest versions and working fine. But I can't get this installation for Nefit Easy get to work. I'll gues it is going wrong in the first stage. Tough I managed to install node v5.3.0 I get a 'Segmentation fault' as a reaction to the command node -v. When i ignore this fault and move on to installing the nefit client, I also get the samen notification on npm install. Any ideas of what is going wrong?
Who is online
Users browsing this forum: No registered users and 1 guest