Forums

Resolved
0 votes
I have run into a problem whit domoticz running on clearos 7.

I can't install any plugins because the wont start.

The version of domoticz i have running is installed via the marketplace in clearos.

Version: 2021.1
Build Hash: 0
Compile Date: 1970-01-01 01:00:00
dzVents Version: 3.1.7
Python Version: 3.6.8 (default, Nov 16 2020, 16:55:22) [GCC 4.8.5 20150623 (Red Hat 4.8.5-44)]

i have tryed to install the plugin manager but i find in the log file the following message.

2021-07-24 12:24:19.461 Plugin Manager: (Plugin Manager) Installing plugin custom page...
2021-07-24 12:24:19.461 Plugin Manager: (Plugin Manager) Copying files from /var/domoticz/plugins/plugins-manager/frontend to /usr/share/domoticz/www/templates
2021-07-24 12:24:19.461 Error: Plugin Manager: (Plugin Manager) Error during installing plugin custom page
2021-07-24 12:24:19.461 Error: Plugin Manager: (Plugin Manager) FileNotFoundError(2, 'No such file or directory')

I have traced this down to the following problem in the script there is a variable used called startup path which is set at startup and is the location where domoticz is started from.

2021-07-24 11:46:23.063 Status: Domoticz V2021.1 (c)2012-1970 GizMoCuz
2021-07-24 11:46:23.063 Status: Build Hash: 0, Date: 1970-01-01 01:00:00
2021-07-24 11:46:23.063 Status: Startup Path: /usr/share/domoticz/
2021-07-24 11:46:23.063 Status: Startup delay... waiting 0 seconds...
2021-07-24 11:46:23.082 BuildManifest: Created directory /var/domoticz/plugins/
2021-07-24 11:46:23.101 Status: PluginSystem: Started, Python version '3.6.8'.

As you can see it is /user/shared/domoticz/.
This causes the files to be copeyd to the wrong location.

i have updated python but i am running the last avadible release i can find using "yum install"
i have changed the script and set the startup up folder to /var/domoticz/, it will install but during update it goes wrong again. Also all new plugins are installed in the /usr/shared/domoticz/ directory.

i have also tryed to install the zigate plugin because i bought a zigate+ usb controller.

i get the following messages in the log when i try to restart domoticz whit the plugin installed in the /var/domoticz/plugin directory.

2021-07-24 12:47:18.895 Zigate+ Zigbee hardware started.
2021-07-24 12:47:18.895 Status: Zigate+ Zigbee: (Zigate+ Zigbee) Entering work loop.
2021-07-24 12:47:18.895 Status: Zigate+ Zigbee: (Zigate+ Zigbee) Started.
2021-07-24 12:47:19.298 Error: Zigate+ Zigbee: (Zigate) failed to load 'plugin.py', Python Path used was '/var/domoticz/plugins/Domoticz-Zigate/:/usr/lib64/python36.zip:/usr/lib64/python3.6:/usr/lib64/python3.6:/usr/lib64/python3.6/lib-dynload:/usr/local/lib64/python3.6/site-packages:/usr/local/lib/python3.6/site-packages:/usr/lib64/python3.6/site-packages:/usr/lib/python3.6/site-packages'.
2021-07-24 12:47:19.298 Error: Zigate+ Zigbee: (Zigate+ Zigbee) Module Import failed, exception: 'ImportError'
2021-07-24 12:47:19.298 Error: Zigate+ Zigbee: (Zigate+ Zigbee) Error Line details not available.

What has caused this error i dont no yet but im very sure it has something to do whit the way domoticz is set up in clearos.

i have also tryed to install the zwave battery level plugin but it does not want to strat as well.

i have installed a raspberry pi whit domoticz and installed the zigate plugin , it works whitout any problem.

can you please help me to resolve this problem ?

Sorry for the long story but im trying to give as much as possible information.
Saturday, July 24 2021, 11:10 PM
Share this post:
Responses (3)
  • Accepted Answer

    Sunday, July 25 2021, 07:08 AM - #Permalink
    Resolved
    0 votes
    The locations of Domoticz differs indeed from other distros. Domoticz is mainly written/setup for Pi systems.

    I'm not an expert on this field, but look at my post on the Domtoicz forum with regards to the Plugin Manager
    https://www.domoticz.com/forum/viewtopic.php?f=65&t=22339&p=265774#p265774

    Maybe you can do the same for the Zigate plugin
    The reply is currently minimized Show
  • Accepted Answer

    Wednesday, July 28 2021, 01:01 PM - #Permalink
    Resolved
    0 votes
    Frans,
    I do not use python plugins myself so I have not seen this. But I will investigate a bit, and the info you provided is a good start.
    Unfortunately I do not have access to my normal development environment right now so it may take a few days. Setting up a virtual machine right now for trouble shooting.

    /Fred
    The reply is currently minimized Show
  • Accepted Answer

    Wednesday, July 28 2021, 04:02 PM - #Permalink
    Resolved
    0 votes
    Frans,
    If I understand it correctly there are two different "plugin Managers", and I assume you have tried to install the second one named "Domoticz Plugin Manager", correct?
    Domoticz PluginsTitle

    Can you describe how you tried to install it in a bit more detail and please also the "trace" leading up to the "startup variable"? (or is it row 63 and 79 below?)

    In ClearOS the Domoticz the executing (working) directory is (and should be) /usr/share/domoticz . However, the userdata, webserver files and database pahts are different ( /var/domoticz ) and this is set at the startup of Domoticz. In Debian based systems (such as Raspberry Pi) it looks different. My assumption is that there is some "hardcoded" path in the plugin modules part that is assuming a Debian file structure which is then causing the trouble.

    I am pretty sure the plugins should be installed in /var/domoticz/plugins/ .. Also, make sure that domoticz is owner of the files (recursive in all sub-directories)

    I might be mistaken, but I think the bug-fix that was made to Domoticz Plugin Manager inCommit #16 was not the best... "StartupFolder" should have been "UserDataFolder" instead (two places). Also, they seem to have forgotten about fixing a row in plugins-manager/manager.py in row 80 also. it says:
    plugins_folder = os.path.dirname(str(os.getcwd()) + "/plugins/")
    which I guess mean it takes current working directory (set to /usr/share/domoticz ) and add /plugins so the final path to where it "thinks" it sits is "/usr/share/domoticz/plugins/ ". Which obviously is not correct.

    With Domoticz Plugin Manager installed in /var/domoticz/plugins , owner set to domoticz, and with line 63 and 79 changed so it says "UserDataFolder" instead of "StartupFolder" (and hardcoded the row 80 in manager.py to "/usr/share/domoticz/plugins" it seems to work a bit better. I do not have time right now to "install" a plugin from the menu. But you can try this first if it is possible to experiment on your side.

    /Fred
    The reply is currently minimized Show
Your Reply