I have a diesel motor that I am tracking the RPM of using the AC output of the alternator. It tracks well enough, but the issue is that when the motor stops, ESPHome reports the last RPM instead of resetting to 0 RPM after some ammount of time. I was originally using Pulse_Counter and have also tried Pulse_Meter with the timeout set to 2s, but no dice, it still reports the last known RPM. I use this metric to tell when the engine has successfully started so I can disengage the starter, but I would also like to use it as an indication of the motor running as well (Currently I am using oil pressure, but would like to be able to use both)
Is there a way to count RPM and have it show 0 when there are no pulses for a time?
What config do you have?
- platform: pulse_meter
name: "Gen RPM"
id: rpm
unit_of_measurement: RPM
accuracy_decimals: 0
timeout: 1s
internal: False
pin:
number: GPIO14
inverted: false
mode:
input: true
pullup: false
filters:
- delta: 100
- timeout:
timeout: 2s
value: 0
- sliding_window_moving_average:
window_size: 5
send_every: 1
send_first_at: 1
- calibrate_linear:
- 0.0 -> 0.0
- 17300.0 -> 1820.0
I tried it with the pin inverted as true and false as I had read that it may stick if left in the wrong state with no change.