Hi David,
I compared your config to mine. Looks like your [[topics]] is incorrectly
indented. It needs to be indented in at the indentation of "username".
Below is my config that is working.
Mike
[MQTTSubscribeService]
enable = True
stop_on_validation_errors = true
binding = loop
host = host
log = true
password = pwd
port = 1111
username = xxx
[[tls]]
enable = false
ca_certs = ""
certfile = None
certs_required = required
ciphers = None
keyfile = None
tls_version = tlsv12
[[message_callback]]
type = json
[[topics]]
unit_system = METRIC
[[[home/rtl_433/temperature/name/pool]]]
[[[[temperature]]]]
# The WeeWX name.
# Default is the name from MQTT.
name = extraTemp2
conversion_type = float
[[[[battery]]]]
ignore = true
[[[[time]]]]
ignore = true
On Tuesday, 15 April 2025 at 9:07:57 pm UTC+10 David Salinas wrote:
>
> Hi, I'm quite new and I've been struggling with Weewx and MQTT for almost
> a month. I've made a lot of progress but I'm stuck. I can't find the same
> problem online.
> I have a weather station far from my house connected to an MQTT server
> that I used for home assistant, since I have the data I wanted to upload it
> to weewx .
> I used https://github.com/bellrichm/WeeWX-MQTTSubscribe/ ( weectl
> extension install
> https://github.com/bellrichm/WeeWX-MQTTSubscribe/archive/refs/tags/v${MQTTSUBSCRIBE_VERSION=3.0.0}.zip
>
> ) I did the steps
> https://github.com/bellrichm/WeeWX-MQTTSubscribe?tab=readme-ov-file#update-weewxconf
>
> Error:
> root@my-vps:~# sudo systemctl status weewx
> × weewx.service - WeeWX
> Loaded: loaded (/lib/systemd/system/weewx.service; enabled; preset:
> enabled)
> Active: failed (Result: exit-code) since Tue 2025-04-15 09:55:03 UTC;
> 1h 9min ago
> Duration: 1.203s
> Docs: https://weewx.com/docs
> Process: 2391087 ExecStart=weewxd /etc/weewx/weewx.conf (code=exited,
> status=1/FAILURE)
> Main PID: 2391087 (code=exited, status=1/FAILURE)
> CPU: 168ms
>
> Apr 15 09:55:03 my-vps weewxd[2391087]: File
> "/etc/weewx/bin/user/MQTTSubscribe.py", line 1832, in get_subscriber
> Apr 15 09:55:03 my-vps weewxd[2391087]: return
> MQTTSubscriberV1(service_dict, logger)
> Apr 15 09:55:03 my-vps weewxd[2391087]:
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> Apr 15 09:55:03 my-vps weewxd[2391087]: File
> "/etc/weewx/bin/user/MQTTSubscribe.py", line 2011, in __init__
> Apr 15 09:55:03 my-vps weewxd[2391087]: super().__init__(service_dict,
> logger)
> Apr 15 09:55:03 my-vps weewxd[2391087]: File
> "/etc/weewx/bin/user/MQTTSubscribe.py", line 1751, in __init__
> Apr 15 09:55:03 my-vps weewxd[2391087]: raise ValueError("[[topics]]
> is required.")
> Apr 15 09:55:03 my-vps weewxd[2391087]: ValueError: [[topics]] is required.
> Apr 15 09:55:03 my-vps systemd[1]: weewx.service: Main process exited,
> code=exited, status=1/FAILURE
> Apr 15 09:55:03 my-vps systemd[1]: weewx.service: Failed with result
> 'exit-code'.
>
> Data mqtt
> home/OMG_lilygo_rtl_433_ESP_OOK/RTL_433toMQTT/Bresser-6in1/0/336595588
>
> {"model":"Bresser-6in1","id":336595588,"channel":0,"sensor_type":1,"wind_max_m_s":6.6,"wind_avg_m_s":5.8,"wind_dir_deg":202,"rain_mm":714.4,"startup":1,"flags":1,"mic":"CRC","protocol":"Bresser
>
> Weather Center 6-in-1, 7-in-1 indoor, soil, new 5-in-1, 3-in-1 wind gauge,
> Froggit WH6000, Ventus C8488A","rssi":-62,"duration":33000}
>
>
> thanks, I'm stuck and even though I'm learning a lot it's frustrating.
>
>
--
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 [email protected].
To view this discussion visit
https://groups.google.com/d/msgid/weewx-user/dc82c0c3-a5df-43ad-8c9f-929a1bc141e3n%40googlegroups.com.