Hello all, I’m quite new in HA, and one of my first projects is to get notified when my outdoor fence is open.
I already asked around about what sensor to use for this, as it should be wheather resistant. So I bought this sensor.
I have an utp cable already in place that has some free wires, so I can install the sensor to my fence, and connect it to the wire to have it in my garage.
But now my knowledge ends on how to continue. I suppose I have to attach a DC voltage to it (it says max 24 V DC), but how can I make it smart, so my HA can see the sensor, and generates an alarm when the contact is open…?
Hello, and welcome to the community!
You need an interface that can read the status of this “dry contact” sensor and report it to HA in a network language that HA understands. There are many different ways to do this.
- You can setup a Z-Wave or Zigbee wireless network, and use one of several vendors’ dry contact inputs to wire your sensor and report its status to HA over Z-Wave (900Mhz) or Zigbee (2.4Ghz) radio signals. (note that, depending how far away the gate is, voltage drop on the wire could be an issue, so if the signal can reach, consider a wireless contact sensor on the gate instead).
- You can get a WiFI dry contact reader, but avoid WiFi devices that require cloud access or custom apps. Known good vendors of “open” WiFi include Shelly, Athom, and Kincony (which also has wired Ethernet options). The Shelly i4 device in particular is designed for dry contact inputs.
- You can get a barebones device with GPIO (general purpose input/output) terminals. If you happen to have a raspberry pi, you can use its built-in GPIO pins, or you can use a dev board like esp32 and setup esphome firmware, which is very low-cost and highly customizable (but more complex).
I’ve had good luck with the DWZWAVE2.5 by Ecolink. You’ll need to have a Z-Wave coordinator connected to HA to pick up the zwave signal, but if you don’t already one will open up an entire world of z-wave devices you can use with it.
The DWZWAVE2.5 has 2 connectors inside that you connect your magnetic switch wires to. I used telephone wire and extended it from my gate about 20 feet to an empty plastic electrical junction box on my deck and placed the DWZWAVE2.5 in that box to make it waterproof. I have a similar setup with one in my mailbox. The only concern is to make sure the signal from the DWZWAVE2.5 outside can reach inside to your coordinator.
Once HA receives the open or closed signal you can use an automation to notify your phone, sound a siren, send a notification to your TV’s, etc.
Thanks a lot for the helpful information . Indeed, I need to take into account the voltage drop. Not sure if a wireless contact sensor can reach my house - need to test it.
I already have this WiFi device laying in my draw. But I’m not sure if this is what I need: I can switch on/off a channel from my phone, but it’s the other way around that I need to go: the receiver should detect when the channel is on or off. Is the Shelly doing the same as my device, or is it something different?
I was just looking into ESPHome, but for the moment I will leave it like it is, because that’s another rabbit hole that once I’m in, I probably won’t get out .
Thanks a lot for the tip. I have seen that sensor around, but as it’s zwave, I don’t have the coordinator yet - but maybe I can get it to broader the number of devices I can use .
I will keep your tip in mind, but will first try with something I already have laying around. Not sure if it fits the purpose, but I asked it to peterxian (who replied my post as well).
Keep you posted…
I came by this video, which is exactly what I need, so thanks for the Shelly suggestion .
DIY Smart Garage Opener LOCAL Shelly Plus 1 (Bluetooth Bonus)