Python Plugin: Python Plugin Manager

Python and python framework
User avatar
remb0
Posts: 1002
Joined: Thursday 11 July 2013 22:21
Target OS: Raspberry Pi
Domoticz version: Beta
Location: The Netherlands
Contact:

Re: Python Plugin: Python Plugin Manager

Post by remb0 » Saturday 03 March 2018 17:31

some ideas:
add a short info message on https://www.domoticz.com/wiki/Plugins
and maybe a column if plugin is installable from PP-manager?

pp manager default in domoticz? (would help lots of users searching for plugins etc.)

categories for plugins? hardware / web services because the list will grow fast and with categories (maybe an extra metadata of the plugins) the dropdown will be shorter.

maybe a screenshot for the plugins? if the plugin has a folder: screenshots ?

what if a plugin is installed already? can it be updated from the manager?

is there an install log of the prerequisites of a plugin?


one problem:
When I enable pp manager my domoticz goes down. and when restarting I can't disable the plugin: problem adding hardware.

User avatar
remb0
Posts: 1002
Joined: Thursday 11 July 2013 22:21
Target OS: Raspberry Pi
Domoticz version: Beta
Location: The Netherlands
Contact:

Re: Python Plugin: Python Plugin Manager

Post by remb0 » Saturday 03 March 2018 17:39

IDANIT wrote:
Wednesday 28 February 2018 16:23
I've change from 3.5.3 to different Python version (3.4.4) and now everything works fine.
Can you reply the commands for other users? (like me :P)

User avatar
ycahome
Posts: 217
Joined: Sunday 12 February 2017 11:55
Target OS: Linux
Domoticz version: lat Beta
Contact:

Re: Python Plugin: Python Plugin Manager

Post by ycahome » Saturday 03 March 2018 17:56

remb0 wrote:
Saturday 03 March 2018 17:31
add a short info message on https://www.domoticz.com/wiki/Plugins
and maybe a column if plugin is installable from PP-manager?

pp manager default in domoticz? (would help lots of users searching for plugins etc.)

I would try to contact dnpwwo. A "repository" like approach would be more preferable.
Note that this plugin currently works only on Debian based systems (Linux, raspberry)


categories for plugins? hardware / web services because the list will grow fast and with categories (maybe an extra metadata of the plugins) the dropdown will be shorter.

Currently, plugin framework does not allow plugin configuration from within the plugin code.

maybe a screenshot for the plugins? if the plugin has a folder: screenshots ?
Currently, plugin framework does not allow plugin configuration from within the plugin code.

what if a plugin is installed already? can it be updated from the manager?
If plugin was installed from GitHub with git command (not just a zip download) can be managed.

is there an install log of the prerequisites of a plugin?
this is an information that can be provided from plugin creators just like the installation scripts for those prerequisites.

IDANIT
Posts: 86
Joined: Saturday 07 November 2015 11:01
Target OS: Raspberry Pi
Domoticz version: Beta
Location: Poland
Contact:

Re: Python Plugin: Python Plugin Manager

Post by IDANIT » Saturday 03 March 2018 21:08

remb0 wrote:
Saturday 03 March 2018 17:39
IDANIT wrote:
Wednesday 28 February 2018 16:23
I've change from 3.5.3 to different Python version (3.4.4) and now everything works fine.
Can you reply the commands for other users? (like me :P)
Well, there are two ways, sophisticated by "update-alternatives" or easy by "remove" :geek:. First one didn't work for me, so I give You second one :lol:.
1. first, check what's on Your system

Code: Select all

compgen -c python
2. if You have 3.4 already move to 4.
if dont...
3.

Code: Select all

sudo apt-get install python3.4
4.

Code: Select all

sudo apt-get remove python3.5
sudo apt-get autoremove
sudo reboot
Thats it

pvklink
Posts: 142
Joined: Wednesday 12 November 2014 16:01
Target OS: Raspberry Pi
Domoticz version:
Contact:

Re: Python Plugin: Python Plugin Manager

Post by pvklink » Saturday 03 March 2018 22:49

@remb0

I had the same problems that python did not start (sometimes)
I followed your procedure

Code: Select all

i@raspberrypi:~ $ compgen -c python
python3.5
python2
python3.4
python3.4m
python-config
python3
python
python2.7-config
python2.7
python3.5m
python2-config
python3m

Code: Select all

pi@raspberrypi:~ $ sudo apt-get remove python3.5
Pakketlijsten worden ingelezen... Klaar
Boom van vereisten wordt opgebouwd
De statusinformatie wordt gelezen... Klaar
Pakket 'python3.5' is niet geïnstalleerd, en wordt dus niet verwijderd
U kunt 'apt --fix-broken install' uitvoeren om dit op te lossen.
De volgende pakketten hebben niet-voldane vereisten:
 alacarte : Vereisten: gnome-menus (>= 3.5.3) maar het zal niet geïnstalleerd worden
 python-minecraftpi : Vereisten: minecraft-pi maar het zal niet geïnstalleerd worden
