Nefit easy client

I’ve changed the nefit.py file. I’ve get now same error as RobStraten. This is my home-assistant.log file.

Blockquote 2017-11-12 23:37:46 ERROR (MainThread) [homeassistant.loader] Error loading custom_components.climate.nefit. Make sure all dependencies are installed
Traceback (most recent call last):
File “/srv/homeassistant/lib/python3.5/site-packages/homeassistant/loader.py”, line 142, in get_component
module = importlib.import_module(path)
File “/usr/lib/python3.5/importlib/init.py”, line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File “”, line 986, in _gcd_import
File “”, line 969, in _find_and_load
File “”, line 958, in _find_and_load_unlocked
File “”, line 673, in _load_unlocked
File “”, line 673, in exec_module
File “”, line 222, in _call_with_frames_removed
File “/home/homeassistant/.homeassistant/custom_components/climate/nefit.py”, line 24, in
from nefit import NefitClient
ImportError: No module named ‘nefit’
2017-11-12 23:37:46 ERROR (MainThread) [homeassistant.loader] Unable to find component climate.nefit

I’ve several times restarted home-assistante service and rebooted RP3. But nothing is changing.

Anyone has any idea what to do?

Thanks,

I think you’re nefit.py is still not correct.
Did you succeeded in installing the Nefit Client via terminal?

I managed to get everything working just now.

I’ve checked the nefit.py file. The content of the nefit.py is exactly same as github file. I did succeeded in installing the Nefit Client via terminal.

This is the result after the installling nefit client via terminal.

Blockquote
Successfully built nefit-client pyaes sleekxmpp
Installing collected packages: pyaes, sleekxmpp, nefit-client
Successfully installed nefit-client-0.2.2 pyaes-1.6.1 sleekxmpp-1.3.3

And this is what I’ m getting on home-assistant.log

Blockquote
2017-11-14 22:25:31 ERROR (MainThread) [homeassistant.loader] Error loading custom_components.climate.nefit. Make sure all dependencies are installed
Traceback (most recent call last):
_ File “/srv/homeassistant/lib/python3.5/site-packages/homeassistant/loader.py”, line 142, in get_component_
_ module = importlib.import_module(path)_
_ File “/usr/lib/python3.5/importlib/init.py”, line 126, in import_module_
_ return bootstrap.gcd_import(name[level:], package, level)
_ File “”, line 986, in gcd_import
_ File “”, line 969, in find_and_load
_ File “”, line 958, in find_and_load_unlocked
_ File “”, line 673, in load_unlocked
_ File “”, line 673, in exec_module

_ File “”, line 222, in call_with_frames_removed
_ File “/home/homeassistant/.homeassistant/custom_components/climate/nefit.py”, line 24, in _
_ from nefit import NefitClient_
ImportError: No module named ‘nefit’
2017-11-14 22:25:31 ERROR (MainThread) [homeassistant.loader] Unable to find component climate.nefit

I don’t know what the reason is.

Which command did you use to install the nefit easy client?

I used docker and the command I used is this:

$ pip3 install nefit-client

Which gave me this result:

Collecting nefit-client
Downloading nefit-client-0.2.2.tar.gz
Collecting pyaes (from nefit-cient)
Downloading pyaes-1.6.1.tar.gz
Requirement already satisfied: sleekxmpp in /usr/local/lib/python3.6/site-packages (from nefit client)
Building wheels for collected packages: nefit-client … done
Running setup.py dist_wheel for nefit-client … done
Stored in directory: /root/.cache/pip/wheels/ef/40.be/
Running setup.py bdist_wheel for pyaes … done
Stored in directory: /root/.cache/pip/wheels/ca/85/ce/
Successfully built nefit-client pyaes
Installing collected packages: pyaes, nefit-client
Succesfully installed nefit-client-0.2.2 pyaes-1.6.1

I don’t know if you’re helped with that.
For the record I use a Synology NAS and Docker for HASS

Hello:) I have the same problem. This is what i got when i use pip3 install nefit-client

Collecting nefit-client
Downloading nefit-client-0.2.2.tar.gz
Collecting pyaes (from nefit-client)
Downloading pyaes-1.6.1.tar.gz
Collecting sleekxmpp (from nefit-client)
Downloading sleekxmpp-1.3.3.tar.gz (845kB)
100% |████████████████████████████████| 849kB 151kB/s
Building wheels for collected packages: nefit-client, pyaes, sleekxmpp
Running setup.py bdist_wheel for nefit-client … done
Stored in directory: /root/.cache/pip/wheels/ef/40/be/164205d9a9a2afc7480bba0c567c77be29d5366791d4f03fd1
Running setup.py bdist_wheel for pyaes … done
Stored in directory: /root/.cache/pip/wheels/ca/85/ce/e1a8679159155c92ca18be7d374bccfbf3dfe42386fead1b71
Running setup.py bdist_wheel for sleekxmpp … done
Stored in directory: /root/.cache/pip/wheels/3d/fd/c3/66abcf67ba5c4a609449824f6b4741fa53655ee4df862aa03c
Successfully built nefit-client pyaes sleekxmpp
Installing collected packages: pyaes, sleekxmpp, nefit-client
Successfully installed nefit-client-0.2.2 pyaes-1.6.1 sleekxmpp-1.3.3

I hope you can help?

greetings Justin

HI!
Rather interested to try this in my Hassio setup, but how to install the nefit.py in the system. Ive created the file and directory in custom components, added the entry into the configuration file, but cant execute the pip.

Please have a look for dedicated Hassio instructions to install?
Cheers,
Marius

1 Like

Hi,

I am trying to install the nefit-client, but Hassio doesn’t recognize the command.
I did a SSH login with putty, username root ans with a rsa-key and seam to be in core-ssh:~#
I tried all the commands i could find, but they weren’t recognized.

I also have no clue how to create the folder where the nefit.py has to go.

Can someone help me please?

Thanks,
Marco

Hi,
This is an update.
I stopped using Hass.io and started with Hassbian.
I followed the instructions from @marconfus.

The installation went good, but i got the same error output as RobStraaten, ekesgin.
The nefit client doesn’t want to load correctly.
This is the install command with the install output:

sudo pip3 install nefit-client

Collecting nefit-client
Downloading https://www.piwheels.hostedpi.com/simple/nefit-client/nefit_client -0.2.2-py3-none-any.whl
Collecting pyaes (from nefit-client)
Downloading https://www.piwheels.hostedpi.com/simple/pyaes/pyaes-1.6.1-py3-non e-any.whl
Collecting sleekxmpp (from nefit-client)
Downloading https://www.piwheels.hostedpi.com/simple/sleekxmpp/sleekxmpp-1.3.3 -py3-none-any.whl (434kB)
100% |████████████████████████████████| 440kB 636kB/s
Installing collected packages: pyaes, sleekxmpp, nefit-client
Successfully installed nefit-client-0.2.2 pyaes-1.6.1 sleekxmpp-1.3.3

This the is from the Configuration Validation:
2017-12-17 18:30:25 ERROR (MainThread) [homeassistant.loader] Error loading custom_components.climate.nefit. Make sure all dependencies are installed
Traceback (most recent call last):
File “/srv/homeassistant/lib/python3.5/site-packages/homeassistant/loader.py”, line 142, in get_component
module = importlib.import_module(path)
File “/usr/lib/python3.5/importlib/init.py”, line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File “”, line 986, in _gcd_import
File “”, line 969, in _find_and_load
File “”, line 958, in _find_and_load_unlocked
File “”, line 673, in _load_unlocked
File “”, line 673, in exec_module
File “”, line 222, in _call_with_frames_removed
File “/home/homeassistant/.homeassistant/custom_components/climate/nefit.py”, line 24, in
from nefit import NefitClient
ImportError: No module named ‘nefit’
2017-12-17 18:30:25 ERROR (MainThread) [homeassistant.loader] Unable to find component climate.nefit

I hope there is a sollution for this problem.

Greets,
Marco

I use neither Hass.io nor Hassbian, but I guess the problem is, that you install the nefit-client module in the wrong python environment.
Looking at the stacktrace you should have the directory /srv/homeassistant/bin
So as the user that is running Homeassistant you should run the following:

source /srv/homeassistant/bin/activate
pip install nefit-client

