-
-
Notifications
You must be signed in to change notification settings - Fork 26
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
forked for Docker-Domoticz #172
Comments
Next step : I moved domoticz.py to the plugin directory because it can not be loaded ? When entering the docker environment there is no PATH for library's ?:
is there much more logging now ?:
|
But your websocket is still on https port ?
Without this check the plugin will work but will be not able to make request.
It's not hardcoded, and already modified for docker
Wich one path you need ? Perhaps a new one ?
Perhps you have usefull logs at start ?
|
Thank you for your quick reply. Path for docker didn't work for me, maybe something further on went wrong. I hardcoded : templates_path = os.path.abspath('/opt/domoticz/www/templates') That worked and installed the custom/deCONZ widget in Domoticz. Ha!While typing.
Previous assumption is wrong. See here : https://hub.docker.com/r/domoticz/domoticz The path i used : '/opt/domoticz/www/templates' is the correct path in this Domoticz / Docker distribution. I wil make (later this week) a new install of domoticz from that container from scratch with only this plugin and see how that goes. |
Can you give me the result of this request ?
It's not a big problem, if a file don't exist, I can try another hardcoded path in the code, but need to know what to add/remove to the path. |
First of all ! After following the below procedure in my " production" environment everything works now ! To come to this I installed a new container, exactly following the Domoticz instructions . The relation between your install instructions and the relation with the Domoticz container setup where not clear to me at first sight. All my other plugins/scripts etc just worked right for copying with no hasle in the container environment. Maybe you can add some extra instruction for Docker install : In the
I followed your install instructions BUT now from INSIDE the containe (i don't know if this is crucial but it worked):
Restart of Domoticz and entering the connection details in the deCONZ-Domoticz plugin. Add to the user in Domoticz that the Custom tab should be visible. Then :
Many hours where spend ... I think crucial are owner rights and environment variables used when installing within the container. |
Here, IDK, I don't use docker, I have never check how to pull a Git on them, but it's good to know ^^
This is worrying, where the missing part is from ?
You can't check what is the result of this request by defaut ? without specific setting ? I can try to bypass this issue with python code. |
You don't have to change the plugin, but for less experienced docker this can be usefull if you add some extra at the Install page. The missing part is from the before mentioned Domoticz docker install page ie : https://hub.docker.com/r/domoticz/domoticz This is used in the You use that path in your plugin (userdata/):
This is the outside world on the disk (look at the paths used) :
This is the inside world as seen by the programs in the Domoticz-docker container :
You see, also other user/group owner. After first run of Domoticz the inside world is created and can be referenced to . That is why in the 'compose.yaml' only then the new mapping can be made. If the mapping exist before the first start of the container this gives a (breaking) error because the outside world is not created. Especially this plugin uses this special treatment, other plugins and scrips i used in Domoticz don't. So this took me by surprise, i was confused because of the errors thrown by the plugin, I didn't know why. I have (for some time now) an another docker instance running with my personal intranet. It consists of a php-apache container. I prefer the use of Docker because my intranet is the same on amd64 and arm64 (windows, Linux , Raspbian). If you consider docker PHP ' https://hub.docker.com/_/php/tags ' there are 462 pages full of containers for 8 operating/architecture systems and from PHP 5.4 up to 8.4.xx and in different setups. It is like a sort of the virtual environment in Python , but there you can actually see the inside world in your userland. It is only treated by Python different. So i was surprised to find out about the inside world in the docker container. Regards |
It can come from the docker setting, some folder can be set to be persistant, but here you know docker better than me, and I think since the time you are on them, you are skilled now ^^
Yep, but if I can do something to prevent users having problem with their setup ... From here the path And about
This don't return good path ? |
skilled ?, nah, just learned something more.
I tried several setups , every time there are errors, and i don't know about Python to solve this . Placing the above at line 1048 in
But it works for now in my operational system so after weeks of fiddling around with the CONBEE II and software, i go and enjoy my Domoticz et all. I thank you for your patience. |
I have updated the beta branch to use Domoticz native fonction for path, it need to work with and without docker now, if you want to make a try.
|
I downloaded the beta zip and extracted right in my local /opt/NewDomo/config/plugins directory. The Docker domoticz container is the same instance i already had running The instructions on the Domoticz docker page are NOT clear/confusing about where to install plugins, they say :
But here is the logging.
Local source path for the frontend is Problems arise when installing as things are not clear, as i mentioned before in docker - domoticz documentation |
But from log it use
And you are right, I m reading it on the documentation
So for this part I can do nothing. |
Long time I haven't updated the code. |
Hi, Smanar,
First : i can't code in Python and have little knowledge of github. (But i have some knowledge in other programming languages)
As i already mentioned this plugin will not work in Docker. It seemed to work but was terminated :
There where several error messages which where not related to the actual problem. (like indicating missing api-key)
The missing Library's where already incorporated in the docker image.
As you already mentioned : in Docker it is al to fluent ...
And indeed it is.
So I forked this repository and made some hard coded changes.
I hardcoded some import checks, path's , IP addresses.
Docker problem: after first start from compose file , errors come up. After restart from Portainer (is Docker webinterface) these errors are gone. I still have to look into that later.
All apply to the use of this plugin in Domoticz Docker only :
These i hardcodded for my use and Currently, i have the widget in the customtab/deCONZ running and it is being updated every minute. So the connections are good !
There is one error logged now :
Error must be :
For now i have no clue, mabe you have any idea where the problem is ?
The text was updated successfully, but these errors were encountered: