Completing a circuit with battery switch

Iā€™m waiting for my Switchmate to arrive from eBay, hard to get hold of in the UK... but I think this could be a perfect solution for me.

Going back to my original use case of controlling a battery powered water timer, the controls for this include a dial and one of the positions turns the timer on once and runs for set time and then do nothing until itā€™s turned back to the off position and then back to manual. So by setting the timer to this mode and then intercepting the battery circuit and turning it off and back on again it will kick off the watering! The timer itself has chargeable batteries and a solar panel to trickle charge them so I wonā€™t even need to faff with figuring the circuitry for this out as turning the watering on will just cut the power then reinstate and keep the battery circuit closed..

I didnā€™t entirely understand the part of your post about which terminals to use and how to figure this out though ..

https://community.hubitat.com/t/kiwkset-lock-zwave-to-zigbee-conversion/9137/51?u=zarthan

1 Like

Sounds like you are talking about an entirely different product, so this may be a moot point, but for anyone that is considering using the Switchmate product. Here's more detail on the limit switch wiring.

Essentially, you want the wires that share the same common connection point to be on the common terminal of the limit switch. Since you'd be using the open terminal of the limit switch to close a circuit outside of the Switchmate internal circuit, you wouldn't have the full 3 volts like you do when the switch is close and you measure across the NO and C terminals, but there could be stray voltage going to the external device for which you are trying to close a contact, if the switch isn't wired correctly. In some cases it will be correct, but you have to test that with a multimeter to see which wires are connected together between the two switches, and are they both on the C (Common) terminal or not.

Perfect thanks for the clarification and drawing. I updated my rather garbled post for clarity. But plan is to wire up the switchmate to the battery holder of a water time in the same way you have done for the light.

Cheers!

1 Like

I understand now. If youā€™re only using one of the limit switches like I did for the light, then thereā€™s no need to change the wiring around if the common and normally open wires are soldered correctly, as they are for the switch on the left of the photo I posted.

I soldered my connection to that switch, using the bottom normally closed terminal, and to the common terminal where it is soldered together with the exiting wire for the Switchmate gear travel limit.

I managed to get this up and running and controller using the python script here:

I can even pull back the status of whether it is on / off.

I had lots of problems on a Pi3 - Bluetooth just isnā€™t realiable on my pi4 it works flawlessly

Iā€™ve now go to figure out how I can control from Hubitat and send the state back to hubitat... any ideas?

Cheers

You could use something called OmniThing. This is a tool you can install on your RPi and then create a device in HE to execute command line commands from Hubitat. The setup instructions are on the GitHub. As far as the status report back, I don't know about that one. You would have to capture the report back from the python command. That would take something like NodeRED to be able to do.

1 Like

You can report back with a contact sensor wired to one of the limit switches. For the outlet, you could get the status of a connect bulb.

But the cost gets to the point where it starts to not make a lot of sense unless you have spare devices and nothing else you want to use them for.

The python script can return the status and battery, so Iā€™m wandering how Iā€™d go about sending this info back to hubitat.

Iā€™ve set up the control through a virtual http switch..

D

Does it control it switch 100% of the time,,and the switch never does anything odd, like turn itself back on seconds after turning off? I have experienced this with the Switchmate.

A contact sensor triggered by one of the limit switches would allow physical confirmation and corrections when the intended state became out of sync.

The python script queries the device for the state (as well as battery life), so it can report back the actual position of the switch.

Itā€™s pretty straight forward to set up, you just pass the MAC address of the switch ..

The status attribute returns the on/off status

/switchmate.py
Usage:
./switchmate.py scan [options]
./switchmate.py status [options]
./switchmate.py <mac_address> status [options]
./switchmate.py <mac_address> switch (on | off)
./switchmate.py <mac_address> toggle
./switchmate.py <mac_address> battery-level
./switchmate.py <mac_address> debug
./switchmate.py (-h | --help) | help

Iā€™ve not seen any odd behaviour yet, but ill be putting it through its paces..

@daniel.john.edge Did you ever get this device to work on HE?

I got the Switchmate working via a python script on a raspberry pi(link above). I started playing around with updating a virtual omnisensor to send back battery status and state but its very crude .. if I make any decent progress Iā€™ll share my results.. for now, it works well enough for my original use case

Hi @daniel.john.edge,
I recently bought Linktap and would like to manage it through hubitat. Can you tell how you managed to do it?

I use node red to issue http posts activated from virtual switches, they have a very straight forward api:

My integration is pretty straight forward in so far as I have a ā€œwater gardenā€ option on my dashboard and also tied it in with amazon echo. But in reality the LinkTap just works, on its own..