N00b Help: Raspberry Pi Garage door opener with current state

Hi Super Smart Peeps,

I was looking for some guidance on how to connect a Garage door > Raspberry Pi > Smartthings. I’m unfortunately not a developer and only able to manipulate basic code and config files. I’ve been struggling at connecting the dots between what is needed on the Rpi side and Smartthings.

I have been looking at alot of guides where people have built really nice Rpi Programs, and have set it up connections to report the state of a garage door (Open/Closed) OR to fire off a momentary relay to trigger the door. I’m hoping to combine the two and have been struggling at finding a way to associate a sensor with an action.

Could someone recommend pointing me in a good direction where I can get a device handler that will show me the current state of a garage door and by pressing it would trigger the relay on the Rpi? And the corresponding Rpi setup to handle my 2 door setup?

My wife and kids would love it if they could yell at Alexa to open and close the doors too.

I already have a Rpi, (2) 5v relays, (2) magnetic door sensor (wired) that I was planning on using.

My research so far…

This code allows one to see the status in smartthings…

Basic control of WebIOPi via smartthings

This code is on the Rpi side and allows for the control of two doors…

Any help at pointing me the right way would be very much appreciated.

-John

The custom device type you need is included in the first link you provided.

@shadowjirg, I don’t believe so. When I load the device handler it only shows the status of the garage door as provided by the Garage Alert solution. There aren’t any options or settings to trigger or link the relay to open the garage door.

If you aren’t a developer then why not use one of the off the shelf devices available?

Jimmy, I’m trying to learn something new.

After some more digging I found that a virtual switch may do the trick. New smart app to link the virtual/simulated garage door device with two actual devices

1 Like

yes I wrote that smartapp

@Lgkahn I’m looking forward to getting it setup. Quick question though… If someone manually opens the garage door (outside of smarthings) will the virtual switch report that state change? Or does it only update when the virtual switch is triggered?

It updates, but there is no virtual switch, only a virtual garage door opener. You nred a real switch and a real sensor.

The device type triggers WebIOPi which in turn triggers the relay board which triggers the wired connection to the opener.

If anyone is curious this is what I finalized on. Thanks everyone for your help…