ffes / domoticz-buienradar

Domoticz Buienradar.nl Weather Lookup Plugin
MIT License
14 stars 5 forks source link

Discrepancy in library used in Domoticz/plugins #4

Closed Sneeuwtijger closed 5 years ago

Sneeuwtijger commented 7 years ago

In Reader.md -

In your domoticz/plugins directory do

cd domoticz/plugins git clone https://github.com/ffes/domoticz-buienradar.git

Alternatively you can download the latest version from https://github.com/ffes/domoticz-buienradar/archive/master.zip and unzip it. Then create a directory on your Domoticz device in domoticz/plugins named buienradar and transfer all the files to your device. <<

The Buienradar plugin expects the second method and searches for Buienradar.py in /domoticz/plugins/Buienradar but git clone installs it in /domoticz/plugins/domoticz-buienradar

ffes commented 7 years ago

The name of the directory is not important to the plugin system. It just goes through all the directories in the plugins directory and gets its information from the XML block in the plugin.py file.

Maybe I understand you wrong, but otherwise I will close this issue.

Sneeuwtijger commented 7 years ago

I opened this as an reaction to a problem in the Domoticz forum Buienradar Weather plugin thread - someone posted a problem < 2017-03-07 20:50:34.186 Error: (Buienradar) failed to load 'plugin.py', Python Path used was '/home/pi/domoticz/plugins/Buienradar/:/usr/local/lib/python35.zip:/usr/local/lib/python3.5/:/usr/local/lib/python3.5/plat-linux:/usr/local/lib/python3.5/lib-dynload'. 2017-03-07 20:50:34.186 Error: (Buienradar) Module Import failed, exception: 'ImportError' 2017-03-07 20:50:34.186 Error: (Buienradar) Module Import failed: ' Name: buienradar'

There I saw the Python path pointing to /plugins/Buienradar and in my installation the module is in /plugins/domoticz-buienradar , therefor I thought there was an error in the directory the modules where installed to. Now I read your explanation and it makes sense. Still I, as a user, find it confusing that Git installs it in /plugins/domoticz-buienradar and the other suggested method should install it in /plugins/Buienradar, but that is my problem not understanding the plugin system :)

ffes commented 7 years ago

I understand the confusion. "domoticz-buienradar" is just the name I gave to my repository. And git clone creates a directory with that name. But for the plugin system the directory name is irrelevant.

I will add an extra line to the readme to clarify.

But as said in that forum post as well: Somebody has to write a decent "How to install a plugin" page on the wiki for users.

Sneeuwtijger commented 7 years ago

I understand - thank you for the clarification ;)

And about the wiki page - very good idea, but I am not good at writing instructions....

hcroij commented 6 years ago

As part of a previous topic (with no answer). Any odea why the “buienradar” plugin is not showing in my hardware list? Working on raspberry Pi

Thx in advancedHenk

Tsjippy commented 5 years ago

no idea, here it is working