Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dependancy pb: ModuleNotFoundError: No module named 'meross_iot' #12

Closed
fanchlagadecmail opened this issue Aug 6, 2019 · 3 comments
Closed

Comments

@fanchlagadecmail
Copy link

fanchlagadecmail commented Aug 6, 2019

Hi Alberto,,

I'm a total beginner in python and home assistant, so my question is maybe stupid. I have followed your explanations to install Meross cloud iot in Home assistant via HACS but i have this error message.

Error loading custom_components.meross_cloud. Make sure all dependencies are installed
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/loader.py", line 338, in _load_file
module = importlib.import_module(path)
File "/usr/local/lib/python3.7/importlib/init.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1006, in _gcd_import
File "", line 983, in _find_and_load
File "", line 967, in _find_and_load_unlocked
File "", line 677, in _load_unlocked
File "", line 728, in exec_module
File "", line 219, in _call_with_frames_removed
File "/config/custom_components/meross_cloud/init.py", line 11, in
from meross_iot.api import UnauthorizedException
ModuleNotFoundError: No module named 'meross_iot'

What have i done wrong ?

Thanks

Fanch

@guitarmanusa
Copy link

Alberto, it looks like a Hass.io/HACS might have changed something. I'm getting the same error and it appears as though it's not finding your meross_iot library. It's not mentioned in the install instructions, but do we need to pip install your library before running the add on?

I'm not even able to do a pip install meross_iot at the moment. I get the following error:

ERROR: Could not find a version that satisfies the requirement meross-iot (from versions: none) ERROR: No matching distribution found for meross-iot

@guitarmanusa
Copy link

So I figured out what was happening. hass.io is running docker to run any plugins, unlike a more "traditional" Home Assistant install sitting on top of a regular Linux install. The meross_cloud HACS package is expecting to be able to pull from pip3 to get the meross_iot package, which works fine under vanilla ubuntu:
sudo apt-get install python3-pip; pip3 install meross_iot

We can actually take HACS out of the equation completely with a hassio add-on. I threw together a sample repository and ALMOST have it working. But it's late so I'll have to track down why python3 in the Alpine Linux docker image can't seem to find the init.py script.

Anyways, from hassio go to "Hass.io" -> "ADD-ON STORE" -> Add new repository by URL (https://github.com/guitarmanusa/meross_cloud) -> Add then refresh the page. The new repository should show up there. Add your meross email and password from the config page.

@fanchlagadecmail
Copy link
Author

Sorry for the late update but after copying meross_iot library in config/custom_components and rebooting HA, everything work.
Perhaps, it would work too without manually copying the library and just rebooting.
Thanks a lot for your work

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants