Nefit Easy™

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

Moderator: leecollings

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,

Kind request. Can you maybe post a new version of your flow, which includes the single connection feature. Just want to see how to get this running properly. Thanks
The single connection option is not initiated from the flow but it's in the node. So it should work in your flow after upgrading.
I am working to do some fine-tuning on my flow, when done i will post it here.
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 »

kc27 wrote:This is the php-script, I use for importing nefit-easy values:
.........

When you save the script in /var/www/update.php you can test it in your browser with http://raspberrypi/update.php, or with the commandline:

Code: Select all

php /var/www/update.php
I made a cronjob for it which runs every 5 minutes:

Code: Select all

*/5 * * * * sudo php /var/www/update.php >/home/pi/update/update_out.txt 2>&1
When there are problems you see it in /home/pi/update/update_out.txt
Nice, i have some questions:
  • How do you handle thermostat changes within Domoticz (so from Domoticz to the Easy)
  • Do you have TIMEOUT issues? You use the CLI, so it authenticates every time you request the status
User avatar
kraades
Posts: 36
Joined: Wednesday 24 June 2015 9:47
Target OS: Raspberry Pi / ODroid
Domoticz version: Stable
Location: The Netherlands
Contact:

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

Post by kraades »

BTW
On the Tweakers.net forum (Dutch) someone is working on porting the library to PHP.
jakkes72
Posts: 23
Joined: Sunday 10 January 2016 20:37
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

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

Post by jakkes72 »

kc27 wrote:This is the php-script, I use for importing nefit-easy values:

Thanks for the script!!
When i use the command "easy -V --serial=xxxxxx --access-key=xxxxxx --password=xxxxx status" i get an output, but when used in the update.php i receive an error:
PHP Parse error: syntax error, unexpected ' ' (T_STRING) in /var/www/update.php on line 3

My knowledge of php/scripting is not that good...
dorenberg
Posts: 110
Joined: Monday 22 June 2015 20:18
Target OS: Raspberry Pi / ODroid
Domoticz version: 4.10982
Location: Veghel, The Netherlands
Contact:

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

Post by dorenberg »

Saw in a commit on github of domoticz the following: Expirimental Nefit-Easy via HTTP web server application from Robert
https://github.com/domoticz/domoticz/co ... 101beb2579

Interesting!!
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 »

dorenberg wrote:Saw in a commit on github of domoticz the following: Expirimental Nefit-Easy via HTTP web server application from Robert
https://github.com/domoticz/domoticz/co ... 101beb2579

Interesting!!
You need the NodeJS Nefit HTTP server. But like the name says it's very experimental.

Are you running with the Node-RED flow now?
dorenberg
Posts: 110
Joined: Monday 22 June 2015 20:18
Target OS: Raspberry Pi / ODroid
Domoticz version: 4.10982
Location: Veghel, The Netherlands
Contact:

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

Post by dorenberg »

yes I did. Went really straight-forward. CPU load seems also back to normal. So thanks for all your hard work!!!!
jeroenkl
Posts: 113
Joined: Sunday 14 July 2013 22:00
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: NL
Contact:

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

Post by jeroenkl »

Werkt inderdaad subliem!
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 »

If running, could you post or PM me your hardware platform (Pi/Windows/etc), install method (sd, binary, source) and version (Domoticz, nodejs and node-red-contrib-benefit-easy) also keep it running and do not update any of the components or reboot your system unless your really need to.

Right now we are investigating a stability issue.
dorenberg
Posts: 110
Joined: Monday 22 June 2015 20:18
Target OS: Raspberry Pi / ODroid
Domoticz version: 4.10982
Location: Veghel, The Netherlands
Contact:

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

Post by dorenberg »

1 small "issue" I currently see is that the setpoint is re-set often on the thermostate when no change is proposed. Clock mode is initiated on the thermostate and it runs like it should. I can see the mobile device icon on the thermostate without any proposed change in temperature.
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 »

dorenberg wrote:1 small "issue" I currently see is that the setpoint is re-set often on the thermostate when no change is proposed. Clock mode is initiated on the thermostate and it runs like it should. I can see the mobile device icon on the thermostate without any proposed change in temperature.
You need to change your flow :)

When only updating the Setpoint's temperature (from a status message) add:

Code: Select all

