StyraHem / ShellyForHASS

Shelly smart home platform for Home Assistant
MIT License
615 stars 110 forks source link

[BUG] Too many state records on DB #471

Open pedrobsm opened 3 years ago

pedrobsm commented 3 years ago

Environment

Describe the bug

Since I have a Shelly 1PM controlling my heating system, my HA DB grew up exponentially. I noticed that when power consumption varies, the rate at which new state records are stored on the database goes up to 200-300 per minute. Then I noticed it happends to every current consumption sensor, on shelly 1PM and Shelly 2.5.

Steps to Reproduce

Just query the DB records for time periods when power consumption is not steady.

Expected behavior

Shouldn't the record rate be constantor at least limited?

asilgalis commented 3 years ago

Any update on this? I am having the same issue. I've had to downgrade shelly devices to 1.8.3 in order to have steady records in HA.

pedrobsm commented 3 years ago

Not really. I had to remove most of the sensor from the recorder manually on the configuration file. Still, I'me geting 10x more events than before. :/

asilgalis commented 3 years ago

@hakana has this issue been looked at?

hakana commented 3 years ago

Ii think this is the way HA working. You can change number of decimals to have lower logging. You can also exclude sensors for recorder in HA.