views:

946

answers:

7

Ok, everybody get in your wayback machine. I need to have a phone dial into my computer's 56k modem. I need my computer to have the modem "on" and have an active dialtone. Here is why: I have a sump pump alarm that will call me on a pump failure. It only works with a landline. I want to stop paying for my landline to save money and just have my cell. My idea is to intercept the outbound caLL from my sump alarm on my pc's 56k v90 modem. Then I can text message, email,etc... for free.

Does anybody know how to get started? I have found plenty of stuff on how to make outbound calls from my pc, but I want a phone (device) to dial my pc. I think the sump alarm will not dial unless it hears a dialtone.

I prefer a C# or vb6 program, but willing to go with anything. I have some experience working with serial comm devices so I just need to be pointed in the right direction.

Thanks!!!

A: 

Do you need the sump pump to actually dial?
Can you not just intercept the sump pump's check for the dialtone?
Or better, maybe there is an electronics friend you have who can wire up a simple device that plugs into the sump pump and checks for a voltage edge that occurs when the pump fails. This is an event preceding or concurrent with the pump actually trying to dial. When this little device detects the edge, it can then trigger something on your PC appropriately. The device might even be able to detect the V change on the telephone line - on the RJ11.

Cheeso
A: 

I don't know how familiar you are with electronics, but I almost wonder if your solution could be handled with a mix of software and hardware.

My first thought was to have something like an Arduino hooked up to either the circuit that does the pump failure detection or the phone line and watches for whatever signal the pump sends out. Arduinos are usually hooked up to your computer via serial/usb, and then you can have a piece of software that emails you, tweets at you, or whatever you want.

You could possibly have your modem watch for the pump trying to dial out, but I have no idea how you could do that.

Jared Harley
A: 

I'd probably keep the two programs separate.

  1. I'd have HyperTerminal (assuming you're on a Windows machine) running against your modem, with ATA or something similar, upon activity, I'd have it write a file.
  2. I'd have another program running as an automated task (like every 30 minutes), looking to see if that file has been changed, and have that trigger a SMS message to your phone.

I'd imagine this would be a simple enough setup that it'd be easy to maintain, yet reliable enough to prevent your house from becoming a pool...

Eric Caron
+1  A: 

The easy way: Take a simple PABX (small SOHO kind) to let your alarm call your PC. You can use your PC's modem to wait for a RING from your modem. (Use the System.IO.Ports.SerialPort class to accoumplish this.) You'll need to program your alarm system to call the internal number of your PC.

Once you get a ring, you let your software do the rest.

Jeroen Landheer
+2  A: 

You're going to need more than a modem in your PC to accomplish what you've described. Both the sump pump and your PC have modems, which are the subscriber end of a telephone "loop". The CO end (Central office in telephony terms) provides functions that you're telephone and both the modems mentioned above.

A big one is the generation of a ring ... this is a relatively high voltage AC signal that actually rang the bell in the old style telephones, but is simply detected in newer phones and your modems. In order for your sump pump's call to be recognized, this ring voltage has to be received at your PC's modem, but the sump pump won't actually generate this tone.

The other ideas presented here (the use of a PABX SOHO switch or connecting the detected signal from the sump pump directly to a I/O port on your PC), I can think of one other option. Somewhere inside the sump pump is a UART chip that does the serial communications to the included modem. If you disconnect the modem from the UART, you have the basics of a serial port, which can be connected to the serial port on a PC (though you may need an interface chip to get the levels right ... see the ICs provided by Maxim).

Good luck!

Steve Moyer
A: 

Another option is a pySerial script written in Python.

You can write a small listener that listens for phone calls from your pump modem. You will need to know some AT commands, which you can look up anywhere online.

import pySerial
ser=serial.Serial('COM4',2400,timeout=1) #replace 2400 with your baudrate

ser.open()

ser.write("ATS0=1\r\n") #picks up after one ring

while(1):
    line = ser.readline() #listen in a loop
Dmitry
A: 

I used to have a "Telephone Line Simulator" that allowed me to test modem configurations by letting one modem call another through a little black box that simulated the phone company's part of the bargain. Something like that should be easy to find, and would be an easy solution to your problem.

PeterAllenWebb