-
Notifications
You must be signed in to change notification settings - Fork 11
/
install.py
59 lines (49 loc) · 1.75 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
# installer for the weewxMQTT driver
#
# Based on installer for bootstrap skin
#
# Configured by Bill to install weewxMQTT user driver, 2016.
import os.path
import configobj
import setup
import distutils
def loader():
return weewxMQTTInstaller()
class weewxMQTTInstaller(setup.ExtensionInstaller):
_driver_conf_files = ['weewx.conf']
def __init__(self):
super(weewxMQTTInstaller, self).__init__(
version="0.2",
name='weewxMQTT',
description='A weewx driver which subscribes to MQTT topics providing weewx compatible data',
author="Bill Morrow",
author_email="[email protected]",
config={
'wxMesh': {
driver = user.wxMesh
host = localhost # MQTT broker hostname
topic = weather # topic
poll_interval = 1
[[label_map]]
TIME = dateTime
HUMT = outTemp
RHUM = outHumidity
INTE = inTemp
INHU = inHumidity
BARP = barometer
IRRA = radiation
PHOV = supplyVoltage
BATV = consBatteryVoltage
AMBT = extraTemp1
SYST = extraTemp2
WDIR = windDir
WIND = windSpeed
}
files=[('bin/users/wxMesh.py')]
)
print ""
print "The following alternative languages are available:"
self.language = None
def merge_config_options(self):
fn = os.path.join(self.layout['CONFIG_ROOT'], 'weewx.conf')
config = configobj.ConfigObj(fn)