How To - Doorbell Automation Hack
-
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