Closed pmendiuk closed 3 years ago
The configuration options should have been backwards compatible.... For some reason the connection is failing and the current code had a typo when logging the connection failure. I just fixed the typo, so now we should see the connection return code. Could you try installing from master again and post what gets logged? Thanks. Rich
Hi Rich, I reinstalled and those errors are gone.
Thanks, Patrick
Good to hear.
rich
I have been using an older version of MQTT Subscribe without issue. I am setting up a new instance of Weewx 4.1.1 and MQTTSubscribe 1.6.2-rc01 and ran into these errors:
Sep 28 06:47:46 weewxtempest weewx[12121] CRITICAL main: File "/usr/share/weewx/weewx/engine.py", line 75, in init Sep 28 06:47:46 weewxtempest weewx[12121] CRITICAL main: self.loadServices(config_dict) Sep 28 06:47:46 weewxtempest weewx[12121] CRITICAL main: File "/usr/share/weewx/weewx/engine.py", line 138, in loadServices Sep 28 06:47:46 weewxtempest weewx[12121] CRITICAL main: obj = weeutil.weeutil.get_object(svc)(self,config_dict) Sep 28 06:47:46 weewxtempest weewx[12121] CRITICAL main: File "/usr/share/weewx/user/MQTTSubscribe.py", line 1543, in init Sep 28 06:47:46 weewxtempest weewx[12121] CRITICAL main: self.subscriber.start() Sep 28 06:47:46 weewxtempest weewx[12121] CRITICAL main: File "/usr/share/weewx/user/MQTTSubscribe.py", line 1460, in start Sep 28 06:47:46 weewxtempest weewx[12121] CRITICAL main: % (self.userdata['connect_rc'], self.userdata['flags'])) Sep 28 06:47:46 weewxtempest weewx[12121] CRITICAL main: KeyError: 'flags' Sep 28 06:47:46 weewxtempest weewx[12121] CRITICAL main: Exiting.
I see some differences in the entries in weewx.conf and I must have missed something.
Options for extension 'MQTTSubscribe'
[MQTTSubscribeService]
This section is for the MQTTSubscribe service.
Here is the output from wee_debug:
pi@weewxtempest:~ $ wee_debug --info Using verbosity=1, displaying most info
wee_debug output will be sent to stdout(console)
Using configuration file /etc/weewx/weewx.conf Using database binding 'wx_binding', which is bound to database 'archive_sqlite'
System info Platform: Linux-5.4.51-v7+-armv7l-with-debian-10.4 Python Version: 3.7.3
Load Information 1 minute load average: 0.00 5 minute load average: 0.00 15 minute load average: 0.00
General Weewx info Weewx version 4.1.1 detected.
Station info Station type: WeatherFlowUDP Driver: user.weatherflowudp
Driver info [WeatherFlowUDP] driver = user.weatherflowudp log_raw_packets = True udp_address =
udp_address = 192.168.1.187
Currently installed extensions Extension Name Version Description MQTTSubscribe 1.6.2-rc01Augment WeeWX records or packets with data MQTT mqtt 0.23 Upload weather data to MQTT server.
Archive info Database name: weewx.sdb Table name: archive Version 2.0 Unit system: 1 (US) First good timestamp: 2020-09-27 20:45:00 PDT (1601264700) Last good timestamp: 2020-09-28 06:30:00 PDT (1601299800) Number of records: 105 weewx (weewx.conf) is set to use an archive interval of 300 seconds. The station hardware was not interrogated in determining archive interval.
Databases configured in weewx.conf Database name: weewx.sdb Database driver: weedb.sqlite
Database name: weewx Database driver: weedb.mysql Database host: localhost
Parsed and obfuscated weewx.conf
WEEWX CONFIGURATION FILE
#
Copyright (c) 2009-2019 Tom Keffer tkeffer@gmail.com
See the file LICENSE.txt for your rights.
##############################################################################
This section is for general configuration information.
Set to 1 for extra debug info, otherwise comment it out or set to zero
debug = 1
Root directory of the weewx data file hierarchy for this station
WEEWX_ROOT = /
Whether to log successful operations
log_success = True
Whether to log unsuccessful operations
log_failure = True
How long to wait before timing out a socket (FTP, HTTP) connection
socket_timeout = 20
Do not modify this. It is used when installing and updating weewx.
version = 4.1.1
##############################################################################
This section is for information about the station.
[Station]
############################################################################## [WeatherFlowUDP] driver = user.weatherflowudp log_raw_packets = True udp_address =
udp_address = 192.168.1.187
lightningYYY = distance.AR-00004444.evt_strike
lightningZZZ = energy.AR-00004444.evt_strike
[Simulator]
This section is for the weewx weather station simulator
The simulator mode can be either 'simulator' or 'generator'.
Real-time simulator. Sleep between each LOOP packet.
mode = simulator
Generator. Emit LOOP packets as fast as possible (useful for testing).
mode = generator
The start time. Format is YYYY-mm-ddTHH:MM. If not specified, the default
is to use the present time.
start = 2011-01-01T00:00
The driver to use:
driver = weewx.drivers.simulator
##############################################################################
This section is for uploading data to Internet sites
[StdRESTful]
##############################################################################
This section specifies what reports, using which skins, to generate.
[StdReport]
##############################################################################
This service acts as a filter, converting the unit system coming from
the hardware to a unit system in the database.
[StdConvert]
##############################################################################
This section can adjust data using calibration expressions.
[StdCalibrate]
##############################################################################
This section is for quality control checks. If units are not specified,
values must be in the units defined in the StdConvert section.
[StdQC]
##############################################################################
This section controls the origin of derived values.
[StdWXCalculate]
##############################################################################
For hardware that supports it, this section controls how often the
onboard clock gets updated.
[StdTimeSynch]
##############################################################################
This section is for configuring the archive service.
[StdArchive]
##############################################################################
This section binds a data store to a database.
[DataBindings]
##############################################################################
This section defines various databases.
[Databases]
##############################################################################
This section defines defaults for the different types of databases.
[DatabaseTypes]
##############################################################################
This section configures the internal weewx engine.
[Engine]
##############################################################################
Options for extension 'MQTTSubscribe'
[MQTTSubscribeService]
This section is for the MQTTSubscribe service.
wee_debug report successfully generated
Thanks, Patrick