domoticz_msg.payload.parse = false;
When a setpoint value is updated and 'parse is set to false' it wil not trigger the outgoing MQTT message that sets the temperature on your 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™

Post by pepijn »

I'm working on some documentation but here is my current flow (you need version 1.1.2 of https://www.npmjs.com/package/node-red- ... nefit-easy):
Easy-Flow.png
Easy-Flow.png (47.85 KiB) Viewed 2698 times

Code: Select all

[{"id":"2070e95a.a9555a","type":"nefit-easy-config","z":"b83a61b3.47c5a","serialNumber":"","accessKey":"","password":"","timeout":"60"},{"id":"86f0c28c.790f4","type":"mqtt-broker","z":"","broker":"127.0.0.1","port":"1883","clientid":"","usetls":false,"verifyservercert":true,"compatmode":true,"keepalive":"60","cleansession":true,"willTopic":"","willQos":"0","willRetain":null,"willPayload":"","birthTopic":"","birthQos":"0","birthRetain":null,"birthPayload":""},{"id":"f0310caa.577e2","type":"inject","z":"b83a61b3.47c5a","name":"","topic":"nefit-status","payload":"","payloadType":"date","repeat":"30","crontab":"","once":true,"x":124,"y":75.35716247558594,"wires":[["c36e75f0.089e4"]]},{"id":"9fa51e6d.4853c","type":"debug","z":"b83a61b3.47c5a","name":"","active":true,"console":"true","complete":"true","x":1246.7540283203125,"y":248.60714721679688,"wires":[]},{"id":"e21d13d7.54d608","type":"mqtt in","z":"b83a61b3.47c5a","name":"domoticz/out/#","topic":"domoticz/out/#","broker":"86f0c28c.790f4","x":88.07138061523438,"y":617,"wires":[["be46893b.ec1a7"]]},{"id":"be46893b.ec1a7","type":"function","z":"b83a61b3.47c5a","name":"de-jsonify","func":"var payload = JSON.parse(msg.payload);\nreturn payload;","outputs":1,"noerr":0,"x":254.07138061523438,"y":617,"wires":[["82aa37b1.26f148"]]},{"id":"8f458b60.6c998","type":"debug","z":"b83a61b3.47c5a","name":"","active":false,"console":"false","complete":"true","x":965.3214111328125,"y":615.7500019073486,"wires":[]},{"id":"10471660.16b0ca","type":"function","z":"b83a61b3.47c5a","name":"Get SetPoint Value","func":"msg.payload = msg.svalue1\nreturn msg;","outputs":1,"noerr":0,"x":633.2658462524414,"y":616.0833168029785,"wires":[["de4fda49.b134f"]]},{"id":"82aa37b1.26f148","type":"switch","z":"b83a61b3.47c5a","name":"filter Setpoint IDX","property":"idx","rules":[{"t":"eq","v":"160"}],"checkall":"true","outputs":1,"x":432.51580810546875,"y":616.5555419921875,"wires":[["10471660.16b0ca"]]},{"id":"71ac80f8.677704","type":"comment","z":"b83a61b3.47c5a","name":"Read changes from Domoticz and send to Easy","info":"","x":189.07138061523438,"y":580,"wires":[]},{"id":"a47fff4f.db6778","type":"function","z":"b83a61b3.47c5a","name":"Domoticz MQTT","func":"// Configuration , set to -1 if you dont want to use the sensor\nvar IDX = {};\nIDX['nefit-setpoint'] = 160;\nIDX['nefit-roomtemp'] = 161;\nIDX['nefit-outdoortemp'] = 167;\nIDX['nefit-pressure'] = 162;\nIDX['nefit-boilerindicator'] = 168;\nIDX['nefit-statuscode'] = 163;\nIDX['nefit-flow-temperature'] =164;\n\n// Create message\nvar domoticz_msg = {};\ndomoticz_msg.topic = \"domoticz/in\";\ndomoticz_msg.payload = {};\n\nswitch (msg.topic) {\n    // Topics from nefit-status\n    case 'nefit-roomtemp'  :\n    case 'nefit-outdoortemp'  :\n    case 'nefit-boilerindicator':\n    case 'nefit-setpoint'  :\n    case 'nefit-statuscode' :\n        if (IDX[msg.topic] != -1) {\n            domoticz_msg.payload.idx = IDX[msg.topic];\n            domoticz_msg.payload.nvalue = 0;\n            domoticz_msg.payload.svalue = \"\" + msg.payload;\n            if (msg.topic == 'nefit-setpoint') {\n                domoticz_msg.payload.parse = false;\n            }\n        }\n\n        break;\n    case 'nefit-pressure'  :\n        if (IDX[msg.topic] != -1) {\n            var NefitJSON = JSON.parse(msg.payload);\n            domoticz_msg.payload.idx = IDX[msg.topic];\n            domoticz_msg.payload.nvalue = 0;\n            domoticz_msg.payload.svalue = \"\" + NefitJSON['pressure'];\n        }\n        break;\n    case 'nefit-flow-temperature' :\n        if (IDX[msg.topic])  {\n            var NefitJSON = JSON.parse(msg.payload);\n            domoticz_msg.payload.idx = IDX[msg.topic];\n            domoticz_msg.payload.nvalue = 0;\n            domoticz_msg.payload.svalue = \"\" + NefitJSON['temperature'];\n        }\n        break;\n    default:\n        return;\n}\n\nreturn domoticz_msg;\n","outputs":1,"noerr":0,"x":1063,"y":215.21429443359375,"wires":[["e232a850.baa2c","9fa51e6d.4853c"]]},{"id":"e232a850.baa2c","type":"mqtt out","z":"b83a61b3.47c5a","name":"Domoticz MQTT","topic":"","qos":"","retain":"","broker":"86f0c28c.790f4","x":1278.7499618530273,"y":130.96430206298828,"wires":[]},{"id":"2b74b537.2f9dc6","type":"inject","z":"b83a61b3.47c5a","name":"","topic":"nefit-pressure","payload":"","payloadType":"date","repeat":"300","crontab":"","once":false,"x":125,"y":305.357177734375,"wires":[["6d1aa742.8cfab8"]]},{"id":"e182c879.f16fd8","type":"comment","z":"b83a61b3.47c5a","name":"Publish data from Nefit Easy Client to Domoticz","info":"","x":187.07138061523438,"y":22,"wires":[]},{"id":"f506871a.acbe7","type":"rbe","z":"b83a61b3.47c5a","name":"","func":"rbe","gap":"","x":826.0714111328125,"y":56,"wires":[["a47fff4f.db6778"]]},{"id":"6ee39037.bb5c4c","type":"function","z":"b83a61b3.47c5a","name":"Parse JSON","func":"var NefitJSON = JSON.parse(msg.payload);\nmsg1 = {};\nmsg2 = {};\nmsg3 = {};\nmsg4 = {};\nmsg1.topic = 'nefit-setpoint';\nmsg1.payload = NefitJSON['temp setpoint'];\nmsg2.topic = 'nefit-roomtemp';\nmsg2.payload = NefitJSON['in house temp'];\nmsg3.topic = 'nefit-outdoortemp';\nmsg3.payload = NefitJSON['outdoor temp'];\nmsg4.topic = 'nefit-boilerindicator';\nmsg4.payload = NefitJSON['boiler indicator'];\nreturn [msg1,msg2,msg3,msg4];","outputs":"4","noerr":0,"x":622.5714111328125,"y":75.00001525878906,"wires":[["f506871a.acbe7"],["a47fff4f.db6778"],["a47fff4f.db6778"],["d369a91.8270318"]]},{"id":"fb1d1576.db6fb","type":"inject","z":"b83a61b3.47c5a","name":"","topic":"nefit-statuscode","payload":"","payloadType":"date","repeat":"60","crontab":"","once":false,"x":121.142822265625,"y":241.10716247558594,"wires":[["a4070a6c.adf5c"]]},{"id":"b169b9e6.8e827","type":"rbe","z":"b83a61b3.47c5a","name":"","func":"rbe","gap":"","x":798.142822265625,"y":251.57144165039062,"wires":[["a47fff4f.db6778"]]},{"id":"c36e75f0.089e4","type":"nefit-easy","z":"b83a61b3.47c5a","easyconfig":"2070e95a.a9555a","name":"","topic":"nefit-status","command":"status","x":300.5,"y":75.35716247558594,"wires":[["85ad8d13.d10d2"]]},{"id":"a4070a6c.adf5c","type":"nefit-easy","z":"b83a61b3.47c5a","easyconfig":"2070e95a.a9555a","name":"","topic":"nefit-statuscode","command":"display-code","x":296.5,"y":241.85716247558594,"wires":[["7e8c3906.0149c8"]]},{"id":"6d1aa742.8cfab8","type":"nefit-easy","z":"b83a61b3.47c5a","easyconfig":"2070e95a.a9555a","name":"","topic":"nefit-pressure","command":"pressure","x":297.5,"y":305.357177734375,"wires":[["147e4cc.4f491b3"]]},{"id":"de4fda49.b134f","type":"nefit-easy","z":"b83a61b3.47c5a","easyconfig":"2070e95a.a9555a","name":"","topic":"nefit-set","command":"set-temperature","x":810.0714111328125,"y":616.0000019073486,"wires":[["8f458b60.6c998"]]},{"id":"7e8c3906.0149c8","type":"json","z":"b83a61b3.47c5a","name":"","x":467.5,"y":241.85716247558594,"wires":[["389ea7b4.e23c38"]]},{"id":"85ad8d13.d10d2","type":"json","z":"b83a61b3.47c5a","name":"","x":455,"y":75.35716247558594,"wires":[["6ee39037.bb5c4c"]]},{"id":"d369a91.8270318","type":"rbe","z":"b83a61b3.47c5a","name":"","func":"rbe","gap":"","x":799.0714111328125,"y":201,"wires":[["a47fff4f.db6778"]]},{"id":"efab4bc5.94d228","type":"inject","z":"b83a61b3.47c5a","name":"","topic":"nefit-flow-temperature","payload":"","payloadType":"date","repeat":"300","crontab":"","once":false,"x":122,"y":382.00001525878906,"wires":[["2cb0fac.7081c06"]]},{"id":"2cb0fac.7081c06","type":"nefit-easy","z":"b83a61b3.47c5a","easyconfig":"2070e95a.a9555a","name":"","topic":"nefit-flow-temperature","command":"flow-temperature","x":443,"y":383.00001525878906,"wires":[["f797913b.e0a45"]]},{"id":"f797913b.e0a45","type":"json","z":"b83a61b3.47c5a","name":"","x":799,"y":382.00001525878906,"wires":[["a47fff4f.db6778"]]},{"id":"389ea7b4.e23c38","type":"function","z":"b83a61b3.47c5a","name":"Get Status Code","func":"var NefitJSON = JSON.parse(msg.payload);\nmsg.topic = 'nefit-statuscode';\nmsg.payload = \"\"+\"[ \"+NefitJSON['code']+\" ] \"+NefitJSON['description'];\nreturn msg;","outputs":1,"noerr":0,"x":630,"y":241.35714721679688,"wires":[["b169b9e6.8e827"]]},{"id":"147e4cc.4f491b3","type":"json","z":"b83a61b3.47c5a","name":"","x":799,"y":304,"wires":[["a47fff4f.db6778"]]}]
This will be the result in Domoticz:
Easy-Domoticz.png
Easy-Domoticz.png (97.7 KiB) Viewed 2684 times
dorenberg
Posts: 110
Joined: Monday 22 June 2015 20:18
Target OS: Raspberry Pi / ODroid
Domoticz version: 4.10982
Location: Veghel, The Netherlands
Contact:

Re: Nefit Easy™

Post by dorenberg »

Hi Pepijn,

I should set that in the return flow right? Get setpoint value?

When back home, I am going to update. I will delete the statuscode part because my CV doesn't support it.

thanks! regards. Roger
ps 1.1.2 was already installed.
pepijn
Posts: 251
Joined: Friday 12 July 2013 13:19
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: The Netherlands
Contact:

Re: Nefit Easy™

Post by pepijn »

dorenberg wrote:When back home, I am going to update. I will delete the statuscode part because my CV doesn't support it.
No, it's set in Domoticz MQTT. So the message towards Domoticz.
When you set your temperature on the Easy (manual, by app or by clock) the update comes in trough the regular nefit-status message. In your current situation (when not using parse=false) Node-RED tells Domoticz to update the SetPoint temperature. Domoticz changes the temp and sends a MQTT message to update the temperature. This message is picked up by the other flow which sets the new value on the Easy.

To illustratie:
Temp -15 --> Clock sets to 20 --> Message to Domoticz --> Domoticz set to 20 --> Message to Easy --> Manual set to 20.
So that seems a loop :)

By using parse=false it will look like this
Temp -15 --> Clock sets to 20 --> Message to Domoticz --> Domoticz set to 20 --> Parse =false so STOP
dorenberg wrote:When back home, I am going to update. I will delete the statuscode part because my CV doesn't support it.
You can also set the nefit-statuscode timer to never.
jakkes72
Posts: 23
Joined: Sunday 10 January 2016 20:37
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Nefit Easy™

