On Friday, September 7, 2018 at 3:25:04 PM UTC-7, Tom Keffer wrote:
>
> WeeRT uses InfluxDB to store both LOOP and archive data. 
>
> The data model is discussed 
> <https://github.com/tkeffer/weert-js#weert-and-influxdb> in the README. 
>
>
I like the idea of a 'deep' packet which to me has the idea of additional 
metadata (tags) attached to it, ignoring the timestamp in ms difference due 
to influxdb speaking ms.

In my stuff, I try to remember to add have a weewx(ish) dateTime field 
intended to say when the data was sent from wherever, independent of 
whatever timestamp field the receiving software (influxdb) might attach to 
the 'meat' with whatever formatting that software speaks.

Possibly inconsistent examples of my current MQTT topics:

          #---- nodeMCU arduino publishing ds18b20 sensor values ---
     # espID indicates the source card that sent the data

# oops, no timestamp.  Doh !

#

$ mosquitto_sub -h mqtt -t esp/test
{"espID":10469339,"degF":75.425}


#---- WeatherFlow station 'air' device observations ----

# (this uses WeatherFlow API terminology)

#

$ mosquitto_sub -h mqtt -t "wf/obs/air"
{"battery": 3.52, "firmware_revision": 20, "lightning_strike_avg_distance": 
0, "lightning_strike_count": 0, "relative_humidity": 53, "report_interval": 
1, "station_pressure": 1005.0, "temperature": 23.33, "timestamp": 
1536360581}


#---- WeatherFlow station 'sky' device observations ----

# this uses WeatherFlow API terminology

# 

$ mosquitto_sub -h mqtt -t "wf/obs/sky"
{"battery": 3.47, "firmware_revision": 43, "illuminance": 83071, 
"precipitation_type": 0, "rain_accumulated": 0.0, "report_interval": 1, 
"solar_radiation": 692, "timestamp": 1536360608, "uv": 9.07, "wind_avg": 
0.44, "wind_direction": 284, "wind_gust": 1.12, "wind_lull": 0.0, 
"wind_sample_interval": 3}


#---- weewx mqtt extension published info ----
# this uses the current weewx-mqtt extension, lightly hacked so
# the values are floats, not strings
#
$ mosquitto_sub -h mqtt -t "weather/loop"
{"monthET": 0.0, "heatindex": 75.9, "outHumidity": 49.0, "dayET": 0.0, 
"maxSolarRad": 530.366762221, "consBatteryVoltage": 4.64, "monthRain": 0.0, 
"insideAlarm": 0.0, "barometer": 29.985, "dateTime": 1536360900.0, 
"stormRain": 0.0, "sunrise": 1536327360.0, "windchill": 75.9, "dewpoint": 
55.3501548838, "lowOutTemp": 75.3, "outsideAlarm1": 0.0, "altimeter": 
29.9832616326, "outsideAlarm2": 0.0, "forecastRule": 187.0, "rainAlarm": 
0.0, "inTemp": 74.0, "inHumidity": 49.0, "windSpeed10": 3.02, "hourRain": 
0.0, "yearRain": 34.02, "soilLeafAlarm2": 0.0, "windGustDir": 0.0, 
"extraAlarm1": 0.0, "extraAlarm2": 0.0, "extraAlarm3": 0.0, "extraAlarm4": 
0.0, "extraAlarm5": 0.0, "extraAlarm6": 0.0, "extraAlarm7": 0.0, 
"extraAlarm8": 0.0, "windrun": 41.0833333333, "rain": 0.0, "humidex": 
80.9056035875, "forecastIcon": 3.0, "pressure": 29.5987380092, 
"rxCheckPercent": 99.0833333333, "ET": 0.0, "soilLeafAlarm4": 0.0, 
"trendIcon": -20.0, "rainRate": 0.0, "soilLeafAlarm3": 0.0, "usUnits": 1.0, 
"soilLeafAlarm1": 0.0, "leafWet4": 0.0, "txBatteryStatus": 0.0, "yearET": 
0.0, "appTemp": 74.7472795468, "inDewpoint": 53.6117725505, "interval": 
5.0, "dayRain": 0.0, "windDir": 0.0, "outTemp": 75.9, "windSpeed": 5.0, 
"sunset": 1536374220.0, "rain24": 0.0, "windGust": 18.0, "highOutTemp": 
75.9, "cloudbase": 5035.41934459}




Reply via email to