Well pump control

I already have an esphome device at a remote well pump that gives water to a livestock pasture. It controls pump house heating lights, and monitors water pressure and pump house temperature. The pump is just plugged into an outlet. So if a line breaks, the pressure will fall below the pump’s pressure switch and it will run until I turn it off.

I’d like to figure out away to allow the esphome device to also control power to the pump. Then setup automation that if pressure falls below 10 psig then power turns off.

Beyond installing another hardwired relay, is there a device that could wirelessly connect to the esphome device? I would like to install the device into the pump’s outlet. The devices would be within 2 ft from each other.

Thanks in advance,

If I correctly understood your request, you need a wireless relay. Shelly modules may help you here?

Then both integrate in the HA and HA automation controls the stuff.

Or the best way might be that you do full control with one ESPhome and perform local automation

@tilz0R I would like something like a shelley device, but I want the esphome device to handle the automation. That way if wireless to the esphome device fails for some reason, the pump will still shut off.

The only way I can currently think of how to do this is to hardwire a relay. Just interested if there are other ways to do this. May be with espnow flashed onto a device that’ll fit in an outlet???

From reliability standpoint, wire is ALWAYS better than wireless. If you can wire simple relay module, do it directly.

You can do that as well, but it’s not anyhow needed. I control all my shelly (stock firmware) devices by Esphome. Shelly has local REST api, you only have to make HTTP GET call straight from esphome device. No internet, cloud or HA needed.

          - if:
              condition:
                ...
              then:
                - http_request.get:
                    url: http://192.168.0.240/relay/0?turn=on

I disagree, especially outside.
Rodents like to eat wires, but wireless is bad dinner for them.
Wires can be cut by gardening or soil frost lift.
Long wires act like antennas picking interferences.

You still need to supply power to these devices somehow :slight_smile:

For your option to work, network must not ail or wifi connection wont work. Wiring relay to esphome is de-facto best solution.

I generally disagree. De-facto just for you.
I have power on my well and every corner of my garden. For sure I don’r run 70m of wires there to connect a relay.
In the case of OP, for few feet, probably yes.

But you still need to power the device 70m away. Wirelessly? :joy: and one will need wifi coverage there, too.

I only see complications.

I wrote I have power there. And 70m open field is not any problem for wireless coverage.

Fell free to ALWAYS run your wires. It also saves you from the headache of looking for battery operated devices, deciding between Wifi, BLE or Zigbee and so on.

Interesting, thank you for sharing. I will look into this for sure. If not on this project, its good to know for future projects. Now that I think about it I do have an external antenna on the esp32 which is mounted on the outside of the pump, due to the metal siding. I had connection issues even with a WAP within 20 ft of the pump house. So that’ll likely not allow me to use this method. I wish there was a shelley size device which can be can be controlled by low voltage, instead of line voltage.

Shelly 1 for example can be used at 12VDC or 24-48VDC.
I get 50m from my well to my house open field, but my box is made of plastic.

Yeah, but the esp32 can only handle 5 V and output 3.3 V.

Explain better what you are after, especially " controlled by low voltage".

Do you mean Shelly SW contact? If powered from DC, sw is at gnd level. Any device sharing common gnd can control that. But I don’t see sense to control one wifi device with another wifi device through wires.

Edit: For anyone reading above, it’s only valid for DC powered Shelly.
For mains (AC) powered Shelly, sw is controlled at mains live.

I’d just like a shelley like device that is just a relay with a 3 Vdc minimum coil voltage. That way I can hook it up in the outlet box. It would be easier to run a couple low voltage wires than to run 110 Vac from outlet box to esphome device box, then back to outlet box. Even cooler would be an outlet with this built in.

For now seems my only option is to install a relay in my esphome device box though. So ordered a couple relays from amazon.
Thanks for all the input though.

I happened across almost exactly what I want, at least my best option. This company has some items that could be helpful to the DIYers of the community. Even have opto-isolated realys for large loads that an esphome device can run.
https://www.functionaldevices.com/product/RIB2401B
So the outlet power will power the coil and contacts. One of the coil wires though will be routed to my esphome device with will have a latching relay. Then it’ll run back to the outlet relay.