Adding plugin does not work

Python and python framework

Moderator: leecollings

Post Reply
User avatar
jorgh
Posts: 124
Joined: Friday 27 June 2014 23:19
Target OS: Raspberry Pi / ODroid
Domoticz version: 3.8224
Location: Netherlands
Contact:

Adding plugin does not work

Post by jorgh »

Hi All,

I'm interested in writing a plugin myself. So I've installed a spare Pi with the latest Raspbian (using NOOBS).
Updated using apt-get update and apt-get upgrade
Installed Domoticz (used the method as stated in the Wiki), and issued a updatebeta to get to the latest Beta release (3.6807)
Domoticz is up and running.

I noticed that de plugin directory was created, but is empty and has (in my opinion) the wrong access rights (or owner).
It actually was owned by root.root and had no access fro the Pi account, that Domoticz is actually running under.
So I used chmod a+rwx to make the directory accessible to Domoticz (could also have used chown pi.pi).

To test the plugin framework, I've downloaded the Denon example, and put in in the Denon4306 folder in the plugins directory (renamed to plugin.py).
Restarted Domotics.
The plugin is now listed in the add hardware section, but if I try to add it, actually nothing happens (I'ts actually not added, so not listed in the table in the hardware section). I also noticed, there is no config, other than the data timeout option.
Same happens if I try to use the base template as a test.

Is this a bug I hit? Or am I doing something wrong here?
The log shows no errors.

Thanks in advance for any help.
User avatar
ycahome
Posts: 248
Joined: Sunday 12 February 2017 10:55
Target OS: Linux
Domoticz version: lat Beta
Contact:

Re: Adding plugin does not work

Post by ycahome »

Hello jorgh and welcome.

Just some hints:
- "plugins" folder seems that is normally without permisions. I always getting in with "sudo -s".
- "plugin.py" file should be on a subfolder inside "plugins" folder. You can easily find out the name on the "plugin.py" file in keyword "key=". Try to keep the case intact.
- You can always check Log to see what goes wrong.(Setup/Log)

Hope this helps,
User avatar
jorgh
Posts: 124
Joined: Friday 27 June 2014 23:19
Target OS: Raspberry Pi / ODroid
Domoticz version: 3.8224
Location: Netherlands
Contact:

Re: Adding plugin does not work

Post by jorgh »

ycahome,

Thanks for your response.
Just some hints:
- "plugins" folder seems that is normally without permisions. I always getting in with "sudo -s".
I agree, that this is the case. But I doubt that it should be, it's the only folder owned by root in the compete domoticz install. I've corrected this, but I think this might need to be changed in the Domoticz install script. However, as the plugins are listed in the drop-down, I think there is no permission issue with the way I've set it up right now.
- "plugin.py" file should be on a subfolder inside "plugins" folder. You can easily find out the name on the "plugin.py" file in keyword "key=". Try to keep the case intact.
Verified, and yes, this is the case.
- You can always check Log to see what goes wrong.(Setup/Log)
Well, the strange thing is, that nothing strange shows up there, don't know if there is a way to enable extended logging.

So I'm still puzzled...
User avatar
jorgh
Posts: 124
Joined: Friday 27 June 2014 23:19
Target OS: Raspberry Pi / ODroid
Domoticz version: 3.8224
Location: Netherlands
Contact:

Re: Adding plugin does not work

Post by jorgh »

All,

Just tried using Internet Explorer instead of Chrome.
Using Internet Explorer it works, another thing I noticed, that in de drop down, in IE, the list is sorted Alphabetically and In Chrome, the Python plugins are always on the bottom of the list.
So, there seems some incompatibility issue with Chrome. Strange thing is, that adding other hardware works perfectly in Chrome.

Regards,
User avatar
ycahome
Posts: 248
Joined: Sunday 12 February 2017 10:55
Target OS: Linux
Domoticz version: lat Beta
Contact:

Re: Adding plugin does not work

Post by ycahome »

my Chrome 56.0.2924.87 displays the plugins the same way like firefox and IE.
Try to purge browser's cache.
User avatar
jorgh
Posts: 124
Joined: Friday 27 June 2014 23:19
Target OS: Raspberry Pi / ODroid
Domoticz version: 3.8224
Location: Netherlands
Contact:

Re: Adding plugin does not work

Post by jorgh »

@ycahome,

Purging the cache does not solve the issue.
For now, I'll just use IE as this works for me.

Regards,

Jorg
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest