#Measuring voltage spikes/sags in HA
1 messages · Page 1 of 1 (latest)
i'd say use a derivative sensor, and then check for large values
the problem is if it's not reporting to HA that fast how would it know?
derivative helper that is
if you're doing this at the HA side then the reporting interval would be the limitation
The spikes/sags only last a fraction of a second so even if I had it set to poll every second it would still be off
HA seems to be able to measure trends but not transients
that's a nice practical application of Nyquist–Shannon sampling theorem 😅
HA doesn't measure anything. It just relies on what the device reports
HA is never the bottleneck
well unless you're dealing with UPS configs then it is lol. I can't for the life of me get HA to poll faster than every 60 seconds and the addon can do 2
there's probably an integration setting you can configure then
yeah I know but when I tried to fix it like it said it's still only reporting every 60 seconds
but I imaging there's no way to measure transients?
there;'s always a way, but if you're limited to 60s intervals then using your current hardware it would not be possible no
I doubt 2 seconds would be nough either
well you haven't given much information so I can only guess
I'm using the NUT UPS addon
did you read this? https://www.home-assistant.io/integrations/nut/#data-updates
it just leads back to this https://www.home-assistant.io/common-tasks/general/#defining-a-custom-polling-interval
which I did
triggering that doesn't cause more updates?
nope
it went from 60 seconds down to 40 seconds but far from the 10 seconds I want
try this pattern
trigger: time_pattern
seconds: /10
adn remove all your other triggers
yeah just updated it
you know what I think it is working
I just wasn't seeing it because there wasn't any state change
if you hover over the line with your mouse you can check where the individual samples are
yeah it's every 10 seconds for that but I guess because power is in percent whole numbers it just sometimes doesn't change value
that makes sense
I'm just stuck since it still doesn't do what I want it to do but there's not much I can do about it. I'll have to get a shally energy monitor
I don't know if that reports the voltage spikes though
esphome + shunt sensor would also do the trick