I’m working on Imp’ing my doorbell such that I get a Pushover notification when the doorbell is rung. The doorbell consists of a button and a wireless battery-operated receiver. It’s the Friedland Libra+. I’ve opened up the receiver and everything is SMD. One of the chips is covered in black epoxy and the other is an RF FSK chip. However, whenever the doorbell is pushed it can be programmed to light up one of 6 LEDs. I thought this would be a convenient place to tap Pin1 of my Imp onto.
The idea was to put the Imp to sleep and then have it woken up when the LED is activated and then send me a Pushover notification. I also thought that Pin 1 was a ‘rising edge’ notification, but it just seems sensitive to +ve level. As a consequence the Imp cycles through waking up, going to sleep, waking up, …
Trying to reverse engineer the doorbell circuitry I think what I’ve tapped onto is the collector of an open-collector output. The collector is linked to the SMD LED and then through an SMD Resistor and up to +3.3V. So, in the (doorbell) dormant state, Pin1/Collector is reading +3.3V (up through the LED/Resistor), but when the doorbell is pushed, it temporarily drops to 0v and lights the LED.
My code looks like this (nothing startling):
local reasonString = “Unknown”;
reasonString = “The power was turned on”;
case WAKEREASON_SW_RESET: reasonString = "A software reset took place"; break; case WAKEREASON_TIMER: reasonString = "An event timer fired"; break; case WAKEREASON_PIN1: reasonString = "Pulse detected on Wakeup Pin"; agent.send ("Doorbell Status", "DingDong") break; case WAKEREASON_NEW_SQUIRREL: reasonString = "New Squirrel code downloaded"; } server.log("Reason for waking/reboot: " + reasonString);
function DoorbellWakeup ()
server.log (“Doorbell Wakeup”)
// wakeup every hour, on the hour
server.log (“Hourly Wakeup”)
server.sleepfor(3600 - (time() % 3600));
How could I modify the connection from Pin1 to the Open Collector to get the inverse effect to what I have now? Thanks in advance.