After the source command there should be a prefix in your shell prompt, this shows that you activated a virtual python environment.

1 Like

I am getting closer, but now i get this result:
(homeassistant) pi@hassbian:~ $ pip install nefit-client
Collecting nefit-client
Using cached https://www.piwheels.hostedpi.com/simple/nefit-client/nefit_client-0.2.2-py3-none-any.whl
Requirement already satisfied: sleekxmpp in /srv/homeassistant/lib/python3.5/site-packages (from nefit-client)
Collecting pyaes (from nefit-client)
Using cached https://www.piwheels.hostedpi.com/simple/pyaes/pyaes-1.6.1-py3-none-any.whl
Installing collected packages: pyaes, nefit-client
Exception:
Traceback (most recent call last):
File “/srv/homeassistant/lib/python3.5/site-packages/pip/basecommand.py”, line 215, in main
status = self.run(options, args)
File “/srv/homeassistant/lib/python3.5/site-packages/pip/commands/install.py”, line 360, in run
prefix=options.prefix_path,
File “/srv/homeassistant/lib/python3.5/site-packages/pip/req/req_set.py”, line 784, in install
**kwargs
File “/srv/homeassistant/lib/python3.5/site-packages/pip/req/req_install.py”, line 851, in install
self.move_wheel_files(self.source_dir, root=root, prefix=prefix)
File “/srv/homeassistant/lib/python3.5/site-packages/pip/req/req_install.py”, line 1064, in move_wheel_files
isolated=self.isolated,
File “/srv/homeassistant/lib/python3.5/site-packages/pip/wheel.py”, line 345, in move_wheel_files
clobber(source, lib_dir, True)
File “/srv/homeassistant/lib/python3.5/site-packages/pip/wheel.py”, line 316, in clobber
ensure_dir(destdir)
File “/srv/homeassistant/lib/python3.5/site-packages/pip/utils/init.py”, line 83, in ensure_dir
os.makedirs(path)
File “/usr/lib/python3.5/os.py”, line 241, in makedirs
mkdir(name, mode)
PermissionError: [Errno 13] Permission denied: '/srv/homeassistant/lib/python3.5/site-packages/pyaes-1.6.1.dist-info’

I think it wants to install in the correct location, but I don’t have the permission to do so.
How can I solve that?

Thx

It seems that hassbian is using the user homeassistant. So after ssh’ing into your Pi just before the source command you should switch to that user:
sudo su - homeassistant

@marconfus
Many thanks for your support, it is working now.

Greets
Marco

would you please have a look for the Hassio install too? Though one is able to log in as [email protected], the authentication/login isn’t capable/allowed this install procedure.
I have all files copied into the right places, but need the install to happen yet.
Thanks,
Marius

In my Hassbian / Pi2 setup it doesn’t work?

After changing to home assistant user:

root@hassbian:~# sudo su -s /bin/bash homeassistant
homeassistant@hassbian:/root $ source /srv/homeassistant/bin/activate

Giving the final command
(homeassistant) homeassistant@hassbian:/root $ pip install nefit-client

Error unkown…

Collecting nefit-client
Downloading nefit-client-0.2.4.tar.gz
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File “”, line 1, in
File “/tmp/pip-build-myd42w7h/nefit-client/setup.py”, line 5, in
from nefit import version
File “/tmp/pip-build-myd42w7h/nefit-client/nefit/init.py”, line 7, in
from pyaes import AESModeOfOperationECB, Encrypter, Decrypter, PADDING_NONE
ImportError: No module named ‘pyaes’

----------------------------------------

Command “python setup.py egg_info” failed with error code 1 in /tmp/pip-build-myd42w7h/nefit-client/

Be sure to install dependencies:
pip install pyaes
pip install sleekxmpp

thanks. This worked after i’ve updated wheel

HI,
any thoughts on installing this in the Hassio environment? Would be very nice indeed to be able to use the Nefit client
Thanks,
Marius.

1 Like

Currently no success on my hassio environment either :frowning:

Hi.
just installed the nefit easy client.
everything works fine.
only I want to see more, how do I do that?
for example, system pressure, outside temp, etc

Alexander

More features would be great