Plugins not becoming active in a Docker container
Posted: Sunday 13 October 2019 21:15
Hi,
I have recently switched from an older Domoticz version (3.5849) that was made available via App central of my NAS manufacturer (Asustor), to a version (4.1137) of Domoticz running a Docker container (with Portainer as UI).
The main reason is that I want to control the control heating pump based boiler activety and boiler temperature. This all works when I test with a light on a Philips Hue.
What I don't get to work is the connection to a switch (smart plug).
I could either do this indirectly by making a connection with my Homewizard, or directly via a Dlink DSP-W215 Home Smart Plug.
Both should be possible with plugins.
The latter (Dlink DSP-W215) is available in the example folder of plugins. So, seems easy.
However, whatever I try, I don't get Domoticz to show the Dlink device in the Hardware overview.
I have put the plugin in the Plugins folder and in its own folder. Given the plugin read/write/execute rights ('chmon 77'7). Copied it to a standard name 'plugin.py'. 'Stopped' and 'started' the container of course. But also restarted the NAS.
I also tried another example (DenonMarantz).
But no new hardware is appearing.
What I am doing wrong or what am I missing?
[Edit:]
Maybe I am on to something.
Plugins require Python 3.4 or higher.
When I start Domoticz, I see this line in the log file:
Status: PluginSystem: Started, Python version '3.7.3'.
So, I assumed that that was the Python version running and that all was OK
However, when I type “python” in the command prompt (via the Console function of Portainer), I get:
Python 2.7.16 (default, May 6 2019, 19:28:45) [GCC 8.3.0] on linux2
So, I could very well be that Python is too old.
I have recently switched from an older Domoticz version (3.5849) that was made available via App central of my NAS manufacturer (Asustor), to a version (4.1137) of Domoticz running a Docker container (with Portainer as UI).
The main reason is that I want to control the control heating pump based boiler activety and boiler temperature. This all works when I test with a light on a Philips Hue.
What I don't get to work is the connection to a switch (smart plug).
I could either do this indirectly by making a connection with my Homewizard, or directly via a Dlink DSP-W215 Home Smart Plug.
Both should be possible with plugins.
The latter (Dlink DSP-W215) is available in the example folder of plugins. So, seems easy.
However, whatever I try, I don't get Domoticz to show the Dlink device in the Hardware overview.
I have put the plugin in the Plugins folder and in its own folder. Given the plugin read/write/execute rights ('chmon 77'7). Copied it to a standard name 'plugin.py'. 'Stopped' and 'started' the container of course. But also restarted the NAS.
I also tried another example (DenonMarantz).
But no new hardware is appearing.
What I am doing wrong or what am I missing?
[Edit:]
Maybe I am on to something.
Plugins require Python 3.4 or higher.
When I start Domoticz, I see this line in the log file:
Status: PluginSystem: Started, Python version '3.7.3'.
So, I assumed that that was the Python version running and that all was OK
However, when I type “python” in the command prompt (via the Console function of Portainer), I get:
Python 2.7.16 (default, May 6 2019, 19:28:45) [GCC 8.3.0] on linux2
So, I could very well be that Python is too old.