Buienradar Weather Lookup Plugin

Python and python framework

Moderator: leecollings

pvm
Posts: 550
Joined: Tuesday 17 June 2014 22:14
Target OS: NAS (Synology & others)
Domoticz version: 4.10538
Location: NL
Contact:

Re: Buienradar Weather Lookup Plugin

Post by pvm »

Will this plugin also be delivered with a future Domoticz version ?
Synology NAS, slave PI3, ZWave (Fibaro), Xiaomi zigbee devices, BTLE plant sensor, DzVents, Dashticz on tablet, Logitech Media Server
Spymate
Posts: 5
Joined: Tuesday 15 December 2015 10:29
Target OS: Linux
Domoticz version: 4.10717
Contact:

Re: Buienradar Weather Lookup Plugin

Post by Spymate »

since today the plugin gives a error.
This starten on 6 April at 15:15 uur.

log:
2017-04-06 16:49:55.195 (Buienradar) Retrieve weather data from http://xml.buienradar.nl/
2017-04-06 16:49:55.248 Error: (Buienradar) 'onStart' failed 'ParseError'.
2017-04-06 16:49:55.248 Error: (Buienradar) ----> Line 80 in /home/alexander/domoticz/plugins/domoticz-buienradar/plugin.py, function onStart
2017-04-06 16:49:55.248 Error: (Buienradar) ----> Line 78 in /home/alexander/domoticz/plugins/domoticz-buienradar/buienradar.py, function getBuienradarXML
2017-04-06 16:49:55.248 Error: (Buienradar) ----> Line 1184 in /usr/lib/python3.5/xml/etree/ElementTree.py, function parse
2017-04-06 16:49:55.248 Error: (Buienradar) ----> Line 607 in /usr/lib/python3.5/xml/etree/ElementTree.py, function parse

Does anyone know the solution ?

edit: I see that the XML link is empty. Might be a problem with buienradar.
Spymate
Posts: 5
Joined: Tuesday 15 December 2015 10:29
Target OS: Linux
Domoticz version: 4.10717
Contact:

Re: Buienradar Weather Lookup Plugin

Post by Spymate »

Spymate wrote:since today the plugin gives a error.
This starten on 6 April at 15:15 uur.

log:
2017-04-06 16:49:55.195 (Buienradar) Retrieve weather data from http://xml.buienradar.nl/
2017-04-06 16:49:55.248 Error: (Buienradar) 'onStart' failed 'ParseError'.
2017-04-06 16:49:55.248 Error: (Buienradar) ----> Line 80 in /home/alexander/domoticz/plugins/domoticz-buienradar/plugin.py, function onStart
2017-04-06 16:49:55.248 Error: (Buienradar) ----> Line 78 in /home/alexander/domoticz/plugins/domoticz-buienradar/buienradar.py, function getBuienradarXML
2017-04-06 16:49:55.248 Error: (Buienradar) ----> Line 1184 in /usr/lib/python3.5/xml/etree/ElementTree.py, function parse
2017-04-06 16:49:55.248 Error: (Buienradar) ----> Line 607 in /usr/lib/python3.5/xml/etree/ElementTree.py, function parse

Does anyone know the solution ?

edit: I see that the XML link is empty. Might be a problem with buienradar.

Buienradar is up and running. It was a problem with Buienradar.
EldigoR
Posts: 41
Joined: Monday 12 October 2015 19:57
Target OS: Linux
Domoticz version: Beta
Location: Netherlands
Contact:

Re: Buienradar Weather Lookup Plugin

Post by EldigoR »

Missing some error handling in buienradar.py:
Changed:

Code: Select all

self.tree = ET.parse(xml)
self.lastUpdate = datetime.now()
into

Code: Select all

try:
     self.tree = ET.parse(xml)
except ET.ParseError as err:
     Domoticz.Log("XML error: " + err)
     return

self.lastUpdate = datetime.now()
User avatar
Plaagje
Posts: 42
Joined: Thursday 30 April 2015 10:00
Target OS: Raspberry Pi / ODroid
Domoticz version: Latest
Location: Netherlands
Contact:

Re: Buienradar Weather Lookup Plugin

