Since a couple of years I use a Nefit Easy thermostat to control my heating at home. This instruction allows you to control and read the thermostat from your Domoticz home automation.
First I asume you already have Domoticz up and running. I run it on a RaspBerry Pi using Raspian Buster.

Install the Nefit Easy server

First connect to your Raspberry Pi using SSH.
Then we have to install some components
– NodeJS
– PM2
– Nefit Easy Server

To do so run the following commands

sudo curl -sL | sudo -E bash -
sudo apt-get install nodejs 
sudo apt-get install npm
sudo npm install pm2 -g 
sudo pm2 startup 
sudo npm i nefit-easy-http-server -g

After installing the components you have to create a script called
Create the script by running touch
Edit the script using nano and put the following content in the script

/usr/bin/easy-server --serial=<serial number> --access-key=<access-key> --password=<pincode> --host= >/dev/null

The credentials you must use are the same you use when accessing the Nefit Easy through the Android or IOS app.
After saving your script you must make it executable by running: chmod 755
I experienced some linux versions or nodejs versions use a different path. I am not 100% sure what it is. If it is not working try changing the location in the file in /usr/local/bin/easy-server After that the file looks like this:

/usr/local/bin/easy-server --serial=<serial number> --access-key=<access-key> --password=<pincode> --host= >/dev/null

If you run Raspbian Buster unfortunately we have to lower the minimum encryption: sudo nano /etc/ssl/openssl.cnf and add the following lines toe the file:

MinProtocol = None
CipherString = DEFAULT

Start the script by running: sudo pm2 start /home/pi/
To check the scipt is running enter: sudo pm2 list
The output looks like:

pi@pi-hostmane:~ $ sudo pm2 list
│ id │ name                    │ version │ mode    │ pid      │ uptime │ ↺    │ status   │ cpu      │ mem      │ user     │ watching │
│ 0  │ nefiteasyhttpserver     │ N/A     │ fork    │ 460      │ 2D     │ 0    │ online   │ 0%       │ 1.8mb    │ root     │ disabled │

Do not forget to make it start through reboots by running sudo pm2 save
In case you have problems you can run sudo pm2 show <id> (were the <id> is the number in the id column above). If you run the command you see a output similar as below. All the locations of the scripts and logs are displayed, You can view them for troubleshooting.

pi@pi-hostname:~ $ sudo pm2 show 0
 Describing process with id 0 - name nefiteasyhttpserver
│ status            │ online                                        │
│ name              │ nefiteasyhttpserver                           │
│ version           │ N/A                                           │
│ restarts          │ 0                                             │
│ uptime            │ 2D                                            │
│ script path       │ /home/pi/scripts/       │
│ script args       │ N/A                                           │
│ error log path    │ /root/.pm2/logs/nefiteasyhttpserver-error.log │
│ out log path      │ /root/.pm2/logs/nefiteasyhttpserver-out.log   │
│ pid path          │ /root/.pm2/pids/     │
│ interpreter       │ bash                                          │
│ interpreter args  │ N/A                                           │
│ script id         │ 0                                             │
│ exec cwd          │ /home/pi/scripts                              │
│ exec mode         │ fork_mode                                     │
│ node.js version   │ N/A                                           │
│ node env          │ N/A                                           │
│ watch & reload    │ ✘                                             │
│ unstable restarts │ 0                                             │
│ created at        │ 2019-11-10T10:06:52.841Z                      │
 Divergent env variables from local env
│ SUDO_COMMAND │ /usr/bin/pm2 start /home/pi/scripts/ │

 Add your own code metrics:
 Use `pm2 logs nefiteasyhttpserver [--lines 1000]` to display logs
 Use `pm2 env 0` to display environment variables
 Use `pm2 monit` to monitor CPU and Memory usage nefiteasyhttpserver

Adding the Nefit Easy server to Domoticz

After doing all the CLI work at your linux installation, browse to your Domoticz webpage and perform the instructions below

Now the hardware is added and after a few minutes the devices should appear:

If they do not appear make sure the “Accept new Hardware Devices” is enabled or hit the “Allow for 5 minutes” button in settings.

That’s it!

4 Replies to “Make your Nefit Easy thermostat work with Domoticz”

  • Hi Edwin,

    I don’t know how to thank you for this information.
    I run my self written domotics software which partially uses Domoticz running on a mini-PC under Windows 10. I port the sensor data to mij software through SQL request on the Domiticz.db.
    I had a spare Raspberry so installed the Nefit-Easy server on that. I connected the two Domoticz so now get the Raspberry data in my Windows Domoticz where I can port it to my software. Next step is to port everything to the Raspberry such as the Smart meter.
    Thanks again,


  • Great article! Having done all of this I have issues trying to access the webserver. When I run it I always get as answer Error: missing password
    I know the password is correct as I use the same to logon with the iOS app. Any ideas where things are going wrong?

    • This webserver is not to be accessed interactively using a browser. It’s only purpose is to be used with another system. eg Domoticz!

  • Hi, Great help your work. It works just as I love it. Thx!
    Only got a warning. Maybe you can adapt your blog to avoid this. See log below.
    Best regards,

    sudo npm i nefit-easy-http-server -g
    npm WARN deprecated node-xmpp-client@3.2.0: this package is deprecated please use
    npm WARN deprecated node-xmpp-core@5.0.9: this package is deprecated please use
    npm WARN deprecated request@2.88.2: request has been deprecated, see
    npm WARN deprecated node-xmpp-tls-connect@1.0.1: this package is deprecated please use
    npm WARN deprecated har-validator@5.1.5: this library is no longer supported
    /usr/bin/easy-server -> /usr/lib/node_modules/nefit-easy-http-server/bin/easy-server
    + nefit-easy-http-server@5.0.3
    added 142 packages from 123 contributors in 28.842s

Leave a Reply

Your email address will not be published. Required fields are marked *