Nefit Easy™

Others (MiLight, Hue, Toon etc...)

Moderator: leecollings

Post Reply
renebiemans
Posts: 6
Joined: Tuesday 08 December 2015 22:12
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Nefit Easy™ client library (How to install on the Pi)

Post by renebiemans »

you have to stop node-red first before you can issue that command.

sudo ps -ef | grep node
sudo /etc/init.d/nodered stop
node -v
(VERSIE 0.10.4 OID ZOU ER MOETEN STAAN)
wget https://nodejs.org/dist/v5.3.0/node-v5. ... v7l.tar.gz
tar -xvf node-v5.3.0-linux-armv7l.tar.gz
cd node-v5.3.0-linux-armv7l
sudo cp -R * /usr/local/
node -v
(VERSIE 5.3.0 ZOU ER MOETEN STAAN)
I have done this now. Now I don't have an error with the CP command but when I do node-v I get: segmentation fault.
pepijn
Posts: 251
Joined: Friday 12 July 2013 13:19
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: The Netherlands
Contact:

Re: Nefit Easy™ client library (How to install on the Pi)

Post by pepijn »

I published the node on NPMjs so for installation use:

Code: Select all

sudo npm install -g node-red-contrib-nefit-easy
pepijn
Posts: 251
Joined: Friday 12 July 2013 13:19
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: The Netherlands
Contact:

Nefit Easy™ client library (How to install on the Pi)

Post by pepijn »

Doler wrote:
rostyk wrote:@pepijn
i got once per hour a error with crash of node-red:

Code: Select all

Error: read ECONNRESET
    at exports._errnoException (util.js:870:11)
    at TLSWrap.onread (net.js:544:26)
looks like connection are closed (dropped by nefit easy) after a 40-50 minutes.

i will report after clean reinstall (probably caused by mine changes in a code)
I have the same problem, 7 minutes after a restart of red-node

Code: Select all

6 Jan 17:26:26 - [red] Uncaught Exception:
6 Jan 17:26:26 - Error: read ECONNRESET
    at exports._errnoException (util.js:855:11)
    at TLSWrap.onread (net.js:544:26)
Mark

Should be fixed in the new version:

Upgrade:

Code: Select all

sudo npm un -g node-red-contrib-nefit-easy
sudo npm i -g node-red-contrib-nefit-easy
sudo service nodered restart
Doler
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™ client library (How to install on the Pi)

Post by Doler »

pepijn wrote: Should be fixed in the new version:

Upgrade:

Code: Select all

sudo npm u -g node-red-contrib-nefit-easy
sudo npm i -g node-red-contrib-nefit-easy
sudo service nodered restart
Thanks for the solution but you have to help me once more before I can test. Before I saw your message I decided to do a new install on a saved image since I felt a little uncertain on all try-and-error of last few days.

So I started with updating nodejs:

Code: Select all

sudo ps -ef | grep node
sudo service nodered stop
node -v
wget https://nodejs.org/dist/v5.3.0/node-v5.3.0-linux-armv7l.tar.gz
tar -xvf node-v5.3.0-linux-armv7l.tar.gz
cd node-v5.3.0-linux-armv7l
sudo cp -R * /usr/local/
node -v
sudo service nodered start
Then updated node-RED:

Code: Select all

sudo npm cache clean
sudo npm install -g --unsafe-perm node-red
Installed nefit-easy-client:

Code: Select all

sudo npm i nefit-easy-client -g
Then installed nefit-easy node:

Code: Select all

sudo npm i -g node-red-contrib-nefit-easy
sudo service nodered restart
Imported your example script and added necessary nefit easy and device data. After deploying the script the only debug messages I get is "Error: REQUEST_TIMEOUT".
What did I forget? How can I check what is missing?

Thanks, Mark
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
pepijn
Posts: 251
Joined: Friday 12 July 2013 13:19
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: The Netherlands
Contact:

Re: Nefit Easy™ client library (How to install on the Pi)

Post by pepijn »

Doler wrote:
pepijn wrote: Should be fixed in the new version:

Upgrade:

Code: Select all

sudo npm u -g node-red-contrib-nefit-easy
sudo npm i -g node-red-contrib-nefit-easy
sudo service nodered restart
Thanks for the solution but you have to help me once more before I can test. Before I saw your message I decided to do a new install on a saved image since I felt a little uncertain on all try-and-error of last few days.

So I started with updating nodejs:

Code: Select all

sudo ps -ef | grep node
sudo service nodered stop
node -v
wget https://nodejs.org/dist/v5.3.0/node-v5.3.0-linux-armv7l.tar.gz
tar -xvf node-v5.3.0-linux-armv7l.tar.gz
cd node-v5.3.0-linux-armv7l
sudo cp -R * /usr/local/
node -v
sudo service nodered start
Then updated node-RED:

Code: Select all

sudo npm cache clean
sudo npm install -g --unsafe-perm node-red
Installed nefit-easy-client:

Code: Select all

sudo npm i nefit-easy-client -g
Then installed nefit-easy node:

Code: Select all

sudo npm i -g node-red-contrib-nefit-easy
sudo service nodered restart
Imported your example script and added necessary nefit easy and device data. After deploying the script the only debug messages I get is "Error: REQUEST_TIMEOUT".
What did I forget? How can I check what is missing?

Thanks, Mark
Try to remove and reinstall node-red-contrib-nefit-easy. There was an issue with earlier versions.
Doler
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™ client library (How to install on the Pi)

Post by Doler »

pepijn wrote: Try to remove and reinstall node-red-contrib-nefit-easy. There was an issue with earlier versions.
Did that and it's looking far better now (happy that it wasn't me :) ). Still getting occasional errors 'REQUEST_TIMEOUT' but also success messages. Hopefully that can be fixed too. In the mean time I keep it up and see if it will stay connected.

Thanks again, Mark
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
pepijn
Posts: 251
Joined: Friday 12 July 2013 13:19
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: The Netherlands
Contact:

Re: Nefit Easy™ client library (How to install on the Pi)

Post by pepijn »

The new error handling in the library generate these errors. Right now I use a static timeout setting, this will be modified in a future version.
User avatar
mvveelen
Posts: 678
Joined: Friday 31 October 2014 10:22
Target OS: NAS (Synology & others)
Domoticz version: Beta
Location: Hoorn, The Netherlands
Contact:

Re: Nefit Easy™ client library (How to install on the Pi)

Post by mvveelen »

Hi guys, just following this thread and hoping there will be something I could use on my Synology NAS. I'm not using Domoticz anymore on the RPi, but really want to integrate my Nefit Easy in Domoticz. Wishful thinking perhaps, but a guy can dream right :D ?
RPi3b+/RFXCOM rfxtrx433E/Shelly/Xiaomi Gateway/Philips HUE Lights/Atag Zone One/2 SunnyBoy inverters/AirconWithMe/P1 smartmeter/Domoticz latest Beta
pepijn
Posts: 251
Joined: Friday 12 July 2013 13:19
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: The Netherlands
Contact:

Re: Nefit Easy™ client library (How to install on the Pi)

Post by pepijn »

mvveelen wrote:Hi guys, just following this thread and hoping there will be something I could use on my Synology NAS. I'm not using Domoticz anymore on the RPi, but really want to integrate my Nefit Easy in Domoticz. Wishful thinking perhaps, but a guy can dream right :D ?
What about my suggestion on Tweakers? Run Node-RED on your Pi? Maybe there's also a nodejs package for Synology

https://www.synology.com/en-us/dsm/app_packages/Node_js
Holland
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™ client library (How to install on the Pi)

Post by Holland »

Pepijn.

Got the uninstall working by adding the letter n. npm version 3.3.12


sudo npm un -g node-red-contrib-nefit-easy
pepijn
Posts: 251
Joined: Friday 12 July 2013 13:19
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: The Netherlands
Contact:

Re: Nefit Easy™ client library (How to install on the Pi)

Post by pepijn »

Holland wrote:Pepijn.

Got the uninstall working by adding the letter n. npm version 3.3.12


sudo npm un -g node-red-contrib-nefit-easy
Oeps... Thanks for correcting my typo
User avatar
mvveelen
Posts: 678
Joined: Friday 31 October 2014 10:22
Target OS: NAS (Synology & others)
Domoticz version: Beta
Location: Hoorn, The Netherlands
Contact:

Re: Nefit Easy™ client library (How to install on the Pi)

Post by mvveelen »

pepijn wrote:
mvveelen wrote:Hi guys, just following this thread and hoping there will be something I could use on my Synology NAS. I'm not using Domoticz anymore on the RPi, but really want to integrate my Nefit Easy in Domoticz. Wishful thinking perhaps, but a guy can dream right :D ?
What about my suggestion on Tweakers? Run Node-RED on your Pi? Maybe there's also a nodejs package for Synology

https://www.synology.com/en-us/dsm/app_packages/Node_js
There isn't a package with the right version, but I installed it manually and can use the deprecated script. So maybe I'm nearly there already ?
This "Node-RED" is abracadabra for me though. Is this necessary for the newer scripts to work with Domoticz? I'd love to try it.....
Last edited by mvveelen on Thursday 07 January 2016 22:34, edited 1 time in total.
RPi3b+/RFXCOM rfxtrx433E/Shelly/Xiaomi Gateway/Philips HUE Lights/Atag Zone One/2 SunnyBoy inverters/AirconWithMe/P1 smartmeter/Domoticz latest Beta
Holland
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™ client library (How to install on the Pi)

Post by Holland »

Just wondering what is the svalue for flowtemp. I tried both flowtemp and actualSupplyTemperature, but that didn't work

domoticz_msg.payload.svalue = "" + NefitJSON['flowtemp'];
rostyk
Posts: 9
Joined: Monday 04 January 2016 16:58
Target OS: Windows
Domoticz version: 2.4028
Contact:

Re: Nefit Easy™ client library (How to install on the Pi)

Post by rostyk »

Holland wrote:Just wondering what is the svalue for flowtemp. I tried both flowtemp and actualSupplyTemperature, but that didn't work

domoticz_msg.payload.svalue = "" + NefitJSON['flowtemp'];
in current realisation:
you will receive json code like this:

Code: Select all

{ "topic": "nefit-flowtemp", "payload": { "id": "/heatingCircuits/hc1/actualSupplyTemperature", "type": "floatValue", "recordable": 0, "writeable": 0, "value": 36, "unitOfMeasure": "C", "minValue": 0, "maxValue": 100 }, "_msgid": "830e9319.7cf17" }
so just use:

Code: Select all

"" + NefitJSON['value']]
:lol:
in mine previus post i suggest to edit a nefit-easy-commands to receive it in more "human-friendly format" what we have for example for pressure
pepijn
Posts: 251
Joined: Friday 12 July 2013 13:19
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: The Netherlands
Contact:

Re: Nefit Easy™ client library (How to install on the Pi)

Post by pepijn »

rostyk wrote:
Holland wrote:Just wondering what is the svalue for flowtemp. I tried both flowtemp and actualSupplyTemperature, but that didn't work

domoticz_msg.payload.svalue = "" + NefitJSON['flowtemp'];
in current realisation:
you will receive json code like this:

Code: Select all

{ "topic": "nefit-flowtemp", "payload": { "id": "/heatingCircuits/hc1/actualSupplyTemperature", "type": "floatValue", "recordable": 0, "writeable": 0, "value": 36, "unitOfMeasure": "C", "minValue": 0, "maxValue": 100 }, "_msgid": "830e9319.7cf17" }
so just use:

Code: Select all

"" + NefitJSON['value']]
:lol:
in mine previus post i suggest to edit a nefit-easy-commands to receive it in more "human-friendly format" what we have for example for pressure
This is just the full output from the boiler. Off course I can minimize the amount of data displayed in the json ;-)
pepijn
Posts: 251
Joined: Friday 12 July 2013 13:19
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: The Netherlands
Contact:

Re: Nefit Easy™ client library (How to install on the Pi)

Post by pepijn »

mvveelen wrote:
pepijn wrote:
mvveelen wrote:Hi guys, just following this thread and hoping there will be something I could use on my Synology NAS. I'm not using Domoticz anymore on the RPi, but really want to integrate my Nefit Easy in Domoticz. Wishful thinking perhaps, but a guy can dream right :D ?
What about my suggestion on Tweakers? Run Node-RED on your Pi? Maybe there's also a nodejs package for Synology

