Not better, but different ;) In the last error message the MQTT were not sent by weewx at all. With the new error message the MQTT data are not accepted by the MQTT server. Is the user you entered in the weewx configuration also allowed to receive the data on the MQTT server? Here you can find a good description about MQTT and weewx: https://www.woellsdorf-wetter.de/software/mosquitto.html
Michael Geni schrieb am Samstag, 12. März 2022 um 16:17:43 UTC+1: > Not much better, I had already tried > Mar 12 16:12:13 Wetter-Raspi weewx[16406] DEBUG user.mqtt: Failed upload > attempt 1: [Errno 104] Die Verbindung wurde vom Kommunikationspartner > zurückgesetzt > Mar 12 16:12:18 Wetter-Raspi weewx[16406] DEBUG user.mqtt: Failed upload > attempt 2: [Errno 104] Die Verbindung wurde vom Kommunikationspartner > zurückgesetzt > Mar 12 16:12:23 Wetter-Raspi weewx[16406] DEBUG user.mqtt: Failed upload > attempt 3: [Errno 104] Die Verbindung wurde vom Kommunikationspartner > zurückgesetzt > Mar 12 16:12:28 Wetter-Raspi weewx[16406] ERROR weewx.restx: MQTT: Failed > to publish record 2022-03-12 16:12:13 CET (1647097933): Failed upload after > 3 tries > Mar 12 16:12:28 Wetter-Raspi weewx[16406] DEBUG user.mqtt: Failed upload > attempt 1: [Errno 104] Die Verbindung wurde vom Kommunikationspartner > zurückgesetzt > Mar 12 16:12:33 Wetter-Raspi weewx[16406] DEBUG user.mqtt: Failed upload > attempt 2: [Errno 104] Die Verbindung wurde vom Kommunikationspartner > zurückgesetzt > Mar 12 16:12:38 Wetter-Raspi weewx[16406] DEBUG user.mqtt: Failed upload > attempt 3: [Errno 104] Die Verbindung wurde vom Kommunikationspartner > zurückgesetzt > Mar 12 16:12:43 Wetter-Raspi weewx[16406] ERROR weewx.restx: MQTT: Failed > to publish record 2022-03-12 16:12:13 CET (1647097933): Failed upload after > 3 tries > Mar 12 16:12:43 Wetter-Raspi weewx[16406] DEBUG user.mqtt: Failed upload > attempt 1: [Errno 104] Die Verbindung wurde vom Kommunikationspartner > zurückgesetzt > Mar 12 16:12:48 Wetter-Raspi weewx[16406] DEBUG user.mqtt: Failed upload > attempt 2: [Errno 104] Die Verbindung wurde vom Kommunikationspartner > zurückgesetzt > Mar 12 16:12:53 Wetter-Raspi weewx[16406] DEBUG user.mqtt: Failed upload > attempt 3: [Errno 104] Die Verbindung wurde vom Kommunikationspartner > zurückgesetzt > Mar 12 16:12:58 Wetter-Raspi weewx[16406] ERROR weewx.restx: MQTT: Failed > to publish record 2022-03-12 16:12:15 CET (1647097935): Failed upload after > 3 tries > Mar 12 16:12:58 Wetter-Raspi weewx[16406] DEBUG user.mqtt: Failed upload > attempt 1: [Errno 104] Die Verbindung wurde vom Kommunikationspartner > zurückgesetzt > > Michael schrieb am Samstag, 12. März 2022 um 14:11:19 UTC+1: > >> Hi, >> >> try it with this syntax: >> server_url = mqtt://name:[email protected]:1883/ >> <http://name:[email protected]:1883/> >> >> Michael >> Geni schrieb am Samstag, 12. März 2022 um 12:23:16 UTC+1: >> >>> I have a local MQTT broker Mosquitto on a Synology (Docker image). >>> With Tasmotta flashed switches this works fine >>> >>> I use this extension https://github.com/matthewwall/weewx-mqtt >>> >>> What should be the syntax for the server_url in weewx? >>> [[MQTT]] >>> server_url = 192.168.56.1:1883/ >>> topic = weather >>> unit_system = METRIC >>> binding = loop, archive >>> aggregation = aggregate >>> >>> >>> In my attempts there were the following errors >>> Mar 12 10:52:09 Wetter-Raspi weewx[12110] ERROR weewx.restx: *** File >>> "/usr/share/weewx/weewx/restx.py", line 385, in run_loop >>> Mar 12 10:52:09 Wetter-Raspi weewx[12110] ERROR weewx.restx: *** >>> self.process_record(_record, dbmanager) >>> Mar 12 10:52:09 Wetter-Raspi weewx[12110] ERROR weewx.restx: *** File >>> "/usr/share/weewx/user/mqtt.py", line 494, in process_record >>> Mar 12 10:52:09 Wetter-Raspi weewx[12110] ERROR weewx.restx: *** >>> mc.connect(url.hostname, url.port) >>> Mar 12 10:52:09 Wetter-Raspi weewx[12110] ERROR weewx.restx: *** File >>> "/usr/lib/python3/dist-packages/paho/mqtt/client.py", line 838, in connect >>> Mar 12 10:52:09 Wetter-Raspi weewx[12110] ERROR weewx.restx: *** >>> self.connect_async(host, port, keepalive, bind_address) >>> Mar 12 10:52:09 Wetter-Raspi weewx[12110] ERROR weewx.restx: *** File >>> "/usr/lib/python3/dist-packages/paho/mqtt/client.py", line 893, in >>> connect_async >>> Mar 12 10:52:09 Wetter-Raspi weewx[12110] ERROR weewx.restx: *** >>> raise ValueError('Invalid host.') >>> Mar 12 10:52:09 Wetter-Raspi weewx[12110] ERROR weewx.restx: *** >>> ValueError: Invalid host. >>> Mar 12 10:52:09 Wetter-Raspi weewx[12110] CRITICAL weewx.restx: MQTT: >>> Thread terminating. Reason: Invalid host. >>> >>> Does this work with my chosen MQTT extension? >>> Are there any better variants for this? >>> >>> Thank you in advanced >> >> -- 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 on the web visit https://groups.google.com/d/msgid/weewx-user/db7e74b1-db42-4834-9d08-ea48f77e6a79n%40googlegroups.com.
