Weewx with Belchertown skin and setup of mqtt

34 views
Skip to first unread message

Gregalfl

unread,
May 21, 2026, 4:10:09 PM (10 hours ago) May 21
to weewx-user
I am having an issue with setting up my software with mqtt 

I am running the following Weewx version 5.3.1, Belchertown-New version 1.6 and Mosquito version 2.0.21.  I believe I have Mosquito up and running okay as when I load mosquitto_sub -h localhost -t weather/#  in a terminal window it will display and update the weather data from my station.  When I connect via the web browser to my webpage running the Belchertown skin it can manually be updated in the 5 minute increments that it posts new reports.  When you refresh the webpage it says connecting to weather station real time then says Connected waiting on data and does not refresh.

Any thoughts on what to look for?  I can provide more information if needed.

Thank you for your time

Gregalfl

Vince Skahan

unread,
May 21, 2026, 4:51:03 PM (9 hours ago) May 21
to weewx-user
For websockets you need to connect to the actual hostname or ip address of the computer, not localhost.

Gregalfl

unread,
May 21, 2026, 5:38:32 PM (8 hours ago) May 21
to weewx-user
when I run mosquitto_sub -h 192.168.1.230 -t weather/# my data shows up as well.

In weewx.conf I have the following

[StdRESTful]
[[MQTT]]
        server_url = mqtt://user:pass...@192.168.1.230:1883 (user and password are redacted here)
        topic = weather
        unit_system = US
        binding = archive, loop
        aggregation = aggregate
        retain = True


[StdReport] 

#---MQTT Websockets defaults---
             mqtt_websockets_enabled         = 1
             mqtt_websockets_host            = 192.168.1.230
             mqtt_websockets_port            = 9001
             mqtt_websockets_ssl             = 0
             mqtt_websockets_topic           = weather
             mqtt_websockets_username        = username (redacted)
             mqtt_websockets_password        = password (redacted)
             disconnect_live_website_visitor = 1800000000
             show_last_updated_alert         = 0
             last_updated_alert_threshold    = 180000
             webpage_autorefresh             = 1

Any other thoughts

Vince Skahan

unread,
May 21, 2026, 6:18:34 PM (8 hours ago) May 21
to weewx-user
try weather/loop for your topic and restart weewx

or walk through https://github.com/vinceskahan/belchertown-from-scratch from the beginning to check your setup


Anton Diedericks

unread,
12:13 AM (2 hours ago) 12:13 AM
to weewx-user
My Belchertown/skin.conf looks like this, and working 100%.

    # MQTT Websockets defaults
    mqtt_websockets_enabled         = 1
    mqtt_enabled                    = 1
    mqtt_websockets_host            = "mqtt.woodlands-weather.co.za"
    mqtt_websockets_port            = 443
    mqtt_websockets_ssl             = 1
    mqtt_websockets_topic           = "weather/loop"
    mqtt_websockets_username        = ""
    mqtt_websockets_password        = ""
    mqtt_websockets_path            = "/"
    disconnect_live_website_visitor = 1800000
Reply all
Reply to author
Forward
0 new messages