esphome / feature-requests

ESPHome Feature Request Tracker
https://esphome.io/
417 stars 26 forks source link

Add the 1 euro filter #2084

Open MarkoPaasila opened 1 year ago

MarkoPaasila commented 1 year ago

Describe the problem you have/What new integration you would like I would like the 1 euro filter to be an option.

Please describe your use case for this integration and alternatives you've tried: This is a simple filter which - compared to existing filters - smooths well AND reacts quickly.

Additional context The linked page lists implementations in programmin languages, and also links to a demo where one can test the 1 euro filter and others - and compare them.

nagyrobi commented 1 year ago

I wish they didn't name it so stupidly.

MarkoPaasila commented 5 months ago

Arduino version: https://github.com/casiez/OneEuroFilterArduino

ssieb commented 5 months ago

What would it be used for? What are you filtering?

netweaver1970 commented 5 months ago

very interesting. Might be nice to collect standard tuning values, say room temperature readings, power monitoring readings etc .... now I'm getting from the sensors a (too) noisy signal, while I know the values can be more steady, as slowly changing.

Ideally it would be an HA option on a sensor, to apply a filter of choice with the required parameters and some sensible defaults (a bit like the decimal precision setting), already in the HA interface, BEFORE saving into the DB, as they are delivered from the -say zigbee- devices. But that would require a standard sensor attribute behaviour change in HA. Probably not going to happen anytime soon.

I guess the only thing one can easier do is then put it indeed in ESPHOME (for custom sensors). For standard sensors, one might create template/filter sensors. But that's a maintenance nightmare, as they'll then all exist 2x, once as noisy sensor and once as filtered sensor. Keeping an eye on this, hopefully someone can do the programming

MarkoPaasila commented 5 months ago

What would it be used for? What are you filtering?

I would use it for everything; at least power, temperature, humidity. Most often when you filter enough to get rid of noise, the lag becomes significant. This filter simply seems like a better filter - which would hopefully result in more accurate data while using less storage, in more responsive and accurate automations/logic. I don’t know if it would make any practical difference, but that’s the case with most incremental improvements anyway.