Page 1 of 1
Python plugin: Python plugin installer!
Posted: Thursday 22 February 2018 0:27
by blauwebuis
A plugin to easily install other python plugins
Just paste in the URL into this plugin's input field, and it will do the rest.
- It downloads the zip file URL you provide, unpacks that file into a new plugin directory, and finally CHMOD's the plugin.py file.
- The URL you provide is processed when you press "update" on the plugin, or when Domoticz boots.
- It checks to see that it hasn't already processed the current URL (and that it's a valid URL).
Download and install
https://github.com/flatsiedatsie/Domoti ... -installer
Re: Python plugin: Python plugin installer!
Posted: Thursday 22 February 2018 9:08
by EdwinK
Trying this one out.
Re: Python plugin: Python plugin installer!
Posted: Thursday 22 February 2018 9:29
by ycahome
Nice idea!!
I would prefer if your plugin had a predefined list of plugins/urls for installation.
For example,
- you could agree on one or two sources (ex. github and http download).
- all plugin developers will provide their urls
- you will update your config file every now and then in order to include new plugins
- also, on github there is a way to discover if there any code updates. That way you can prepare a notification about plugins with updates.
To be honest, am searching for spare time in order to do that by myself (although i think that should be part of the core domoticz).
If you have time to do it, would be nice.
Re: Python plugin: Python plugin installer!
Posted: Thursday 22 February 2018 10:09
by fkok
ycahome wrote: ↑Thursday 22 February 2018 9:29
Nice idea!!
I would prefer if your plugin had a predefined list of plugins/urls for installation.
For example,
- you could agree on one or two sources (ex. github and http download).
- all plugin developers will provide their urls
- you will update your config file every now and then in order to include new plugins
- also, on github there is a way to discover if there any code updates. That way you can prepare a notification about plugins with updates.
To be honest, am searching for spare time in order to do that by myself (although i think that should be part of the core domoticz).
If you have time to do it, would be nice.
That would be fantastic!!!
Re: Python plugin: Python plugin installer!
Posted: Friday 23 February 2018 11:15
by blauwebuis
@ycahome: that is the direction Domoticz is/should be heading.
See this feature request:
https://github.com/domoticz/domoticz/issues/2057
It has also been discussed with Gizmocus. But there is no time path.
A more practical reason why it's not really possible to create a more complex plugin to manage plugins (and themes), is that the plugin infrastructure does not yet support:
- A way to show data output on the hardware page (update text in a textarea for example). This makes it impossible to give users feedback on their actions, or create more complex interfaces there.
- Similarly, there is no option to create something like a button ("click to install") or checkbox ("keep plugins updated automatically).
I hope the python plugin system will go in this direction. Ideally, it would allow each plugin to come with a little bit of javascript too. Then you could create advanced mini-interfaces for each plugin on their respective hardware pages. (Or allow plugins to add JS features, as a bonus)
Re: Python plugin: Python plugin installer!
Posted: Friday 23 February 2018 12:43
by ycahome
I took a snap on the feature request and I think that developer's feedback is more than justified.
But, in order to return to our discussion, humans often make thoughts in a more complex way that really needed.
Since you are running on root context, theoretically, you can do anything from within your plugin (add crontab job/send notification/run git update).
I will try to create a demo plugin to see if this can be done.
Re: Python plugin: Python plugin installer!
Posted: Friday 23 February 2018 19:29
by ycahome