Nefit Easy™
Moderator: leecollings
-
- Posts: 79
- Joined: Tuesday 02 December 2014 22:16
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Beta
- Location: Netherlands
- Contact:
Nefit Easy™ client library (How to install on the Pi)
Yes I changed these locations.. But where to check the mqtt settings? I might missed that one.
- andreo
- Posts: 42
- Joined: Friday 07 August 2015 21:00
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2024.3
- Location: Anna Paulowna, Netherlands
- Contact:
Re: Nefit Easy™ client library (How to install on the Pi)
Where to find enable MQTT support in Domoticz?pepijn wrote:If you place the scripts in a different location you have to edit the 'EXEC' nodes in Node-RED.
Do you have MQTT enabled on your Domoticz setup?
Latest version of Domoticz and more running on Docker|Raspberry Pi 4-B 8GB Bookworm|RF-Link|Klik Aan Klik Uit|Nefit easy|ESPeasy|P1 power meter|S0PCM-5 through Ser2Net|Alecto WS5500|FrtizBox|Satel Integra|Solis
Greetz Andre.
Greetz Andre.
-
- 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)
In the hardware settings check the wiki for more information
- Dutchsea
- Posts: 116
- Joined: Tuesday 08 December 2015 13:22
- Target OS: Raspberry Pi / ODroid
- Domoticz version: v2023.2
- Location: The Netherlands
- Contact:
Re: Nefit Easy™ client library (How to install on the Pi)
All flows import fine in the node-red on my pi except you latest. After the functions 2 unknown nodes "unknown rbe" have appearedpepijn wrote:Here is my current Node-RED flow, have fun.
Code: Select all
[{"id":"22a46350.4b5c8c","type":"mqtt-broker","broker":"127.0.0.1","port":"1883","clientid":"","usetls":false,"verifyservercert":true,"compatmode":true,"keepalive":15,"cleansession":true,"willQos":"0","birthQos":"0"},{"id":"8b0bfef4.74f4","type":"inject","z":"b83a61b3.47c5a","name":"","topic":"nefit-update","payload":"","payloadType":"date","repeat":"30","crontab":"","once":true,"x":210.92857360839844,"y":72.4285717010498,"wires":[["b358d0b9.4ca73"]]},{"id":"b358d0b9.4ca73","type":"exec","z":"b83a61b3.47c5a","command":"/opt/nefit/nefit-status","addpay":false,"append":"","useSpawn":"","name":"Nefit Status","x":366.3730163574219,"y":72.09524345397949,"wires":[["6ebefa6b.914104","5ddfad82.a22054"],[],[]]},{"id":"3876c9bf.c78936","type":"debug","z":"b83a61b3.47c5a","name":"","active":true,"console":"true","complete":"true","x":1248.1825561523438,"y":201.17855834960938,"wires":[]},{"id":"1caaaa11.e35556","type":"mqtt in","z":"b83a61b3.47c5a","name":"domoticz/out/#","topic":"domoticz/out/#","broker":"22a46350.4b5c8c","x":195.92855834960938,"y":371.4285717010498,"wires":[["577c156d.a883ec"]]},{"id":"577c156d.a883ec","type":"function","z":"b83a61b3.47c5a","name":"de-jsonify","func":"var payload = JSON.parse(msg.payload);\nreturn payload;","outputs":1,"noerr":0,"x":361.9285583496094,"y":371.4285717010498,"wires":[["342ad05e.cbd53"]]},{"id":"23467d6a.dcb982","type":"debug","z":"b83a61b3.47c5a","name":"","active":true,"console":"false","complete":"true","x":1073.1785583496094,"y":357.1785717010498,"wires":[]},{"id":"50e0c648.af1f38","type":"function","z":"b83a61b3.47c5a","name":"Get SetPoint Value","func":"msg.payload = msg.svalue1\nreturn msg;","outputs":1,"noerr":0,"x":741.1230239868164,"y":370.5118885040283,"wires":[["a97981c8.56868"]]},{"id":"342ad05e.cbd53","type":"switch","z":"b83a61b3.47c5a","name":"filter Setpoint IDX","property":"idx","rules":[{"t":"eq","v":"160"}],"checkall":"true","outputs":1,"x":540.3729858398438,"y":370.9841136932373,"wires":[["50e0c648.af1f38"]]},{"id":"a97981c8.56868","type":"exec","z":"b83a61b3.47c5a","command":"/opt/nefit/nefit-set","addpay":true,"append":"","useSpawn":"","name":"Nefit Set Temp","x":930.9285697937012,"y":370.17857551574707,"wires":[["23467d6a.dcb982"],[],[]]},{"id":"6440aca2.9bbf54","type":"comment","z":"b83a61b3.47c5a","name":"Read changes from Domoticz and send to Easy","info":"","x":296.9285583496094,"y":334.4285717010498,"wires":[]},{"id":"6ebefa6b.914104","type":"function","z":"b83a61b3.47c5a","name":"Domoticz MQTT","func":"// Configuration\nconst IDX_SetPoint = 160;\nconst IDX_RoomTemp = 161;\nconst IDX_Pressure = 162;\nconst IDX_StatusCode = 163;\n\n\nvar domoticz_msg = {};\ndomoticz_msg.topic = \"domoticz/in\";\ndomoticz_msg.payload = {};\n\nif (msg.topic == 'nefit-update') {\n var NefitJSON = JSON.parse(msg.payload);\n domoticz_msg.payload.idx = IDX_RoomTemp;\n domoticz_msg.payload.nvalue = 0;\n domoticz_msg.payload.svalue = \"\" + NefitJSON['in house temp'];\n}\nif (msg.topic == 'nefit-pressure') {\n var NefitJSON = JSON.parse(msg.payload);\n domoticz_msg.payload.idx = IDX_Pressure;\n domoticz_msg.payload.nvalue = 0;\n domoticz_msg.payload.svalue = \"\" + NefitJSON['pressure'];\n}\nif (msg.topic == 'nefit-setpoint') {\n domoticz_msg.payload.idx = IDX_SetPoint;\n domoticz_msg.payload.nvalue = 0;\n domoticz_msg.payload.svalue = \"\" + msg.payload;\n}\nif (msg.topic == 'nefit-statuscode') {\n domoticz_msg.payload.idx = IDX_StatusCode;\n domoticz_msg.payload.nvalue = 0;\n domoticz_msg.payload.svalue = \"\" + msg.payload;\n}\n\nreturn domoticz_msg;","outputs":1,"noerr":0,"x":1028.4285354614258,"y":140.78571891784668,"wires":[["5bc7035e.a438fc","3876c9bf.c78936"]]},{"id":"5bc7035e.a438fc","type":"mqtt out","z":"b83a61b3.47c5a","name":"Domoticz MQTT","topic":"","qos":"","retain":"","broker":"22a46350.4b5c8c","x":1273.1785507202148,"y":142.53571319580078,"wires":[]},{"id":"2f2db332.d0d24c","type":"exec","z":"b83a61b3.47c5a","command":"/opt/nefit/nefit-pressure","addpay":false,"append":"","useSpawn":"","name":"Nefit Easy Pressure","x":393.9285659790039,"y":211.17857551574707,"wires":[["6ebefa6b.914104"],[],[]]},{"id":"baf3b005.450c5","type":"inject","z":"b83a61b3.47c5a","name":"","topic":"nefit-pressure","payload":"","payloadType":"date","repeat":"300","crontab":"","once":false,"x":208.67857360839844,"y":211.17857551574707,"wires":[["2f2db332.d0d24c"]]},{"id":"2b4dca2.fd4b236","type":"comment","z":"b83a61b3.47c5a","name":"Publish data from Nefit Easy Client to Domoticz","info":"","x":289.9285583496094,"y":24.428571701049805,"wires":[]},{"id":"906bc261.6f944","type":"rbe","z":"b83a61b3.47c5a","name":"","func":"rbe","gap":"","x":794.1428527832031,"y":40.42856979370117,"wires":[["6ebefa6b.914104"]]},{"id":"5ddfad82.a22054","type":"function","z":"b83a61b3.47c5a","name":"Get Setpoint","func":"var NefitJSON = JSON.parse(msg.payload);\nmsg.topic = 'nefit-setpoint';\nmsg.payload = NefitJSON['temp setpoint'];\nreturn msg;","outputs":1,"noerr":0,"x":632,"y":40.571428298950195,"wires":[["906bc261.6f944"]]},{"id":"2296752e.dd698a","type":"inject","z":"b83a61b3.47c5a","name":"","topic":"nefit-statuscode","payload":"","payloadType":"date","repeat":"10","crontab":"","once":false,"x":200.57141876220703,"y":145.6785717010498,"wires":[["4e5066ef.b1af98"]]},{"id":"4e5066ef.b1af98","type":"exec","z":"b83a61b3.47c5a","command":"/opt/nefit/nefit-code","addpay":false,"append":"","useSpawn":"","name":"Nefit Status Code","x":386.1785659790039,"y":145.92857360839844,"wires":[["8e61f998.719e08"],[],[]]},{"id":"8e61f998.719e08","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":586.4285888671875,"y":132.92857360839844,"wires":[["8553f832.7aac08"]]},{"id":"8553f832.7aac08","type":"rbe","z":"b83a61b3.47c5a","name":"","func":"rbe","gap":"","x":741.5714111328125,"y":138.14286041259766,"wires":[["6ebefa6b.914104"]]}]
Message:
"This node is a type unknown to your installation of Node-RED.
If you deploy with the node in this state, it's configuration will be preserved, but the flow will not start until the missing type is installed.
See the Info side bar for more help"
[img]Knipsel.PNG[/img]
Updating my version isnt working
Code: Select all
~ $ sudo apt-get install nodered
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package nodered
- Attachments
-
- Knipsel.PNG (16.86 KiB) Viewed 4438 times
Raspberry PI 3B on USB drive, Debian version: 12 (bookworm), Domoticz 2023.2
Aeon Z-Wave G5 stick, RFXCOM, Sonof Zigbee 3.0 Dongle plus E, Nefit Easy, Fritzbox, Buienradar, Sonos
Aeon Z-Wave G5 stick, RFXCOM, Sonof Zigbee 3.0 Dongle plus E, Nefit Easy, Fritzbox, Buienradar, Sonos
- andreo
- Posts: 42
- Joined: Friday 07 August 2015 21:00
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2024.3
- Location: Anna Paulowna, Netherlands
- Contact:
Re: Nefit Easy™ client library (How to install on the Pi)
I have found it thanxpepijn wrote:In the hardware settings check the wiki for more information
Latest version of Domoticz and more running on Docker|Raspberry Pi 4-B 8GB Bookworm|RF-Link|Klik Aan Klik Uit|Nefit easy|ESPeasy|P1 power meter|S0PCM-5 through Ser2Net|Alecto WS5500|FrtizBox|Satel Integra|Solis
Greetz Andre.
Greetz Andre.
- andreo
- Posts: 42
- Joined: Friday 07 August 2015 21:00
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2024.3
- Location: Anna Paulowna, Netherlands
- Contact:
Re: Nefit Easy™ client library (How to install on the Pi)
Dutchsea wrote:All flows import fine in the node-red on my pi except you latest. After the functions 2 unknown nodes "unknown rbe" have appearedpepijn wrote:Here is my current Node-RED flow, have fun.
Code: Select all
[{"id":"22a46350.4b5c8c","type":"mqtt-broker","broker":"127.0.0.1","port":"1883","clientid":"","usetls":false,"verifyservercert":true,"compatmode":true,"keepalive":15,"cleansession":true,"willQos":"0","birthQos":"0"},{"id":"8b0bfef4.74f4","type":"inject","z":"b83a61b3.47c5a","name":"","topic":"nefit-update","payload":"","payloadType":"date","repeat":"30","crontab":"","once":true,"x":210.92857360839844,"y":72.4285717010498,"wires":[["b358d0b9.4ca73"]]},{"id":"b358d0b9.4ca73","type":"exec","z":"b83a61b3.47c5a","command":"/opt/nefit/nefit-status","addpay":false,"append":"","useSpawn":"","name":"Nefit Status","x":366.3730163574219,"y":72.09524345397949,"wires":[["6ebefa6b.914104","5ddfad82.a22054"],[],[]]},{"id":"3876c9bf.c78936","type":"debug","z":"b83a61b3.47c5a","name":"","active":true,"console":"true","complete":"true","x":1248.1825561523438,"y":201.17855834960938,"wires":[]},{"id":"1caaaa11.e35556","type":"mqtt in","z":"b83a61b3.47c5a","name":"domoticz/out/#","topic":"domoticz/out/#","broker":"22a46350.4b5c8c","x":195.92855834960938,"y":371.4285717010498,"wires":[["577c156d.a883ec"]]},{"id":"577c156d.a883ec","type":"function","z":"b83a61b3.47c5a","name":"de-jsonify","func":"var payload = JSON.parse(msg.payload);\nreturn payload;","outputs":1,"noerr":0,"x":361.9285583496094,"y":371.4285717010498,"wires":[["342ad05e.cbd53"]]},{"id":"23467d6a.dcb982","type":"debug","z":"b83a61b3.47c5a","name":"","active":true,"console":"false","complete":"true","x":1073.1785583496094,"y":357.1785717010498,"wires":[]},{"id":"50e0c648.af1f38","type":"function","z":"b83a61b3.47c5a","name":"Get SetPoint Value","func":"msg.payload = msg.svalue1\nreturn msg;","outputs":1,"noerr":0,"x":741.1230239868164,"y":370.5118885040283,"wires":[["a97981c8.56868"]]},{"id":"342ad05e.cbd53","type":"switch","z":"b83a61b3.47c5a","name":"filter Setpoint IDX","property":"idx","rules":[{"t":"eq","v":"160"}],"checkall":"true","outputs":1,"x":540.3729858398438,"y":370.9841136932373,"wires":[["50e0c648.af1f38"]]},{"id":"a97981c8.56868","type":"exec","z":"b83a61b3.47c5a","command":"/opt/nefit/nefit-set","addpay":true,"append":"","useSpawn":"","name":"Nefit Set Temp","x":930.9285697937012,"y":370.17857551574707,"wires":[["23467d6a.dcb982"],[],[]]},{"id":"6440aca2.9bbf54","type":"comment","z":"b83a61b3.47c5a","name":"Read changes from Domoticz and send to Easy","info":"","x":296.9285583496094,"y":334.4285717010498,"wires":[]},{"id":"6ebefa6b.914104","type":"function","z":"b83a61b3.47c5a","name":"Domoticz MQTT","func":"// Configuration\nconst IDX_SetPoint = 160;\nconst IDX_RoomTemp = 161;\nconst IDX_Pressure = 162;\nconst IDX_StatusCode = 163;\n\n\nvar domoticz_msg = {};\ndomoticz_msg.topic = \"domoticz/in\";\ndomoticz_msg.payload = {};\n\nif (msg.topic == 'nefit-update') {\n var NefitJSON = JSON.parse(msg.payload);\n domoticz_msg.payload.idx = IDX_RoomTemp;\n domoticz_msg.payload.nvalue = 0;\n domoticz_msg.payload.svalue = \"\" + NefitJSON['in house temp'];\n}\nif (msg.topic == 'nefit-pressure') {\n var NefitJSON = JSON.parse(msg.payload);\n domoticz_msg.payload.idx = IDX_Pressure;\n domoticz_msg.payload.nvalue = 0;\n domoticz_msg.payload.svalue = \"\" + NefitJSON['pressure'];\n}\nif (msg.topic == 'nefit-setpoint') {\n domoticz_msg.payload.idx = IDX_SetPoint;\n domoticz_msg.payload.nvalue = 0;\n domoticz_msg.payload.svalue = \"\" + msg.payload;\n}\nif (msg.topic == 'nefit-statuscode') {\n domoticz_msg.payload.idx = IDX_StatusCode;\n domoticz_msg.payload.nvalue = 0;\n domoticz_msg.payload.svalue = \"\" + msg.payload;\n}\n\nreturn domoticz_msg;","outputs":1,"noerr":0,"x":1028.4285354614258,"y":140.78571891784668,"wires":[["5bc7035e.a438fc","3876c9bf.c78936"]]},{"id":"5bc7035e.a438fc","type":"mqtt out","z":"b83a61b3.47c5a","name":"Domoticz MQTT","topic":"","qos":"","retain":"","broker":"22a46350.4b5c8c","x":1273.1785507202148,"y":142.53571319580078,"wires":[]},{"id":"2f2db332.d0d24c","type":"exec","z":"b83a61b3.47c5a","command":"/opt/nefit/nefit-pressure","addpay":false,"append":"","useSpawn":"","name":"Nefit Easy Pressure","x":393.9285659790039,"y":211.17857551574707,"wires":[["6ebefa6b.914104"],[],[]]},{"id":"baf3b005.450c5","type":"inject","z":"b83a61b3.47c5a","name":"","topic":"nefit-pressure","payload":"","payloadType":"date","repeat":"300","crontab":"","once":false,"x":208.67857360839844,"y":211.17857551574707,"wires":[["2f2db332.d0d24c"]]},{"id":"2b4dca2.fd4b236","type":"comment","z":"b83a61b3.47c5a","name":"Publish data from Nefit Easy Client to Domoticz","info":"","x":289.9285583496094,"y":24.428571701049805,"wires":[]},{"id":"906bc261.6f944","type":"rbe","z":"b83a61b3.47c5a","name":"","func":"rbe","gap":"","x":794.1428527832031,"y":40.42856979370117,"wires":[["6ebefa6b.914104"]]},{"id":"5ddfad82.a22054","type":"function","z":"b83a61b3.47c5a","name":"Get Setpoint","func":"var NefitJSON = JSON.parse(msg.payload);\nmsg.topic = 'nefit-setpoint';\nmsg.payload = NefitJSON['temp setpoint'];\nreturn msg;","outputs":1,"noerr":0,"x":632,"y":40.571428298950195,"wires":[["906bc261.6f944"]]},{"id":"2296752e.dd698a","type":"inject","z":"b83a61b3.47c5a","name":"","topic":"nefit-statuscode","payload":"","payloadType":"date","repeat":"10","crontab":"","once":false,"x":200.57141876220703,"y":145.6785717010498,"wires":[["4e5066ef.b1af98"]]},{"id":"4e5066ef.b1af98","type":"exec","z":"b83a61b3.47c5a","command":"/opt/nefit/nefit-code","addpay":false,"append":"","useSpawn":"","name":"Nefit Status Code","x":386.1785659790039,"y":145.92857360839844,"wires":[["8e61f998.719e08"],[],[]]},{"id":"8e61f998.719e08","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":586.4285888671875,"y":132.92857360839844,"wires":[["8553f832.7aac08"]]},{"id":"8553f832.7aac08","type":"rbe","z":"b83a61b3.47c5a","name":"","func":"rbe","gap":"","x":741.5714111328125,"y":138.14286041259766,"wires":[["6ebefa6b.914104"]]}]
Message:
"This node is a type unknown to your installation of Node-RED.
If you deploy with the node in this state, it's configuration will be preserved, but the flow will not start until the missing type is installed.
See the Info side bar for more help"
[img]Knipsel.PNG[/img]
Updating my version isnt working
Code: Select all
~ $ sudo apt-get install nodered Reading package lists... Done Building dependency tree Reading state information... Done E: Unable to locate package nodered
Same issue here
Latest version of Domoticz and more running on Docker|Raspberry Pi 4-B 8GB Bookworm|RF-Link|Klik Aan Klik Uit|Nefit easy|ESPeasy|P1 power meter|S0PCM-5 through Ser2Net|Alecto WS5500|FrtizBox|Satel Integra|Solis
Greetz Andre.
Greetz Andre.
- Dutchsea
- Posts: 116
- Joined: Tuesday 08 December 2015 13:22
- Target OS: Raspberry Pi / ODroid
- Domoticz version: v2023.2
- Location: The Netherlands
- Contact:
Re: Nefit Easy™ client library (How to install on the Pi)
I have been looking myself but did bot find it in the Wiki or set-up page. Can you give me more hints?andreo wrote:I have found it thanxpepijn wrote:In the hardware settings check the wiki for more information
Raspberry PI 3B on USB drive, Debian version: 12 (bookworm), Domoticz 2023.2
Aeon Z-Wave G5 stick, RFXCOM, Sonof Zigbee 3.0 Dongle plus E, Nefit Easy, Fritzbox, Buienradar, Sonos
Aeon Z-Wave G5 stick, RFXCOM, Sonof Zigbee 3.0 Dongle plus E, Nefit Easy, Fritzbox, Buienradar, Sonos
- Dutchsea
- Posts: 116
- Joined: Tuesday 08 December 2015 13:22
- Target OS: Raspberry Pi / ODroid
- Domoticz version: v2023.2
- Location: The Netherlands
- Contact:
Re: Nefit Easy™ client library (How to install on the Pi)
More questions and a remark:
- In the scripts where I enter the Nefit serial number etc; do I replace only the xxx's and keep the double quotes or do I delete the quotes (I assumed I need have to keep the quotes)
- What permission must the scripts have? (now have rwxr-xr-x)
- In the node red input and output box the code from Pepijn shows as 127.0.0.1:1883 as IP and port. I changed this to my own Domoticz IP and port.
After the change I see these boxes in NOde-red as "disconnected" When I change it back to 127.0.0.1:1883 I see "connected" again. Should I not enter my own IP/port?
- I started with Node-red using the last version of Pepijn's code (with the erros described in my previous post). Not knowing what I am doing as I never used node-red before and all the programming knowledge I have is Pascal and 25 years ago , I deployed this code. Next I did the same with Pepijn's code one version before the latest.
Do I now have 2 different deployments/flows running at the same time? Should I delete one somehow? Or has the latest deployment overwritten the previous flow.
Really not knowing what I am doing.......... But getting somewhere
Remark: I had to install the Nefit node module using as described on Robert Klep's page https://github.com/robertklep/nefit-easy-client
Else the "easy status" command does not work.
So the instalation described in the first post by Holland did not work for me. (CLI Tool is needed....?)
- In the scripts where I enter the Nefit serial number etc; do I replace only the xxx's and keep the double quotes or do I delete the quotes (I assumed I need have to keep the quotes)
- What permission must the scripts have? (now have rwxr-xr-x)
- In the node red input and output box the code from Pepijn shows as 127.0.0.1:1883 as IP and port. I changed this to my own Domoticz IP and port.
After the change I see these boxes in NOde-red as "disconnected" When I change it back to 127.0.0.1:1883 I see "connected" again. Should I not enter my own IP/port?
- I started with Node-red using the last version of Pepijn's code (with the erros described in my previous post). Not knowing what I am doing as I never used node-red before and all the programming knowledge I have is Pascal and 25 years ago , I deployed this code. Next I did the same with Pepijn's code one version before the latest.
Do I now have 2 different deployments/flows running at the same time? Should I delete one somehow? Or has the latest deployment overwritten the previous flow.
Really not knowing what I am doing.......... But getting somewhere
Remark: I had to install the Nefit node module using
Code: Select all
$ npm install robertklep/nefit-easy-client -g
Else the "easy status" command does not work.
So the instalation described in the first post by Holland did not work for me. (CLI Tool is needed....?)
Raspberry PI 3B on USB drive, Debian version: 12 (bookworm), Domoticz 2023.2
Aeon Z-Wave G5 stick, RFXCOM, Sonof Zigbee 3.0 Dongle plus E, Nefit Easy, Fritzbox, Buienradar, Sonos
Aeon Z-Wave G5 stick, RFXCOM, Sonof Zigbee 3.0 Dongle plus E, Nefit Easy, Fritzbox, Buienradar, Sonos
-
- 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)
Hi,
Add the MQTT Client gateway. Give it a name , ip address 127.0.0.1 and port 1883, and you will get something like this;
2016-01-04 02:59:00.139 MQTT: Connecting to 127.0.0.1:1883
2016-01-04 02:59:00.241 MQTT: connected to: 127.0.0.1:1883
2016-01-04 02:59:00.341 MQTT: Subscribed
2016-01-04 02:59:07.669 MQTT: Topic: domoticz/in, Message: {"idx":1,"nvalue":0,"svalue":"19.3"}
2016-01-04 02:59:37.685 MQTT: Topic: domoticz/in, Message: {"idx":1,"nvalue":0,"svalue":"19.4"}
2016-01-04 03:00:07.769 MQTT: Topic: domoticz/in, Message: {"idx":1,"nvalue":0,"svalue":"19.3"}
2016-01-04 03:00:37.780 MQTT: Topic: domoticz/in, Message: {"idx":1,"nvalue":0,"svalue":"19.4"}
2016-01-04 03:01:07.887 MQTT: Topic: domoticz/in, Message: {"idx":1,"nvalue":0,"svalue":"19.4"}
2016-01-04 03:01:37.838 MQTT: Topic: domoticz/in, Message: {"idx":1,"nvalue":0,"svalue":"19.3"}
2016-01-04 03:02:01.962 MQTT: Topic: domoticz/in, Message: {"idx":8,"nvalue":0,"svalue":"0.9"}
2016-01-04 03:02:07.878 MQTT: Topic: domoticz/in, Message: {"idx":1,"nvalue":0,"svalue":"19.3"}
2016-01-04 03:02:37.947 MQTT: Topic: domoticz/in, Message: {"idx":1,"nvalue":0,"svalue":"19.3"}
2016-01-04 03:03:08.225 MQTT: Topic: domoticz/in, Message: {"idx":1,"nvalue":0,"svalue":"19.3"}
Add the MQTT Client gateway. Give it a name , ip address 127.0.0.1 and port 1883, and you will get something like this;
2016-01-04 02:59:00.139 MQTT: Connecting to 127.0.0.1:1883
2016-01-04 02:59:00.241 MQTT: connected to: 127.0.0.1:1883
2016-01-04 02:59:00.341 MQTT: Subscribed
2016-01-04 02:59:07.669 MQTT: Topic: domoticz/in, Message: {"idx":1,"nvalue":0,"svalue":"19.3"}
2016-01-04 02:59:37.685 MQTT: Topic: domoticz/in, Message: {"idx":1,"nvalue":0,"svalue":"19.4"}
2016-01-04 03:00:07.769 MQTT: Topic: domoticz/in, Message: {"idx":1,"nvalue":0,"svalue":"19.3"}
2016-01-04 03:00:37.780 MQTT: Topic: domoticz/in, Message: {"idx":1,"nvalue":0,"svalue":"19.4"}
2016-01-04 03:01:07.887 MQTT: Topic: domoticz/in, Message: {"idx":1,"nvalue":0,"svalue":"19.4"}
2016-01-04 03:01:37.838 MQTT: Topic: domoticz/in, Message: {"idx":1,"nvalue":0,"svalue":"19.3"}
2016-01-04 03:02:01.962 MQTT: Topic: domoticz/in, Message: {"idx":8,"nvalue":0,"svalue":"0.9"}
2016-01-04 03:02:07.878 MQTT: Topic: domoticz/in, Message: {"idx":1,"nvalue":0,"svalue":"19.3"}
2016-01-04 03:02:37.947 MQTT: Topic: domoticz/in, Message: {"idx":1,"nvalue":0,"svalue":"19.3"}
2016-01-04 03:03:08.225 MQTT: Topic: domoticz/in, Message: {"idx":1,"nvalue":0,"svalue":"19.3"}
-
- 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)
Dutchsea,
I will try to make it a bit more clear;
- In the scripts where I enter the Nefit serial number etc; do I replace only the xxx's and keep the double quotes or do I delete the quotes (I assumed I need have to keep the quotes)
Yes, keep the quotes.
- What permission must the scripts have? (now have rwxr-xr-x)
This is fine. It should be executable, in your case that's the case given it includes x
- In the node red input and output box the code from Pepijn shows as 127.0.0.1:1883 as IP and port. I changed this to my own Domoticz IP and port.
After the change I see these boxes in NOde-red as "disconnected" When I change it back to 127.0.0.1:1883 I see "connected" again. Should I not enter my own IP/port?
127.0.0.1 is your local host ip address. But you can also use the ip address that you are referring to (prob something like 192.168... etc). But you should keep the port number equal to 1883, given that is the port number that is relevant voor MQTT.
- I started with Node-red using the last version of Pepijn's code (with the erros described in my previous post). Not knowing what I am doing as I never used node-red before and all the programming knowledge I have is Pascal and 25 years ago , I deployed this code. Next I did the same with Pepijn's code one version before the latest.
Do I now have 2 different deployments/flows running at the same time? Should I delete one somehow? Or has the latest deployment overwritten the previous flow.
I would remove the old flow, just to be sure
Else the "easy status" command does not work.
So the instalation described in the first post by Holland did not work for me. (CLI Tool is needed....?)
You didn't show an error message or something. But I'm guessing that you didn't jump to the bin directory in the nefit-easy-client directory
Hope this helps
I will try to make it a bit more clear;
- In the scripts where I enter the Nefit serial number etc; do I replace only the xxx's and keep the double quotes or do I delete the quotes (I assumed I need have to keep the quotes)
Yes, keep the quotes.
- What permission must the scripts have? (now have rwxr-xr-x)
This is fine. It should be executable, in your case that's the case given it includes x
- In the node red input and output box the code from Pepijn shows as 127.0.0.1:1883 as IP and port. I changed this to my own Domoticz IP and port.
After the change I see these boxes in NOde-red as "disconnected" When I change it back to 127.0.0.1:1883 I see "connected" again. Should I not enter my own IP/port?
127.0.0.1 is your local host ip address. But you can also use the ip address that you are referring to (prob something like 192.168... etc). But you should keep the port number equal to 1883, given that is the port number that is relevant voor MQTT.
- I started with Node-red using the last version of Pepijn's code (with the erros described in my previous post). Not knowing what I am doing as I never used node-red before and all the programming knowledge I have is Pascal and 25 years ago , I deployed this code. Next I did the same with Pepijn's code one version before the latest.
Do I now have 2 different deployments/flows running at the same time? Should I delete one somehow? Or has the latest deployment overwritten the previous flow.
I would remove the old flow, just to be sure
Else the "easy status" command does not work.
So the instalation described in the first post by Holland did not work for me. (CLI Tool is needed....?)
You didn't show an error message or something. But I'm guessing that you didn't jump to the bin directory in the nefit-easy-client directory
Hope this helps
-
- 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)
Pepijn,
Thanks for sharing your Node-Red flow. I have got it working now, and I'm very happy with this. Also my first project with Node red, beautiful stuff btw.
Next thing on the to do list is to retrieve more variables from the Nefit Easy Client.
Thanks for sharing your Node-Red flow. I have got it working now, and I'm very happy with this. Also my first project with Node red, beautiful stuff btw.
Next thing on the to do list is to retrieve more variables from the Nefit Easy Client.
-
- 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)
here too. Updated node.js and created scripts (pepijn). Dummy sensors created. But cannot update node-red unfortunately. The nefit client is working because I saw some values when using the 3 export functions.andreo wrote:Dutchsea wrote:All flows import fine in the node-red on my pi except you latest. After the functions 2 unknown nodes "unknown rbe" have appearedpepijn wrote:Here is my current Node-RED flow, have fun.
Code: Select all
[{"id":"22a46350.4b5c8c","type":"mqtt-broker","broker":"127.0.0.1","port":"1883","clientid":"","usetls":false,"verifyservercert":true,"compatmode":true,"keepalive":15,"cleansession":true,"willQos":"0","birthQos":"0"},{"id":"8b0bfef4.74f4","type":"inject","z":"b83a61b3.47c5a","name":"","topic":"nefit-update","payload":"","payloadType":"date","repeat":"30","crontab":"","once":true,"x":210.92857360839844,"y":72.4285717010498,"wires":[["b358d0b9.4ca73"]]},{"id":"b358d0b9.4ca73","type":"exec","z":"b83a61b3.47c5a","command":"/opt/nefit/nefit-status","addpay":false,"append":"","useSpawn":"","name":"Nefit Status","x":366.3730163574219,"y":72.09524345397949,"wires":[["6ebefa6b.914104","5ddfad82.a22054"],[],[]]},{"id":"3876c9bf.c78936","type":"debug","z":"b83a61b3.47c5a","name":"","active":true,"console":"true","complete":"true","x":1248.1825561523438,"y":201.17855834960938,"wires":[]},{"id":"1caaaa11.e35556","type":"mqtt in","z":"b83a61b3.47c5a","name":"domoticz/out/#","topic":"domoticz/out/#","broker":"22a46350.4b5c8c","x":195.92855834960938,"y":371.4285717010498,"wires":[["577c156d.a883ec"]]},{"id":"577c156d.a883ec","type":"function","z":"b83a61b3.47c5a","name":"de-jsonify","func":"var payload = JSON.parse(msg.payload);\nreturn payload;","outputs":1,"noerr":0,"x":361.9285583496094,"y":371.4285717010498,"wires":[["342ad05e.cbd53"]]},{"id":"23467d6a.dcb982","type":"debug","z":"b83a61b3.47c5a","name":"","active":true,"console":"false","complete":"true","x":1073.1785583496094,"y":357.1785717010498,"wires":[]},{"id":"50e0c648.af1f38","type":"function","z":"b83a61b3.47c5a","name":"Get SetPoint Value","func":"msg.payload = msg.svalue1\nreturn msg;","outputs":1,"noerr":0,"x":741.1230239868164,"y":370.5118885040283,"wires":[["a97981c8.56868"]]},{"id":"342ad05e.cbd53","type":"switch","z":"b83a61b3.47c5a","name":"filter Setpoint IDX","property":"idx","rules":[{"t":"eq","v":"160"}],"checkall":"true","outputs":1,"x":540.3729858398438,"y":370.9841136932373,"wires":[["50e0c648.af1f38"]]},{"id":"a97981c8.56868","type":"exec","z":"b83a61b3.47c5a","command":"/opt/nefit/nefit-set","addpay":true,"append":"","useSpawn":"","name":"Nefit Set Temp","x":930.9285697937012,"y":370.17857551574707,"wires":[["23467d6a.dcb982"],[],[]]},{"id":"6440aca2.9bbf54","type":"comment","z":"b83a61b3.47c5a","name":"Read changes from Domoticz and send to Easy","info":"","x":296.9285583496094,"y":334.4285717010498,"wires":[]},{"id":"6ebefa6b.914104","type":"function","z":"b83a61b3.47c5a","name":"Domoticz MQTT","func":"// Configuration\nconst IDX_SetPoint = 160;\nconst IDX_RoomTemp = 161;\nconst IDX_Pressure = 162;\nconst IDX_StatusCode = 163;\n\n\nvar domoticz_msg = {};\ndomoticz_msg.topic = \"domoticz/in\";\ndomoticz_msg.payload = {};\n\nif (msg.topic == 'nefit-update') {\n var NefitJSON = JSON.parse(msg.payload);\n domoticz_msg.payload.idx = IDX_RoomTemp;\n domoticz_msg.payload.nvalue = 0;\n domoticz_msg.payload.svalue = \"\" + NefitJSON['in house temp'];\n}\nif (msg.topic == 'nefit-pressure') {\n var NefitJSON = JSON.parse(msg.payload);\n domoticz_msg.payload.idx = IDX_Pressure;\n domoticz_msg.payload.nvalue = 0;\n domoticz_msg.payload.svalue = \"\" + NefitJSON['pressure'];\n}\nif (msg.topic == 'nefit-setpoint') {\n domoticz_msg.payload.idx = IDX_SetPoint;\n domoticz_msg.payload.nvalue = 0;\n domoticz_msg.payload.svalue = \"\" + msg.payload;\n}\nif (msg.topic == 'nefit-statuscode') {\n domoticz_msg.payload.idx = IDX_StatusCode;\n domoticz_msg.payload.nvalue = 0;\n domoticz_msg.payload.svalue = \"\" + msg.payload;\n}\n\nreturn domoticz_msg;","outputs":1,"noerr":0,"x":1028.4285354614258,"y":140.78571891784668,"wires":[["5bc7035e.a438fc","3876c9bf.c78936"]]},{"id":"5bc7035e.a438fc","type":"mqtt out","z":"b83a61b3.47c5a","name":"Domoticz MQTT","topic":"","qos":"","retain":"","broker":"22a46350.4b5c8c","x":1273.1785507202148,"y":142.53571319580078,"wires":[]},{"id":"2f2db332.d0d24c","type":"exec","z":"b83a61b3.47c5a","command":"/opt/nefit/nefit-pressure","addpay":false,"append":"","useSpawn":"","name":"Nefit Easy Pressure","x":393.9285659790039,"y":211.17857551574707,"wires":[["6ebefa6b.914104"],[],[]]},{"id":"baf3b005.450c5","type":"inject","z":"b83a61b3.47c5a","name":"","topic":"nefit-pressure","payload":"","payloadType":"date","repeat":"300","crontab":"","once":false,"x":208.67857360839844,"y":211.17857551574707,"wires":[["2f2db332.d0d24c"]]},{"id":"2b4dca2.fd4b236","type":"comment","z":"b83a61b3.47c5a","name":"Publish data from Nefit Easy Client to Domoticz","info":"","x":289.9285583496094,"y":24.428571701049805,"wires":[]},{"id":"906bc261.6f944","type":"rbe","z":"b83a61b3.47c5a","name":"","func":"rbe","gap":"","x":794.1428527832031,"y":40.42856979370117,"wires":[["6ebefa6b.914104"]]},{"id":"5ddfad82.a22054","type":"function","z":"b83a61b3.47c5a","name":"Get Setpoint","func":"var NefitJSON = JSON.parse(msg.payload);\nmsg.topic = 'nefit-setpoint';\nmsg.payload = NefitJSON['temp setpoint'];\nreturn msg;","outputs":1,"noerr":0,"x":632,"y":40.571428298950195,"wires":[["906bc261.6f944"]]},{"id":"2296752e.dd698a","type":"inject","z":"b83a61b3.47c5a","name":"","topic":"nefit-statuscode","payload":"","payloadType":"date","repeat":"10","crontab":"","once":false,"x":200.57141876220703,"y":145.6785717010498,"wires":[["4e5066ef.b1af98"]]},{"id":"4e5066ef.b1af98","type":"exec","z":"b83a61b3.47c5a","command":"/opt/nefit/nefit-code","addpay":false,"append":"","useSpawn":"","name":"Nefit Status Code","x":386.1785659790039,"y":145.92857360839844,"wires":[["8e61f998.719e08"],[],[]]},{"id":"8e61f998.719e08","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":586.4285888671875,"y":132.92857360839844,"wires":[["8553f832.7aac08"]]},{"id":"8553f832.7aac08","type":"rbe","z":"b83a61b3.47c5a","name":"","func":"rbe","gap":"","x":741.5714111328125,"y":138.14286041259766,"wires":[["6ebefa6b.914104"]]}]
Message:
"This node is a type unknown to your installation of Node-RED.
If you deploy with the node in this state, it's configuration will be preserved, but the flow will not start until the missing type is installed.
See the Info side bar for more help"
[img]Knipsel.PNG[/img]
Updating my version isnt working
Code: Select all
~ $ sudo apt-get install nodered Reading package lists... Done Building dependency tree Reading state information... Done E: Unable to locate package nodered
Same issue here
-
- 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)
You cannot upgrade Node-RED with apt-get.
See http://nodered.org/docs/getting-started/upgrading.html
See http://nodered.org/docs/getting-started/upgrading.html
-
- 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)
Have you tried the following?
Code: Select all
npm update
-
- 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)
Succeeded with the node-red update using:
Node-red gives no longer the rbe error of unknown node.
However, I am getting XMPP error when executing the scripts nefit-pressure. Copy/paste the script in putty gives good results.
Code: Select all
sudo npm cache clean
sudo npm install -g --unsafe-perm node-red
However, I am getting XMPP error when executing the scripts nefit-pressure. Copy/paste the script in putty gives good results.
-
- 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)
Please post the XMPP error message
-
- 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)
XMPP authentication failure
this is all I can see in Putty
this is all I can see in Putty
-
- 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)
This means the environment variabeles are not set correctly in the script file. Are the other scripts working oké?
-
- 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)
I am getting the same error for all the scripts. Should there be more in the script than the 3 export lines and the command, so in total 4 lines? I just copy/pasted the code and saved.
-
- 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)
To be sure, Did you change the serial, access code and password?
Who is online
Users browsing this forum: No registered users and 1 guest