Sorry - I don't know and basically have no idea what your system configuration is at this point. You mention a /var/log/weewx.log file that doesn't even exist typically. You definitely should be seeing log messages unless you forgot to stop/restart weewx after setting log_success true. Also set debug=1 in weewx.conf.
You're basically going to need to either get logging working and follow what the logs say to determine what isn't correct, or start over and use the example files I posted which 'do' work on a modern raspios. On Tuesday, August 13, 2024 at 4:24:11 PM UTC-7 M&M wrote: > Do you think starting over will fix my errors? I don't have the latest > Raspberry Pi OS on here so maybe that is causing issues. > > On Thursday, August 8, 2024 at 11:36:23 PM UTC-4 M&M wrote: > >> Interesting. I changed log_success to true however my /var/log/weewx.log >> file is empty. >> >> On Thursday, August 8, 2024 at 11:12:37 PM UTC-4 vince wrote: >> >>> (apologies for the long post below) >>> >>> No - you have one process listening on two ports, which is correct. >>> >>> I just did a full install to a clean pi4 it works for me. Here are the >>> config file snippets and some diagnostic information.... >>> >>> Note - if you set log_success true in the MQTT section you can verify >>> weewx is publishing to the MQTT broker ok via the weewx log >>> >>> #------------------------------------------------------- >>> # From the weewx log >>> #------------------------------------------------------- >>> 2024-08-08T19:55:17.387146-07:00 raspberrypi weewxd[4222]: DEBUG >>> weewx.manager: Daily summary version is 4.0 >>> 2024-08-08T19:55:17.876041-07:00 raspberrypi weewxd[4222]: INFO >>> weewx.restx: MQTT: Published record 2024-08-08 19:55:18 PDT (1723172118) >>> 2024-08-08T19:55:18.294317-07:00 raspberrypi weewxd[4222]: INFO >>> weewx.cheetahgenerator: Generated 12 files for report Belchertown in 0.92 >>> seconds >>> 2024-08-08T19:55:18.307852-07:00 raspberrypi weewxd[4222]: INFO >>> weewx.reportengine: Copied 3 files to >>> /home/pi/weewx-data/public_html/belchertown >>> 2024-08-08T19:55:18.324487-07:00 raspberrypi weewxd[4222]: DEBUG >>> weewx.manager: Daily summary version is 4.0 >>> 2024-08-08T19:55:18.487352-07:00 raspberrypi weewxd[4222]: DEBUG >>> weewx.reportengine: Report 'FTP' not enabled. Skipping. >>> 2024-08-08T19:55:18.487690-07:00 raspberrypi weewxd[4222]: DEBUG >>> weewx.reportengine: Report 'RSYNC' not enabled. Skipping. >>> 2024-08-08T19:55:20.375037-07:00 raspberrypi weewxd[4222]: INFO >>> weewx.restx: MQTT: Published record 2024-08-08 19:55:20 PDT (1723172120) >>> 2024-08-08T19:55:22.874986-07:00 raspberrypi weewxd[4222]: INFO >>> weewx.restx: MQTT: Published record 2024-08-08 19:55:23 PDT (1723172123) >>> 2024-08-08T19:55:25.375017-07:00 raspberrypi weewxd[4222]: INFO >>> weewx.restx: MQTT: Published record 2024-08-08 19:55:25 PDT (1723172125) >>> >>> #------------------------------------------------------- >>> # Example mosquitto log >>> #------------------------------------------------------- >>> 1723168752: mosquitto version 2.0.11 starting >>> 1723168752: Config loaded from /etc/mosquitto/mosquitto.conf. >>> 1723168752: Starting in local only mode. Connections will only be >>> possible from clients running on this machine. >>> 1723168752: Create a configuration file which defines a listener to >>> allow remote access. >>> 1723168752: For more details see >>> https://mosquitto.org/documentation/authentication-methods/ >>> 1723168752: Opening ipv4 listen socket on port 1883. >>> 1723168752: Opening ipv6 listen socket on port 1883. >>> 1723168801: mosquitto version 2.0.11 running >>> 1723170602: Saving in-memory database to >>> /var/lib/mosquitto//mosquitto.db. >>> 1723170686: New connection from 192.168.1.232:56773 on port 1883. >>> 1723170686: New client connected from 192.168.1.232:56773 as >>> weewx_784a909c (p2, c1, k60). >>> 1723170915: Client weewx_784a909c closed its connection. >>> 1723171692: New connection from 192.168.1.232:51645 on port 1883. >>> 1723171692: New client connected from 192.168.1.232:51645 as >>> weewx_b396e0df (p2, c1, k60). >>> 1723171834: New client connected from ::ffff:192.168.1.51:54402 as >>> website522586962 (p2, c1, k60). >>> 1723172225: Client weewx_b396e0df closed its connection. >>> 1723172228: New connection from 192.168.1.232:54439 on port 1883. >>> 1723172228: New client connected from 192.168.1.232:54439 as >>> weewx_2d9b84ff (p2, c1, k60). >>> 1723172403: Saving in-memory database to >>> /var/lib/mosquitto//mosquitto.db. >>> >>> >>> #------------------------------------------------------- >>> # weewx.conf snippets for Belchertown websockets >>> #------------------------------------------------------- >>> >>> [StdRESTful] >>> >>> [[MQTT]] >>> server_url = mqtt://192.168.1.232:1883/ >>> topic = simulator >>> unit_system = US >>> >>> binding = archive, loop >>> aggregation = aggregate >>> enable = true >>> log_success = true # NOTE: THIS IS VERY CHATTY >>> log_failure = true >>> >>> >>> [StdReport] >>> >>> [[Belchertown]] >>> skin = Belchertown >>> HTML_ROOT = public_html/belchertown >>> >>> enable = true >>> >>> [[[Extras]]] >>> >>> #--- MQTT Websockets (for Real Time Streaming) Options --- >>> mqtt_websockets_enabled = 1 >>> mqtt_websockets_host = 192.168.1.232 >>> >>> mqtt_websockets_port = 9001 >>> mqtt_websockets_ssl = 0 >>> mqtt_websockets_topic = simulator/loop >>> disconnect_live_website_visitor = 1800000 >>> >>> #--------------------------------------------------------- >>> # /etc/mosquitto/conf.d/local.conf for minimal websockets >>> #--------------------------------------------------------- >>> >>> listener 9001 >>> protocol websockets >>> >>> listener 1883 >>> allow_anonymous true >>> >>> #--------------------------------------------------------- >>> # weectl extension list >>> #--------------------------------------------------------- >>> >>> Extension Name Version Description >>> Belchertown 1.3.1 A clean modern skin with real time streaming >>> updates and interactive charts. Modeled after BelchertownWeather.com >>> mqtt 0.24 Upload weather data to MQTT server. >>> >>> #--------------------------------------------------------- >>> # venv pip3 list >>> #--------------------------------------------------------- >>> >>> Package Version >>> ---------- ----------- >>> configobj 5.0.8 >>> CT3 3.3.3.post1 >>> ephem 4.1.5 >>> paho-mqtt 2.1.0 >>> pillow 10.4.0 >>> pip 23.0.1 >>> PyMySQL 1.1.1 >>> pyserial 3.5 >>> pyusb 1.2.1 >>> setuptools 66.1.1 >>> six 1.16.0 >>> >>> #--------------------------------------------------------- >>> # sudo ss -tupl >>> #--------------------------------------------------------- >>> >>> Netid State Recv-Q >>> Send-Q Local Address:Port >>> Peer Address:Port Process >>> udp UNCONN 0 0 >>> 0.0.0.0:mdns >>> 0.0.0.0:* >>> users:(("avahi-daemon",pid=536,fd=12)) >>> udp UNCONN 0 0 >>> 0.0.0.0:54830 >>> 0.0.0.0:* >>> users:(("avahi-daemon",pid=536,fd=14)) >>> udp UNCONN 0 0 >>> *:48349 >>> *:* >>> users:(("avahi-daemon",pid=536,fd=15)) >>> udp UNCONN 0 0 >>> *:mdns >>> *:* >>> users:(("avahi-daemon",pid=536,fd=13)) >>> tcp LISTEN 0 128 >>> 0.0.0.0:ssh >>> 0.0.0.0:* users:(("sshd",pid=782,fd=3)) >>> tcp LISTEN 0 511 >>> 0.0.0.0:http >>> 0.0.0.0:* >>> >>> users:(("nginx",pid=1627,fd=5),("nginx",pid=1626,fd=5),("nginx",pid=1625,fd=5),("nginx",pid=1624,fd=5),("nginx",pid=1622,fd=5)) >>> tcp LISTEN 0 100 >>> 0.0.0.0:1883 >>> 0.0.0.0:* >>> users:(("mosquitto",pid=1268,fd=8)) >>> tcp LISTEN 0 4096 >>> *:9001 >>> *:* >>> users:(("mosquitto",pid=1268,fd=7)) >>> tcp LISTEN 0 128 >>> [::]:ssh >>> [::]:* users:(("sshd",pid=782,fd=4)) >>> tcp LISTEN 0 511 >>> [::]:http >>> [::]:* >>> >>> users:(("nginx",pid=1627,fd=6),("nginx",pid=1626,fd=6),("nginx",pid=1625,fd=6),("nginx",pid=1624,fd=6),("nginx",pid=1622,fd=6)) >>> tcp LISTEN 0 100 >>> [::]:1883 >>> [::]:* >>> users:(("mosquitto",pid=1268,fd=9)) >>> >>> >>> On Thursday, August 8, 2024 at 6:19:04 PM UTC-7 M&M wrote: >>> >>>> Looks like I have two mosquittos running on 1883 but they have the same >>>> PID. >>>> >>>> pi@raspberrypi:/etc/weewx/skins/Belchertown $ sudo ss -tupl >>>> Netid State Recv-Q Send-Q Local >>>> Address:Port Peer Address:Port Process >>>> udp UNCONN 0 0 >>>> 0.0.0.0:51030 0.0.0.0:* >>>> users:(("avahi-daemon",pid=234,fd=14)) >>>> udp UNCONN 0 0 >>>> 0.0.0.0:mdns 0.0.0.0:* >>>> users:(("avahi-daemon",pid=234,fd=12)) >>>> udp UNCONN 0 0 >>>> 0.0.0.0:bootpc 0.0.0.0:* >>>> users:(("dhcpcd",pid=571,fd=13)) >>>> udp UNCONN 0 0 >>>> *:mdns *:* >>>> users:(("avahi-daemon",pid=234,fd=13)) >>>> udp UNCONN 0 0 >>>> *:54532 *:* >>>> users:(("avahi-daemon",pid=234,fd=15)) >>>> tcp LISTEN 0 100 >>>> 0.0.0.0:1883 0.0.0.0:* >>>> users:(("mosquitto",pid=18024,fd=8)) >>>> tcp LISTEN 0 128 >>>> 0.0.0.0:ssh 0.0.0.0:* >>>> users:(("sshd",pid=354,fd=3)) >>>> tcp LISTEN 0 100 >>>> [::]:1883 [::]:* >>>> users:(("mosquitto",pid=18024,fd=9)) >>>> tcp LISTEN 0 4096 >>>> *:9001 *:* >>>> users:(("mosquitto",pid=18024,fd=7)) >>>> tcp LISTEN 0 511 >>>> *:http *:* >>>> >>>> users:(("apache2",pid=23498,fd=4),("apache2",pid=23497,fd=4),("apache2",pid=356,fd=4)) >>>> tcp LISTEN 0 128 >>>> [::]:ssh [::]:* >>>> users:(("sshd",pid=354,fd=4)) >>>> >>>> On Thursday, August 8, 2024 at 12:14:00 PM UTC-4 vince wrote: >>>> >>>>> try "sudo ss -tupl" which should show which process is using port >>>>> 1883.... >>>>> >>>>> On Wednesday, August 7, 2024 at 7:49:16 PM UTC-7 M&M wrote: >>>>> >>>>>> Thanks for looking into this for me. I feel like I've read a bunch >>>>>> of pages and that I'm really close to this. I've attached my >>>>>> weewx.conf, >>>>>> mosquitto.conf, and local.conf (located at /etc/mosquitto/conf.d/). >>>>>> >>>>>> Looking at the mosquitto log file, I'm seeing this error a ton of >>>>>> times: >>>>>> >>>>>> 1722824003: mosquitto version 2.0.11 starting >>>>>> 1722824003: Config loaded from /etc/mosquitto/mosquitto.conf. >>>>>> 1722824003: Opening websockets listen socket on port 9001. >>>>>> 1722824003: Opening ipv4 listen socket on port 1883. >>>>>> 1722824003: Opening ipv6 listen socket on port 1883. >>>>>> 1722824003: Opening ipv4 listen socket on port 1883. >>>>>> 1722824003: Error: Address already in use >>>>>> >>>>>> Although ps -ef is only showing one mosquitto running which I see the >>>>>> service running with systemctl. >>>>>> >>>>>> On Monday, August 5, 2024 at 9:04:15 PM UTC-4 vince wrote: >>>>>> >>>>>>> Can't help without seeing your current mosquitto config file and >>>>>>> your weewx.conf file at a minimum. Remember you need to restart weewx >>>>>>> after making weewx.conf changes and that your mosquitto broker is >>>>>>> running >>>>>>> and accepting incoming traffic into the ip address you are trying to >>>>>>> talk >>>>>>> to. >>>>>>> >>>>>>> You might check your mosquitto broker's logfile too to see if >>>>>>> anything there is being logged that might help. >>>>>>> >>>>>>> On Sunday, August 4, 2024 at 8:12:53 PM UTC-7 M&M wrote: >>>>>>> >>>>>>>> Vince, I followed that link and I'm making some progress. Thank >>>>>>>> you. I now get the message on my local page: >>>>>>>> >>>>>>>> >>>>>>>> Connected. Waiting for data. Last Updated 4 August 2024, 23:00:00 >>>>>>>> >>>>>>>> I've been reading over some threads of people having the same issue >>>>>>>> but those fixes are not working for me. Thoughts? >>>>>>>> >>>>>>>> On Friday, August 2, 2024 at 4:01:58 PM UTC-4 Stefanos Kalaitzis >>>>>>>> wrote: >>>>>>>> >>>>>>>>> >>>>>>>>> Try this in weewx.conf :** but be careful with the unit_system >>>>>>>>> [[MQTT]] >>>>>>>>> topic = your_topic >>>>>>>>> unit_system = METRICWX >>>>>>>>> binding = loop >>>>>>>>> aggregation = aggregate >>>>>>>>> log_success = false >>>>>>>>> log_failure = true >>>>>>>>> server_url = mqtt://broker.hivemq.com:1883 >>>>>>>>> >>>>>>>>> [[[inputs]]] >>>>>>>>> [[[[windSpeed]]]] >>>>>>>>> units = km_per_hour >>>>>>>>> [[[[windGust]]]] >>>>>>>>> units = km_per_hour >>>>>>>>> >>>>>>>>> In belchertown stanza : >>>>>>>>> >>>>>>>>> >>>>>>>>> #--- MQTT Websockets (for Real Time Streaming) Options --- >>>>>>>>> mqtt_websockets_enabled = 1 >>>>>>>>> >>>>>>>>> mqtt_websockets_host = broker.hivemq.com >>>>>>>>> mqtt_websockets_port = 8884 >>>>>>>>> mqtt_websockets_ssl = 1 >>>>>>>>> mqtt_websockets_topic = yourtopic/loop >>>>>>>>> # disconnect_live_website_visitor = 1800000 >>>>>>>>> >>>>>>>>> **Change only the topic and the unit system you are using. Because >>>>>>>>> i am writing from mobile please forgive me if something is strange to >>>>>>>>> your >>>>>>>>> eyes. >>>>>>>>> >>>>>>>>> Στις Παρ 2 Αυγ 2024, 21:42 ο χρήστης vince <[email protected]> >>>>>>>>> έγραψε: >>>>>>>>> >>>>>>>>>> You're probably overthinking. It's really very simple. You >>>>>>>>>> don't need SSL if you're just going to run on your LAN. You likely >>>>>>>>>> don't >>>>>>>>>> even need to password protect it either if you are LAN only. >>>>>>>>>> >>>>>>>>>> See the example starting at line 72 of >>>>>>>>>> https://github.com/vinceskahan/weewx-odds-and-ends/blob/master/install-belchertown-websockets >>>>>>>>>> >>>>>>>>>> for the minimal mosquitto MQTT server setup that works for me. >>>>>>>>>> >>>>>>>>>> On Friday, August 2, 2024 at 10:56:59 AM UTC-7 M&M wrote: >>>>>>>>>> >>>>>>>>>>> I've read a bunch about MQTT, Belchertown, and Weewx so I >>>>>>>>>>> thought I would able to get this working. From the pages I read on >>>>>>>>>>> github >>>>>>>>>>> and such, it didn't seem like it took a lot of configuration to >>>>>>>>>>> mosquitto >>>>>>>>>>> to get it working. From the links I posted above that I followed, >>>>>>>>>>> it >>>>>>>>>>> didn't seem that I needed to have SSL certs working yet to get it >>>>>>>>>>> working >>>>>>>>>>> locally. I figured I would do that first before venturing out to >>>>>>>>>>> get this >>>>>>>>>>> working on a website. So I'll go back and see what I can configure >>>>>>>>>>> to get >>>>>>>>>>> the certs added to my conf files. >>>>>>>>>>> >>>>>>>>>>> Do you have any websites that you suggest to use to get this >>>>>>>>>>> working? I feel like I'm close. >>>>>>>>>>> >>>>>>>>>>> On Friday, August 2, 2024 at 8:41:28 AM UTC-4 [email protected] >>>>>>>>>>> wrote: >>>>>>>>>>> >>>>>>>>>>>> I see you haven't done much research. >>>>>>>>>>>> If you want to understand this and get the Belchertown skin to >>>>>>>>>>>> work, you need to do some. >>>>>>>>>>>> A default mosquitto.conf isn't going to work as you want. >>>>>>>>>>>> You will likely need SSL certs in order to have websockets work >>>>>>>>>>>> via the internet vs local LAN. >>>>>>>>>>>> You should have writing to mosquitto password protected, but >>>>>>>>>>>> allow anonymous reading. >>>>>>>>>>>> >>>>>>>>>>>> When MQTT/Websockets works, it is great. Getting there requires >>>>>>>>>>>> a passing familiarity with the care and feeding of mosquitto. >>>>>>>>>>>> >>>>>>>>>>>> On Thursday, August 1, 2024 at 11:38:28 PM UTC-4 M&M wrote: >>>>>>>>>>>> >>>>>>>>>>>>> Where can I find out if I have acl? >>>>>>>>>>>>> >>>>>>>>>>>>> My mosquitto.conf file looks a bit different. I didn't change >>>>>>>>>>>>> any of it after it was installed besides the two listener lines. >>>>>>>>>>>>> It looks >>>>>>>>>>>>> like this: >>>>>>>>>>>>> >>>>>>>>>>>>> pi@raspberrypi:~ $ more /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 >>>>>>>>>>>>> >>>>>>>>>>>>> listener 1883 >>>>>>>>>>>>> listener 9001 >>>>>>>>>>>>> protocol websockets >>>>>>>>>>>>> >>>>>>>>>>>>> On Thursday, August 1, 2024 at 9:38:48 AM UTC-4 >>>>>>>>>>>>> [email protected] wrote: >>>>>>>>>>>>> >>>>>>>>>>>>>> Do you have an acl and does it resemble this? >>>>>>>>>>>>>> # Allow anonymous access to the sys >>>>>>>>>>>>>> topic read $SYS/# >>>>>>>>>>>>>> >>>>>>>>>>>>>> # Allow anonymous to read weather >>>>>>>>>>>>>> topic read weather/# >>>>>>>>>>>>>> topic read tester/# >>>>>>>>>>>>>> >>>>>>>>>>>>>> # weewx readwrite to the loop >>>>>>>>>>>>>> user weewx >>>>>>>>>>>>>> topic weather/# >>>>>>>>>>>>>> topic tester/# >>>>>>>>>>>>>> >>>>>>>>>>>>>> Did you create a password for the weewx user (not the linux >>>>>>>>>>>>>> user, the mqtt user)? >>>>>>>>>>>>>> >>>>>>>>>>>>>> Does your mosquitto conf file resemble this? >>>>>>>>>>>>>> persistence false >>>>>>>>>>>>>> allow_anonymous true >>>>>>>>>>>>>> password_file /etc/mosquitto/pwfile >>>>>>>>>>>>>> acl_file /etc/mosquitto/acl >>>>>>>>>>>>>> # Insecure mqtt to localhost only, and secure mqtt >>>>>>>>>>>>>> listener 1883 >>>>>>>>>>>>>> listener 8883 >>>>>>>>>>>>>> certfile /etc/mosquitto/certs/cert.pem >>>>>>>>>>>>>> cafile /etc/mosquitto/certs/chain.pem >>>>>>>>>>>>>> keyfile /etc/mosquitto/certs/privkey.pem >>>>>>>>>>>>>> protocol mqtt >>>>>>>>>>>>>> >>>>>>>>>>>>>> # websockets >>>>>>>>>>>>>> listener 8080 >>>>>>>>>>>>>> certfile /etc/mosquitto/certs/cert.pem >>>>>>>>>>>>>> cafile /etc/mosquitto/certs/chain.pem >>>>>>>>>>>>>> keyfile /etc/mosquitto/certs/privkey.pem >>>>>>>>>>>>>> protocol websockets >>>>>>>>>>>>>> On Wednesday, July 31, 2024 at 11:47:46 PM UTC-4 M&M wrote: >>>>>>>>>>>>>> >>>>>>>>>>>>>>> I checked mosquitto.conf and it has "listener 1883" in it. >>>>>>>>>>>>>>> I also disabled my pihole and checked that my raspberry pi is >>>>>>>>>>>>>>> listening on >>>>>>>>>>>>>>> port 1883. >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> On Friday, July 26, 2024 at 11:23:25 PM UTC-4 M&M wrote: >>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> I checked journalctl and now I'm seeing this error: >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> Jul 26 23:16:30 raspberrypi weewxd[1141]: ERROR >>>>>>>>>>>>>>>> user.ambientweatherapi: AmbientAPI get_devices() returned >>>>>>>>>>>>>>>> empty dict >>>>>>>>>>>>>>>> Jul 26 23:16:30 raspberrypi weewxd.py[1141]: >>>>>>>>>>>>>>>> ambientweatherapi driver encountered an error. >>>>>>>>>>>>>>>> Jul 26 23:16:30 raspberrypi weewxd[1141]: ERROR >>>>>>>>>>>>>>>> user.ambientweatherapi: ambientweatherapi driver encountered >>>>>>>>>>>>>>>> an error. >>>>>>>>>>>>>>>> Jul 26 23:16:30 raspberrypi weewxd.py[1141]: Error caught >>>>>>>>>>>>>>>> was: AmbientAPI get_devices() returned empty dict >>>>>>>>>>>>>>>> Jul 26 23:16:30 raspberrypi weewxd[1141]: ERROR >>>>>>>>>>>>>>>> user.ambientweatherapi: Error caught was: AmbientAPI >>>>>>>>>>>>>>>> get_devices() returned >>>>>>>>>>>>>>>> empty dict >>>>>>>>>>>>>>>> Jul 26 23:16:30 raspberrypi weewxd.py[1141]: >>>>>>>>>>>>>>>> ambientweatherapi driver had an error sending data to weewx. >>>>>>>>>>>>>>>> Jul 26 23:16:30 raspberrypi weewxd[1141]: ERROR >>>>>>>>>>>>>>>> user.ambientweatherapi: ambientweatherapi driver had an error >>>>>>>>>>>>>>>> sending data >>>>>>>>>>>>>>>> to weewx. >>>>>>>>>>>>>>>> Jul 26 23:16:30 raspberrypi weewxd.py[1141]: Error caught >>>>>>>>>>>>>>>> was: Previous error occured, skipping packet build. >>>>>>>>>>>>>>>> Jul 26 23:16:30 raspberrypi weewxd[1141]: ERROR >>>>>>>>>>>>>>>> user.ambientweatherapi: Error caught was: Previous error >>>>>>>>>>>>>>>> occured, skipping >>>>>>>>>>>>>>>> packet build. >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>> On Friday, July 26, 2024 at 11:20:51 PM UTC-4 M&M wrote: >>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>> Making some progress. I am back to having weewx running >>>>>>>>>>>>>>>>> and I now have mosquito running as well. I was able to test >>>>>>>>>>>>>>>>> that service >>>>>>>>>>>>>>>>> by mosquitto_sub and mosquitto_pub which worked by sending >>>>>>>>>>>>>>>>> "hello world". >>>>>>>>>>>>>>>>> However when I check my local Belchertown page, it now says >>>>>>>>>>>>>>>>> this at the top: >>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>> Failed connecting to the weather station. Please try again >>>>>>>>>>>>>>>>> later! Last Updated 26 July 2024, 23:10:00 >>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>> On Friday, July 26, 2024 at 2:02:17 PM UTC-4 M&M wrote: >>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>> Oh thats right! I edited the /etc/default/locales file. >>>>>>>>>>>>>>>>>> I changed it from en_GB.UTF-8 to en_US.UTF-8 since I was >>>>>>>>>>>>>>>>>> trying to fix the >>>>>>>>>>>>>>>>>> time in Belchertown skin to show a 12h time format. I >>>>>>>>>>>>>>>>>> believe I fixed it >>>>>>>>>>>>>>>>>> and for some reason, i decided to edit the locales file. >>>>>>>>>>>>>>>>>> I'll change that >>>>>>>>>>>>>>>>>> back when I get to that system. >>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>> Thanks. I believe that is what will fix it. >>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>> On Friday, July 26, 2024 at 12:17:42 PM UTC-4 vince wrote: >>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>> https://stackoverflow.com/questions/14547631/python-locale-error-unsupported-locale-settling >>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>> Have you messed with system locale at the os level or >>>>>>>>>>>>>>>>>>> edited it in some weewx or mqtt config file ? There have >>>>>>>>>>>>>>>>>>> been some skeletal >>>>>>>>>>>>>>>>>>> reports about this over the years but I've never really >>>>>>>>>>>>>>>>>>> understood the >>>>>>>>>>>>>>>>>>> explanations. >>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>> On Friday, July 26, 2024 at 3:41:42 AM UTC-7 Mark Jenks >>>>>>>>>>>>>>>>>>> wrote: >>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>> Make sure MQTT is running correctly. You can test it >>>>>>>>>>>>>>>>>>>> via CLI. This page goes into configuring a cert, you >>>>>>>>>>>>>>>>>>>> can stop reading >>>>>>>>>>>>>>>>>>>> at that point. >>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>> https://medium.com/gravio-edge-iot-platform/how-to-set-up-a-mosquitto-mqtt-broker-securely-using-client-certificates-82b2aaaef9c8 >>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>> On Thursday, July 25, 2024 at 10:27:54 PM UTC-5 M&M >>>>>>>>>>>>>>>>>>>> wrote: >>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>> Also I tried commenting out all of the MQTT lines in >>>>>>>>>>>>>>>>>>>>> weewx.conf so that I could get the service running again >>>>>>>>>>>>>>>>>>>>> but it isn't >>>>>>>>>>>>>>>>>>>>> running at all. Giving me the same error as I posted >>>>>>>>>>>>>>>>>>>>> above. >>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>> On Thursday, July 25, 2024 at 11:11:15 PM UTC-4 M&M >>>>>>>>>>>>>>>>>>>>> wrote: >>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>>> I'm getting closer. Mosquito service is running but >>>>>>>>>>>>>>>>>>>>>> weewx gives me the follow error in journalctl: >>>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>>> Jul 25 22:59:55 raspberrypi weewxd[25852]: INFO >>>>>>>>>>>>>>>>>>>>>> __main__: Terminating weewx version 5.0.2 >>>>>>>>>>>>>>>>>>>>>> Jul 25 22:59:55 raspberrypi systemd[1]: >>>>>>>>>>>>>>>>>>>>>> weewx.service: Succeeded. >>>>>>>>>>>>>>>>>>>>>> Jul 25 22:59:55 raspberrypi systemd[1]: Stopped WeeWX. >>>>>>>>>>>>>>>>>>>>>> Jul 25 22:59:55 raspberrypi systemd[1]: >>>>>>>>>>>>>>>>>>>>>> weewx.service: Consumed 3h 44min 13.462s CPU time. >>>>>>>>>>>>>>>>>>>>>> Jul 25 23:00:51 raspberrypi systemd[1]: Started WeeWX. >>>>>>>>>>>>>>>>>>>>>> Jul 25 23:00:53 raspberrypi weewxd[28347]: INFO >>>>>>>>>>>>>>>>>>>>>> __main__: Initializing weewxd version 5.0.2 >>>>>>>>>>>>>>>>>>>>>> Jul 25 23:00:53 raspberrypi weewxd[28347]: INFO >>>>>>>>>>>>>>>>>>>>>> __main__: Command line: /usr/share/weewx/weewxd.py >>>>>>>>>>>>>>>>>>>>>> /etc/weewx/weewx.conf >>>>>>>>>>>>>>>>>>>>>> Jul 25 23:00:53 raspberrypi weewxd[28347]: Traceback >>>>>>>>>>>>>>>>>>>>>> (most recent call last): >>>>>>>>>>>>>>>>>>>>>> Jul 25 23:00:53 raspberrypi weewxd[28347]: File >>>>>>>>>>>>>>>>>>>>>> "/usr/share/weewx/weewxd.py", line 265, in <module> >>>>>>>>>>>>>>>>>>>>>> Jul 25 23:00:53 raspberrypi weewxd[28347]: main() >>>>>>>>>>>>>>>>>>>>>> Jul 25 23:00:53 raspberrypi weewxd[28347]: File >>>>>>>>>>>>>>>>>>>>>> "/usr/share/weewx/weewxd.py", line 107, in main >>>>>>>>>>>>>>>>>>>>>> Jul 25 23:00:53 raspberrypi weewxd[28347]: >>>>>>>>>>>>>>>>>>>>>> weewx_root, user_module = >>>>>>>>>>>>>>>>>>>>>> weeutil.startup.initialize(config_dict) >>>>>>>>>>>>>>>>>>>>>> Jul 25 23:00:53 raspberrypi weewxd[28347]: File >>>>>>>>>>>>>>>>>>>>>> "/usr/share/weewx/weeutil/startup.py", line 67, in >>>>>>>>>>>>>>>>>>>>>> initialize >>>>>>>>>>>>>>>>>>>>>> Jul 25 23:00:53 raspberrypi weewxd[28347]: >>>>>>>>>>>>>>>>>>>>>> importlib.import_module('user.extensions') >>>>>>>>>>>>>>>>>>>>>> Jul 25 23:00:53 raspberrypi weewxd[28347]: File >>>>>>>>>>>>>>>>>>>>>> "/usr/lib/python3.9/importlib/__init__.py", line 127, in >>>>>>>>>>>>>>>>>>>>>> import_module >>>>>>>>>>>>>>>>>>>>>> Jul 25 23:00:53 raspberrypi weewxd[28347]: return >>>>>>>>>>>>>>>>>>>>>> _bootstrap._gcd_import(name[level:], package, level) >>>>>>>>>>>>>>>>>>>>>> Jul 25 23:00:53 raspberrypi weewxd[28347]: File >>>>>>>>>>>>>>>>>>>>>> "<frozen importlib._bootstrap>", line 1030, in >>>>>>>>>>>>>>>>>>>>>> _gcd_import >>>>>>>>>>>>>>>>>>>>>> Jul 25 23:00:53 raspberrypi weewxd[28347]: File >>>>>>>>>>>>>>>>>>>>>> "<frozen importlib._bootstrap>", line 1007, in >>>>>>>>>>>>>>>>>>>>>> _find_and_load >>>>>>>>>>>>>>>>>>>>>> Jul 25 23:00:53 raspberrypi weewxd[28347]: File >>>>>>>>>>>>>>>>>>>>>> "<frozen importlib._bootstrap>", line 986, in >>>>>>>>>>>>>>>>>>>>>> _find_and_load_unlocked >>>>>>>>>>>>>>>>>>>>>> Jul 25 23:00:53 raspberrypi weewxd[28347]: File >>>>>>>>>>>>>>>>>>>>>> "<frozen importlib._bootstrap>", line 680, in >>>>>>>>>>>>>>>>>>>>>> _load_unlocked >>>>>>>>>>>>>>>>>>>>>> Jul 25 23:00:53 raspberrypi weewxd[28347]: File >>>>>>>>>>>>>>>>>>>>>> "<frozen importlib._bootstrap_external>", line 790, in >>>>>>>>>>>>>>>>>>>>>> exec_module >>>>>>>>>>>>>>>>>>>>>> Jul 25 23:00:53 raspberrypi weewxd[28347]: File >>>>>>>>>>>>>>>>>>>>>> "<frozen importlib._bootstrap>", line 228, in >>>>>>>>>>>>>>>>>>>>>> _call_with_frames_removed >>>>>>>>>>>>>>>>>>>>>> Jul 25 23:00:53 raspberrypi weewxd[28347]: File >>>>>>>>>>>>>>>>>>>>>> "/etc/weewx/bin/user/extensions.py", line 18, in <module> >>>>>>>>>>>>>>>>>>>>>> Jul 25 23:00:53 raspberrypi weewxd[28347]: >>>>>>>>>>>>>>>>>>>>>> locale.setlocale(locale.LC_ALL, '') >>>>>>>>>>>>>>>>>>>>>> Jul 25 23:00:53 raspberrypi weewxd[28347]: File >>>>>>>>>>>>>>>>>>>>>> "/usr/lib/python3.9/locale.py", line 610, in setlocale >>>>>>>>>>>>>>>>>>>>>> Jul 25 23:00:53 raspberrypi weewxd[28347]: return >>>>>>>>>>>>>>>>>>>>>> _setlocale(category, locale) >>>>>>>>>>>>>>>>>>>>>> Jul 25 23:00:53 raspberrypi weewxd[28347]: >>>>>>>>>>>>>>>>>>>>>> locale.Error: unsupported locale setting >>>>>>>>>>>>>>>>>>>>>> Jul 25 23:00:53 raspberrypi systemd[1]: >>>>>>>>>>>>>>>>>>>>>> weewx.service: Main process exited, code=exited, >>>>>>>>>>>>>>>>>>>>>> status=1/FAILURE >>>>>>>>>>>>>>>>>>>>>> Jul 25 23:00:53 raspberrypi systemd[1]: >>>>>>>>>>>>>>>>>>>>>> weewx.service: Failed with result 'exit-code'. >>>>>>>>>>>>>>>>>>>>>> Jul 25 23:00:53 raspberrypi systemd[1]: >>>>>>>>>>>>>>>>>>>>>> weewx.service: Consumed 2.050s CPU time. >>>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>>> On Thursday, July 25, 2024 at 1:47:21 PM UTC-4 vince >>>>>>>>>>>>>>>>>>>>>> wrote: >>>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>>>> Pat's docs are authoritative for Belchertown and the >>>>>>>>>>>>>>>>>>>>>>> MQTT stuff looks ok to me. Just follow that. >>>>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>>>> https://github.com/weewx/weewx/wiki/mqtt has Tom's >>>>>>>>>>>>>>>>>>>>>>> instructions for installing the MQTT extension. You >>>>>>>>>>>>>>>>>>>>>>> can check it at least >>>>>>>>>>>>>>>>>>>>>>> minimally by running "weectl extension list" and it >>>>>>>>>>>>>>>>>>>>>>> should show up in the >>>>>>>>>>>>>>>>>>>>>>> list of installed extensions. >>>>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>>>> Your config file stuff for weewx that you posted >>>>>>>>>>>>>>>>>>>>>>> looked ok to me. >>>>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>>>> On Thursday, July 25, 2024 at 9:54:13 AM UTC-7 M&M >>>>>>>>>>>>>>>>>>>>>>> wrote: >>>>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>>>>> 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/81877241-40e9-426e-ae14-1d2d709008ecn%40googlegroups.com >>>>>>>>>> >>>>>>>>>> <https://groups.google.com/d/msgid/weewx-user/81877241-40e9-426e-ae14-1d2d709008ecn%40googlegroups.com?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 [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/af9773ed-569e-4909-b46e-2b82484b8151n%40googlegroups.com.
