Closed mrdc closed 5 years ago
Hi, typically the history plugin will average all incoming mqtt temperature messages within a 10min intervall and so it will add one entry every 10 minutes to the history. If no data was received in the last 10min intervall, the default behavior of fakegato-history is to just repeat the last entry to prevent holes in the graph. I assume this happens here. Please make sure that your device really sends messages continuously (during night) at least every 10min.
You can disable this repetition by the following config line (recommenced):
"history": {"autoRepeat": false}
Alternatively, you can disable the complete timer (no averaging and no data repetition) by:
"history": {"autoTimer": false}
Attention: In this case you may flood the history with a lot of measurements. But these will reflect the original mqtt messages. Good for debugging and to see what’s going on.
"history": {"autoRepeat": false}
Should I also keep "history": "true"
in my config?
Like this:
"history": { "history": "true", "autoRepeat": false}
Not necessary. If you define history as an object, it’s implicit true
.
@tobekas
I've enabled autoRepeat
but again I see the same values at night for many hours - do I have such a stable weather during sleep time or it can be an issues with MQTT: old data is fetched by mqttthing
as sensor is not updating a MQTT topic with new measurements?
Can you paste your config.json? Do you use the latest version of this plugin? For me personally, this configuration works as expected. What kind of sensor do you have? Does it really stop publishing messages at night? For further debugging, you can install mqtt.fx, which can also subscribe to your temperature topic. So you will see the origin messages.
Yes, I'm using the latest version of Mqttthing - 1.0.45. Hardware setup: ESP-01S with ESP Easy + DS18B20. ESP-01S sends temp values via MQTT to RPi3b+ with Mosquitto on it. I have no clue if it really stops sending at night - maybe there is no new values and Mqttthing fetches old values before ESP-01S send a new one.
For further debugging, you can install mqtt.fx, which can also subscribe to your temperature topic.
Yes, that's what I want to do.
Config:
{
"accessory": "mqttthing",
"type": "temperatureSensor",
"name": "OutsideTemp",
"url": "mqtt://192.168.1.35",
"username": "admin",
"password": "admin",
"topics": {
"getCurrentTemperature": "/ESP_Easy/OutsideTemp/Temperature"
},
"history": {
"history": "true",
"autoRepeat": false
}
},
With "autoRepeat": false
I receive correct measurements.
Hello,
I'm using mqttthing v1.0.45 and sometimes see that in EVE history values for outside temp are the same for 6-8 hours. I've also check it in json - the same values for many hours. Strange that it happens during night time: