How To - Doorbell Automation Hack
-
It's definitely the illuminated button. I pulled it out and connecting the wires rings the bell correctly. I hadn't thought about swapping the wires... It is pretty new but I wasn't considering the possibility of it being led. I'll give that a try. Worst case, replace it with a non lit button. Just glad to have finally figured it out!
edit: actually, I'm betting it's not a LED. These buttons are typically on a 16VAC system, so a LED wouldn't work without more components. Whereas a simple incandescent bulb works fine on AC. So I think I probably just need a new button.
@timropp said:
actually, I'm betting it's not a LED. These buttons are typically on a 16VAC system, so a LED wouldn't work without more components. Whereas a simple incandescent bulb works fine on AC. So I think I probably just need a new button.
Actually an LED WILL work on AC. It will just flicker at 50/60 Hz (Depending on what country you are from) when connected with only a resistor which is only slightly noticeable to the naked eye. The flickering is because it is only lighting the LED on one half of the AC sine wave. An LED is a current controlled device, so all you need to make it work on AC is the correct size resistor to limit the current for whatever voltage you put on it. You can put more complex components in to stop the flickering such as a bridge rectifier, but for very basic operation it is not needed.
-
Final update - no local stores carry a non-illuminated doorbell button. Argh. So I ended up taking the button apart on mine, yanking the incandescent bulb out, and putting it back together. Since it's held together with just some bent over tabs, they broke off and I had to glue it back together. Once I did, everything worked perfectly. The sketch I posted above is working great - doorbell rings and the ring appears in my Home Assistant like it should.
-
Final update - no local stores carry a non-illuminated doorbell button. Argh. So I ended up taking the button apart on mine, yanking the incandescent bulb out, and putting it back together. Since it's held together with just some bent over tabs, they broke off and I had to glue it back together. Once I did, everything worked perfectly. The sketch I posted above is working great - doorbell rings and the ring appears in my Home Assistant like it should.
-
Thanks for this great project/hack.
I built this project and it is working great, but i have a question about this. My controller is Domoticz and in Domoticz i have the two switches (DOORBELL_CHILD_ID, SWITCH_CHILD_ID). I though with this project i could also use the ringer of my doorbell as a sort of alarm in other combinations, but if a use the doorbell-switch in Domoticz the doorbell won't ring. But if i use the normal doorbell at my front door, it will ring.
Is there something wrong in my sketch or am i missing something else?
Thanks in advance for your help!
-
Thanks for this great project/hack.
I built this project and it is working great, but i have a question about this. My controller is Domoticz and in Domoticz i have the two switches (DOORBELL_CHILD_ID, SWITCH_CHILD_ID). I though with this project i could also use the ringer of my doorbell as a sort of alarm in other combinations, but if a use the doorbell-switch in Domoticz the doorbell won't ring. But if i use the normal doorbell at my front door, it will ring.
Is there something wrong in my sketch or am i missing something else?
Thanks in advance for your help!
@Mister_ik You're not missing anything. It wasn't designed to do what you're describing. That is an interesting idea that I never thought of though! It shouldn't be too hard to implement if you wanted to try. I'm not sure which device types are available in Domoticz but I would think you would want to use some sort of momentary button press (rather than an on/off switch) in Domoticz. You could then send that to the sensor and when it receives the command it could trigger the relay. Have a look at the relay actuator code if you haven't done this before. https://github.com/mysensors/MySensors/blob/development/examples/RelayActuator/RelayActuator.ino#L82
-
@Mister_ik You're not missing anything. It wasn't designed to do what you're describing. That is an interesting idea that I never thought of though! It shouldn't be too hard to implement if you wanted to try. I'm not sure which device types are available in Domoticz but I would think you would want to use some sort of momentary button press (rather than an on/off switch) in Domoticz. You could then send that to the sensor and when it receives the command it could trigger the relay. Have a look at the relay actuator code if you haven't done this before. https://github.com/mysensors/MySensors/blob/development/examples/RelayActuator/RelayActuator.ino#L82
-
@petewill Thanks for pointing me in the right direction. I am not a programmer but i managed to get this working with your sketch and the example sketch of the relay
-
Very long time ago this was active.
I tried the code for MySensors 2.0 but it triggers my relay all the time.
When I press simulate a button-press the relay goes off, then on and then stays on.
I have the stuff on my desk so it is not connected to my button.
Only differene is that I am using a Arduino nano, so the signal from PIN 4 is 5 volt.
I think the micro is only giving 3.3 volt out on pins?
-
Very long time ago this was active.
I tried the code for MySensors 2.0 but it triggers my relay all the time.
When I press simulate a button-press the relay goes off, then on and then stays on.
I have the stuff on my desk so it is not connected to my button.
Only differene is that I am using a Arduino nano, so the signal from PIN 4 is 5 volt.
I think the micro is only giving 3.3 volt out on pins?
@flopp
Found one mistake. I wrote some Serial.print to see where in the code my problem was and I wrote in a wrong place, so the code was looping on a wrong way.When that was corrected I found out that my relay needed to get 1 when it was off, so I just changed to below and now I don't get a green light as soon as I power on the arduino
#define RELAY_ON 0 #define RELAY_OFF 1