I have the Belchertown skin up and running nicely and so I
decided to enable MQTT. I successfully installed mosquitto and
endeavored to enable MTTQ with Belchertown/weewx. However,
Belchertown/weewx is not doing realtime updates as it is supposed to and displays
either "Connecting to weather station real time data" (with
firefox) or "Failed connecting to the weather station. Please try
again later!" (with chrome, chromium or Konqueror) according to which browser
I am using.
I am confident that mosquitto is working properly since I am able to manually receive mosquitto output with the
command, "mosquitto_sub -h localhost -t weather/#", which generates lots
of weather data every two seconds. Also, my logs show MQTT posting every two seconds as follows:
Jan 17 17:46:27
zeebytes.org weewx[22287]: restx: MQTT: Published
record 2020-01-17 17:46:27 EST (1579301187)
Here is my MQTT setup in weewx.conf:
[[MQTT]]
server_url = mqtt://<user>:<password>@localhost:1883/
topic = weather
unit_system = US
binding = archive, loop
aggregation = aggregate
Here is my MQTT setup in the Belchertown skin.conf:
# MQTT Websockets defaults
mqtt_websockets_enabled = 1
mqtt_websockets_host = "localhost"
mqtt_websockets_port = 9001
mqtt_websockets_ssl = 0
mqtt_websockets_topic = "weather/#"
disconnect_live_website_visitor = 1800000
I am running Debian 10 and apache2.
You may view the site at
https://zeebytes.org
I hope that someone can tell me what I am doing wrong!
Thanks,
Gordon