IP Doobell - How to do it ???

Posted by: Cris

IP Doobell - How to do it ??? - 11/12/2004 06:43

Thinking back to the old empeg towers, I remember an IP Doorbell being discussed.

I have just wired out most of the house with Cat5e, even up to the door bell and alarm (more to do with having spare cable than anything else) and it got me thinking about how cool it would be to have an IP Doorbell.

The trouble is I don't have a clue where to start. I will have a couple of PC's in the "Server Cupboard" running XP Pro (for music/video and CCTV) and everything is wired back to there. I am using this Spore doorbell button.

I will have a couple of Rio Recievers around the house, as welll as Tivo and WiFi to the PDA and several PC's, it would be really cool if a message pops up on all these devices when the doorbell is pressed (and maybe CLi when the phone rings???).

Anyone hae any solutions to this ???

Cheers

Cris.
Posted by: bonzi

Re: IP Doobell - How to do it ??? - 11/12/2004 08:14

Now, this would be nice interfacing-and-networking case study, if you are in the mood to undertake such a thing.

First, you have to deliver one bit of information (pressed/not pressed) your door bell button is capable of to something a bit more cerebral. Since you probably won't want to buy a dedicated digital I/O board fro one of PCs just for this, perhaps you can use one of handshaking lines on a serial or parallel port for this. If the button has only one set of contacts, you will have to isolate the 'input port' from the actual bell circuitry via a relay, optocoupler or something like that.

Next, you will have to build a piece of SW that monitors that one-bit I/O port. Probably the clenest thing would be to write a driver, but I don't know absolutely nothing about Windows device drivers, and very little about drivers elsewhere, so I would stay in userland. The problem is, I am not sure whether XP lets userland apps to access bare metal in any way. Somebody else will have to fill in here.

Assuming we found a way to let a piece of program know the state of out bell port, we have to think of a way to let your numerous devices know about is. Here we have several approaches:

We can have XP run a trivial server that will, when contacted on a specific UDP/IP or TCP/IP port say 'yes' or 'no', and devices will run programs that will poll that port and pop a message when an interesting event occurs. Of course, we can avoid polling by having a (semi-)permanent TCP connection from each 'client', but then our 'server' has to be multithreaded or spawn a process for every connection.

It can be other way around: clients run little processes listening on a port, and central XP simply broadcasts a message on that port when somebody rings.

How to write client programs is another cup of tea. I know how to do it on 'normal' OSes (Windoze or Linux, say), so empegs, presumably receivers and TiVos should not be a problem. For PDAs, it depends on OS, but I think it should be doable. Anyway, any device more exotic than, say, empeg will pose its ow challanges (in starting the client SW, handling the message display etc).

Ah, yes, there is another approach: I believe there are little boxes available (I will try and look them up) with a couple of assorted I/O ports and ethernet, running a rudimentary web server. That eliminates XP device drivers problem, and the rest is similar.

All in all, nice excercise! Good luck!
Posted by: Roger

Re: IP Doobell - How to do it ??? - 11/12/2004 08:33

Quote:
Thinking back to the old empeg towers, I remember an IP Doorbell being discussed.


The one in empeg towers consisted of a crappy old Linux PC. The doorbell was connected to the serial port, IIRC.

When the serial line was taken high (or low, whatever), it broadcasted a UDP packet to the local subnet. Any interested parties could then do something.

We had one app running on one of the Linux boxes in the server rack which would play a .WAV file out through the speakers. There was another Linux box like this downstairs in the comfy room.

Mike also put together a Windows tray app that would play a noise and pop up a bubble tooltip when the doorbell rang.
Posted by: andym

Re: IP Doobell - How to do it ??? - 11/12/2004 10:04

Right Cris, I accept your challenge. Do you want me write some code for you?
Posted by: Cris

Re: IP Doobell - How to do it ??? - 11/12/2004 11:06

Quote:
I believe there are little boxes available



Is this what you mean ??? The SitePlayer seems to do everything I want, not too far out of reach money wise either

