MQTT / Belchertown / Connected. Waiting for data.

245 views
Skip to first unread message

Stefan Gliessmann

unread,
Jul 21, 2023, 9:32:01 AM7/21/23
to weewx-user
I am struggling to understand why the Belchertown skin is not receiving weather data even though it is connected to the MQTT broker and user.mqtt is publishing weather data.

TIA,
Stefan

Here is what I have configured in /etc/weewx/weewx.conf:

[StdRESTful]

    [[MQTT]]

        # Enable/disable this service
        enable = true

        # Hostname/IP of MQTT broker
        host = 192.168.178.190
        server_url = mqtt://teffi:++++...@192.168.178.190:1883/

        # Credentials
        user = teffi
        password = ++++++++

        # Prefix for topics
        topic = weather/weewx
        unit_system = METRIC
        binding = archive,loop
        aggregation = aggregate
        [[[inputs]]]
            [[[[rainRate]]]]
                units = mm_per_hour
            [[[[rain]]]]
                units = mm
            [[[[hourRain]]]]
                units = mm
            [[[[rain24]]]]
                units = mm
            [[[[dayRain]]]]
                units = mm
            [[[[ET]]]]
                units = mm
            [[[[dayET]]]]
                units = mm
            [[[[ET24]]]]
                units = mm

[StdReport]
    [[Belchertown]]
        skin = Belchertown
        HTML_ROOT = /var/www/html/weewx/belchertown
        enable = true

        [[[Extras]]]
            #--- MQTT Websockets (for Real Time Streaming) Options ---
            log_failure = True
            mqtt_websockets_enabled = 1
            mqtt_websockets_host = 192.168.178.190
            mqtt_websockets_port = 9001
#            mqtt_websockets_ssl = 0
            mqtt_websockets_topic = weather/weewx
            # disconnect_live_website_visitor = 1800000

