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*:
*/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:*
*http://localhost/weewx/belchertown/ <http://localhost/weewx/belchertown/>*
 or weewxhi.de

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').
On Tuesday, July 25, 2023 at 5:15:54 AM UTC+2 vince wrote:

> 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....
>
> On Monday, July 24, 2023 at 6:52:05 PM UTC-7 Graham Eddy wrote:
>
>> i meant ‘mosquito_sub -v -t “#" -h brokerhost’ on weewx host, plus 
>> authentication if any
>> *⊣GE⊢*
>>
>> On 25 Jul 2023, at 11:47 am, Graham Eddy <g...@geddy.au> wrote:
>>
>> try ‘mosquito_sub -v -t topic_pattern -h brokerhost’ to see what **is** 
>> being published
>> *⊣GE⊢*
>>
>> On 25 Jul 2023, at 5:08 am, vince <vince...@gmail.com> wrote:
>>
>> I think you have a mismatch in what you are publishing vs. what you are 
>> trying to subscribe to.
>>
>>
>>
>> -- 
>> 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
>>  
>> <https://groups.google.com/d/msgid/weewx-user/686A219D-75B5-431B-9044-215355744BDF%40geddy.au?utm_medium=email&utm_source=footer>
>> .
>>
>>
>>

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/0428136f-6a72-4de9-9939-947bc09670dan%40googlegroups.com.

Reply via email to