Open pipiche38 opened 5 years ago
Actually, plugin gets "current working directory" via
str(os.getcwd()) + "/plugins/"
Seems that Domoticz working dir is on the profile but userdata on a different folder, right?
@ycahome I beleive so. But userdata default is mostlikely also the Domoticz working dir except if we specifiy it.
So I feel that by using
Parameters["HomeFolder"]/../
Where Parameters["HomeFolder"] is the pp-manager folder You get to the plugin directory with ../
If you use the officiel docker of domoticz (domoticz/domoticz) the folder path for plugins is /opt/domoticz/userdata/plugins, wich doesn't correcpond to str(os.getcwd()) + "/plugins/"
Same bug identified in a different plugin manager and corrected here: https://github.com/stas-demydiuk/domoticz-plugins-manager/commit/26459edfbde77bf19337037c264f8203a579367a
In case Domoticz is started with -userdata /var/lib/domoticz/
/usr/share/domoticz/beta-domoticz/domoticz -www 8080 -sslwww 8443 -sslcert /var/lib/domoticz/server_cert.pem -sslpass -sslmethod -ssloptions -ssldhparam -wwwroot /var/lib/domoticz/www -dbase /var/lib/domoticz/domoticz.db -userdata /var/lib/domoticz/ -debuglevel normal -loglevel normal,status,error -log /var/tmp/domoticz.log
The plugins are installed on the wrong folder as they are installed on homedirectory of the user and not under the userdata folder.
It might be optimum to use
Parameters["HomeFolder"]
(which is the HomFolder of pp-manager) or even betterParameters["StartupFolder"] in case Parameters["DomoticzVersion"] >= '4.10267'