Cheers

Cris.
Posted by: Cris

Re: IP Doobell - How to do it ??? - 11/12/2004 11:09

Quote:
Right Cris, I accept your challenge. Do you want me write some code for you?


That would be nice

Esp since I am a total code numpty

I like the idea of a UDP broadcast, like Roger suggests, it wouls then just be a case of each device picking it up, I think there are apps out there already that can deal with that, I know there is one for the Tivo that allows you to put messages up on screen.

Cheers

Cris.
Posted by: bonzi

Re: IP Doobell - How to do it ??? - 11/12/2004 11:40

Quote:
Is this what you mean ??? The SitePlayer seems to do everything I want, not too far out of reach money wise either

Well, not precisely (this is primarily a telnet server, as far as I can see), but I think it could be pressed into duty; for example, it should be possible to sense the state of its (quite appropriately) Ring Indicator line or something along those lines. Other boxes I found are much worse overkills
Posted by: mdavey

Re: IP Doobell - How to do it ??? - 11/12/2004 13:10

Quote:
I believe there are little boxes available...


The picoWeb server - but I'm not sure whether it has any inputs/outputs. I believe the source and schematics are available.

Microchip has a TCP/IP stack for its PIC controllers, so you could re-invent the picoWeb wheel. It would be cool to use the new power-over-Ethernet standard so that the doorbell only needs cat5 (of course, you could add this to the picoWeb design).
Posted by: andym

Re: IP Doobell - How to do it ??? - 11/12/2004 13:18

I should be able to knock something up fairly easily. How is your doorbell connected, is it a simple closing contact with a separate LED?
Posted by: bonzi

Re: IP Doobell - How to do it ??? - 11/12/2004 13:33

Quote:
The picoWeb server - but I'm not sure whether it has any inputs/outputs. I believe the source and schematics are available.

Yes, that's it (though I thouhgt I remembered similar ones with some I/O besides RS/232 this one seems to have). Schematics and SW is here. The commercial dev system is not that cheap, though; the single-port terminal server Cris found is cheaper.

Quote:
Microchip has a TCP/IP stack for its PIC controllers, so you could re-invent the picoWeb wheel. It would be cool to use the new power-over-Ethernet standard so that the doorbell only needs cat5 (of course, you could add this to the picoWeb design).

Ah, that would be the coolest approach.
Posted by: mdavey

Re: IP Doobell - How to do it ??? - 11/12/2004 13:42

Quote:
I believe there are little boxes available...


I came across these just now:
http://www.tibbo.com/products/
http://www.beyondlogic.org/etherip/ip.htm
Posted by: wfaulk

Re: IP Doobell - How to do it ??? - 11/12/2004 16:44

The obvious extension to all this, now that you've got a user interface outside of your house, is to get an IP-controlled door lock. Then you could program a sequence into the doorbell controller to unlock the door. That would be cool.
Posted by: bonzi

Re: IP Doobell - How to do it ??? - 11/12/2004 16:47

beyondlogic.org seems to be a very good resource. Bookmarked. Thanks!

Pitty I don't currently have time to play with these nice toys. Well, one day...
Posted by: bonzi

Re: IP Doobell - How to do it ??? - 11/12/2004 16:50

Quote:
The obvious extension to all this, now that you've got a user interface outside of your house, is to get an IP-controlled door lock. Then you could program a sequence into the doorbell controller to unlock the door. That would be cool.

Heh, good idea (I think)
Posted by: bonzi

Re: IP Doobell - How to do it ??? - 11/12/2004 16:53

Cris, for writing a device driver for your XP box so that you can use parallel post as an interface to your dell switch see this article on the site Michael found.
Posted by: wfaulk

Re: IP Doobell - How to do it ??? - 11/12/2004 16:53

You could even set it up to understand morse code and have username/password combos for your front door. So when your girlfriend storms off, you can revoke her privileges.
Posted by: bonzi

Re: IP Doobell - How to do it ??? - 11/12/2004 17:02

LOL