Close

Garage Door Sensor

Back to overview

Using the ESP8266 to broadcast open/close MQTT events over WiFi

Discussions

paulfecht wrote 05/08/2022 at 19:53 point

I'm coming back to this project after a few years.  By the way, I set this up and it has worked like a charm for three years.  Old reliable. :). I was wondering why you used Telnet in the code.  Also, I'm wanting to setup a simple door notification using a NodeMCU and a binary sensor.... thought?

  Are you sure? yes | no

Andy Castille wrote 05/08/2022 at 20:09 point

The telnet server is for remote debugging: https://hackaday.io/project/25090-garage-door-sensor/log/70779-debugging-over-the-network

By binary sensor, do you mean the Home Assistant sensor type? Notifications should be easy to do with a Home Assistant automation that has the door state as a trigger and notification as an action.

  Are you sure? yes | no

paulfecht wrote 05/08/2022 at 20:14 point

Thanks for the link on Telnet.  I was following this: https://randomnerdtutorials.com/esp8266-nodemcu-door-status-telegram/?unapproved=740203&moderation-hash=64253203bc8d8625f8e596fcd4777d83#comment-740203 

and was wanting to integrate it with Home Assistant so that say when the front door opens the kitchen light turns on.  I was thinking of adapting that linked tutorial above using the MQTT binary sensor code and just connecting the magnetic switch and adapting it for a door sensor.

  Are you sure? yes | no

paulfecht wrote 11/12/2019 at 06:21 point

How does one get the sensor to show up in home assistant... I pasted the MQTT code in my configuration.yaml and it shows up as a badge but how do I get the open / closed to display and update in real time.  Thanks

  Are you sure? yes | no

Meteorinca wrote 01/15/2019 at 22:51 point

It worked!! Thank you so much for this post! As Matt Motherway said, I had to use 115200 to upload.

  Are you sure? yes | no

addledbadger wrote 04/20/2018 at 14:19 point

Hi, the .ino link seems broken, I'm getting:

```

This XML file does not appear to have any style information associated with it. The document tree is shown below.

<Error>
<Code>NoSuchKey</Code>
<Message>The specified key does not exist.</Message>
<Key>files/250901073450560/GarageDoorSensor.ino</Key>
<RequestId>BEA271ADC9AA88C6</RequestId>
<HostId>
9C2Qh7JKACR6EQHIKmyYAG4mgYm14QJ2JsIF7Wz2oN4xCf5Hdo3LbxjrOrfaNvBwcPq6P3sr2zk=
</HostId>

</Error>

```

  Are you sure? yes | no

Matt wrote 04/19/2018 at 20:48 point

Thanks for the great write-up. I was able to get it working with these parts and settings, except I needed to set the upload speed to 115200. My nodemcu never completed flashing with that sketch, even though it completed flashing with other (smaller) sketches.

  Are you sure? yes | no

juan11perez wrote 03/02/2018 at 14:21 point

Andy, many thanks for sharing this. It works and you've made it so simple. I've looked at similar projects and somehow they seem overcomplicated.

  Are you sure? yes | no