Page 1 of 1

Complete beginner - Garage Door Dedection

Posted: Wed Aug 28, 2019 7:32 am
by Earthing
Hi Guy's,

I'm a Solution Architect @ Microsoft so I have a lot if IT knowledge. I do basic programming, but that's it. I now want to start with my very first Raspberry Pi program (haven't bought one yet :D). I Was hoping I could get some tips!

The problem? I Leave my garage door open all the time. I Can open/close it remotely, but I don't have the sensors to check if it's open or closed.
My idea? Get a Raspberry Pi with a camera that can dedect (AI/Neural Network) if the port is closed or open. I doesn't need to close automatically - it just needs to sent me an e-mail or something like that.

I Was thinking about getting a Raspberry Pi 3 B+ with a camera module. Will this be enough or do I need something else?
Does anybody have experience with image detection? What program language do I use? I Dont want to place/hang special markers on my garage door for the program to detect, I really want to 'learn' the network how an open door looks like.

Thank you very much!
Earthing

Re: Complete beginner - Garage Door Dedection

Posted: Wed Aug 28, 2019 5:06 pm
by pcmanbob
Hi.

You could also do this using 2 magnetic switches one reporting closed and one reporting open, you could then have your pi send an email upon opening and upon closing of the door.

You could do this using the pi gpio and python.

Re: Complete beginner - Garage Door Dedection

Posted: Wed Aug 28, 2019 5:27 pm
by drgeoff
pcmanbob wrote:
Wed Aug 28, 2019 5:06 pm
Hi.

You could also do this using 2 magnetic switches one reporting closed and one reporting open, you could then have your pi send an email upon opening and upon closing of the door.

You could do this using the pi gpio and python.
Such switches are commonly used in alarm systems. eg https://www.ebay.co.uk/itm/5X-Magnetic- ... 3201624859

Re: Complete beginner - Garage Door Dedection

Posted: Wed Aug 28, 2019 5:34 pm
by cmrincon
Hi!
I think that the use of image detection is a waste of time and effort. I'm sure that you will get better solutions from people in this forum.

You can use whatever language you already know, but i encurage you to use python because python has all the tools you need to develop T the project quickly:

With this library you can send emails:
https://docs.python.org/3/library/smtplib.html

With this library you can control the gpio port:
https://pypi.org/project/RPi.GPIO/

Re: Complete beginner - Garage Door Dedection

Posted: Wed Aug 28, 2019 7:25 pm
by neilgl
Or just one micro switch on the garage door.

Re: Complete beginner - Garage Door Dedection

Posted: Wed Aug 28, 2019 8:31 pm
by lpsw
IMO, a 3B+ is overkill, if it's only task is to monitor the garage door.
A Pi0WH (with headers installed, so no soldering) will suffice. I monitor my entry doors with Pi0Ws + Pi Cameras + Pikrellcam. Works great.
Your use case will probably use much less CPU and memory than mine.

Re: Complete beginner - Garage Door Dedection

Posted: Wed Aug 28, 2019 9:53 pm
by drgeoff
lpsw wrote:
Wed Aug 28, 2019 8:31 pm
IMO, a 3B+ is overkill, if it's only task is to monitor the garage door.
A Pi0WH (with headers installed, so no soldering) will suffice. I monitor my entry doors with Pi0Ws + Pi Cameras + Pikrellcam. Works great.
Your use case will probably use much less CPU and memory than mine.
True, but bloat and and feature creep have become second nature to the OP's thinking. :)

Re: Complete beginner - Garage Door Dedection

Posted: Wed Aug 28, 2019 10:31 pm
by LTolledo
is your garage door a "motorized roll-up door"

if so there is already a limit switch installed to check if door is fully closed or fully open.
or as neilgl suggested install micro-switch for your interface to your monitoring system, but I do recommend full-sized lever roller-cam limit switches as those are more robust.

or to augment your camera-type requirement, why not add a linear magnetic tape sensor or rotary encoder to give you the actual position of the door opening...
and some proximity sensors/ area sensors to prevent the door from closing if there is something within 500 mm both sides below the door.

Re: Complete beginner - Garage Door Dedection

Posted: Fri Aug 30, 2019 6:45 am
by Earthing
Hi Guy's!

Thank you for all input. I Want to do this with image recognition because I don't want extra cables to my garage port for the sensors.
if so there is already a limit switch installed to check if door is fully closed or fully open.
or as neilgl suggested install micro-switch for your interface to your monitoring system, but I do recommend full-sized lever roller-cam limit switches as those are more robust.
Is this 'limit switch' in the motor or where do I find this?
lpsw wrote:
Wed Aug 28, 2019 8:31 pm
IMO, a 3B+ is overkill, if it's only task is to monitor the garage door.
A Pi0WH (with headers installed, so no soldering) will suffice. I monitor my entry doors with Pi0Ws + Pi Cameras + Pikrellcam. Works great.
Your use case will probably use much less CPU and memory than mine.
Are you doing this with sensors?

Thank you!

Re: Complete beginner - Garage Door Dedection

Posted: Fri Aug 30, 2019 7:31 am
by pcmanbob
Earthing wrote:
Fri Aug 30, 2019 6:45 am

if so there is already a limit switch installed to check if door is fully closed or fully open.
or as neilgl suggested install micro-switch for your interface to your monitoring system, but I do recommend full-sized lever roller-cam limit switches as those are more robust.
Is this 'limit switch' in the motor or where do I find this?

I would not try using the existing limit switch as you have no idea what voltages may be present on it, it could even be mains AC voltage.

Re: Complete beginner - Garage Door Dedection

Posted: Sat Aug 31, 2019 8:01 pm
by lpsw
Earthing wrote:
Fri Aug 30, 2019 6:45 am
lpsw wrote:
Wed Aug 28, 2019 8:31 pm
IMO, a 3B+ is overkill, if it's only task is to monitor the garage door.
A Pi0WH (with headers installed, so no soldering) will suffice. I monitor my entry doors with Pi0Ws + Pi Cameras + Pikrellcam. Works great.
Your use case will probably use much less CPU and memory than mine.
Are you doing this with sensors?

Thank you!
No, I'm using the motion detection feature built into Pikrellcam. Upon motion detection, the "watcher" Pis send an SMS (text with a picture attached) to my cell, and send a message to another Pi that plays an audio file (depending which "watcher") to a BT speaker.

Re: Complete beginner - Garage Door Dedection

Posted: Tue Sep 03, 2019 7:29 pm
by boyoh
Sitting in your office .then you receive a e-mail
Saying your garage door is open. Can you close
The door from your office, IF not what is the
Point of your project , More thought is to go
Into this project.
Regards BoyOh

Re: Complete beginner - Garage Door Dedection

Posted: Tue Sep 03, 2019 7:43 pm
by rpdom
boyoh wrote:
Tue Sep 03, 2019 7:29 pm
Sitting in your office .then you receive a e-mail
Saying your garage door is open. Can you close
The door from your office, IF not what is the
Point of your project , More thought is to go
Into this project.
Regards BoyOh
That is close to a project I had been working one (but then other things overtook it). I have some switches in place and some code to either send me an SMS or an email if the garage door is opened or closed and I had most of the hardware in place to be able to respond to that and close the door remotely if needed.

However, before closing the door I would want to find out why it opened unexpectedly, perhaps with a video feed so I can see if someone has tried to break in.