Completing a circuit with battery switch

Hi All,

So I have an irrigation system that I’ve got working through hubitat for my main garden.

There’s a small planted area at the front of my house that is watered from a battery powered water butt pump and timer.

Cutting power to the timer/pump eg pulling the battery and reinserting kicks off the pump.

It runs off two AA batteries

My thinking is if I can get some sort of battery operated switch that I can wire in line I could then effectively control the watering through hubitat.

Does anyone have any ideas what I could use for this?

D

That's going to a be a little challenging. Battery powered devices are usually sensors. They go into very low power mode until woken up by a physical event, like when a contact sensor changes state from open to closed. Only then do they communicate on the Zigbee/Z-Wave network as transmitting data uses quite a bit of power. Most devices that are always listening for commands, like a switch or relay, are powered by 120/240vac power.

Hopefully another community member will chime in with some other ideas.

1 Like

Unfortunately, that’s what my internet searches are showing.. I thought it was going to be an easy one, but appears not :frowning:

1 Like

.. I have a microbot which I think can be controlled from a raspberry pi over Bluetooth so I guess I could wire up a physical switch and control this way but it feels clunky :grimacing:

1 Like

There are low-power (5-12v) switch options but they all require power 24/7 as they use WiFi and are even more power hungry than zigbee or z-wave. But of course, they run off 5v power so it would be easier to run wiring out to the pump in the front yard rather than running 120v AC out there. Depending on how many batteries your pump uses, you could run the pump off the same 5v supplied to the controller. Or it can act as a regular relay. If we aren't talking a very long distance, this would probably be an option.

I don't know if there is an output option but Iman (@iharyadi) has been doing some different interface options and he might have something that will work for you.

Home made Zigbee

1 Like

Was just thinking about a similar idea myself. As you found out there just isn’t a battery powered Zigbee relay. But these kind of battery powered irrigation timers attach to the garden tap, which is typically attached to the house, mine is anyway. So you can buy these magnetic contacts on Amazon similar to the magsafe on MacBooks. My thought was take one of my Xiaomi dual relays and have that close a 120 V relay. I do this now for my otherwise disconnected iSmartAlarm system to trigger the battery powered remote (which is also now mains power via an adapter).

So I would tell HE to trigger the Xiaomi relay, that would close the 120V relay attached to it, which would close contacts which are attached to the magnetic connector exposed to the outside of the house and then the other half attached to it would activate the irrigation device.

Hi, that’s for the reply - sorry I’m struggling to follow.

I have a LinkTap for my main irrigation that I’ve got working via hubitat and it’s connected to a tap.

I also have a water butt that has a battery operated pump/timer and it’s this I’m trying to find a way to trigger. If the battery is disconnected and reconnected it will trigger the pump. I’m trying to picture your suggestion but not sure I’m understanding ....

:flushed:

1 Like

Thanks Ryan - I’ll take a look

Cheers

1 Like

Here's a Xiaomi double relay. Doesn't have to be this one, take your pick. Some manufacturers have relays that are isolated from the 120v mains voltages, this one does not, but it works and it's inexpensive.

If we take the example of my security system, I needed to close a low voltage contact, similar to what you're trying to accomplish. But I couldn't attach the low voltage circuit directly to the Xiaomi relay, becuase its contacts are not isolated from the 120v circuit. This is fine if you want to turn on or off something that is 120v, but it would cause fire and smoke to use it directly with a low voltage circuit. :dizzy_face:

So instead, I use the Xiaomi Zigbee relay to send power to a relay with a 120v coil. Thus closing its contacts, which are separated from the mains voltages. This is known as dry contacts (e.g. no power passing through them).

1 Like

Thank you for the detailed response and taking the tine to draw out the diagram that’s very helpful and very much appreciated.

So you Xiaomi relay is mains powered?

It is. There are other options that are either Zigbee or Z-wave like Qubino, but these are good quality, and very affordable. You will just have to wait for about 2 weeks minimum to get one.

And you'll have to run 110 out to your garden to use any of them. I would prefer a low voltage solution as the requirements for low voltage outdoor cabling is a lot easier.

No, my idea was to keep the 110/120v inside and run the low voltage to the outside, or in this case, the no voltage wire. My thought was a magnetic contact on the outside so I can just attach the garden appliance with the mating contacts.

Not going to work for everyone and every situation. Hubduino is more cost effective in volume or where more than two relays are needed. But when you’re just in need of one or two relays, this is quick and easy for about the same total cost

Lol you guys are some deep thinkers.

In my excessive googling I keep coming across The ESP8266 and it seems that there has been some projects in which it’s running off batteries for a long time... could this be a potential option?

I also came across this which the manufacture says will run for years on a 9V battery...

Could this work? (I’m UK based so zwave frequency should be fine)

https://www.popp.eu/wp-content/uploads/2016/11/Manual_ElectricStrikeLockControl_POPP_en.pdf

Unfortunately, the ESP8266 is not really an option due to its constant power drain on the battery. In the Hackaday example you linked above, the code puts the ESP8266 into a deep sleep mode to conserve power. Doing so shuts down the WiFi connection, and thus there is no way for the device to receive commands from Hubitat.

Update: Perhaps there is a way... Assuming you do not require instant on/off control of this water pump...it might be possible to custom program an Arduino sketch that runs on an ESP8266 to have it wake up once an hour and check the status of a virtual switch in your Hubitat Hub via the "Maker API" App. From Hubitat's perspective, it only knows about the Virtual Switch device. Your logic on Hubitat would turn this on/off as you see fit. Then, once an hour, the ESP8266 would wake up from deep sleep, connect to your WiFi, and then make an http call to Hubitat via the Maker API to see the status of the virtual switch, and then control the pump accordingly. The one problem I see with this is that to control the pump, you probably need to turn on a relay to complete the circuit. Powering a relay is very costly in terms of battery life, and the ESP8266 cannot go back to sleep while the relay is being held on... You'd need a mechanical latching relay that retains the commanded state until it is commanded to change state.

Never used this and not sure if there is a driver for it but it has two dry contacts and is battery powered.

Thanks ! That’s interesting ... anyone tried this ?