Mechanical Multiple Dry Contacts

I had to install 6 mechanical plunger type contact sensor in lock latches to detect open close status…
Honeywell Dry Contact
These of course have no power source… I was hoping to integrate into HA using ESPHome but have not found a clear way to do it… Any advice is greatly appreciated. Thanks

Connect one end of the dry contact to the ESP ground.

Connect the other end of the dry contact to a GPIO on the ESP.

Configure the GPIO as a binary sensor with pull-up enabled and logic inverted.

4 Likes

is it possible to share the yaml to reach this configuration?

thank you for your help.
I read the documentation, but there are no references to the pull-up option, that’s why I’m a bit lost.

a bit of text would be very useful… but thanks anyway

GPIO general purpose Input Output. Means the pin has no special property’s when configured as GPIO other than it can read high and low, or output high or low.
A little Google around the subject for basic hardware may help

1 Like

I sent you the link with the documentation that tells you how to set it up. If thats to much work and your going to always need someone to create your extremely easy gpio switches then you might want to reconsider the hobby.

Im happy to help anyone who makes an effort to help themselves and atleast try’s. This is a place for people to help and ask for help. Thats very different from what your expecting, which is on-demand free labor.

I used my time and effort to go get you those links that explain and show you with examples exactly what you need to do. The least you can do is spend some of your time and read them.

3 Likes

You are wrongly assuming that I don’t spend my time trying to understand it…
Let me tell you that I’ve read all this documentation even before you shared it, nevertheless I appreciate your time confirming that’s the right place to go.

Now let me explain my point of view. That’s my first time trying to do my own hardware to be used in Home Assistant. I’ve never worked with something similar so what I’m trying to get here is just a starting point, some guidelines on what are the first steps to follow… and your comments didn’t help at all.

I really appreciate all the help, but let me also help you to help better: when communicating using offline tools like this forum and using written language we should try to provide as much context as possible using examples of code, use cases, etc…

Btw… @Roxy comment have helped me to learn what I needed and I now have something to start exploring :slightly_smiling_face:

Thank you both

@Roxy thank you for your help so far.

Something that is not clear for me yet is how will I in Home Assistant define the binary sensor as on or off.

Meaning, in the documentation I can see several options to read a state from the sensor. But cannot find anything to set a state to the sensor.

Can you help me understand what an I missing here?

I truly appreciate your eagerness to learn and acknowledge that everyone begins their journey somewhere. I, too, started self-taught and gained valuable insights by asking appropriate questions. However, it seems there are some foundational concepts you might be missing at the moment. In all honesty, if you’re finding the current task challenging, it might be beneficial to consider a smaller project to build your skills.

For instance, the ESP reads the state and determines whether the sensor is low or high. Home Assistant merely reads the information provided by the ESP. Describing it as “setting a state” for a sensor could be a bit contradictory.

I suggest exploring comprehensive tutorials on platforms like YouTube, as suggested by @Fallingaway24. Their advice on distinguishing between help and doing the work for someone else is noteworthy. I regret that I cannot offer further assistance at this point. However, if you encounter difficulties even after attempting steps from a tutorial, the forum might provide more active support. Keep up the effort.

2 Likes

You do not define the state of a binary sensor. The esp watches for state changes and reports them to HA…
Here my bedroom door which has a reed sensor(binary sensor) on it. It was Open and it was telling HA the door is open. I closed the door and a state change was immediately sent to HA to show Closed as the new state.


Without you showing us what part part of the documentation your talking about, It’s hard to know what you’re talking about.

A sensor by definition “senses”. A sensor is something that is read by esphome or HA. A binary_sensor sensor is read and it can be On or Off. A temperature sensor is read and the temperature gets updated.

Now there are a few scenarios where you CAN set the state of a sensor. A common way would be in an automation. For example, lets say you create a template binary_sensor called, “House Occupied”. Now in HA you create an automation that watches for your device_tracker that is your cell phone. When your cell phone state changes to Home(thats the condition) then an action happens that turns your sensor “House Occupied” to On. When you leave and your phone is Away(comdition) then an action turns your House Occupied sensor Off. So, youve created a sensor and you set your own conditions that cause the Occupied sensor