E: Er zijn niet-voldane vereisten. U kunt best 'apt --fix-broken install' uitvoeren zonder pakketten op te geven, (of u kunt zelf een oplossing specificeren).
also did a
apt --fix-broken install

python 3.5 still remains!

Code: Select all

sudo update-alternatives --config python
  Keuze        Pad                 Prioriteit Status
------------------------------------------------------------
  0            /usr/bin/python3.5   3         automatische modus
  1            /usr/bin/python2.7   2         handmatige modus
* 2            /usr/bin/python3     1         handmatige modus
  3            /usr/bin/python3.5   3         handmatige modus
  
  python --version                                             
  Python 3.5.3


pvklink
Posts: 142
Joined: Wednesday 12 November 2014 16:01
Target OS: Raspberry Pi
Domoticz version:
Contact:

Re: Python Plugin: Python Plugin Manager

Post by pvklink » Saturday 03 March 2018 22:57

Solved my problem, i can select 3.4 and python works now
Anyone an idea why
-EnableEventScriptSystem value has become 0 (off). It was 1 (ON) and after playing with weatherunderground and detect hardware devices python stopped and this value became 0
- i cant remove python 3.5 (see previous post)

solution:

Code: Select all

sudo update-alternatives --install /usr/bin/python python /usr/bin/python3.4 4   (4 is variable)

and then 

sudo update-alternatives --config python
and choose option 4(variable)

Also python is working again after updating EnableEventScriptSystem to 1

rowid	Key	nValue	sValue
139	EnableEventScriptSystem	1	

User avatar
ycahome
Posts: 217
Joined: Sunday 12 February 2017 11:55
Target OS: Linux
Domoticz version: lat Beta
Contact:

Re: Python Plugin: Python Plugin Manager

Post by ycahome » Sunday 04 March 2018 10:26

Hello again.

New version is here. You have nothing to do. You will get new version on next domoticz restart or plugin "Update".
v.1.4.10

Added: Xiaomi PM2.5 Sensor
Added: Sony Bravia TV (with Kodi remote)
Changed: Selected (NotifyOnly) is now the default option for auto update

remb0 wrote:
Saturday 03 March 2018 17:31
some ideas:
add a short info message on https://www.domoticz.com/wiki/Plugins
and maybe a column if plugin is installable from PP-manager?
@remb0: Adopted your idea. Thanks ;)

As for making this plugin default on domoticz, am trying first to make it play under Windows or only if Detect Linux .

Thank you for your help

IDANIT
Posts: 86
Joined: Saturday 07 November 2015 11:01
Target OS: Raspberry Pi
Domoticz version: Beta
Location: Poland
Contact:

Re: Python Plugin: Python Plugin Manager

Post by IDANIT » Sunday 04 March 2018 10:36

ycahome wrote:
Sunday 04 March 2018 10:26
Hello again.

New version is here. You have nothing to do. You will get new version on next domoticz restart or plugin "Update".
v.1.4.10

Added: Xiaomi PM2.5 Sensor
Added: Sony Bravia TV (with Kodi remote)
Changed: Selected (NotifyOnly) is now the default option for auto update

remb0 wrote:
Saturday 03 March 2018 17:31
some ideas:
add a short info message on https://www.domoticz.com/wiki/Plugins
and maybe a column if plugin is installable from PP-manager?
@remb0: Adopted your idea. Thanks ;)

As for making this plugin default on domoticz, am trying first to make it play under Windows or only if Detect Linux .

Thank you for your help
Great Job! TYVM!
https://github.com/kofec/domoticz-AirPurifier maybe next? ;-)

User avatar
DeBaat
Posts: 35
Joined: Saturday 27 January 2018 15:52
Target OS: NAS (Synology & others)
Domoticz version: V3.8153
Contact:

Re: Python Plugin: Python Plugin Manager

Post by DeBaat » Sunday 04 March 2018 10:47

Wow!
Wonderful idea.

Was looking in how to add Sonos plugin but was holding back because I wasn't that confident accessing the bare system.
I do have some good experience with managing plugins for WordPress. Might find some ideas there?

Keep up the good work!

michellejohnso1
Posts: 1
Joined: Sunday 04 March 2018 16:19
Target OS: Linux
Domoticz version:
Location: Michigan
Contact:

Re: Python Plugin: Python Plugin Manager

Post by michellejohnso1 » Sunday 04 March 2018 16:32

