forked from ffes/domoticz-buienradar
-
Notifications
You must be signed in to change notification settings - Fork 0
/
localtest.py
43 lines (36 loc) · 779 Bytes
/
localtest.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#!/usr/bin/env python3
#
# Buienradar.nl Weather Lookup Plugin
#
# Frank Fesevur, 2017
# https://github.com/ffes/domoticz-buienradar
#
# About the weather service:
# https://www.buienradar.nl/overbuienradar/gratis-weerdata
#
import os
from buienradar import Buienradar
interval = 10
# Den Haag
lat_dh = 52.095556
lon_dh = 4.316389
# Maastricht
lat_mt = 50.849722
lon_mt = 5.693056
# Schiermonnikoog
lat_so = 53.489167
lon_so = 6.202222
# Cadzand (Zeeuws Vlaanderen)
lat_cd = 51.367778
lon_cd = 3.408056
# Berlijn
lat_be = 52.516667
lon_be = 13.416667
x = Buienradar(lat_so, lon_so, interval)
xmlFile = './buienradar.xml'
if os.path.isfile(xmlFile):
x.getBuienradarXML(file = xmlFile)
else:
x.getBuienradarXML()
x.getNearbyWeatherStation()
x.getWeather()