I have read these steps over several times already, followed them, and am still getting errors, that's why I'm here asking for help. FWIW, I'm not a NOOB, I did RTFM, I currently have 18 devices (PC's and SBC's), all running either Debian or Raspberry Pi OS, and have been using Linux exclusively since 1993, when I started using it while in college - perhaps I'm getting old, and it's starting to show ;-).
Here are the steps I have taken to attempt to get this working:
I uninstalled the MQTTSubscribe driver that I had installed earlier by running sudo weectl extension uninstall MQTTSubscribe, to "start fresh".
myusername@Zero2W-1:~ $ systemctl restart weewx
==== AUTHENTICATING FOR org.freedesktop.systemd1.manage-units ====
Authentication is required to restart 'weewx.service'.
Authenticating as: ,,, (myusername)
Password:
==== AUTHENTICATION COMPLETE ====
At that point, I did a CTRL-C and got this:
python3 $USER_ROOT/MQTTSubscribe.py simulate $RUN_MODE --conf mqttsubscribe.template.conf
^CTraceback (most recent call last):
File "/etc/weewx//bin/user/MQTTSubscribe.py", line 3397, in <module>
main()
File "/etc/weewx//bin/user/MQTTSubscribe.py", line 3390, in main
simulator.run()
File "/etc/weewx//bin/user/MQTTSubscribe.py", line 3136, in run
self.simulate_driver_packet(driver)
File "/etc/weewx//bin/user/MQTTSubscribe.py", line 3047, in simulate_driver_packet
for packet in driver.genLoopPackets():
File "/etc/weewx//bin/user/MQTTSubscribe.py", line 2342, in genLoopPackets
data = self._handle_empty_queue()
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/etc/weewx//bin/user/MQTTSubscribe.py", line 2385, in _handle_empty_queue
time.sleep(self.wait_before_retry)
KeyboardInterrupt
I have attached the "newly" generated MQTTSubscribeDriver configuration template, that was produced by following the instructions, with the only the user and password info changed, maybe you can see what is going wrong, or what I'm missing here. Also, I am in including the Micro Python code snippet from my Raspberry Pico 2W (The device I am publishing the sensor data via MQTT from, via WiFi) to show my data mapping, which is all being
sent to a single topic (weatherpi), on the Raspberry Pi Zero2W-1 device which has the
Mosquitto server installed and working, along with the
paho-mqtt client, which I installed from the Raspberry Pi OS repo, using sudo apt install python3-paho-mqtt. I'm pretty sure that everything is working up to receiving the information to the Zero2W-1:
sudo tail -f /var/log/mosquitto/mosquitto.log
1760745310: New connection from
192.168.1.106:60569 on port 1883.
1760745310: New client connected from
192.168.1.106:60569 as pico2w (p2, c1, k0, u'myusername').
1760745310: No will message specified.
1760745310: Sending CONNACK to pico2w (0, 0)
1760745326: Received PUBLISH from pico2w (d0, q0, r0, m0, 'weatherpi', ... (132 bytes))
1760745342: Received PUBLISH from pico2w (d0, q0, r0, m0, 'weatherpi', ... (132 bytes))
1760745358: Received PUBLISH from pico2w (d0, q0, r0, m0, 'weatherpi', ... (132 bytes))
Here is the last output from WeeWX with the "newly generated" configuration in place:
systemctl status weewx
× weewx.service - WeeWX
Loaded: loaded (/lib/systemd/system/weewx.service; enabled; preset: enabled)
Active: failed (Result: exit-code) since Fri 2025-10-17 15:34:37 PDT; 22min ago
Duration: 1.065s
Docs:
https://weewx.com/docs Process: 8805 ExecStart=weewxd /etc/weewx/weewx.conf (code=exited, status=4)
Main PID: 8805 (code=exited, status=4)
CPU: 1.063s
Oct 17 15:34:37 Zero2W-1 weewxd[8805]: CRITICAL weewx.engine: **** File "/etc/weewx/bin/user/MQTTSubscribe.py", line 2011, in __init>
Oct 17 15:34:37 Zero2W-1 weewxd[8805]: CRITICAL weewx.engine: **** super().__init__(service_dict, logger)
Oct 17 15:34:37 Zero2W-1 weewxd[8805]: CRITICAL weewx.engine: **** File "/etc/weewx/bin/user/MQTTSubscribe.py", line 1751, in __init>
Oct 17 15:34:37 Zero2W-1 weewxd[8805]: CRITICAL weewx.engine: **** raise ValueError("[[topics]] is required.")
Oct 17 15:34:37 Zero2W-1 weewxd[8805]: CRITICAL weewx.engine: **** ValueError: [[topics]] is required.
Oct 17 15:34:37 Zero2W-1 weewxd[8805]: CRITICAL __main__: Unable to load driver: [[topics]] is required.
Oct 17 15:34:37 Zero2W-1 weewxd[8805]: CRITICAL __main__: **** Exiting...
Oct 17 15:34:37 Zero2W-1 systemd[1]: weewx.service: Main process exited, code=exited, status=4/NOPERMISSION
Oct 17 15:34:37 Zero2W-1 systemd[1]: weewx.service: Failed with result 'exit-code'.
Oct 17 15:34:37 Zero2W-1 systemd[1]: weewx.service: Consumed 1.063s CPU time.
At this point, I'm pretty sure (AFAICT) I just need to figure out how to get the data from there into WeeWX, using the MQTTSubscribeDriver. I'm sorry that there is so much info in this post, I'm just trying to convey what is in front of me, and get help to fix the problem. Please forgive my lack of knowledge here, this is my first experience with WeeWX. If you need anything else, please don't hesitate to ask, I am happy to help in any way I can - this is driving me bonkers!