arendst / Tasmota

Alternative firmware for ESP8266 and ESP32 based devices with easy configuration using webUI, OTA updates, automation using timers or rules, expandability and entirely local control over MQTT, HTTP, Serial or KNX. Full documentation at
https://tasmota.github.io/docs
GNU General Public License v3.0
22.02k stars 4.78k forks source link

MI32 Flora send old data from sensor for days while sensor is out of range (xsns_62_MI_ESP32.ino) #8882

Closed d0m1n1qu3 closed 3 years ago

d0m1n1qu3 commented 4 years ago

PROBLEM DESCRIPTION

A clear and concise description of what the problem is. I found out that if a MI Flora sensor is on the border from in range to out of range some pakets lost and if the battery goes down the sensor data will not arrive the ESP32. but the Tasmote will send the old known data endless until you reboot the ESP32

i could try to fix that but what to discuss this first, may be i have done a misstake ;-)

REQUESTED INFORMATION

Make sure your have performed every step and checked the applicable boxes before submitting your issue. Thank you!

- [ ] If using rules, provide the output of this command: `Backlog Rule1; Rule2; Rule3`:

Rules output here:

- [ ] Provide the output of this command: `Status 0`:

STATUS 0 output here:

- [ ] Provide the output of the Console log output when you experience your issue; if applicable:
  _(Please use_ `weblog 4` _for more debug information)_

Console output here:



### TO REPRODUCE
_Steps to reproduce the behavior:_

### EXPECTED BEHAVIOUR
_A clear and concise description of what you expected to happen._

### SCREENSHOTS
_If applicable, add screenshots to help explain your problem._

### ADDITIONAL CONTEXT
_Add any other context about the problem here._

**(Please, remember to close the issue when the problem has been addressed)**
Staars commented 4 years ago

This is a known behavior for all BLE-sensors.

d0m1n1qu3 commented 4 years ago

but it would be easy to ignore sensors which send nothing in a time window x for example 10minutes. or is it already disscused?

Staars commented 4 years ago

but it would be easy to ignore sensors which send nothing in a time window x for example 10minutes. Yes. or is it already disscused? Yes.

d0m1n1qu3 commented 4 years ago

or is it already disscused?

Yes.

where? can i join? is this function not wanted or missing time to do it? :-)

Carsten3P commented 4 years ago

imho a very good idea, tasmota should avoid sending old values over a long time without ensuring they are correct.

d0m1n1qu3 commented 4 years ago

i have made some changes .. https://github.com/d0m1n1qu3/Tasmota/tree/MI32_offline but you have now insert another approach, maybe you want to check my also :-)

Staars commented 4 years ago

A direct bridging of the sensor data messages was always a development goal. So I‘d rather will pass all messages in (near) real time to MQTT, send a the usual tele message and then simply delete the sensor data, which will not be sended again with the next tele message (unless new data arrives). If you really care about the timestamp of the last measurement, you get it automatically with the last MQTT-message. No need to add another property.

d0m1n1qu3 commented 4 years ago

ok understand. but my timestamp was only for looking how old the data is which we received via BLE to decide if we want to send them. but your approach to send every data from BLE only one per mqtt is also very nice..

Staars commented 4 years ago

I would try to implement it in the next time and then we'll see, if this is enough to fulfill the needs. My goal is to reach this with minimal code size increase, because more things are already in the pipeline.

mark078 commented 4 years ago

This has nothing directly to do with the topic, but will be read the soil moisture and fertilizer values correctly? I have two Mi Flora sensors where the two readings (Moisture & Fertility) are incorrect. On both Mi Floras I have updated the firmware to the latest version.

"Flora-65xxxx":{"Temperature":22.6,"Illuminance":39,"Moisture":1077149696,"Fertility":1080139776}

Tasmota Version | 8.3.1.6 on ESP32

Staars commented 4 years ago

No, this should be another issue. Please re-check (reflash, erase) and if this will persist, please open a new issue.

stale[bot] commented 4 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] commented 3 years ago

This issue will be auto-closed because there hasn't been any activity for a few months. Feel free to open a new one if you still experience this problem.