Buienradar Weather Lookup Plugin

Python and python framework
schulpr
Posts: 80
Joined: Thursday 01 January 2015 10:10
Target OS: NAS (Synology & others)
Domoticz version: Beta
Contact:

Re: Buienradar Weather Lookup Plugin

Post by schulpr » Sunday 19 March 2017 18:00

I was hoping to have both values with your plugin. I use an additional LUA script to calculate the Beaufort value now for use in my weather dashboard. If it's in your plugin I can delete this LUA script.

Isn't it possible to put the visibility value as it is in the xml in a custom sensor?

Regards, Rob

curious
Posts: 75
Joined: Saturday 02 April 2016 19:38
Target OS: -
Domoticz version:
Contact:

Re: Buienradar Weather Lookup Plugin

Post by curious » Sunday 19 March 2017 21:56

Just updated to v3.7041
First message in log is :
2017-03-19 20:43:57.758 Error: (Buienradar) failed to load 'plugin.py', Python Path used was '/home/pi/domoticz/plugins/domoticz-buienradar/:/usr/lib/python3.4/:/usr/lib/python3.4/plat-arm-linux-gnueabihf:/usr/lib/python3.4/lib-dynload'.
2017-03-19 20:43:57.758 Error: (Buienradar) Module Import failed, exception: 'MemoryError'

Is it caused by the update or something else

ffes
Posts: 51
Joined: Friday 27 January 2017 0:11
Target OS: Raspberry Pi
Domoticz version: Beta
Location: NL
Contact:

Re: Buienradar Weather Lookup Plugin

Post by ffes » Tuesday 21 March 2017 0:23

curious wrote:Just updated to v3.7041
First message in log is :
2017-03-19 20:43:57.758 Error: (Buienradar) failed to load 'plugin.py', Python Path used was '/home/pi/domoticz/plugins/domoticz-buienradar/:/usr/lib/python3.4/:/usr/lib/python3.4/plat-arm-linux-gnueabihf:/usr/lib/python3.4/lib-dynload'.
2017-03-19 20:43:57.758 Error: (Buienradar) Module Import failed, exception: 'MemoryError'

Is it caused by the update or something else
No idea. Just updated to 3.7067 and everything works as expected

User avatar
Plaagje
Posts: 65
Joined: Thursday 30 April 2015 10:00
Target OS: Raspberry Pi
Domoticz version: Latest
Location: Netherlands
Contact:

Re: Buienradar Weather Lookup Plugin

Post by Plaagje » Sunday 02 April 2017 16:03

Henk50 wrote:Are you running the beta version? That's necessary.
Have you done the following steps (Raspberry Pi)?
sudo apt-get update
sudo apt-get upgrade
sudo apt install python3.4
sudo apt install libpython3.4
sudo apt install python3-dev

Whats in the Domoticz log?

Running stable here.

Image

how to fix this?

gerardvs
Posts: 105
Joined: Sunday 04 January 2015 1:01
Target OS: Raspberry Pi
Domoticz version: latest-1
Location: /dev/null
Contact:

Re: Buienradar Weather Lookup Plugin

Post by gerardvs » Sunday 02 April 2017 17:46

Just try

Code: Select all

sudo apt-get install python3

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

Re: Buienradar Weather Lookup Plugin

Post by pvm » Sunday 02 April 2017 21:01

Will this plugin also be delivered with a future Domoticz version ?
Synology NAS, PI3, ZWave, Xiamo zigbee devices, BTLE plant sensor

Spymate
Posts: 7
Joined: Tuesday 15 December 2015 11:29
Target OS: Raspberry Pi
Domoticz version:
Contact:

Re: Buienradar Weather Lookup Plugin

Post by Spymate » Thursday 06 April 2017 16:55

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: 7
Joined: Tuesday 15 December 2015 11:29
Target OS: Raspberry Pi
Domoticz version:
Contact:

Re: Buienradar Weather Lookup Plugin

Post by Spymate » Thursday 06 April 2017 17:26

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: 20
Joined: Monday 12 October 2015 19:57
Target OS: NAS (Synology & others)
Domoticz version:
Contact:

Re: Buienradar Weather Lookup Plugin

Post by EldigoR » Thursday 06 April 2017 19:32

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: 65
Joined: Thursday 30 April 2015 10:00
Target OS: Raspberry Pi
Domoticz version: Latest
Location: Netherlands
Contact:

Re: Buienradar Weather Lookup Plugin

Post by Plaagje » Sunday 09 April 2017 16:13

Nice Plugin!

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

-Plaagje

User avatar
EdwinK
Posts: 787
Joined: Sunday 22 January 2017 22:46
Target OS: NAS (Synology & others)
Domoticz version: 3.8552
Location: Rhoon
Contact:

Re: Buienradar Weather Lookup Plugin

Post by EdwinK » Tuesday 11 April 2017 12:17

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 STABLE on a NAS Synology 413j | Toon Thermostat | RFxcom | Dashticz V2 |

GuyTreepbush
Posts: 19
Joined: Thursday 12 January 2017 14:26
Target OS: NAS (Synology & others)
Domoticz version:
Contact:

Re: Buienradar Weather Lookup Plugin

Post by GuyTreepbush » Saturday 15 April 2017 22:17

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: 869
Joined: Tuesday 17 June 2014 22:14
Target OS: NAS (Synology & others)
Domoticz version: Stable
Location: NL
Contact:

Re: Buienradar Weather Lookup Plugin

Post by pvm » Saturday 15 April 2017 22:23

Shouldn't it be:

Code: Select all

sudo apt-get install python3-dev
Or without 'install'
Synology NAS, PI3, ZWave, Xiamo zigbee devices, BTLE plant sensor

GuyTreepbush
Posts: 19
Joined: Thursday 12 January 2017 14:26
Target OS: NAS (Synology & others)
Domoticz version:
Contact:

Re: Buienradar Weather Lookup Plugin

Post by GuyTreepbush » Sunday 16 April 2017 6:29

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: 787
Joined: Sunday 22 January 2017 22:46
Target OS: NAS (Synology & others)
Domoticz version: 3.8552
Location: Rhoon
Contact:

Re: Buienradar Weather Lookup Plugin

Post by EdwinK » Sunday 16 April 2017 8:59

Did you try to install easy_install. I did several weeks ago, and I could install what was needed with that.
Running latest STABLE on a NAS Synology 413j | Toon Thermostat | RFxcom | Dashticz V2 |

GuyTreepbush
Posts: 19
Joined: Thursday 12 January 2017 14:26
Target OS: NAS (Synology & others)
Domoticz version:
Contact:

Re: Buienradar Weather Lookup Plugin

Post by GuyTreepbush » Sunday 16 April 2017 10:13

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: 787
Joined: Sunday 22 January 2017 22:46
Target OS: NAS (Synology & others)
Domoticz version: 3.8552
Location: Rhoon
Contact:

Re: Buienradar Weather Lookup Plugin

Post by EdwinK » Sunday 16 April 2017 14:15

Sorry, Can't remember how I did that.
Running latest STABLE on a NAS Synology 413j | Toon Thermostat | RFxcom | Dashticz V2 |

adsernl
Posts: 3
Joined: Monday 14 December 2015 10:11
Target OS: Raspberry Pi
Domoticz version:
Contact:

Re: Buienradar Weather Lookup Plugin

Post by adsernl » Sunday 16 April 2017 15:01

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 14:26
Target OS: NAS (Synology & others)
Domoticz version:
Contact:

Re: Buienradar Weather Lookup Plugin

Post by GuyTreepbush » Sunday 16 April 2017 22:02

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 14:26
Target OS: NAS (Synology & others)
Domoticz version:
Contact:

Re: Buienradar Weather Lookup Plugin

Post by GuyTreepbush » Monday 17 April 2017 8:11

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.

Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests