Weewx with Belchertown skin and setup of mqtt

104 views
Skip to first unread message

Gregalfl

unread,
May 21, 2026, 4:10:09 PMMay 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 PMMay 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 PMMay 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 PMMay 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,
May 22, 2026, 12:13:09 AMMay 22
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

John Smith

unread,
May 22, 2026, 10:48:50 AMMay 22
to weewx...@googlegroups.com
For websockets you need to connect to the actual hostname or ip address of the computer, not localhost.

Yes, they need to be accessible to the browser not the server, I learned this the hardware.

--
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 weewx-user+...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/weewx-user/1312a581-abee-47b2-85a9-6efbfed73140n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages