Hello,
I am new to using WeeWX, and am having trouble getting the MQTTSubscribe driver to work properly. I am following the directions found at
https://github.com/bellrichm/WeeWX-MQTTSubscribe as best as I can, but some of it is hard for me to understand. My basic understanding of WeeWX and MQTT is very limited, so I am going to do the best I can to explain my problem, provide whatever information necessary, and (hopefully) get this issue resolved so I can get my weather station working.
Here is my Hardware/Software Setup Overview:
Weather Station/MQTT Client/MQTT Publisher:
BC-Robotics 1591B Weatherboard with
Raspberry Pico 2W, running MicroPython v1.26.1-2025-09-11. This device is collecting, parsing, and sending data from various weather sensors connected to it over WiFi on my local LAN using umqttsimple. This device is set up as an MQTT client, which publishes the sensor data using the topic "weatherpi" to the MQTT broker on the Raspberry Pi Zero 2W listed below.
Weather Reciever/MQTT Server/MQTT Broker/MQTT Subscriber/WeeWX Server:
Raspberry Pi Zero 2W, running Raspberry OS "Bookworm" with WeeWX version 5.1.0-4 installed as a Debian package via the WeeWX debian repo instructions. I have installed Mosquitto version 2.0.11, and python3-paho-mqtt 1.6.1-1. I set up Mosquitto to act as an MQTT broker on this device, subscribed to the topic "weatherpi", which is published by the Pico. I have installed the MQTTSubscribe driver per the instructions found in the Github link above.
AFAICT, I have everything set up correctly on the Pico, and it is publishing successfully to the Mosquitto MQTT server, but when I run sudo weectl station reconfigure, after going through all the prompts, I get the following error:
Traceback (most recent call last):
File "/usr/share/weewx/weectl.py", line 75, in <module>
main()
File "/usr/share/weewx/weectl.py", line 67, in main
namespace.func(namespace)
File "/usr/share/weewx/weectllib/__init__.py", line 90, in dispatch
namespace.action_func(config_dict, namespace)
File "/usr/share/weewx/weectllib/station_cmd.py", line 311, in reconfigure_station
weectllib.station_actions.station_reconfigure(config_dict=config_dict,
File "/usr/share/weewx/weectllib/station_actions.py", line 164, in station_reconfigure
config_config(config_dict,
File "/usr/share/weewx/weectllib/station_actions.py", line 207, in config_config
config_driver(config_dict, driver=driver, no_prompt=no_prompt)
File "/usr/share/weewx/weectllib/station_actions.py", line 466, in config_driver
settings = weecfg.prompt_for_driver_settings(final_driver,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/share/weewx/weecfg/__init__.py", line 520, in prompt_for_driver_settings
settings = editor.prompt_for_settings()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/etc/weewx/bin/user/MQTTSubscribe.py", line 2424, in prompt_for_settings
if len(self.existing_options['topics']) > 1:
~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^
File "/usr/lib/python3/dist-packages/configobj/__init__.py", line 554, in __getitem__
val = dict.__getitem__(self, key)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: 'topics'.
In following the directions given in the top of the weewx-user group with regard to posting, I am attaching my weewx.conf file, and system log from the RP Zero using the following command: journalctl -xe | grep weewx to this post. The other information requested is listed above. If you need anything else, please let me know, I am happy to help.