break; } if (c == '\n') { // you're starting a new line currentLineIsBlank = true; } else if (c != '\r') { // you've gotten a character on the current line currentLineIsBlank = false; } } } // give the web browser time to receive the data delay(1); // close the connection: client.stop(); }}

I have a "home management" web server running (not the Uno) on a Ubuntu server. This shows various useful things, like forthcoming events. Inside the server's main page it queries the other server (the Arduino one in the box) to see what the garage door status is (PHP code):

And yes, I know that having one web server getting a page from another one is crazy.

However since the Uno is not doing anything else, it always responds quickly. In the event that it is down for some reason the query times out in 5 seconds.

If the door is open, the web page shows this:

It also plays a sound in the hope of getting someone's attention.

It's pretty reliable.

The reason for having it in the first place is, that it is easy to operate the door with the remote control, and forget it is open, or even to accidentally open it, because the button on the remote is very sensitive.

Please post technical questions on the forum, not by personal message. Thanks!

pretty neat. what is the purpose of it? To remind you if you left the door open? you can add some logic to close it if there are no obstacles on the way (check for reflected IR over period of time and if there is no interruption, assume no movement).

These are all nice ideas, thank you. I was also thinking about an RFID tag idea, where the (house) doors would unlock if you just went near them. The GPS idea is cunning.

Probably a good security system could combine all sorts of sensor input, eg. where you are, the time of day, movement, door positions, day of the week. So for example, if movement is detected in the house on a Tuesday afternoon when you are normally out, and the iPhone GPS reports that you are in fact out, then that could be suspicious.

Quote

what is the purpose of it? To remind you if you left the door open?

Basically yes. And in fact, since you can accidentally press the button it isn't so much a reminder as information. The way the door faces, you can't easily tell from inside the house if the door is open or not.

Please post technical questions on the forum, not by personal message. Thanks!

The wget (Web Get) function opens the web page (my server is at 10.0.0.240) and downloads the contents into the variable $door_status. Inside that variable will be the string "Garage door is open." (or closed). I then test for that. The timeout is in case the web server (the Arduino) is down for some reason. The "-O -" means "output to stdout" which means to a variable in this case.

I couldn't think of an easier way of getting my internal (home) web server to interrogate another internal server. Maybe telnet would be been simpler, but hey, this has worked perfectly for months now.

Please post technical questions on the forum, not by personal message. Thanks!

Cool Project. I love seeing people make projects with more practical applications. I made a similar device, but it just acts as a timeout and will close the garage after 5 minutes. Eventually, I'll add wireless communication so I can get the status remotely like yours.

Cool Project. I love seeing people make projects with more practical applications. I made a similar device, but it just acts as a timeout and will close the garage after 5 minutes. Eventually, I'll add wireless communication so I can get the status remotely like yours.

That's a good idea. Unless the cat is asleep under the door. Or you have the car boot* open and are packing it. Or you backed the car half-way out and are looking at the engine.

I suppose a light-beam could detect if the coast is clear, although it would have to be pretty low to detect the cat.

*trunk

Please post technical questions on the forum, not by personal message. Thanks!

grt project..!!! m working on something like this, m facing problem at 2 way switch as u did before..my project is to control home appliances(fan, light, motor, tv, fridge etc) through controller using relays. i want to extend that to 2 way switch, means by manual n using remote(controller-8051) also.

m not getting way to check status of appliances whether is on or not by controller.thought to use stepdown trans. but its too expensice coz i have to use separate trans for each appliances.