I have a water pressure pump with controller. The controller normally displays a green LED which is solid for “on” and blinking for “pumping”. However, if the system faults, it displays int eh same spot a Red LED, blinking. The blinks indicate the cause of the fault.
The blinks can be anywhere form 1 to 10 blinks, followed by a pause, then repeat.
I would like to use a GPIO to sense the Red LED, and trigger a notification, which will include an interpretation of the blink code.
I plan to install a 4-pin opto isolator to the Red leads of the dual LED, rather than having and optical sensor.
At this point I do not know the duration of the pulses, nor the duration of the pause. I would guess the pulses are on the order of 1 second (0.5 on, 0.5 off), and the pause may be several seconds.
Once I have a pulse counter on the ESP (I will be using a Wemos D1 Pro), I can handle the automations in HA to alert me. The ESP should contain one output that indicates a trip, and a second that indicates a number from 1 to 10 to indicate how many blinks.
Are there built-in reset-able counters, or do I need to build up a Lambda filter code to do this? Any suggestions would be helpful.
We have already incorporated the ESP to monitor tank level (with a small 50kpa pressure transducer) and to monitor well pump trips (two 240V coil relays, one before the pump monitor and one after). This current project is to monitor the variable speed pressure pump that lies between the storage tank and the house pressurized lines.
ESPHome made the setup of what we have so far very simple!
Thanks in advance for any ideas!
Chuck