Hi there! It's a long time I didn't visit here.
I have a question regarding MQTT QoS. Even if, in a normal setup (with correct home wifi connexion), this shall never be necessary, I wonder how to set QoS. My concern is related to rain: it's the only measurement that should be sent one time and only one time to weewx (to avoid any risks of couting 2 times a value). Today, I have QoS set to 0 for rain (sensor to broker, broker to Weewx)...only risk might be to miss some packet in case of poor transmission. I wonder if we could improve this: Sensor side: Adafruit mqtt does not provide QoS2 in the library: we could use QoS1 On WeeWX driver side, we currrently use QoS 0, but maybe we shall use QoS 2 ? Could we associate QoS1 on pub + QoS2 on sub ? Does this work ? If we use QoS 1 on weewx side, is there any risks to receive a rain packet more than 1 time? Le mercredi 6 juin 2018 09:25:14 UTC+2, Franz a écrit : > > Hello, > Thank you for the tips. I will test. > Franz > > Am Montag, 4. Juni 2018 16:09:13 UTC+2 schrieb mwall: >> >> >> >> On Saturday, June 2, 2018 at 3:01:58 AM UTC-4, Franz wrote: >>> >>> Hello, >>> Ask a question about wxMesh / MQTT / Rain Sensor. >>> My home rain sensor sends one pulse per spoon (3.4 ml) of rain over MQTT >>> to weewx. >>> - >>> The ESP8266 ... sends ... >>> Adafruit_MQTT_Publish rain_pub = Adafruit_MQTT_Publish (& mqtt, "weewx / >>> rain", 1); >>> ... >>> rain_pub.publish (dregm); // value as char "0.034" >>> >>> About 3 spoons correspond to 1 mm of rain per m2. My hardware does not >>> provide hourly or daily rainfall. The skin (blue leather sofa) displays the >>> following values for rain on an impulse: >>> current weather >>> Rain - rate 0.9 mm / h - wrong >>> Highs and lows of the day >>> Today's rainfall: 0.3 mm - correct! >>> Max.Rain rate: 1.4 mm / h 18:17:57 - wrong >>> One day later, in the "Rain (total hour)", 35 mm of rain is shown. >>> >> >> what values do you expect to see for rain rate? >> >> the default algorithm is to use the rainfall in the past time period, >> normalized to a one hour interval. the default time period is 15 minutes. >> >> >> >>> Question: How can I positively influence the automatic summation of >>> rainfall? >>> Where can I change the internal formula for summing the Rain Rate, Max. >>> Rain Rate? >>> or what value do I have to send per impulse? >>> >> >> >> rain rate is calculated by StdWXCalculate. >> >> to change the default time period used for normalization, do this: >> >> [StdWXCalculate] >> rain_period = 900 # seconds >> >> to change the algorithm, derive your own service from StdWXCalculate then >> install it as a weewx service *after* StdWXCalculate. >> >> >
