-
Notifications
You must be signed in to change notification settings - Fork 152
temperature and heatIndex values on first boot up #36
Comments
I added this to the SendState void function. I basically doesn't send if its below 1. I'm sure something more elegant like just sending a NULL would be better but this works for me if (tempValue<1) { |
My take on that issue is to have a timer, that ensures that it doesn't send any values the first 30 sec. or so, ie. until the calibration period is done. |
Thanks for the input, After some testing I'm going to use humValue < 1 for now since it seems to be the last thing to calibrate. I'll try my hand at using a timer when I have more time. |
Same problem and try add capacitor on power line and better 5volt supply power, nothing help not know why sensor restart/softstart every day random couple times. After that i add this code in first rows sendstate function and everything works perfectly after that. T
Code just ignore 3first mqtt sends and after that sends every mqtt messages normally. |
lassivv, I get these dropouts also, on two sensornodes. It seems to be a random reset from something unknown. It's not power related as I've covered that through elimination and also adding large fiters caps (1800uF) to the 5V input of the NodeMCU's just in case. Update: |
Hello,
Whenever I unplug my sensor or it loses power, the temperature and heatIndex values default to 0 and get sent to my MQTT broker which then makes its way into Home Assistant and results in a spike in the charts.
Here's an example of what it looks like:
I tried adjusting the calibrationTime variable but that didn't work. What would be the recommended way to fix this? Is it as simple as using a counter to disregard the first few MQTT values? If it is then maybe I can try and fix it myself, but I thought there might be a better way.
The text was updated successfully, but these errors were encountered: