I have a Sonoff S31 wifi A/C outlet with ESPHome that I am using to monitor my refrigerator. I use it to troubleshoot by monitoring the current load. When I view the current value graph over long periods, like a month, it is crashing my HA Yellow host. Sometimes it’s okay but mostly not. When initially viewing the device current attribute it seem to be updating much faster than the 60s update_interval value. I have tried very long update_interval values like 10min but it is not having any effect. It seems more like the device is sending updates as soon as the current value changes. There are constant small changes because of the compressor motor. Not sure what to do. Perhaps filtering the current sensor to remove the small fluctuations but the update interval is not doing what I expected.
Is your sensor data being stored by regular time slices or by changes in value? Is your sensor resolution to poofteenth decimal places? Your database may be overloaded with too many data points, hence causing your graphing to crash.
Stepping back: why the need to monitor your refrigerator so closely? Is it having problems?
Post your code (formatted in forum </> formatting please) and we can try to see where the issue is.
Yes it is having problems and has been for a while. Whirlpool French door reefers of this vintage (2014) have a problem with freezing up. There was a class action lawsuit over this. Watching the current draw to see how often the compressor runs and when the defrost cycle is active.
Excessive data points is exactly what I am thinking.
Update:
I found this filter suggestion in the ESPHome CSE7766 platform documents. This is working correctly.
sensor:
- platform: wifi_signal
name: "Mon1 wifi_signal"
update_interval: 60s
- platform: cse7766
current:
name: "Mon1 current"
accuracy_decimals: 1
filters:
- throttle_average: ${update_interval}
voltage:
name: "Mon1 voltage"
accuracy_decimals: 1
filters:
- throttle_average: ${update_interval}
power:
name: "Mon1 power"
accuracy_decimals: 1
filters:
- throttle_average: ${update_interval}
id: mon1_power
- platform: integration
name: "Mon1 energy"
sensor: mon1_power
time_unit: h
unit_of_measurement: kWh
filters:
- multiply: 0.001
- throttle_average: ${update_interval}
That yaml may solve your data collection issue, but check the common faults for freezing which are poor door seals, bad or sticky thermostat, inadequate defrosting, and insufficient internal airflow past the thermostat to accurately monitor temperatures, often caused by recirculating fan failure, or just having too much stuff in the fridge. Some people treat them as a storage cupboard, and this is reflected in the power consumption figures.
Not sure about your class action - just general comment.
I haven’t read up on filters lately, but there seem to be quite a few options in the documents.
I see you have an 60 second interval on your WiFi signal sensor, but not on your cse7766 and power monitor sensors. Is that deliberate?