cannot receive websocket updates in Belchertown skin

117 views
Skip to first unread message

Don Vawter

unread,
Nov 25, 2023, 9:37:47 PM11/25/23
to weewx-user
I know that mqtt is working and publishing info because I can see it in MQTT explorer:exd.jpgex.jpg
here is my config file:
    [[Belchertown]]
        skin = Belchertown
        HTML_ROOT = /var/www/html/weewx/belchertown
        enable = true
        mqtt_websockets_enabled = 1
        mqtt_websockets_host = weather2.sangrephotography.com
        mqtt_websockets_port = 9001
        mqtt_websockets_topic = weather/loop
        mqtt_websockets_ssl = 1
        mqtt_websockets_username = donvawter
        mqtt_websockets_password = xxxxxxxxx
        [[[extras]]]
            web_autorefresh = 0

I see this on web page: preceded by a yellow dot.

Connected. Waiting for data. Last Updated November 25, 2023, 7:10:00 PM





w


vince

unread,
Nov 26, 2023, 2:36:55 AM11/26/23
to weewx-user
This has to be possibly the most frequently asked question of all the Belchertown FAQ type questions and it probably has the most howto threads if you do some searching of the previous messages for full examples that others have posted that work.

Lets see your [[MQTT]] stanza please.  Usually people mess that up.

Don Vawter

unread,
Nov 26, 2023, 10:15:46 AM11/26/23
to weewx-user
The mqtt publish portion has always worked and since I could see messages arriving in MQTT Explorer  there was no need to muddy the waters with that section.
Problem solved. 
Apparently the mqtt_websockets config should go under Extras not Belchertown.
I had it both places ¯\_(ツ)_/¯ and the topic in extras was weather/* not weather/loop 
The reason I was using the wildcard is a story too long for this thread but changing it to loop in the Extras section and removing mqtt_websockets... from the Belchertown section solved the problem.





michael.k...@gmx.at

unread,
Nov 26, 2023, 11:20:45 AM11/26/23
to weewx-user
An asterisk is no wildcard, but + and # are. so, weather/# would have worked. An asterisk is not valid to be used in topics, so it shouldn't be used at all, although it hasn't any other special meaning, as far as I know.

vince

unread,
Nov 26, 2023, 2:01:01 PM11/26/23
to weewx-user
The hierarchy for weewx.conf is something that's a little confusing from the online docs.   If you look at its install script (link) you will see a fully commented out list of all the parameters in the correct locations.  Look starting at line 44 in the link.
Reply all
Reply to author
Forward
0 new messages