I have a remote site that I want to connect to my home network using MQTT
and utilize minimal data transfer.
The plan is to have weewx on one Raspberry Pi Zero at the remote site
receiving the data from the weather station, archive it and publish to a
MQTT broker using mwall's MQTT uploader. The MQTT broker will be
Mosquitto running on my home network. Finally, I want to have another
instance of weewx running on a raspberry pi on my home network using Bill
Morrow's MQTT driver as input.
Right now I am trying to test the arrangement using multiple PI's on my
home network in a simulation.
I am able to successfully publish the data from my local station to the
MQTT broker running on a different PI, and subscribe to it with mosquitto
tool mosquitto-sub - so we know publishing works..
Where things fall apart is that I cannot get Bill Morrow's MQTT driver tor
work. Weewx starts OK, but it just waits for an archive loop and nothing
else happens.
The following is the log output from starting weewx.
Sep 08 14:37:12 testpi systemd[1]: Starting LSB: weewx weather system...
Sep 08 14:37:13 testpi weewx[21197]: engine: Initializing weewx version
3.8.2
Sep 08 14:37:13 testpi weewx[21197]: engine: Using Python 2.7.13 (default,
Nov 24 2017, 17:33:09)
[GCC 6.3.0 20170516]
Sep 08 14:37:13 testpi weewx[21197]: engine: Platform
Linux-4.14.50+-armv6l-with-debian-9.4
Sep 08 14:37:13 testpi weewx[21197]: engine: Locale is 'en_CA.UTF-8'
Sep 08 14:37:13 testpi weewx[21197]: engine: pid file is /var/run/weewx.pid
Sep 08 14:37:13 testpi weewx[21186]: Starting weewx weather system: weewx.
Sep 08 14:37:13 testpi systemd[1]: Started LSB: weewx weather system.
Sep 08 14:37:13 testpi weewx[21201]: engine: Using configuration file
/etc/weewx/weewx.conf
Sep 08 14:37:13 testpi weewx[21201]: engine: Loading station type wxMesh
(user.wxMesh)
Sep 08 14:37:14 testpi weewx[21201]: wxMesh: MQTT host is localhost
Sep 08 14:37:14 testpi weewx[21201]: wxMesh: MQTT topic is weather
Sep 08 14:37:14 testpi weewx[21201]: wxMesh: MQTT client is wxclient
Sep 08 14:37:14 testpi weewx[21201]: wxMesh: polling interval is 1.0
Sep 08 14:37:14 testpi weewx[21201]: wxMesh: label map is {'dateTime':
'dateTime', 'outTemp': 'outTemp', 'outHumidity': 'outHumidity', 'inTemp':
'inTemp', 'i
Sep 08 14:37:14 testpi weewx[21201]: engine: StdConvert target unit is 0x1
Sep 08 14:37:14 testpi weewx[21201]: wxcalculate: The following values will
be calculated: barometer=prefer_hardware, windchill=prefer_hardware,
dewpoint=pre
Sep 08 14:37:14 testpi weewx[21201]: wxcalculate: The following algorithms
will be used for calculations: altimeter=aaNOAA, maxSolarRad=RS
Sep 08 14:37:14 testpi weewx[21201]: engine: Archive will use data binding
wx_binding
Sep 08 14:37:14 testpi weewx[21201]: engine: Record generation will be
attempted in 'hardware'
Sep 08 14:37:14 testpi weewx[21201]: engine: Using archive interval of 300
seconds (specified in weewx configuration)
Sep 08 14:37:14 testpi weewx[21201]: engine: Using binding 'wx_binding' to
database 'weewx.sdb'
Sep 08 14:37:14 testpi weewx[21201]: manager: Starting backfill of daily
summaries
Sep 08 14:37:14 testpi weewx[21201]: restx: StationRegistry: Registration
not requested.
Sep 08 14:37:14 testpi weewx[21201]: restx: Wunderground: Posting not
enabled.
Sep 08 14:37:14 testpi weewx[21201]: restx: PWSweather: Posting not enabled.
Sep 08 14:37:14 testpi weewx[21201]: restx: CWOP: Posting not enabled.
Sep 08 14:37:14 testpi weewx[21201]: restx: WOW: Posting not enabled.
Sep 08 14:37:14 testpi weewx[21201]: restx: AWEKAS: Posting not enabled.
Sep 08 14:37:14 testpi weewx[21201]: restx: MQTT: service version is 0.18
Sep 08 14:37:14 testpi weewx[21201]: engine: Starting up weewx version 3.8.2
Sep 08 14:37:14 testpi weewx[21201]: engine: Starting main packet loop.
The following is the wxMesh section of the weewx.conf file.
[wxMesh]
driver = user.wxMesh
# MQTT specifics
host = localhost # MQTT broker hostname
username = XXXXXXX # MQTT broker user name. Assumption is your
broker requires authentication
password = XXXXXXXX
topic = weather # topic is all weather (indoor and outdoor, e.g.)
poll_interval = 1
[[label_map]]
dateTime = dateTime
outTemp = outTemp
outHumidity = outHumidity
inTemp = inTemp
inHumidity = inHumidity
barometer = barometer
I am not sure about the following things in the wxMesh section of the
weewx.conf file
1. Is the topic "weather" correct? When I subscribe to the feed using
mosquitto-sub the correct syntax is "weather/#"
2. In the MQTT uploader I can select "individual" or "aggregate" records
to upload. What does the MQTT input driver expect?
Any help from Bill or anyone else would be appreciated.
Louis
--
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].
For more options, visit https://groups.google.com/d/optout.