Coder Social home page Coder Social logo

Comments (5)

bellrichm avatar bellrichm commented on August 17, 2024

I would agree that the messages being ignored are probably archive records mixed in with the loop packets. That check was added because someone else had the same issue and it was causing havoc. I believe they stopped publishing the archive records with their loop data.

As for the missing data, set debug=1 and restart WeeWX. Let it run for at least one archive period. The log will be huge, but it will show what MQTTSubscribe is receiving and how it is processing it.

rich

from weewx-mqttsubscribe.

bellrichm avatar bellrichm commented on August 17, 2024

Ah, looks like you need to rename the incoming fields. For example, inside temperature is coming in as inTemp_F and WeeWX expects inTemp. Looks like anything with units has it appended.

LOOP: 2022-01-17 11:46:31 EST (1642437991) 'altimeter': 'None', 'appTemp': 'None', 'appTemp_F': '33.858463474945', 'barometer': 'None', 'barometer_inHg': '29.056', 'cloudbase': 'None', 'cloudbase_foot': '910.4963683247005', 'consBatteryVoltage_volt': '4.68', 'dateTime': '1642437991.0', 'dayET': '0.002', 'dayRain_in': '0.59', 'dewpoint': 'None', 'ET': 'None', 'extraAlarm1': '0.0', 'extraAlarm2': '0.0', 'extraAlarm3': '0.0', 'extraAlarm4': '0.0', 'extraAlarm5': '0.0', 'extraAlarm6': '0.0', 'extraAlarm7': '0.0', 'extraAlarm8': '0.0', 'forecastIcon': '7.0', 'forecastRule': '172.0', 'heatindex': 'None', 'hourRain_in': '0.11999999999999998', 'humidex': 'None', 'humidex_F': '39.4', 'inDewpoint': 'None', 'inDewpoint_F': '39.5272024650873', 'inHumidity': '31.0', 'insideAlarm': '0.0', 'inTemp_F': '71.8', 'leafWet4': '0.0', 'maxSolarRad': '397.4926116165748', 'maxSolarRad_Wpm2': '397.5643120937566', 'monthET': '0.28', 'monthRain_in': '1.06', 'outHumidity': '92.0', 'outsideAlarm1': '0.0', 'outsideAlarm2': '0.0', 'outTemp_F': '39.4', 'pressure': 'None', 'radiation_Wpm2': '139.0', 'rain24_in': '0.5800000000000003', 'rain_in': '0.0', 'rainAlarm': '0.0', 'rainRate': '0.0', 'rainRate_inch_per_hour': '0.09', 'soilLeafAlarm1': '0.0', 'soilLeafAlarm2': '0.0', 'soilLeafAlarm3': '0.0', 'soilLeafAlarm4': '0.0', 'stormRain_in': '0.59', 'stormStart': '1642395600.0', 'sunrise': '1642421700.0', 'sunset': '1642455900.0', 'txBatteryStatus': '0.0', 'usUnits': '1.0', 'UV': '0.8', 'windchill': 'None', 'windDir': 'None', 'windGust_mph': '12.0', 'windGustDir': 'None', 'windrun': 'None', 'windSpeed10_mph': '3.0', 'windSpeed_mph': '5.0', 'yearET': '0.28', 'yearRain_in': '1.06'

from weewx-mqttsubscribe.

gary-hammer avatar gary-hammer commented on August 17, 2024

Thanks for the quick reply.
So, the wifilogger2 MQTT export did not send anything to my mosquitto server. To get things ready if it does send, I'm attempting to configure using my production server mosquitto server. That is where my production weewx writes data for my website's use.
I tried using a keyword setup with no luck.
If the received data has this: "outTemp_F": "33.9", "rain_in": "0.0" what would pick outTemp_F

This is what I tried: (the formatting on github is not correct, my file is)

 unit_system = US
        [[[weather/loop]]]
		ignore = true
		[[[[outTemp_F]]]]
                     ignore = false    # opt back in for this field
                     name = outTemp

It was not successful:

weewx[22593] ERROR user.MQTTSubscribe: (Driver) MessageCallbackProvider on_message_keyword failed to find data in: topic=weather/loop and payload=b'{"dateTime": "1642471898.0", "usUnits": "1.0", "outTemp_F": "33.9", "rain_in": "0.0", "rainRate_inch_per_hour": "0.0", "barometer_inHg": "29.224", "radiation_Wpm2": "0.0", "inTemp_F": "72.3", "inHumidity": "30.0", "outHumidity": "81.0", "windSpeed_mph": "3.0", "windGust_mph": "11.0", "windGustDir": "302.0", "windDir": "333.0", "UV": "0.0", "appTemp_F": "28.180609711484486", "cloudbase_foot": "1609.5592578248302", "humidex_F": "33.9", "inDewpoint_F": "39.119299770921", "maxSolarRad_Wpm2": "0.0", "hourRain_in": "0.0", "rain24_in": "0.72", "dayRain_in": "0.72", "windSpeed10_mph": "5.4", "stormRain_in": "0.72", "dayET": "0.014", "trendIcon": "60.0", "windSpeed2": "5.8", "windGust10": "12.0", "windGustDir10": "292.0", "dewpoint_F": "29.0", "heatindex_F": "34.0", "windchill_F": "29.0", "THSW_F": "27.0", "rain15": "0.0", "bar_reduction": "0.002", "bar_calibration": "0.002", "pressure_raw": "28.756", "pressure_inHg": "28.756", "altimeter_inHg": "29.206", "stormStart": "1642395600.0"}'

from weewx-mqttsubscribe.

bellrichm avatar bellrichm commented on August 17, 2024

You definitely want 'type=json'. Keep the rest of the config snippet you have posted.
rich

from weewx-mqttsubscribe.

gary-hammer avatar gary-hammer commented on August 17, 2024

Thanks for the pointer. I forgot flatten_delimiter = ","
With that, works a treat using the MQTT feed from my main weewx machine.
WiFiLogger2 feed? Well, it seems that there is no output from the device so far.
Maybe next year...

from weewx-mqttsubscribe.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.