Post by Plaagje »

Nice Plugin!

I could use an UV index.
And an rain predicament would be nice.

-Plaagje
User avatar
EdwinK
Posts: 1820
Joined: Sunday 22 January 2017 21:46
Target OS: Raspberry Pi / ODroid
Domoticz version: BETA
Location: Rhoon
Contact:

Re: Buienradar Weather Lookup Plugin

Post by EdwinK »

Recently noticed this:

Code: Select all

2017-04-11 12:09:12.970 Error: (Buienradar) ----> Line 90 in /usr/local/domoticz/var/plugins/buienradar/plugin.py, function onHeartbeat
2017-04-11 12:09:23.170 Error: (Buienradar) 'onHeartbeat' failed 'KeyError'.
Running latest BETA on a Pi-3 | Toon® Thermostat (rooted) | Hue | Tuya | IKEA tradfri | Dashticz V3 on Lenovo Huawei Tablet | Conbee
GuyTreepbush
Posts: 19
Joined: Thursday 12 January 2017 13:26
Target OS: NAS (Synology & others)
Domoticz version:
Contact:

Re: Buienradar Weather Lookup Plugin

Post by GuyTreepbush »

I tried to install the plugin and I think the problem why it is not working is the python3-dev which I cannot install on my synology.
When I run the local.py:

Code: Select all

  File "localtest.py", line 13, in <module>
    from buienradar import Buienradar
  File "/volume1/@appstore/domoticz/plugins/buienradar/buienradar.py", line 16, in <module>
    import urllib.request
ImportError: No module named request
anyone know how to avoid using python3-dev or install is on a synology?

FYI,

Code: Select all

sudo apt install python3-dev
gives

Code: Select all

apt: invalid flag: install
I have anoher plugin running without problems.
pvm
Posts: 550
Joined: Tuesday 17 June 2014 22:14
Target OS: NAS (Synology & others)
Domoticz version: 4.10538
Location: NL
Contact:

Re: Buienradar Weather Lookup Plugin

Post by pvm »

Shouldn't it be:

Code: Select all

sudo apt-get install python3-dev
Or without 'install'
Synology NAS, slave PI3, ZWave (Fibaro), Xiaomi zigbee devices, BTLE plant sensor, DzVents, Dashticz on tablet, Logitech Media Server
GuyTreepbush
Posts: 19
Joined: Thursday 12 January 2017 13:26
Target OS: NAS (Synology & others)
Domoticz version:
Contact:

Re: Buienradar Weather Lookup Plugin

Post by GuyTreepbush »

Thanks for thinking with me but Synology works with an appstore and although I can install most things using PIP, Python packages typically only can be installed via the appstore. Tried your suggestions just to be sure but without succes.
User avatar
EdwinK
Posts: 1820
Joined: Sunday 22 January 2017 21:46
Target OS: Raspberry Pi / ODroid
Domoticz version: BETA
Location: Rhoon
Contact:

Re: Buienradar Weather Lookup Plugin

Post by EdwinK »

Did you try to install easy_install. I did several weeks ago, and I could install what was needed with that.
Running latest BETA on a Pi-3 | Toon® Thermostat (rooted) | Hue | Tuya | IKEA tradfri | Dashticz V3 on Lenovo Huawei Tablet | Conbee
GuyTreepbush
Posts: 19
Joined: Thursday 12 January 2017 13:26
Target OS: NAS (Synology & others)
Domoticz version:
Contact:

Re: Buienradar Weather Lookup Plugin

Post by GuyTreepbush »

Great to know it is possible. I have easy_install installed so gave it a try. Hope you can help me a bit more... :?

Code: Select all

easy_install python3-dev
Searching for python3-dev
Reading https://pypi.python.org/simple/python3-dev/
Couldn't find index page for 'python3-dev' (maybe misspelled?)
Scanning index of all packages (this may take a while)
Reading https://pypi.python.org/simple/
No local packages or download links found for python3-dev
error: Could not find suitable distribution for Requirement.parse('python3-dev')
User avatar
EdwinK
Posts: 1820
Joined: Sunday 22 January 2017 21:46
Target OS: Raspberry Pi / ODroid
Domoticz version: BETA
Location: Rhoon
Contact:

Re: Buienradar Weather Lookup Plugin

Post by EdwinK »

Sorry, Can't remember how I did that.
Running latest BETA on a Pi-3 | Toon® Thermostat (rooted) | Hue | Tuya | IKEA tradfri | Dashticz V3 on Lenovo Huawei Tablet | Conbee
adsernl
Posts: 4
Joined: Monday 14 December 2015 9:11
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Buienradar Weather Lookup Plugin

Post by adsernl »

All,

i installed the pluging and see it when i want to add it as hardware. only if I click on the button "Add" nothing happened...

already reinstalled it, restarted Domoticz a couple of times. tried the 2 different ways to install but still i cannot add it :( dows someone have an idea?
GuyTreepbush
Posts: 19
Joined: Thursday 12 January 2017 13:26
Target OS: NAS (Synology & others)
Domoticz version:
Contact:

Re: Buienradar Weather Lookup Plugin

Post by GuyTreepbush »

Changing

Code: Select all

import urllib.request
import urllib.error
to

Code: Select all

import urllib
#import urllib.request
#import urllib.error
in the PY files on the synology at leasts lets the local.py file run succcesfull. Will check if it now also works in domoticz tomorrow.

Edit: Buienradar does not show up in Domoticz after restarting. Will continue my search n how to install python3-dev on a synology. I expect that to be the issue
GuyTreepbush
Posts: 19
Joined: Thursday 12 January 2017 13:26
Target OS: NAS (Synology & others)
Domoticz version:
Contact:

Re: Buienradar Weather Lookup Plugin

Post by GuyTreepbush »

EdKo66 wrote:Thanks. I hope someone here will have a Synology and will answer.

Ed, there are multiple ways to do this. It can be done via SSH but I find it easiest to go to the web interface of the synology --> Package center --> Domoticz --> Stop service --> Start Service.
User avatar
EdwinK
Posts: 1820
Joined: Sunday 22 January 2017 21:46
Target OS: Raspberry Pi / ODroid
Domoticz version: BETA
Location: Rhoon
Contact:

Re: Buienradar Weather Lookup Plugin

Post by EdwinK »

Got it working now. But thanks for your answer
Running latest BETA on a Pi-3 | Toon® Thermostat (rooted) | Hue | Tuya | IKEA tradfri | Dashticz V3 on Lenovo Huawei Tablet | Conbee
ropske
Posts: 483
Joined: Tuesday 12 August 2014 5:37
Target OS: Raspberry Pi / ODroid
Domoticz version: V3_8394
Location: Rumbeke,Belgium
Contact:

Re: Buienradar Weather Lookup Plugin

Post by ropske »

Hi,
this only works for positions in the Netherlands? Or also for Belgium?
Thanks :)
Snowtiger
Posts: 120
Joined: Tuesday 18 October 2016 13:15
Target OS: Raspberry Pi / ODroid
Domoticz version: 4.10915
Contact:

Re: Buienradar Weather Lookup Plugin

Post by Snowtiger »

ropske wrote:Hi,
this only works for positions in the Netherlands? Or also for Belgium?
Thanks :)
It uses the http://xml.buienradar.nl/ file - only weather stations in the Netherlands ;)
ffes
Posts: 51
Joined: Thursday 26 January 2017 23:11
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: NL
Contact:

Re: Buienradar Weather Lookup Plugin

Post by ffes »

ropske wrote:Hi,
this only works for positions in the Netherlands? Or also for Belgium?
Thanks :)
The plugin uses http://xml/buienradar.nl and buienradar.be doesn't have such an xml feed, unfortunately.
If you are close to the Dutch border, maybe the plugin will be useful for you.
Snowtiger
Posts: 120
Joined: Tuesday 18 October 2016 13:15
Target OS: Raspberry Pi / ODroid
Domoticz version: 4.10915
Contact:

Re: Buienradar Weather Lookup Plugin

Post by Snowtiger »

Update Domoticz Bèta 3.7602 - Buienradar (Weather Lookup) Type in Hardware types is missing and no actual information is delivered anymore by the Plugin.
Somebody else with the same experience?
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest