Christian, I wrote the wxMesh driver, and bonjour81 
<https://github.com/bonjour81> improved it with his fork. He changed it to 
publish each datum separately, and as you have noticed, reconnect. My  
version expects an MQTT publication on the topic "weather" that looks like 
this text string:

TIME:0,AMBT:37.73,BARP:1013.48,RHUM:73.44,HUMT:31.07,IRRA:7,BATV:942,PHOV:522,SYST:36.50

namely key:value pairs with a colon between the key and value, and a comma 
between the pairs. The label_map section in wxMesh config maps the keys to 
weewx values. My configuration is:

[wxMesh]
    driver = user.wxMesh

    # MQTT specifics
    host = localhost           # MQTT broker hostname
    client = XXXXX
    username = XXXXX
    password = XXXXX
    topic = weather          # topic is all weather (indoor and outdoor, 
e.g.)

    poll_interval = 1

    [[label_map]]
    TIME = dateTime
    HUMT = outTemp
    RHUM = outHumidity
    INTE = inTemp
    INHU = inHumidity
    BARP = barometer
    IRRA = radiation
    PHOV = supplyVoltage
    BATV = consBatteryVoltage
    AMBT = extraTemp1
    SYST = extraTemp2
    WDIR = windDir
    WIND = windSpeed

Not every publication has to have every possible key. I have an outdoor 
station which provides some data, and a separate indoor one which provides 
indoor temperature and humidity. The wxMesh driver subscription brings both 
in, pushes them in to baseline weewx, which magically combines them into 
loop packets.

Sparse documentation is here 
<https://github.com/morrowwm/weewxMQTT/wiki/Configuration>.

My driver does not attempt to reconnect if it loses the connection to the 
MQTT broker. That would be a nice enhancement. I don't have issues with 
staying connected on my setup, so this is only an issue when I restart 
mosqitto. 

I'm currently spending my free time building hardware (an anemometer right 
now), so haven't made improvements to wxMesh a priority.

I currently use nrf24L01 radios, but plan to switch to rfm69 for increased 
range. I could share the station software which reads the radio traffic and 
publishes MQTT with you if that would help.

Reply via email to