Closed chrispazz closed 2 years ago
Ha yes, something similar to https://github.com/stas-demydiuk/domoticz-zigbee2mqtt-plugin/issues/556 ?
Here it s paths I m using
source_path = os.path.dirname(os.path.abspath(__file__)) + '/frontend'
templates_path = os.path.abspath(source_path + '/../../../www/templates')
So the source_path is still the good one, but templates_path need to change ?
The problem is the same but I am using the Official Domoticz Docker image (not linuxserver one).
Source path is: /opt/domoticz/userdata/plugins/Domoticz-deCONZ/frontend/. templates_path is: /opt/domoticz/www/templates/.
Thank you
Ha the code is using /opt/domoticz/userdata/www/templates/
instead of /opt/domoticz/www/templates/
for templates_path ?
@chrispazz If it s just that the problem, I can just remove "/userdata/" from path.
@Smanar, no, you have to "add" userdata in path... ;)
Currently you are using: /opt/domoticz/plugins/Domoticz-deCONZ/frontend/.
but inside docker we have to use: /opt/domoticz/userdata/plugins/Domoticz-deCONZ/frontend/.
But I don't understand, with the command
source_path = os.path.dirname(os.path.abspath(__file__)) + '/frontend'
I retreive the folder where the python file is installed ? so it will be /opt/domoticz/userdata/plugins/Domoticz-deCONZ/frontend/.
for you ?
Or in docker you have 1 folder for python domoticz file "/opt/domoticz/plugins/Domoticz-deCONZ/" and one other for idk what in "/opt/domoticz/userdata/plugins/Domoticz-deCONZ/" If it s that, why ?
I have the same error. I use Domoticz in docker and all userdata is placed in /config. The plugin can thus be found in /config/plugins/Domoticz-deCONZ.
@schroot72 so for you plugins files are in
/config/plugins/Domoticz-deCONZ/plugin.py
So file to copy are in
/config/plugins/Domoticz-deCONZ/frontend
And need to be copied where ? And why he haven't same path than you with the same oficial docker ?
I use a different docker, but Domoticz lets you specify the userdata/config folder in the startup command. When I check the domoticz development site, it states you can get the path of the plugin folder by using Parameters["HomeFolder"].
I m using a python command to retreive the plugin folder
source_path = os.path.dirname(os.path.abspath(__file__)) + '/frontend'
Like that I have the path with files I need to copy (the folder frontend in the plugin folder), but what is the destination diorectory for you ?
On the code I m using the previous path andd making
templates_path = os.path.abspath(source_path + '/../../../www/templates')
I think I made the misstake myself, somehow the www folder was deleted from the config folder. I recopied it from the domoticz install folder and now that error is gone ! thank you.
Installing plugin using official Domoticz docker give an error when copying custom pages. In Docker the plugins path is "/opt/domoticz/userdata/plugins" so relative paths has to be adjusted or a custom field in plugin settings has to be added to specify the correct path.