Python plugin: Python plugin installer!

Python and python framework

Moderator: leecollings

Post Reply
blauwebuis
Posts: 331
Joined: Wednesday 21 December 2016 9:11
Target OS: Raspberry Pi / ODroid
Domoticz version: current
Contact:

Python plugin: Python plugin installer!

Post by blauwebuis »

A plugin to easily install other python plugins :D

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
User avatar
EdwinK
Posts: 1820
Joined: Sunday 22 January 2017 21:46
Target OS: Raspberry Pi / ODroid
Domoticz version: BETA
Location: Rhoon
Contact:

Re: Python plugin: Python plugin installer!

Post by EdwinK »

Trying this one out.
Running latest BETA on a Pi-3 | Toon® Thermostat (rooted) | Hue | Tuya | IKEA tradfri | Dashticz V3 on Lenovo Huawei Tablet | Conbee
User avatar
ycahome
Posts: 248
Joined: Sunday 12 February 2017 10:55
Target OS: Linux
Domoticz version: lat Beta
Contact:

Re: Python plugin: Python plugin installer!

Post 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.
fkok
Posts: 29
Joined: Thursday 19 January 2017 9:19
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: Netherlands
Contact:

Re: Python plugin: Python plugin installer!

Post 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!!!
blauwebuis
Posts: 331
Joined: Wednesday 21 December 2016 9:11
Target OS: Raspberry Pi / ODroid
Domoticz version: current
Contact:

Re: Python plugin: Python plugin installer!

Post 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)
User avatar
ycahome
Posts: 248
Joined: Sunday 12 February 2017 10:55
Target OS: Linux
Domoticz version: lat Beta
Contact:

Re: Python plugin: Python plugin installer!

Post 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.
User avatar
ycahome
Posts: 248
Joined: Sunday 12 February 2017 10:55
Target OS: Linux
Domoticz version: lat Beta
Contact:

Re: Python plugin: Python plugin installer!

Post by ycahome »

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest