--
You received this message because you are subscribed to the Google Groups "weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to weewx-user+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/fd40fb4d-a258-445b-b6a8-94c98d64b4f2n%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/CAA1SM21nDqWyVyDywvRGY0-pQENGNjjzR9r2gD9SBbEBseMHbg%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/15f5ed1b-0b62-4b60-8467-50002ab16db7n%40googlegroups.com.
This sound good, but I can't found Information on MQTT in Weewx.
[[MQTT]]
server_url = mqtt://user:pw@ip:1883
topic = weather
unit_system = METRIC
binding = archive
aggregation = aggregate
ok is the MQTT Broker with Mosquitto. He receives the Topic, I can see this with an MQTT Explorer.
Here is the string from the Broker:
{"dateTime": "1614942000.0", "inTemp_C": "25.580000000000005", "outTemp_C": "2.4000000000000004", "inHumidity": "33.0", "outHumidity": "91.73333333333333", "pressure_mbar": "967.3399999999997", "relbarometer": "967.34", "luminosity": "7575.2", "uvradiation": "6.0200000000000005", "UV": "0.0", "rain_cm": "0.0", "stormRain_cm": "0.61", "rainRate_cm_per_hour": "0.0", "dayRain_cm": "0.35000000000000003", "weekRain": "7.4", "monthRain_cm": "0.7400000000000001", "yearRain_cm": "0.7400000000000001", "windSpeed_kph": "0.1200002982589136", "windDir": "223.0", "windGust_kph": "1.800004473883704", "windGustDir": "223.0", "daymaxwind": "3.6", "altimeter_mbar": "1023.3070575534325", "appTemp_C": "0.5729997426277262", "barometer_mbar": "1025.6542650419428", "cloudbase_meter": "622.358803974661", "dewpoint_C": "1.1941448275071624", "heatindex_C": "2.4000000000000004", "humidex_C": "2.4000000000000004", "inDewpoint_C": "8.102394002973144", "windchill_C": "2.4000000000000004", "interval_minute": "5.0", "windrun_km": "0.010000024854909468", "hourRain_cm": "0.020000000000000018", "rain24_cm": "0.6100000000000003", "usUnits": "16.0"}
not ok is the second Station. I don't understand the config of MQTT Subscribe.
In which case I user Service, in which case I use driver?
snippet of the Weewx.conf:
[Station]
station_type = MQTTSubscribeDriver
[MQTTSubscribeDriver]
host = 192.168.114.xx
port = 1883
user = user
password = password
[Engine]
# The following section specifies which services should be run and in what order.
[[Services]]
data_services = "", user.MQTTSubscribe.MQTTSubscribeDriver
In the log I get the following:
Mar 5 11:51:56 weewx-intern weewx[1087] DEBUG __main__: Initializing engine
Mar 5 11:51:56 weewx-intern weewx[1087] CRITICAL __main__: Caught unrecoverable exception:
Mar 5 11:51:56 weewx-intern weewx[1087] CRITICAL __main__: **** 'driver'
Mar 5 11:51:56 weewx-intern weewx[1087] CRITICAL __main__: **** Traceback (most recent call last):
Mar 5 11:51:56 weewx-intern weewx[1087] CRITICAL __main__: **** File "/usr/share/weewx/weewxd", line 151, in main
Mar 5 11:51:56 weewx-intern weewx[1087] CRITICAL __main__: **** engine = weewx.engine.StdEngine(config_dict)
Mar 5 11:51:56 weewx-intern weewx[1087] CRITICAL __main__: **** File "/usr/share/weewx/weewx/engine.py", line 81, in __init__
Mar 5 11:51:56 weewx-intern weewx[1087] CRITICAL __main__: **** self.setupStation(config_dict)
Mar 5 11:51:56 weewx-intern weewx[1087] CRITICAL __main__: **** File "/usr/share/weewx/weewx/engine.py", line 103, in setupStation
Mar 5 11:51:56 weewx-intern weewx[1087] CRITICAL __main__: **** driver = config_dict[station_type]['driver']
Mar 5 11:51:56 weewx-intern weewx[1087] CRITICAL __main__: **** File "/usr/lib/python3/dist-packages/configobj.py", line 554, in __getitem__
Mar 5 11:51:56 weewx-intern weewx[1087] CRITICAL __main__: **** val = dict.__getitem__(self, key)
Mar 5 11:51:56 weewx-intern weewx[1087] CRITICAL __main__: **** KeyError: 'driver'
Mar 5 11:51:56 weewx-intern weewx[1087] CRITICAL __main__: **** Exiting.
Sorry, but I can't find the solution.
[[MQTT]]
server_url = xxxxx
topic = weather
unit_system = METRIC
binding = loop, archive
aggregation = aggregate
append_units_label = false
So I sent loop and archive.