Andrew: Isn't the data in the REC what is written to the archive table? I have MQTT updating my homepage every 10 sec. archive table gets new data every 5 minutes.
On Friday, February 7, 2020 at 4:15:46 PM UTC-6, ed100 wrote: > > Belchertown skin is great and serves the data on website 192.168.1.200 > just fine. I just can't get MQTT to update the loops - it connects and > waits. > I have read and tried several of the things mentioned on the net but no > joy yet. > There are no error msgs that I have found. What am I missing? > > from http://192.168.1.200/weewx/belchertown/index.html > Connected. Waiting for data. Last Updated February 7, 2020, 3:22:00 PM > > belchertown: version 1.1b8 > restx: MQTT: service version is 0.19 > Initializing weewx version 4.0.0b11 > Using Python 3.7.3 (default, Apr 3 2019, 05:39:12) #012[GCC 8.2.0] > Platform Linux-4.19.93-v7l+-armv7l-with-debian-10.2 > Raspberry rpi4 > Weewx is running on 192.168.1.190 (dedicated for weather things) > webserver is running on 192.168.1.200 > pi is user on both. > > 192.168.1.200 is NAS for all my boxes, 5 raspberrys, two ubuntu boxes, two > Arduino boxes. > 192.168.1.190 is setup and running out in our yard where the windspeed, > winddir, rain, temp etc are measured. > Data is stored in an mariadb and served by ngnix running on 192.168.1.200. > > from /etc/mosquitto/conf.d/myconfig.conf on 192.168.1.200: > > persistence false > > # mqtt > listener 1883 > protocol mqtt > > # websockets > listener 9001 > protocol websockets > > allow_anonymous true > > acl_file /etc/mosquitto/acl > > log_type all > =================================================================== > from /etc/mosquitto/acl on 192.168.1.200: > # Allow anonymous access to the sys > topic read $SYS/# > > # Allow anonymous to read weather > topic weather/# > > # weewx readwrite to the loop > user pi > topic weather/# > > ========================================== > > from weewx.conf: > > station_type = BCRobotics > station_url = http://192.168.1.200 > > [[MQTT]] > server_url = mqtt://192.168.1.200:1883/ > topic = weather/loop > unit_system = US > binding = archive, loop > aggregation = aggregate > > [[Belchertown]] > skin = Belchertown > enable = true > HTML_ROOT = /var/www/html/weewx/belchertown > [[[Extras]]] > belchertown_root_url = "http://192.168.1.200" > theme = auto > theme_toggle_enabled = 1 > site_title = "Banjo's Wx Home" (Banjo is our dog, a lab -- > He checks the weather on his Ipaw.) > home_page_header = "Banjo's Wx Conditions" > mqtt_websockets_enabled = 1 > mqtt_websockets_host = "192.168.1.200" > mqtt_websockets_port = 9001 > mqtt_websockets_topic = "weather/loop" > mqtt_websockets_ssl = 0 > disconnect_live_website_visitor = 900000 > log_failure = true > log_success = true > > > ================================================================== > sudo tail -25 /var/log/mosquitto/mosquitto.log on 192.168.1.200 > 1581110894: New connection from 192.168.1.190 on port 1883. > 1581110894: New client connected from 192.168.1.190 as weewx_c7c0a139 (c1, > k60). > 1581110894: No will message specified. > 1581110894: Sending CONNACK to weewx_c7c0a139 (0, 0) > 1581110894: Received PUBLISH from weewx_c7c0a139 (d0, q0, r0, m0, > 'weather/loop/loop', ... (824 bytes)) > 1581110894: Received DISCONNECT from weewx_c7c0a139 > 1581110894: Client weewx_c7c0a139 disconnected. > > ========================================================================= > from mosquitto_sub -v -t '#' (on 192.168.1.200) > weather/loop/loop {"dateTime": "1581110268.0", "usUnits": "1.0", > "windSpeed_mph": "23.5736", "windDir": "225.0", "outTemp_F": > "48.44069175713479", "rainRate_inch_per_hour": "0.0", "pressure_inHg": > "29.537724517082214", "inTemp_F": "48.44069175713479", "inHumidity": > "40.10936680311917", "outHumidity": "40.10936680311917", "extraTemp1_F": > "29.0", "altimeter_inHg": "30.025126837815904", "appTemp_F": > "30.718254859246187", "barometer_inHg": "30.032273523343694", > "beaufort_count": "5.0", "cloudbase_foot": "5707.996577917219", > "dewpoint_F": "25.30550681429903", "heatindex_F": "48.44069175713479", > "humidex_F": "48.4406917571348", "inDewpoint_F": "25.30550681429903", > "maxSolarRad_Wpm2": "337.7856265409849", "windchill_F": > "40.906702199301414", "hourRain_in": "0.02794", "rain24_in": > "0.44704000000000005", "dayRain_in": "0.16763999999999998"} > > > ===================================================================================== > from sudo tail -f /var/log/syslog (on 192.168.1.190) > > Feb 7 15:18:23 raspberrypi weewx[10773] INFO weewx.restx: MQTT: Published > record 2020-02-07 15:18:00 CST (1581110280) > Feb 7 15:18:24 raspberrypi weewx[10773] INFO weewx.cheetahgenerator: > Generated 10 files for report Belchertown in 0.93 seconds > Feb 7 15:18:24 raspberrypi weewx[10773] INFO weewx.reportengine: Copied 2 > files to /var/www/html/weewx/belchertown > Feb 7 15:18:28 raspberrypi weewx[10773] INFO weewx.restx: MQTT: Published > record 2020-02-07 15:18:23 CST (1581110303) > Feb 7 15:18:29 raspberrypi weewx[10773] INFO weeutil.rsyncupload: rsync'd > 18 files (765,224 bytes) in 0.45 seconds > Feb 7 15:18:34 raspberrypi weewx[10773] INFO weewx.restx: MQTT: Published > record 2020-02-07 15:18:28 CST (1581110308) > Feb 7 15:18:39 raspberrypi weewx[10773] INFO weewx.restx: MQTT: Published > record 2020-02-07 15:18:33 CST (1581110313) > Feb 7 15:18:44 raspberrypi weewx[10773] INFO weewx.restx: MQTT: Published > record 2020-02-07 15:18:39 CST (1581110319) > > ======================================================================================================================================= > from sudo netstat -tulpn | grep 1883 on 192.168.1.200: > tcp 0 0 0.0.0.0:1883 0.0.0.0:* > LISTEN 567/mosquitto > tcp6 0 0 :::1883 :::* > LISTEN 567/mosquitto > > on 192.168.1.190: > tcp 0 0 0.0.0.0:1883 0.0.0.0:* > LISTEN 589/mosquitto > tcp6 0 0 :::1883 :::* > LISTEN 589/mosquitto > > -- 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/8de257b1-a39a-4507-9e81-d0019cf1d961%40googlegroups.com.
