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

In case of -userdata different than domoticz home the plugin are not installed in the right folder #15

Open
pipiche38 opened this issue Jan 3, 2019 · 3 comments

Comments

@pipiche38
Copy link
Contributor

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 better

Parameters["StartupFolder"] in case Parameters["DomoticzVersion"] >= '4.10267'

@ycahome
Copy link
Owner

ycahome commented Jan 3, 2019

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?

@pipiche38
Copy link
Contributor Author

@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 ../

@DavidTre07
Copy link

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: stas-demydiuk/domoticz-plugins-manager@26459ed

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

3 participants