That is correct that I have the MQTT installed as an extension for weewx 
which is running on the pi.  I checked for a mqtt.service and I'm not 
seeing one on there.  I'm also not seeing a mosquitto_sub or pub installed 
so I think I must have missed anothe page to get this installed and 
working.  From searching around right now, it looks like I need to follow 
this page:  https://obrienlabs.net/how-to-setup-your-own-mqtt-broker/

I'm hoping to get this on a website that doesn't cost anything but one step 
at a time.

Am I on the right track?  

On Wednesday, July 24, 2024 at 10:50:45 PM UTC-4 vince wrote:

> Connection refused generally means the remote computer is not accepting 
> incoming connections on that port.   It looks to me like you are trying to 
> connect to the MQTT server on the same pi ?   Did you enable and start the 
> MQTT server ?
>
> Did you test it with mosquitto_sub and mosquitto_pub to know that the MQTT 
> server is working ok ?
>
> The authoritative belchertown docs are at 
> https://github.com/poblabs/weewx-belchertown?tab=readme-ov-file#mqtt-and-mqtt-websockets-optional
>  
> if you haven't gone through them already.  Note that it has a prerequisite 
> to install the MQTT extension which itself has prerequisite python modules.
>
> Test with mosquitto_sub/pub first to know your MQTT server is working as 
> desired, then do the weewx part.
>
> On Wednesday, July 24, 2024 at 7:30:33 PM UTC-7 M&M wrote:
>
>> Somewhat of a new user here to Weewx.  I am running it on a Raspberry Pi 
>> Zero W (192.168.0.196) and also installed the Belchertown skin.  I followed 
>> these steps (https://www.wxforum.net/index.php?topic=43377.0) to install 
>> and configure MQTT but I'm running into some errors.  Here is what part of 
>> my weewx.conf file looks like for the MQTT stuff:
>>
>>     [[MQTT]]
>>         server_url = mqtt://random_username:[email protected]:1883 
>> <http://random_username:[email protected]:1883>
>>         unit_system = US
>>         topic = weather
>>         binding = archive, loop
>>         aggregation = aggregate
>>
>>     [[Belchertown]]
>>         skin = Belchertown
>>         HTML_ROOT = /var/www/html/weewx/belchertown
>>         enable = true
>>
>>
>>         [[[Extras]]]
>>             #--- MQTT Websockets (for Real Time Streaming) Options ---
>>             mqtt_websockets_enabled = 1
>>             mqtt_websockets_host = 192.168.0.x
>>             mqtt_websockets_port = 9001
>>             mqtt_websockets_ssl = 0
>>             mqtt_websockets_topic = weather/loop
>>
>> I also added user.mqtt.MQTT to restful_services at the end of the file.
>>
>> The error I'm seeing in journalctl is:
>>
>> Jul 24 22:16:40 raspberrypi weewxd[25776]: ERROR user.mqtt: Failed to 
>> connect to MQTT server (mqtt://random_username:[email protected]:1883 
>> <http://random_username:[email protected]:1883>): [Errno 111] Connection 
>> refused
>> Jul 24 22:16:40 raspberrypi weewxd[25776]: ERROR weewx.restx: MQTT: 
>> Failed to publish record 2024-07-24 22:15:00 EDT (1721873700): MQTT client 
>> not available
>>
>> Any ideas what I'm missing?
>>
>>
>>
>>
>>
>>

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/00d94b37-a122-4b69-8662-9433f5b455d0n%40googlegroups.com.

Reply via email to