Post by jakkes72 »

hmmm, tried to install the node-red, but still get these errors:
Imported unrecognised types:
nefit-easy-config
rbe
nefit-easy

I used this version:
https://www.npmjs.com/package/node-red- ... 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™

Post by pepijn »

jakkes72 wrote:hmmm, tried to install the node-red, but still get these errors:
Imported unrecognised types:
nefit-easy-config
rbe
nefit-easy

I used this version:
https://www.npmjs.com/package/node-red- ... nefit-easy
Try upgrading node-red

Code: Select all

sudo npm update -g --unsafe-perm node
And reinstall the easy node

Code: Select all

sudo npm -g un node-red-contrib-nefit-easy

sudo npm -g i node-red-contrib-nefit-easy
jakkes72
Posts: 23
Joined: Sunday 10 January 2016 20:37
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Nefit Easy™

Post by jakkes72 »

I followed the steps above, but still receive the same errors..
(i also did a reboot)
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™

Post by Doler »

pepijn wrote:I'm working on some documentation but here is my current flow.
Works like a charm, thanks for a great job,
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™

Post by pepijn »

Doler wrote:
pepijn wrote:I'm working on some documentation but here is my current flow.
Works like a charm, thanks for a great job,
Mark
Mark,
could you post or PM me your hardware platform (Pi/Windows/etc), install method (sd, binary, source) and version (Domoticz, nodejs and node-red-contrib-benefit-easy) also keep it running and do not update any of the components or reboot your system unless your really need to.

Right now we are investigating a stability issue.
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™

Post by Doler »

pepijn wrote: Mark,
could you post or PM me your hardware platform (Pi/Windows/etc), install method (sd, binary, source) and version (Domoticz, nodejs and node-red-contrib-benefit-easy) also keep it running and do not update any of the components or reboot your system unless your really need to.

Right now we are investigating a stability issue.
Sure, here you go:
- Hardware: Raspberry-PI 2/Razberry/RFXCom
- Install: SD
- Domoticz version v2.4222
- Node.js version v5.3.0
- Node-RED version v.0.12.5
- Nefit Trendline HRC30/CW5 - Nefit Easy (of course ;) )

Additional Node-RED startup information:
Spoiler: show
Welcome to Node-RED
===================

16 Jan 19:07:42 - [info] Node-RED version: v0.12.5
16 Jan 19:07:42 - [info] Node.js version: v5.3.0
16 Jan 19:07:42 - [info] Loading palette nodes
16 Jan 19:07:49 - [info] Settings file : /home/pi/.node-red/settings.js
16 Jan 19:07:49 - [info] User directory : /home/pi/.node-red
16 Jan 19:07:49 - [info] Flows file : /home/pi/.node-red/flows_raspberrypi.json
16 Jan 19:07:49 - [info] Server now running at http://127.0.0.1:1880/
16 Jan 19:07:49 - [info] Starting flows
16 Jan 19:07:49 - [info] [nefit-easy-config:8fea181b.7015e8] Starting Nefit Easy Node for Node-RED.
16 Jan 19:07:49 - [info] Started flows
16 Jan 19:07:50 - [info] [mqtt-broker:66440ee.f99bbf] Connected to broker: mqtt://127.0.0.1:1883
16 Jan 19:07:50 - [info] [nefit-easy-config:8fea181b.7015e8] Nefit Easy xxxxxxxxx connected to Bosch backend.
16 Jan 19:07:50 - [info] [nefit-easy-config:8fea181b.7015e8] Nefit Easy software firmware version: 02.17.00
16 Jan 19:08:19 - [info] [nefit-easy-config:8fea181b.7015e8] Nefit command status (param null value null)
16 Jan 19:08:20 - [info] [debug:43a2d22f.bc5d2c]
Is there something to pay attention to with regards to your investigation?

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
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests