MQTT Doorbell RF and ESP8266

mqtt
Tags: #<Tag:0x00007f1b9b631d80>

#1

I’m in the process of creating a esp8266 doorbell with eapeasy. I’ve tried with a custom code sources from https://github.com/thehookup/Wireless_MQTT_Doorbell/blob/master/Doorbell_CONFIGURE.ino but couldn’t get the message to send to homeassitant.

Basically what I want to do is when the door bell sounds, homeassitant recieves the message on or active. I have tapped into the speaker wires and tested that when the speaker sounds, power is supplied (used an led to test).


Image doesn’t show that I had the positive connected to D4.

Then With that message I can create a further automation to be determined.

I loaded up tasmota, made d4 a switch2, and still nothing. I have the positive from the speaker going to D4. But home assistant never detects. I can see that mosquitto is connected to the nodemcu but no signal is ever sent. What am I doing wrong?


#2

In those cases where something weird is happening I have a little simple sketch that just prints all the GPIO pins over and over on the serial port so I can easily see which is getting triggered or if there is a issue with the pull-up resistor or not. It will be several hours but if you need it still I can post it when I get to a laptop to pull it.

Wait… reading your text again. Positive? I believe D4 is shared with the LED and has a pull-up resistor already so it will be high. You’ll need to pull it low (to ground). I think D8 has a pull-down on it, or I might be confusing it with the Wemos D1 mini. Check your docs on your chip to see what is what. I believe D0 has a pull-down on the Nodemcu.

Also verify the voltage on the speaker isn’t above 3.3v.


#3

D0 does indeed have pulldown. I’ll preface that I’m learning as I go. I have zero experience with coding and wiring and all of this. It’s all through Google. My background believe it or not is in finance and this is all just a hobby. Ill try what you recommended later today.


#4

I didn’t even think the speaker would be supplying too much. That could be the issue. The tutorials I have been using indicate connecting to the led leads, but I dont feel comfortable with soldering (I don’t have the setup for it) so I wired and glue for the speaker (I did my best not to glue terminal, only partly to prevent movement)


#5

Nothing wrong with learning and trying things. Only way to excel! Do you have a volt meter? Most little LEDs are 2V’ish or less, and if you didn’t pop the LED then you might be safe, but I would see if you can pick up a cheap little volt meter. Super helpful in projects.


#6

I was using an led to confirm that power was supplied when speaker was active (read making the annoying doorbell sound that if I play again my wife will lose her mind). No pop and no resistor added. Also wasn’t super bright either so I’m making the extraordinary assumption it’s not supplying an excessive amount of power.


#7

You might be ok, worst things worst it will pop the GPIO pin or esp8266 chip, but you might be right if the LED is dim. What’s the LED from?


#8

It’s just from a pack of leds I had insertted onto the breadboard.


#9

Ok so here’s some pictures.

Nothing seems to happen on tasmota:


That second picture indicates an on press but I cannot replicate it at all.


#10

I even try adding some power and nothing. Am I not completing the circuit? I’m lost.


#11

Wait, this wouldn’t be a switch, this would be a button, no? Or is it a relay? It only needs to know when power is supplied.


#12

If your using a button could you not simply check he status of the button?

digitalRead();

Are you powering the board all the time?


#13

So the board is USB power and the doorbell board is battery powered. Power will be separate(for now). The positive and negative wires are spliced from the speaker wires. It seems like power is only supplied when speaker is sounding. Basically, I don’t know how to take that supplied power and have the nodemcu interpret it and send to homeassitant. I have the tasmota software installed.


#14

So good news. I got it working.



And the tasmota screen is:

Set switch mode to 1, not 0.


#15

Well done…

Will you take power from the door bell or the battery and use a deep sleep?


#16

Very off-topic maybe, but what doorbell is that? It looks nice for this kind of project :slight_smile:


#17

Out of interest, why not intercept the 433mhz signal?
You can make a 433mhz gateway using esphomeyaml and a send and receive module.
Currently putting mine together for the same kind of application, doorbell presses into HA.


#18

Not sure yet. There’s an outlet right near it so I may for now keep the power separate.


#19

It was on Amazon. I think they discontinued it. Here is the link:

FiBiSonic Portable Wireless Door Bell Chime and Push Button with Batteries Included Range up to 350 Feet for Tabletop Use or Wall Mounting,Black https://www.amazon.com/dp/B01ERJXT16/ref=cm_sw_r_cp_apa_Wp3pBbWDNVNXV

As for the 433 mhz receiver, I have issues with too much interference. I have my pi hooked up with one and it picks ups everything. My dog has a doorbell that’s RF as well that causes alot of interference along with a etekcity outlets and other stuff. This makes it a bit cleaner…ish.


#20

See my comment to tottow. Basically too much interference personally. It might work in. More isolated environment.