marconfus / ha-nefit-ng

Rewrite of the „nefit“ component. Still in development!
11 stars 4 forks source link

No module named 'aionefit' #15

Open MaxMakerMan opened 5 years ago

MaxMakerMan commented 5 years ago

Hello!

first of all, I must give you big thumbs up, for your really great work marconfus! I have been using your nefit integration for over a year now.

Recently I started fresh over with hass.io (92.1) and you rewritten integration gives me now the following error: 2019-04-26 23:55:16 ERROR (MainThread) [homeassistant.components.climate] Error while setting up platform nefit Traceback (most recent call last): File "/usr/local/lib/python3.7/site-packages/homeassistant/helpers/entity_platform.py", line 126, in _async_setup_platform SLOW_SETUP_MAX_WAIT, loop=hass.loop) File "/usr/local/lib/python3.7/asyncio/tasks.py", line 416, in wait_for return fut.result() File "/config/custom_components/nefit/climate.py", line 50, in async_setup_platform device = NefitThermostat(hass, config) File "/config/custom_components/nefit/climate.py", line 59, in __init__ from aionefit import NefitCore ModuleNotFoundError: No module named 'aionefit'

I have put it as you required

grafik

I have tried so far: rebooting a couple of times, deleting the pycache and then rebooting

do I have to install aionefit somehow before?

MaxMakerMan commented 5 years ago

I fixed my problem by adding a file named: manifest.json along the component.

{ "domain": "nefit", "name": "nefit Bosch Therostat", "documentation": "https://github.com/marconfus/ha-nefit-ng", "dependencies": [], "codeowners": ["@marconfus"], "requirements": ["aionefit==0.3"] }

into the empty init.py I added the line: REQUIREMENTS = ['aionefit==0.3']

I dont know which did the trick, but now it loads the module aionefit

marconfus commented 5 years ago

Yes, adding the manifest.json fixes the import problem. Only that I had to restart twice to get it going. After the first restart the module get's installed, but it seems only "importable" after the second restart.

ghost commented 5 years ago

I had the same issue after I had to reinstall hassio after a crash. Adding the latest manifest.json fixed the problem. With the latest manifest.json, the required site-packages will be downloaded in the "\HASSIO\config\deps\lib\python3.7\site-packages\" directory. And like marconfus said, it works after a 2nd reboot.

alextud commented 5 years ago

I also had to link slixmpp version.

"requirements": [ "aionefit==0.3", "https://github.com/marconfus/slixmpp/archive/master.zip#slixmpp==1.4.2.1" ]

tomlevels commented 5 years ago

I also had to link slixmpp version.

"requirements": [ "aionefit==0.3", "https://github.com/marconfus/slixmpp/archive/master.zip#slixmpp==1.4.2.1" ]

If I add this to my manifest file, I get a load of errors?

bywilco commented 5 years ago

after 0.94 update i recive the following error: Platform nefit not ready yet. Retrying in 180 seconds.

pitoganzado commented 5 years ago

I fixed my problem by adding a file named: manifest.json along the component.

{ "domain": "nefit", "name": "nefit Bosch Therostat", "documentation": "https://github.com/marconfus/ha-nefit-ng", "dependencies": [], "codeowners": ["@marconfus"], "requirements": ["aionefit==0.3"] }

into the empty init.py I added the line: REQUIREMENTS = ['aionefit==0.3']

I dont know which did the trick, but now it loads the module aionefit

Perfect! this fix my issue. Thanks!