FilipDem / Domoticz-NEST-plugin

NEST Plugin for Domoticz using the Google credentials.
13 stars 4 forks source link

Installing plugin via Docker #25

Closed hugo-leij closed 3 years ago

hugo-leij commented 3 years ago

Hey,

I'm running Domicz 2020.2 via Docker. I installed the plugin but I get the following error:

2021-04-21 15:06:41.142 Status: (Nest) Started.
2021-04-21 15:06:41.319 Error: (GoogleNest) failed to load 'plugin.py', Python Path used was '/config/plugins/Domoticz-NEST-plugin/:/usr/lib/python38.zip:/usr/lib/python3.8:/usr/lib/python3.8/lib-dynload:/usr/local/lib/python3.8/dist-packages:/usr/lib/python3/dist-packages:/usr/lib/python3.8/dist-packages'.
2021-04-21 15:06:41.320 Error: (Nest) Module Import failed, exception: 'ModuleNotFoundError'
2021-04-21 15:06:41.320 Error: (Nest) Module Import failed: ' Name: requests'
2021-04-21 15:06:41.320 Error: (Nest) Error Line details not available.
2021-04-21 15:07:46.469 Error: Nest hardware (5) thread seems to have ended unexpectedly
2021-04-21 15:08:00.473 Error: Nest hardware (5) thread seems to have ended unexpectedly

If i run the plugin.py i get the following error:

root@b3b444dc4d69:~/plugins/Domoticz-NEST-plugin# python3 plugin.py
Traceback (most recent call last):
  File "plugin.py", line 59, in <module>
    import Domoticz
ModuleNotFoundError: No module named 'Domoticz'

Does anyone have an idea how I can fix that?

FilipDem commented 3 years ago

You cannot run the plugin outside the Domoticz environment. However the error line "Module Import failed: ' Name: requests'" learns me that you don't have the python3 library "requests" installed. You can check it as described in the readme

Be sure the following python3 libraries are installed: requests, pytz and tzlocal use pip3 list to verify if the libraries are installed to install the missing libraries: sudo pip3 install

FilipDem commented 3 years ago

Hugo, Is this topic solved now?

hugo-leij commented 3 years ago

He @FilipDem

Sorry for my late response. I did miss a number of things. These were not (fully) installed in my Docker environment. My solution (in case more people having this issue on the docker file of linuxserver.io)

Go to the config: cd / domoticz / config Make a folder mkdir custom-cont-init.d Make a file vim add_libraries

Content of the file

#! / bin / bash

echo "**** installing requests ****"
pip3 install requests
echo "**** installing pytz ****"
pip3 install pytz
echo "**** installing tzlocal ****"
pip3 install tzlocal

Restart Docker