I’m building a sort of automatic cable winder/extender. It uses a DC motor through an H-bridge. The motor also has a rotary quadrature encoder, which is nice for feedback/monitoring.
In my mind, it makes most sense to integrate this as a cover - extend, retract, stop, see position. But I was surprised to see how little support there is for this:
- there’s a an H-bridge fan component, but I couldn’t find a cover variant. Using an H-bridge seems like a really obvious way of making a cover, is there really no support in ESPHome?
- there’s a a feedback cover component, but it seems to only have endstop support. Instead, “in all the cases the current position is approximated with the time the cover has been moving”, which is the opposite of feedback. Is there a way to replace this approximation with actual position from the encoder?
- there a PID controller for climate, but none that I could find for movement. I suppose it could be implemented as a script/automation on the encoder, but maybe there’s some smart thing done already (this is a bit of a luxury item, but since we’re on this list, why not?)
Given how obvious these use-cases are, I suspect someone has already implemented something, but I just can’t find anything. Any suggestions welcome!