and in /var/log/syslog I can see:
Jul 21 15:30:02 weewx weewx[37286] DEBUG user.mqtt: Publishing "weather/weewx/dateTime_unix_epoch": 1689946202 (unix_epoch)
Jul 21 15:30:02 weewx weewx[37286] DEBUG user.mqtt: Publishing "weather/weewx/inTemp_degree_C": 23.299999999999997 (degree_C)
Jul 21 15:30:02 weewx weewx[37286] DEBUG user.mqtt: Publishing "weather/weewx/outTemp_degree_C": 19.099999999999998 (degree_C)
Jul 21 15:30:02 weewx weewx[37286] DEBUG user.mqtt: Publishing "weather/weewx/inHumidity_percent": 51 (percent)
Jul 21 15:30:02 weewx weewx[37286] DEBUG user.mqtt: Publishing "weather/weewx/outHumidity_percent": 61 (percent)
Jul 21 15:30:02 weewx weewx[37286] DEBUG user.mqtt: Publishing "weather/weewx/pressure_mbar": 1001.4 (mbar)
Jul 21 15:30:02 weewx weewx[37286] DEBUG user.mqtt: Publishing "weather/weewx/relbarometer": 1001.4 (None)
Jul 21 15:30:02 weewx weewx[37286] DEBUG user.mqtt: Publishing "weather/weewx/luminosity": 29620.0 (None)
Jul 21 15:30:02 weewx weewx[37286] DEBUG user.mqtt: Publishing "weather/weewx/uvradiation": 67.8 (None)
Jul 21 15:30:02 weewx weewx[37286] DEBUG user.mqtt: Publishing "weather/weewx/UV_uv_index": 2 (uv_index)
Jul 21 15:30:02 weewx weewx[37286] DEBUG user.mqtt: Publishing "weather/weewx/rain_cm": 0.0 (cm)
Jul 21 15:30:02 weewx weewx[37286] DEBUG user.mqtt: Publishing "weather/weewx/stormRain_cm": 0.0 (cm)
Jul 21 15:30:02 weewx weewx[37286] DEBUG user.mqtt: Publishing "weather/weewx/rainRate_cm_per_hour": 0.0 (cm_per_hour)
Jul 21 15:30:02 weewx weewx[37286] DEBUG user.mqtt: Publishing "weather/weewx/dayRain_cm": 0.0 (cm)
Jul 21 15:30:02 weewx weewx[37286] DEBUG user.mqtt: Publishing "weather/weewx/weekRain": 11.7 (None)
Jul 21 15:30:02 weewx weewx[37286] DEBUG user.mqtt: Publishing "weather/weewx/monthRain_cm": 1.4300000000000004 (cm)
Jul 21 15:30:02 weewx weewx[37286] DEBUG user.mqtt: Publishing "weather/weewx/yearRain_cm": 1.4300000000000004 (cm)
Jul 21 15:30:02 weewx weewx[37286] DEBUG user.mqtt: Publishing "weather/weewx/windDir_degree_compass": 186 (degree_compass)
Jul 21 15:30:02 weewx weewx[37286] DEBUG user.mqtt: Publishing "weather/weewx/windSpeed_km_per_hour": 0.0 (km_per_hour)
Jul 21 15:30:02 weewx weewx[37286] DEBUG user.mqtt: Publishing "weather/weewx/windGust_km_per_hour": 0.0 (km_per_hour)
Jul 21 15:30:02 weewx weewx[37286] DEBUG user.mqtt: Publishing "weather/weewx/daymaxwind": 8.7 (None)
Jul 21 15:30:02 weewx weewx[37286] DEBUG user.mqtt: Publishing "weather/weewx/wh65_batt": 0 (None)
Jul 21 15:30:02 weewx weewx[37286] DEBUG user.mqtt: Publishing "weather/weewx/wh65_sig": 4 (None)
Jul 21 15:30:02 weewx weewx[37286] DEBUG user.mqtt: Publishing "weather/weewx/radiation_watt_per_meter_squared": 233.78058405682714 (watt_per_meter_squared)
Jul 21 15:30:02 weewx weewx[37286] DEBUG user.mqtt: Publishing "weather/weewx/altimeter_mbar": 1005.049695199262 (mbar)
Jul 21 15:30:02 weewx weewx[37286] DEBUG user.mqtt: Publishing "weather/weewx/appTemp_degree_C": 19.53993189168407 (degree_C)
Jul 21 15:30:02 weewx weewx[37286] DEBUG user.mqtt: Publishing "weather/weewx/barometer_mbar": 1004.9037478077688 (mbar)
Jul 21 15:30:02 weewx weewx[37286] DEBUG user.mqtt: Publishing "weather/weewx/cloudbase_meter": 990.2965356401945 (meter)
Jul 21 15:30:02 weewx weewx[37286] DEBUG user.mqtt: Publishing "weather/weewx/dewpoint_degree_C": 11.397525104151388 (degree_C)
Jul 21 15:30:02 weewx weewx[37286] DEBUG user.mqtt: Publishing "weather/weewx/heatindex_degree_C": 18.658333333333328 (degree_C)
Jul 21 15:30:02 weewx weewx[37286] DEBUG user.mqtt: Publishing "weather/weewx/humidex_degree_C": 21.0515585775138 (degree_C)
Jul 21 15:30:02 weewx weewx[37286] DEBUG user.mqtt: Publishing "weather/weewx/inDewpoint_degree_C": 12.585023979027035 (degree_C)
Jul 21 15:30:02 weewx weewx[37286] DEBUG user.mqtt: Publishing "weather/weewx/maxSolarRad_watt_per_meter_squared": 763.710094175752 (watt_per_meter_squared)
Jul 21 15:30:02 weewx weewx[37286] DEBUG user.mqtt: Publishing "weather/weewx/windchill_degree_C": 19.099999999999998 (degree_C)
Jul 21 15:30:02 weewx weewx[37286] DEBUG user.mqtt: Publishing "weather/weewx/usUnits": 16 (None)
Jul 21 15:30:02 weewx weewx[37286] INFO weewx.restx: MQTT: Published record 2023-07-21 15:30:02 CEST (1689946202)

jterr...@gmail.com

unread,
Jul 23, 2023, 12:07:07 AM7/23/23
to weewx-user
Please try the following Belchertown configuration :

StdReport]
    [[Belchertown]]
        skin = Belchertown
        HTML_ROOT = /var/www/html/weewx/belchertown
        enable = true

        [[[Extras]]]
            #--- MQTT Websockets (for Real Time Streaming) Options ---
            log_failure = True
            mqtt_websockets_enabled = 1
            mqtt_websockets_host = 192.168.178.190
            mqtt_websockets_port = 9001
#            mqtt_websockets_ssl = 0
            mqtt_websockets_topic = weather/weewx/loop

Claudio

unread,
Jul 23, 2023, 10:01:07 AM7/23/23
to weewx-user
this is my config, 
no ssl / read user = all

Belchertown skin.conf


 # MQTT Websockets defaults

    mqtt_websockets_enabled = 1

    mqtt_websockets_host = public IP (no local IP)

    mqtt_websockets_port = 9001

    mqtt_websockets_ssl = 0

    mqtt_websockets_topic = weather/loop

    mqtt_websockets_username = ""

    mqtt_websockets_password = ""

    disconnect_live_website_visitor = 1800000


weewx weewx.conf

[[MQTT]]


        server_url = mqtt://user:password@localhost:1883/

        topic = weather

        unit_system = METRIC

        binding = archive, loop

        aggregation = aggregate



work on www.pnmeteo.it


try.....
ciao

Stefan Gliessmann

unread,
Jul 24, 2023, 7:51:16 AM7/24/23
to weewx-user
Thank you all for providing input / sharing your configurations.
I made the suggested changes and more, but still belchertown displays Connected. Waiting for data ...
I have attached all configs / logs / checks I could think of below.

Thanks again for your input in advance!
Stefan


These are my current configs:

mosquitto:
/etc/mosquitto/acl:
# Allow anonymous access to the sys
topic read $SYS/#

# Allow anonymous to read weather
topic read weather/#

# weewx readwrite to the loop
user teffi

/etc/mosquitto/mosquitto.conf
# Place your local configuration in /etc/mosquitto/conf.d/
#
# A full description of the configuration file is at
# /usr/share/doc/mosquitto/examples/mosquitto.conf.example

pid_file /run/mosquitto/mosquitto.pid

#persistence true
#persistence_location /var/lib/mosquitto/

log_dest file /var/log/mosquitto/mosquitto.log

include_dir /etc/mosquitto/conf.d

/etc/mosquitto/conf.d/myconfig.conf
persistence false

allow_anonymous true
password_file /etc/mosquitto/passwd

acl_file /etc/mosquitto/acl

# mqtt
listener 1883
protocol mqtt

# websockets
listener 9001
protocol websockets

/etc/mosquitto/acl
# Allow anonymous access to the sys
topic read $SYS/#

# Allow anonymous to read weather
topic read weather/#

# weewx readwrite to the loop
user teffi
topic weather/#

MQTT in WeeWX:
[StdRESTful]
    [[MQTT]]

        # Enable/disable this service
        enable = true

        # Hostname/IP of MQTT broker
        host = 192.168.178.190
        server_url = mqtt://teffi:********@localhost:1883/


        # Credentials
        user = teffi
        password = ********

        # Prefix for topics

        topic = weather
        unit_system = METRIC
        binding = archive,loop
        aggregation = aggregate

checking if WeeWX serves mosquitto with info:
mosquitto_sub -h 192.168.178.190 -t weather/#
online
online
1690198935
24.6
23.9
53
54
993.7
993.7
11377.0
8.9
0
0.0
0.0
0.0
0.0
0.3
1.46
1.46
294
6.480016105981334
9.360023264195261
7.1
0
4
89.7947908445146
997.3266279778212
23.910163208269463
997.1205287280834
1262.3292207924262
14.015863559854884
23.75555555555555
27.2746765106266
14.37423758808152
859.4544718145543
23.9
16

Belchertown skin receiving MQTT topic /weather/#
[StdReport]
    [[Belchertown]]
        skin = Belchertown
        HTML_ROOT = /var/www/html/weewx/belchertown
        enable = true

        [[[Extras]]]
            #--- MQTT Websockets (for Real Time Streaming) Options ---
            #log_failure = True
            mqtt_websockets_enabled = 1
            mqtt_websockets_host = 192.168.178.190
            mqtt_websockets_port = 9001
            mqtt_websockets_ssl = 0
            mqtt_websockets_topic = weather/loop
            mqtt_websockets_username = teffi
            mqtt_websockets_password = ********
            disconnect_live_website_visitor = 1800000

Checking if it works in webpage:

Connected. Waiting for data. Last Updated July 24, 2023, 1:20:00 PM

The webpage never receives data.

mosquitto.log shows connections:
sudo more /var/log/mosquitto/mosquitto.log

1690197817: mosquitto version 2.0.11 starting
1690197817: Config loaded from /etc/mosquitto/mosquitto.conf.
1690197817: Opening ipv4 listen socket on port 1883.
1690197817: Opening ipv6 listen socket on port 1883.
1690197817: Opening websockets listen socket on port 9001.
1690197817: mosquitto version 2.0.11 running
1690197822: New connection from 192.168.178.190:36367 on port 1883.
1690197822: New client connected from 192.168.178.190:36367 as weewx_e353ae0d (p2, c1, k60, u'teffi').
1690197840: New client connected from ::ffff:192.168.178.190:59900 as website819759641 (p2, c1, k60, u'teffi').
1690197884: Client website819759641 closed its connection.
1690197884: Client <unknown> closed its connection.
1690197886: New client connected from ::ffff:192.168.178.190:52896 as website398593267 (p2, c1, k60, u'teffi').
1690198918: New connection from 192.168.178.190:36078 on port 1883.
1690198918: New client connected from 192.168.178.190:36078 as auto-C1ABF6AD-7B82-CBED-2BB0-5DECA756C1BA (p2, c1, k60).
1690198939: Client auto-C1ABF6AD-7B82-CBED-2BB0-5DECA756C1BA disconnected.
1690199057: New client connected from ::ffff:192.168.178.64:57281 as website924402803 (p2, c1, k60, u'teffi').

mh081...@gmail.com

unread,
Jul 24, 2023, 8:56:01 AM7/24/23
to weewx-user
Hi,

it doesnt work with localhost. Think, you start your Browser localy so your Loca Browser try to mqqt to localhost. And there is no mwtt server.

From My weewx config (the MQTT part). Think i configured my mqtt and Webssite with https.

##################weewx.conf#################
[[MQTT]]
        server_url = mqtt://pi:pass...@gw.martenhinrichs.de:8883/

        topic = weather
        unit_system = METRIC
        binding = archive, loop
        aggregation = aggregate
        log_success = False
        log_failure = True
        [[[tls]]]
            tls_version = tlsv12
            ca_certs = /etc/ssl/certs/ca-certificates.crt
        [[[inputs]]]
            [[[[dayRain]]]]
                name = dayRain_mm
                units = mm
            [[[[rainRate]]]]
                name = rainRate_mm_per_hour
                units = mm_per_hour

[[Belchertown]]


        [[[Extras]]]


            #--- MQTT Websockets (for Real Time Streaming) Options ---
            mqtt_websockets_enabled = 1
            mqtt_websockets_host = gw.martenhinrichs.de
            mqtt_websockets_port = 9001
            mqtt_websockets_ssl = 1
            mqtt_websockets_topic = weather/loop





#########mosquitto.conf################
allow_anonymous true
password_file /etc/mosquitto/passwd
acl_file /etc/mosquitto/acl
persistence false

# mqtt
listener 1883 
listener 8883
certfile /etc/letsencrypt/live/gw.martenhinrichs.de/cert.pem
cafile /etc/letsencrypt/live/gw.martenhinrichs.de/chain.pem
keyfile /etc/letsencrypt/live/gw.martenhinrichs.de/privkey.pem

protocol mqtt

# websockets
listener 9001
certfile /etc/letsencrypt/live/gw.martenhinrichs.de/cert.pem
cafile /etc/letsencrypt/live/gw.martenhinrichs.de/chain.pem
keyfile /etc/letsencrypt/live/gw.martenhinrichs.de/privkey.pem
protocol websockets

Stefan Gliessmann

unread,
Jul 24, 2023, 9:06:49 AM7/24/23
to weewx...@googlegroups.com
Thank you for the feedback.
I changed "localhost" to the IP of the MQTT broker as suggested.
It did not fix it ...

As far as I understand that section is for uploading weewx data to the mqtt broker.
That part works well as I can read the weather with an mqtt client.

It is the Belchertown skin part which connects to the MQTT Brocker with websocket, but it cannot receive data for updates ...

I am really puzzled ...

--
You received this message because you are subscribed to a topic in the Google Groups "weewx-user" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/weewx-user/Scp2wA2qOw4/unsubscribe.
To unsubscribe from this group and all its topics, send an email to weewx-user+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/ee7b160b-3320-423f-879f-9b223916af32n%40googlegroups.com.

Jacques Terrettaz

unread,
Jul 24, 2023, 9:24:07 AM7/24/23
to weewx...@googlegroups.com
Two things to consider :


1)  when opening your website from local network :  your mqtt broker is using port 9001 for websockets. If it doesn't works , you may have to verify that this port 9001 is not blocked by a firewall.  
2)  when opening your website from internet (http://weewxhi.de) .i.e outside your local network :  mqtt_websockets_host = 192.168.178.190  is a local network IP address that cannot be accessed from outside. You should use  a dynamic dns service (no-ip, dyndns or other) to create a redirection from internet to your mqtt broker, and configure your router and firewall accordingly.




Stefan Gliessmann

unread,
Jul 24, 2023, 10:41:07 AM7/24/23
to weewx...@googlegroups.com
Thanks, Jaques!

wrt
1)  when opening your website from local network :  your mqtt broker is using port 9001 for websockets. If it doesn't works , you may have to verify that this port 9001 is not blocked by a firewall.  
9001 is not blocked by the firewall on 192.168.178.190
I can receive the via 9001 on my iPhone with an Matt client the values

2)  when opening your website from internet (http://weewxhi.de) .i.e outside your local network :  mqtt_websockets_host = 192.168.178.190  is a local network IP address that cannot be accessed from outside. You should use  a dynamic dns service (no-ip, dyndns or other) to create a redirection from internet to your mqtt broker, and configure your router and firewall accordingly.
Yeah - I have dyndns enabled and just opened 9001 on my router, too.

Unfortunately, it continues to say "Connected. Waiting for data." 

Does a Belchertown config file override weewx.conf settings somewhere? 


Jacques Terrettaz

unread,
Jul 24, 2023, 10:53:14 AM7/24/23
to weewx...@googlegroups.com

9001 is not blocked by the firewall on 192.168.178.190
I can receive the via 9001 on my iPhone with an Matt client the values 

So have a look at your browser console to detect any websocket or javascript errors that can occur


Yeah - I have dyndns enabled and just opened 9001 on my router, too.

Unfortunately, it continues to say "Connected. Waiting for data." 

If you have a dyndns host configured, such as XXXXX.dyndns.org , that redirects to your mqtt broker, you have to configure  : 
mqtt_websockets_host = XXXXX.dyndns.org


Jacques Terrettaz

unread,
Jul 24, 2023, 11:04:06 AM7/24/23
to weewx...@googlegroups.com
Another point to check :

Please verify in your mosquitto acl file (/etc/mosquitto/acl) that the user "teffi" has read permission for the topic "weather"

Stefan Gliessmann

unread,
Jul 24, 2023, 11:32:49 AM7/24/23
to weewx...@googlegroups.com
user "teffi" has readwrite permission

in Firefox inspect error console there are no errors wrt websocket or javascript errors ... (only errors with geolocation & uncaught type error in context with windy.com)



Jacques Terrettaz

unread,
Jul 24, 2023, 1:55:08 PM7/24/23
to weewx...@googlegroups.com
One point : if you have the "Connected. Waiting for data."  message, this indicates that the websockets connection is successful. If no further data is received, this may indicate that the expected topic "weather/loop" is not existing.

You may try to use a software such as mqtt explorer (http://mqtt-explorer.com/) to inspect your mqtt broker and the topics published 

vince

unread,
Jul 24, 2023, 3:08:52 PM7/24/23
to weewx-user
Stefan - check your MQTT publish stanza of weewx.conf and make sure that you are publishing to the topic that you have Belchertown trying to subscribe to.

From your first post you had a log extract saying:

Jul 21 15:30:02 weewx weewx[37286] DEBUG user.mqtt: Publishing "weather/weewx/inHumidity_percent

So I'm wondering if you need to set Belchertown to look for "weather/weewx/loop" rather than the typical "weather/loop"

I think you have a mismatch in what you are publishing vs. what you are trying to subscribe to.

Graham Eddy

unread,
Jul 24, 2023, 9:48:10 PM7/24/23
to WeeWX User
try ‘mosquito_sub -v -t topic_pattern -h brokerhost’ to see what **is** being published
⊣GE⊢

Graham Eddy

unread,
Jul 24, 2023, 9:52:05 PM7/24/23
to WeeWX User
i meant ‘mosquito_sub -v -t “#" -h brokerhost’ on weewx host, plus authentication if any
⊣GE⊢

--
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 on the web visit https://groups.google.com/d/msgid/weewx-user/686A219D-75B5-431B-9044-215355744BDF%40geddy.au.

vince

unread,
Jul 24, 2023, 11:15:54 PM7/24/23
to weewx-user
If Stefan would just post his MQTT and Belchertown stanzas from weewx.conf we could cut to the chase here and just tell him where things aren't configured correctly....

Stefan Gliessmann

unread,
Jul 25, 2023, 3:23:19 AM7/25/23
to weewx-user
Dear Vince,

you mean something like this?


Jul 24, 2023, 1:51:16 PM (19 hours ago) 
to weewx-user
Thank you all for providing input / sharing your configurations.
I made the suggested changes and more, but still belchertown displays Connected. Waiting for data ...
I have attached all configs / logs / checks I could think of below.

Thanks again for your input in advance!
Stefan


These are my current configs:

mosquitto:

Stefan Gliessmann

unread,
Jul 25, 2023, 3:35:14 AM7/25/23
to weewx...@googlegroups.com
This is what I get:

teffi@weewx:~$ mosquitto_sub -v -t "#" -h 192.168.178.190
weather/connection_status online
weather/connection_status online
weather/dateTime_unix_epoch 1690270081
weather/inTemp_degree_C 24.2
weather/outTemp_degree_C 15.799999999999999
weather/inHumidity_percent 53
weather/outHumidity_percent 75
weather/pressure_mbar 996.7
weather/relbarometer 996.7
weather/luminosity 8013.0
weather/uvradiation 6.4
weather/UV_uv_index 0
weather/rain_cm 0.0
weather/stormRain_cm 0.35000000000000003
weather/rainRate_cm_per_hour 0.0
weather/dayRain_cm 0.0
weather/weekRain 3.8
weather/monthRain_cm 1.8100000000000003
weather/yearRain_cm 1.8100000000000003
weather/windDir_degree_compass 346
weather/windSpeed_km_per_hour 3.9600098425441494
weather/windGust_km_per_hour 5.400013421651113
weather/daymaxwind 4.1
weather/wh65_batt 0
weather/wh65_sig 4
weather/radiation_watt_per_meter_squared 63.24388318863457
weather/altimeter_mbar 1000.3356188974249
weather/appTemp_degree_C 15.463360560056334
weather/barometer_mbar 1000.2272009128795
weather/cloudbase_meter 581.6088849469353
weather/dewpoint_degree_C 11.375139081484333
weather/heatindex_degree_C 15.393888888888887
weather/humidex_degree_C 17.74032194160783
weather/inDewpoint_degree_C 14.004795683252373
weather/maxSolarRad_watt_per_meter_squared 496.46758917662
weather/windchill_degree_C 15.799999999999999
weather/usUnits 16

So, weewx prodcasts the weather thru the mqtt broker mosquitto :)
Yet still, Belchertown skin remains waiting for data

Here is my [StdReport] [[Belchertown]] [[[Extras]]] stanza in weewx.conf:

            #--- MQTT Websockets (for Real Time Streaming) Options ---
            mqtt_websockets_enabled = 1
            mqtt_websockets_host = 192.168.178.190
            mqtt_websockets_port = 9001
            mqtt_websockets_ssl = 0
            mqtt_websockets_topic = weather/loop
            mqtt_websockets_username = teffi
            mqtt_websockets_password = 5tefan4U
            disconnect_live_website_visitor = 1800000

You received this message because you are subscribed to a topic in the Google Groups "weewx-user" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/weewx-user/Scp2wA2qOw4/unsubscribe.
To unsubscribe from this group and all its topics, send an email to weewx-user+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/749B9857-ACE8-4069-87AF-55F0BDB55EFF%40geddy.au.

Graham Eddy

unread,
Jul 25, 2023, 3:45:40 AM7/25/23
to WeeWX User
referenced topic not listed in the topics of published messages
⊣GE⊢

On 25 Jul 2023, at 5:34 pm, Stefan Gliessmann <stefan.g...@gmail.com> wrote:

            mqtt_websockets_topic = weather/loop

Stefan Gliessmann

unread,
Jul 25, 2023, 4:03:39 AM7/25/23
to weewx-user
GE - could you expand on your statement: "referenced topic not listed in the topics of published messages"?

what should mqtt_websockets_topic look like? e.g. = weather/inTemp_degree_C/loop?

TIA,
Stefan

Graham Eddy

unread,
Jul 25, 2023, 4:11:52 AM7/25/23
to WeeWX User
i don’t use belchertown or that mqtt driver so i don’t know the details.
my observation is that the report belchertown seems to be waiting on topic ‘’weather/loop’’ (i don’t know the syntax but it’s a reasonable presumption), but when you printed all the messages being published, none had that topic → belchertown quite rightly is not reporting receiving any messages
⊣GE⊢

--
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.

Jacques Terrettaz

unread,
Jul 25, 2023, 4:12:04 AM7/25/23
to weewx...@googlegroups.com
It should look like : weather/loop. The loop topic is a json containing all the data aggregated  and is apparently not generated with your setup.

Here is an exemple of the content of a weather/loop mqtt message for my station : {"dateTime": "1690272486.0", "barometer_mbar": "1006.4684246818595", "inTemp_C": "24.222222222222218", "inHumidity": "50.0", "outTemp_C": "19.27777777777778", "windSpeed_kph": "8.04672", "windSpeed10_kph": "6.437376", "windDir": "197.0", "extraTemp1_C": "26.666666666666664", "extraTemp2_C": "27.22222222222222", "extraTemp3_C": "23.88888888888889", "soilTemp1_C": "21.666666666666668", "soilTemp2_C": "18.333333333333332", "soilTemp3_C": "21.666666666666668", "leafTemp1_C": "21.666666666666668", "leafTemp2_C": "18.333333333333332", "outHumidity": "73.0", "rainRate_cm_per_hour": "0.0", "UV": "1.3", "radiation_Wpm2": "125.0", "stormRain_cm": "0.9999999939000002", "stormStart": "1690149600.0", "dayRain_cm": "0.019999999878", "monthRain_cm": "3.6999999774300005", "yearRain_cm": "35.679999782352006", "dayET_cm": "0.03048", "monthET": "4.03", "yearET": "18.16", "soilMoist1_centibar": "51.0", "soilMoist3_centibar": "41.0", "leafWet1_count": "0.0", "insideAlarm": "0.0", "rainAlarm": "0.0", "outsideAlarm1": "0.0", "outsideAlarm2": "0.0", "extraAlarm1": "0.0", "extraAlarm2": "0.0", "extraAlarm3": "0.0", "extraAlarm4": "0.0", "extraAlarm5": "0.0", "extraAlarm6": "0.0", "extraAlarm7": "0.0", "extraAlarm8": "0.0", "soilLeafAlarm1": "0.0", "soilLeafAlarm2": "0.0", "soilLeafAlarm3": "0.0", "soilLeafAlarm4": "0.0", "txBatteryStatus": "0.0", "consBatteryVoltage_volt": "3.89", "forecastIcon": "3.0", "forecastRule": "192.0", "sunrise": "1690258020.0", "sunset": "1690312440.0", "rain_cm": "0.0", "windGust_kph": "17.702784", "windGustDir": "190.0", "pressure_mbar": "963.8859943175378", "altimeter_mbar": "1008.0216245072318", "appTemp_C": "19.08558834080051", "beaufort_count": "2.0", "cloudbase_meter": "993.9764167741055", "dewpoint_C": "14.312901895429865", "heatindex_C": "19.167222222222225", "humidex_C": "22.828243781966584", "inDewpoint_C": "13.129089961868337", "maxSolarRad_Wpm2": "598.7311131756545", "windchill_C": "19.27777777777778", "outVaporP_mbar": "16.311027360815487", "outSVP_mbar": "22.343873097007513", "outMixingRatio_gram_per_kilogram": "10.713127603866752", "outEquiTemp_C": "44.3435366864702", "outThetaE_C": "47.69725228025629", "outHumAbs_microgram_per_meter_cubed": "12085709.924432162", "sunshineThreshold_Wpm2": "413.9737112655241", "sunshineDay": "53.43333333333333", "radiationISS_Wpm2": "111.0", "OutTemp-1h_C": "18.333333333333332", "OutTemp-24h_C": "20.33333333333333", "OutHumidity-24h": "78.0", "sunAlt": "39.25159793354046", "extraTemp4_C": "19.944444444444446", "windSpeed2_kph": "4.828032", "windDir2": "123.0", "windGust2_kph": "9.656064", "windGustDir2": "106.0", "wllrain_cm": "0.019999999878", "hourRain_cm": "0.0", "rain24_cm": "0.7599999953640001", "usUnits": "16.0"}


What version of the weewx mqtt extension are you running ?


--
You received this message because you are subscribed to a topic in the Google Groups "weewx-user" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/weewx-user/Scp2wA2qOw4/unsubscribe.
To unsubscribe from this group and all its topics, send an email to weewx-user+...@googlegroups.com.

Stefan Gliessmann

unread,
Jul 25, 2023, 4:25:49 AM7/25/23
to weewx...@googlegroups.com
the current main version 0.24

sudo wee_extension --list
Extension Name    Version   Description
mqtt              0.24      Upload weather data to MQTT server.
GW1000            0.5.0b5   WeeWX driver for devices using the Ecowitt LAN/Wi-Fi Gateway API.
Belchertown       1.3.1     A clean modern skin with real time streaming updates and interactive charts. Modeled after BelchertownWeather.com
MQTT              0.2.0     Extension for uploading LOOP data to an MQTT broker

How did you grep the weather/loop mqtt message on your system?



Stefan Gliessmann

unread,
Jul 25, 2023, 4:27:27 AM7/25/23
to weewx...@googlegroups.com
Thank you, GE!
I appreciate your help. the topic was configured according the different guides online.

You received this message because you are subscribed to a topic in the Google Groups "weewx-user" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/weewx-user/Scp2wA2qOw4/unsubscribe.
To unsubscribe from this group and all its topics, send an email to weewx-user+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/87896D52-4563-457D-A539-A436ACCAEF10%40geddy.au.

Jacques Terrettaz

unread,
Jul 25, 2023, 4:29:23 AM7/25/23
to weewx...@googlegroups.com
Are you using this extension : https://github.com/michael-slx/weewx-mqtt. ?

If yes, this extension does not generate a "loop" json topic needed by the Belchertown skin. In that case, you have to use the following extension : https://github.com/matthewwall/weewx-mqtt/tree/master

--
You received this message because you are subscribed to a topic in the Google Groups "weewx-user" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/weewx-user/Scp2wA2qOw4/unsubscribe.
To unsubscribe from this group and all its topics, send an email to weewx-user+...@googlegroups.com.

Jacques Terrettaz

unread,
Jul 25, 2023, 4:35:33 AM7/25/23
to weewx...@googlegroups.com
It seems that you have 2 mqtt extensions installed :

mqtt              0.24      Upload weather data to MQTT server.
MQTT              0.2.0     Extension for uploading LOOP data to an MQTT broker

Which one is active ?

Stefan Gliessmann

unread,
Jul 25, 2023, 4:49:00 AM7/25/23
to weewx...@googlegroups.com

Yes, I use the one from Matthew Wall ...

I am just about to remove and reinstall it ;)

Stefan Gliessmann

unread,
Jul 25, 2023, 4:52:32 AM7/25/23
to weewx...@googlegroups.com
OMG - what did I do there?
I will first remove the MQTT 0.2.0 one.
I don't remember that installation :(

Glad, you asked me which version I run ... LOL

Stefan Gliessmann

unread,
Jul 25, 2023, 5:58:32 AM7/25/23
to weewx...@googlegroups.com
SOLVED!

Screenshot 2023-07-25 at 11.44.40.png

Thank you, Jacques, for pointing out that I had two (2) weewx to mqtt extensions installed. 😁
Once I removed both and reinstalled the one from https://github.com/matthewwall/weewx-mqtt, modified the weewx.conf accordingly and restarted WeeWX, I had the green dot and data receiving!

I do highly appreciate your patience with me! 🙏

Thank you all again,
Stefan


Reply all
Reply to author
Forward
0 new messages