-
Notifications
You must be signed in to change notification settings - Fork 28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cumulative Pulse Width Sensor Request #3009
Comments
Duplicate of #3008 |
Hi ssieb why did this get closed so quickly? A cumulative pulse width sensor would be a useful general tool. |
Sorry, you created several duplicate issues and with a quick look, this appeared to be exactly the same as 3008 which you closed. |
If anyone's looking at this, then I've written a pulse_width_accumulate sensor. It works well from 20 microsecond pulses to infinity pulse lengths, (ie no microsecond buffer overflow for >72 minute pulses). Frequency is good up to 1Khz and probably beyond. I'm not so good with github so don't know how to submit it? Here's the yaml to show it working if anyone's is interested:
|
Describe the problem you have/What new integration you would like
I’m working on a solar-diverter energy monitor, where I need to add the cumulative daily on-time of a pulsing signal read by a GPIO pin. The pulse-widths to be summed are random and can be as short as 20 ms.Please describe your use case for this integration and alternatives you've tried:
I’ve tried the “Pulse Meter Sensor” but that only counts the total number of pulses. I’ve also tried the “Pulse Counter Sensor” combined with the “Integration Sensor” but again, this sensor is integrating something with respect to time, which is different to simply adding the pulse-widths. I thought I had the solution when I found the "Pulse Width Sensor" but that sensor only measures single discrete pulses, ie it doesn't accumulate.Additional context
The source code of the “Pulse Meter Sensor” looks like it’s measuring pulse-widths, but there’s no way of currently getting the daily, hourly, etc. summed up pulse-width’s. Alternatively, it looks like the "Pulse Width Sensor" functionality could be easily extendedThe text was updated successfully, but these errors were encountered: