Hi,

try it with this syntax:
server_url = mqtt://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/87efeb9c-9c3d-4197-a2e5-e881a10de490n%40googlegroups.com.

Reply via email to