https://www.synology.com/en-us/dsm/app_packages/Node_js
There isn't a package with the right version, but I installed it manually and can use the deprecated script. So maybe I'm nearly there already ?
This "Node-RED" is abracadabra for me though. Is this necessary for the newer scripts to work with Domoticz? I'd love to try it.....
The newer 'scripts' are exactly the same as the depreciated one, only split into some parts.

You need something to translate between the script and Domoticz. I use Node-RED for that but it can also be done in other ways like perl or lua
pepijn
Posts: 251
Joined: Friday 12 July 2013 13:19
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: The Netherlands
Contact:

Re: Nefit Easy™ client library (How to install on the Pi)

Post by pepijn »

pepijn wrote:
rostyk wrote:
Holland wrote:Just wondering what is the svalue for flowtemp. I tried both flowtemp and actualSupplyTemperature, but that didn't work

domoticz_msg.payload.svalue = "" + NefitJSON['flowtemp'];
in current realisation:
you will receive json code like this:

Code: Select all

{ "topic": "nefit-flowtemp", "payload": { "id": "/heatingCircuits/hc1/actualSupplyTemperature", "type": "floatValue", "recordable": 0, "writeable": 0, "value": 36, "unitOfMeasure": "C", "minValue": 0, "maxValue": 100 }, "_msgid": "830e9319.7cf17" }
so just use:

Code: Select all

"" + NefitJSON['value']]
:lol:
in mine previus post i suggest to edit a nefit-easy-commands to receive it in more "human-friendly format" what we have for example for pressure
This is just the full output from the boiler. Off course I can minimize the amount of data displayed in the json ;-)
Robert added a supplyTemperature command to the library, I will implement this in the next version.
rostyk
Posts: 9
Joined: Monday 04 January 2016 16:58
Target OS: Windows
Domoticz version: 2.4028
Contact:

Re: Nefit Easy™ client library (How to install on the Pi)

Post by rostyk »

I still have feeling that for every "nefit-easy node" we execute full authorisation session from beginning. thats not good because we overuse connections (which are limited up to five, according to Nefit documentation).

upd: thats good because for that purpose i modify status.js command include code for flow temperature just five minutes ago :D
pepijn
Posts: 251
Joined: Friday 12 July 2013 13:19
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: The Netherlands
Contact:

Re: Nefit Easy™ client library (How to install on the Pi)

Post by pepijn »

rostyk wrote:I still have feeling that for every "nefit-easy node" we execute full authorisation session from beginning. thats not good because we overuse connections (which are limited up to five, according to Nefit documentation).

upd: thats good because for that purpose i modify status.js command include code for flow temperature just five minutes ago :D
As said before I'm working in session pooling. This is not that easy :)

The connection overuse you are talking about has nothing todo with the limit in Nefits documentation. The session is closed after every command so the number of concurrent sessions does not grow.

I do not advice to change Robert's library files because it's used as a dependency. Everything you do can be done within the nefit-easy.js (you are free to issue a pull request to add your modifications to the node)
Holland
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™ client library (How to install on the Pi)

Post by Holland »

Thanks Rostyk,

Btw I have created 6 sessions concurrent sessions and now I'm getting these;

-1-2016 01:06:5585298a82.9f76fmsg : errorError: REQUEST_TIMEOUT
8-1-2016 01:06:5785298a82.9f76fmsg : errorError: REQUEST_TIMEOUT
8-1-2016 01:07:13502a77ba.9da608msg : errorError: REQUEST_TIMEOUT
8-1-2016 01:07:13e193b188.2daddmsg : errorError: REQUEST_TIMEOUT
8-1-2016 01:07:1385298a82.9f76fmsg : errorError: REQUEST_TIMEOUT
8-1-2016 01:07:17502a77ba.9da608msg : errorError: REQUEST_TIMEOUT
8-1-2016 01:07:2585298a82.9f76fmsg : errorError: REQUEST_TIMEOUT
8-1-2016 01:07:2785298a82.9f76fmsg : errorError: REQUEST_TIMEOUT

I have removed the new sessions I created, hopefully the connection comes back up.
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests