-
Notifications
You must be signed in to change notification settings - Fork 2
/
install.py
92 lines (81 loc) · 3.22 KB
/
install.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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
"""
This program is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
Foundation; either version 2 of the License, or (at your option) any later
version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE. See the GNU General Public License for more details.
Installer for Bloomsky Driver
Version: 2.0.2 Date: 6 September 2021
Revision History
6 September 2021 v2.0.2
- bump version number only
8 June 2021 v2.0.1
- bump version number only
27 August 2020 v2.0.0
- now WeeWX 3.7+/4.x python2/3 compatible
- added accumulator noop adder for field raining
31 May 2019 v1.0.0
- bump version number only
29 May 2019 v0.1.1
- reformatted comments
9 January 2018 v0.2.0rc2
- added ability to support multiple device IDs
- now supports user defined sensor map
- default poll interval now 60 seconds not 15 seconds
25 June 2017 v0.1.0
- initial implementation
"""
import weewx
from distutils.version import StrictVersion
from setup import ExtensionInstaller
REQUIRED_VERSION = "3.7.0"
BLOOMSKY_VERSION = "2.0.2"
def loader():
return BloomskyInstaller()
class BloomskyInstaller(ExtensionInstaller):
def __init__(self):
if StrictVersion(weewx.__version__) < StrictVersion(REQUIRED_VERSION):
msg = "%s requires weeWX %s or greater, found %s" % (''.join(('Bloomsky driver ', BLOOMSKY_VERSION)),
REQUIRED_VERSION,
weewx.__version__)
raise weewx.UnsupportedFeature(msg)
super(BloomskyInstaller, self).__init__(
version=BLOOMSKY_VERSION,
name='Bloomsky',
description='WeeWX driver for Bloomsky Sky1/Sky2/Storm personal weather stations.',
author="Gary Roderick",
author_email="gjroderick<@>gmail.com",
files=[('bin/user', ['bin/user/bloomsky.py'])],
config={
'Bloomsky': {
'api_key': 'INSERT_API_KEY_HERE',
'poll_interval': 60,
'driver': 'user.bloomsky'
},
'Accumulator': {
'deviceID': {
'adder': 'noop'
},
'deviceName': {
'adder': 'noop'
},
'imageURL': {
'adder': 'noop'
},
'deviceType': {
'adder': 'noop'
},
'night': {
'adder': 'noop'
},
'imageTimestamp': {
'adder': 'noop'
},
'raining': {
'adder': 'noop'
}
}
}
)