Help with matthewwall / weewx-mqtt configuration

59 views
Skip to first unread message

Glen Collins

unread,
Jan 14, 2023, 9:05:28 PM1/14/23
to weewx-user
Hello all. I have setup MQTT to transmit data to a broker. I'm trying to rewrite the json transmitted so as if the data at the broker looks as though it was local to the weewx server so it can be subscribes to without modifying the json on the other side. There is not much documentation on the customization other than what's documented in the mqtt.py.

I basically want the json to the broker to look exactly like my sensor map.

    [[sensor_map]]
        windDir = wind_dir.0204.AcuriteAtlasPacket
        windSpeed = wind_speed.0204.AcuriteAtlasPacket
        outTemp = temperature.0204.AcuriteAtlasPacket
        outHumidity = humidity.0204.AcuriteAtlasPacket
        outTempBatteryStatus = battery.0204.AcuriteAtlasPacket
        rain_total = rain_total.0204.AcuriteAtlasPacket
        strikes_total = strike_count.0204.AcuriteAtlasPacket
        strike_distance = strike_distance.0204.AcuriteAtlasPacket

So when it gets to the other instance I'm running it'll do all the calculations and such on that instance rather than the one that's actually capturing the data. Is this possible?

What I'm doing is running a raspberry pi with an SDR, capturing the packets and forwarding them on to a broker. I then have the main weewx instance subscribe to the broker and grab the data. But that data has been modified by the raspberry pi instance of weewx. I just want the raspberry pi to forward and not touch the incoming data. Leaving that to my internal instance of weewx.

Thanks.

Glen Collins


Glen Collins

unread,
Jan 15, 2023, 3:18:07 AM1/15/23
to weewx-user
I was able to figure out the config parameter so the upload to broker would not add the " append_units_label" to the outgoing data. Once I did that, it all started working as I expected.

Thanks

Glen Collins

Reply all
Reply to author
Forward
0 new messages