Python Plugin Management, simplified
[spam ? ?

User avatar
ycahome
Posts: 217
Joined: Sunday 12 February 2017 11:55
Target OS: Linux
Domoticz version: lat Beta
Contact:

Re: Python Plugin: Python Plugin Manager

Post by ycahome » Sunday 04 March 2018 16:39

michellejohnso1 wrote:
Sunday 04 March 2018 16:32
Python Plugin Management, simplified

.. pluginmanager documentation master file, created by
What was that? :shock: :shock:
Your first post to this forum and looks like spam advertising!!
Maybe you should use some code tags in order to make your post readable!!

User avatar
ycahome
Posts: 217
Joined: Sunday 12 February 2017 11:55
Target OS: Linux
Domoticz version: lat Beta
Contact:

Re: Python Plugin: Python Plugin Manager

Post by ycahome » Tuesday 06 March 2018 11:51

New version is here. You have nothing to do. You will get new version on next Domoticz restart or plugin "Update".
v.1.4.17

Added: Denon/Marantz Amplifier
Added: Disc usage
Added: Dutch earthquakes
Added: Hive Active Heating


Wiki Plugin catalogue updated. A suffix "$" added to mark the plugins that have some dependencies (from what is mentioned to instructions)
https://www.domoticz.com/wiki/Plugins

deennoo
Posts: 942
Joined: Wednesday 10 December 2014 14:06
Target OS: Linux
Domoticz version: beta
Location: Bordeaux France
Contact:

Re: Python Plugin: Python Plugin Manager

Post by deennoo » Saturday 10 March 2018 18:12

Thx Ycahome for your works

I try to run your plugin manager on my test domoticz (rpi 3 + stretch) domo beta 3.9014 python 3.5.3

Each time i try to add a plugin (Miflora mate xiaomi robot, pm2.5) this create a segmentation fault, any idea ?
Domoticz stable 3.5877 for real & Domoticz beta for test
Rfxtrxe / RFLink / Milight / Yeelight / ESP8266 / MQTT / BLE
http://domo-attitude.fr

User avatar
ycahome
Posts: 217
Joined: Sunday 12 February 2017 11:55
Target OS: Linux
Domoticz version: lat Beta
Contact:

Re: Python Plugin: Python Plugin Manager

Post by ycahome » Saturday 10 March 2018 20:18

deennoo wrote:
Saturday 10 March 2018 18:12
Thx Ycahome for your works

I try to run your plugin manager on my test domoticz (rpi 3 + stretch) domo beta 3.9014 python 3.5.3

Each time i try to add a plugin (Miflora mate xiaomi robot, pm2.5) this create a segmentation fault, any idea ?
Seems that the are problems with some plugins, raspberry and python 3.5.

Two questions:
- you are pressing "Update" after selecting "Miflora mate xiaomi robot or pm2.5", correct?
- can you post me the results of the following commands?

python --version
and
python3 --version

User avatar
ycahome
Posts: 217
Joined: Sunday 12 February 2017 11:55
Target OS: Linux
Domoticz version: lat Beta
Contact:

Re: Python Plugin: Python Plugin Manager

Post by ycahome » Sunday 11 March 2018 9:48

v.1.4.18 is here:

Added: Meteo Alarm EU RSS Reader
Added: Mikrotik RouterOS
Added: Moon Phases


Help me include your plugins (on GitHub) by requesting changes on GitHub.

Regards,

florisi
Posts: 43
Joined: Saturday 30 July 2016 10:14
Target OS: Raspberry Pi
Domoticz version: v4.9732
Location: Arnhem
Contact:

Re: Python Plugin: Python Plugin Manager

Post by florisi » Sunday 11 March 2018 9:51

just downloaded pp-manager in the plugins directory.
rebooted my raspberry but nothing appears.
running Domoticz v3.9014 (latest beta) on pi3

User avatar
ycahome
Posts: 217
Joined: Sunday 12 February 2017 11:55
Target OS: Linux
Domoticz version: lat Beta
Contact:

Re: Python Plugin: Python Plugin Manager

Post by ycahome » Sunday 11 March 2018 9:54

make sure that you have python installed

florisi
Posts: 43
Joined: Saturday 30 July 2016 10:14
Target OS: Raspberry Pi
Domoticz version: v4.9732
Location: Arnhem
Contact:

Re: Python Plugin: Python Plugin Manager

Post by florisi » Sunday 11 March 2018 10:02

here is my output about python:

Code: Select all

sudo apt-get install python3
Reading package lists... Done
Building dependency tree
Reading state information... Done
python3 is already the newest version (3.5.3-1).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
pi@domotica:~ $ python --version
Python 2.7.13
Any hints?

User avatar
ycahome
Posts: 217
Joined: Sunday 12 February 2017 11:55
Target OS: Linux
Domoticz version: lat Beta
Contact:

Re: Python Plugin: Python Plugin Manager

Post by ycahome » Sunday 11 March 2018 10:07

are you sure that you don't see "Python plugin manager" on plugin list?

Any log entries?

florisi
Posts: 43
Joined: Saturday 30 July 2016 10:14
Target OS: Raspberry Pi
Domoticz version: v4.9732
Location: Arnhem
Contact:

Re: Python Plugin: Python Plugin Manager

Post by florisi » Sunday 11 March 2018 10:10

Absolutely sure, no python plugin manager in the list.
Which logfile would u like to see?

Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests