I see some errors with your configuration :

1) mosquitto should be listening at port 1883 (Mqtt protocol) and at port 
9001 (websockets protocol).  Websockets is used by the javascript of the 
Belchertown skin.
So in mosquitto.conf, you should have :
listener 1883
listener 9001
protocol websockets

2) belchertown skin.conf  should be configured to use the websockets port :
mqtt_websockets_port = 9001




Le samedi 26 août 2023 à 16:57:21 UTC+2, Joseph Barrow a écrit :

> I've been fighting with this thing for a while. I've got WeeWX 4.10.2 
> installed and working, with the Belchertown skin, and the problem comes 
> when I try to use mosquitto for MQTT stuff. I can do the sub/pub stuff 
> (thanks to https://obrienlabs.net/how-to-setup-your-own-mqtt-broker) in 
> separate SSH sessions, which works. Ports 1883 and 9001 are open for 
> business. Not using SSL certificates - that's another fight for later.
>
> Live updates have stopped. Last updated and a date/time. I click on 
> "Continue Live Updates," and I get "Connected. Waiting for data." If I run 
> wee_reports, it generates reports (supposedly) but the 'waiting for data' 
> doesn't do anything but sit there. I have uploads to various services that 
> are telling me 'offline,' which is aggravating, but if I remove all the 
> MQTT references, things work. I don't have it on a public Internet facing 
> IP, just reporting to Weather Underground and most of the weewx.conf 
> [StdRESTful] options.
>
> The MQTT addition is a 'just try it and learn about it' and I've learned 
> it's aggravating.
>
> I'm using a Raspberry Pi 3B+, with a fresh install of Raspberry Pi OS, 
> WeeWX, and the skin. I decided not to do the Weather34 skin (even though I 
> like it, too) until I get this ironed out. I'm using Apache, since I know 
> that a bit better than nginx - even though it isn't as lightweight. WeeWX 
> was installed as a Debian package through apt. My PWS is an AcuRite 5n1, 
> model 01536.
>
> I don't know if WeeWX is supplying data to mosquitto or not, since the 
> 'waiting for data' message makes me think "no" but who knows at this point. 
> I've installed the weewx-mqtt extension from (
> https://github.com/matthewwall/weewx-mqtt/tree/master) and that went well 
> - I think.
>
> I've snipped out extraneous stuff in the config files. I'm sure no one 
> needs the APIs and local NWS weather forecast office stuff and so on.
>
> I've canvassed the group and various web pages, each with bits of 
> information that have been varying degrees of helpful, and I've burnt out 
> my receding brainpower. The beacon is lit, and I'm calling for aid.
>
> Thanks for any help.
>
> Commands:
>
>  > sudo netstat -tulpn | grep 1883
> tcp        0      0 0.0.0.0:1883            0.0.0.0:*               
> LISTEN      656/mosquitto
>
>  > sudo netstat -tulpn | grep 9001
> tcp6       0      0 :::9001                 :::*                    LISTEN 
>      656/mosquitto
>
> 'ufw status' also shows opened ports here.
>
>  - weewx.conf
> https://pastebin.com/dsA2vFSt
>
>  - Belchertown skin.conf
> https://pastebin.com/ArWLqyCi
>
>  - mosquitto:
> https://pastebin.com/vGFczCdm
>
>  - weewx syslog:
> https://pastebin.com/hB05njd0
>

-- 
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/bf83afb5-b551-445d-be97-fb2531dc1ab7n%40googlegroups.com.

Reply via email to