home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
73.56k stars 30.74k forks source link

Sauna causes flat curves in measurements #110929

Closed haraldhh closed 5 months ago

haraldhh commented 8 months ago

The problem

When I put on our electric sauna (6 kW) most of the graphs start after a while to draw horizontal straigth lines with no measurement values. I have to restart HA to get measurements working again, or wait for a few hours after which it corrects itself.

I'm now on HA Core 2024.2.1, it did the same on 2023.11 and the upgrade didn't change this.

I have rtl_433 sensors (Telldus) measuring temperature and humidity. I have a DVB-T stick listening to these and sending them via an external mosquitto server to HA. These measurements are affected.

I have BLE temp/hum sensors too, they are also affected.

I also have a bunch of Shelly-devices. They are also affected.

Since the measurements are straight lines in MQTT, BLE and Wifi-data I don't think that the problem is within the devices.

There's nothing obvious in the logs when this happens. This happens every time I use the sauna.

What version of Home Assistant Core has the issue?

core-2024.2.1

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant Core

Integration causing the issue

Don't know

Link to integration documentation on our website

No response

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

No response

Additional information

No response

joostlek commented 8 months ago

What integration is integrating the sauna?

haraldhh commented 8 months ago

There's no integration with the sauna. It's an electric stove from the -90's with two manual dials, one for temperature and one for a timer.

I measure the temperature with a Telldus 433 MHz sensor, reading it with either Telldus' Znet box or using rtl_433+mosquitto. I measure the power using a Shelly EM3 for the whole house. That's the integration.

When this happens, the garage temperature graph starts drawing a straight line and that's in a totally different building.

The sauna does shut of electric heating in the house when it runs though, opening three contactors in the electric central. No electric heating is on, so no current through these contactors. Maybe there's some spike that zaps calculations in HA for a few hours? My UPS doesn't react to any spikes though.

joostlek commented 8 months ago

This issue looks similar to https://github.com/home-assistant/core/issues/110845, but the fact that this has a completely different cause, this might be a completely different issue. But since the symptoms are the same, please follow the same steps as provided in that issue.

haraldhh commented 8 months ago

home-assistant_v2.db is 5.8 GB. I'm running in a VM with 2 GB RAM and 1 cpu.

Oh wait, could this be because I have recorder set as purge_keep_days: 60 ?

edit: I also noted that my Tasmota/ESP8266 also starts drawing flatlines from it's four ds18b20

joostlek commented 8 months ago

And please answer the other questions, do all sensors flatline? Do you see anything in the logs around that time?

haraldhh commented 8 months ago

Yes, as I wrote "There's nothing obvious in the logs when this happens. This happens every time I use the sauna.". It looks like it's all sensors actually yes.

So all 7 Telldus 433 MHz temp/humidity All xiaomi BLE sensors All Shelly power measurement sensors Tasmota / esp8266.

joostlek commented 8 months ago

Check. Please follow the debug steps given in that issue. We would need (debug) logs, etc. Did you already tell what kind of database you use?

haraldhh commented 8 months ago

home-assistant_v2.db: SQLite 3.x database

I think it's that one. Size 5.8 GB

joostlek commented 8 months ago

Oh right you told me. Did you see what I meant about logging?

haraldhh commented 8 months ago

The log downloaded from the UI starts after the flatlining started. Can I just attach the current and the previous logs here?

homeassistant-2024-02-15_2024-02-19.log

I felt the need to massage the log somewhat to protect the innocent. The flatlining occured between Feb 18 18:15 to Feb 18 20:29 when I restarted HA.

joostlek commented 8 months ago

Give it a shot. But since you know how to reproduce it, feel free to do so. That would give us more info

haraldhh commented 8 months ago

Uploaded. I can reproduce this any time, except I'm on spot prices so don't feel like starting the sauna any time. :)

The flatlining started at the end of the first log. And stopped when I restarted HA, thus logs rotated.

joostlek commented 8 months ago

Hah, understandable.

My hypothesis is that there is some kind of integration that is flooding events, way too much for the recorder integration to handle, causing the flatline.

If you use custom components, maybe try to reproduce it while booted in safe mode to rule out any custom component issues.

haraldhh commented 8 months ago

I will. Thanks.

My custom_components directory is empty. I'm using https://github.com/T3m3z/spotprices2ha

joostlek commented 8 months ago

Is that a custom card?

haraldhh commented 8 months ago

No, sorry, I don't know what to call it. Scripts that get spot prices from an API and provides entities used to avoid expensive spot price hours.

I also have apexcharts, layout-card and mini-graph-card-bundle in www/ subdir, but I don't know if these fall under "custom components". Sorry I don't know the vocabulary better.

joostlek commented 8 months ago

Oh right, it's a blueprint. I also never saw this before 😂

issue-triage-workflows[bot] commented 5 months ago

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.