Live data from Hacker News

Show HN: Raspberry Pi garage door opener

github.com

41–50 of 118 posts

Re: Show HN: Raspberry Pi garage door opener

#41

Very nice! I only have one question: I see there are pull-up resistors connected to push buttons. Aren't there built-in pullups on RPi GPIOs? Maybe you can enable them and use fewer elements on the breadboard.

Can confirm that the internal pull up/down are there and most libraries can enable them (alternatively this can be done manually via terminal after each restart).

Re: Show HN: Raspberry Pi garage door opener

#42
Cool project. I built a couple myself (albeit not with a Pi, but with some Wemos D1) and can share a few lessons learned.

First of all, safeties. I was lucky to add my work to existing motorized garage doors - which already came with enough sensors, but since you are providing everything including the motor, these should be in from the very start, or in any accident you'd be held liable. Actually you may even be held liable if someone implements it from your github repo and then has an accident. I know you have a disclaimer, but I wouldn't rule out being sued.

You want a sensor which detects any anomalous power draw in the motor and immediately cuts off power. Something as simple as an ACS712 (follow guides for reading an inductive load though!) which is a couple bucks (or less if you buy a bucket from China). The motor may come with built in safeties if it's meant for a garage, but this is something I'd still consider.

You will want not only a sensor but also a couple emergency buttons on both sides of the door which instantly stop all movement. While you're there, activating a couple very visible flashing LEDs for a few seconds before you start any movement is also a good safety precaution. You have 2 relays which could due to a bug or other unexpected circumstance be energized at the same time - Depending on the motor this could cause a fire, or fry your relay board/Pi. I would use one relay with its NO contact going to the DOWN motor pin, and the NC going to the UP motor pin, and connect it in series with the other relay which cuts all power. This way it's not possible to energize both in any case (beware: even abruptly switching directions may ruin a motor - always cut power first, THEN toggle direction, THEN provide power again)

Happy to discuss a few more points if you feel like.

Re: Show HN: Raspberry Pi garage door opener

#43
post #18

As someone who has built products with a Raspberry Pi, I'm not sure I would bet on a WIFI connection. I can almost guarantee you that you will sit in your car and scream bloody murder because the WIFI ist not connecting. My products had to work with a lot of other networks around and were built on a Model 3 B, maybe it has improved since then. Sadly I can't point you into the direction of solutions because we just sw…

Some kind of LoRa radio would do well. This 433 mhz one would have long range with a bidirectional link. https://www.adafruit.com/product/3179

Haven't heard of LoRa before - is it some kind of alternative to zigbee?

Re: Show HN: Raspberry Pi garage door opener

#44
post #43

Earlier quoted context omitted.

Some kind of LoRa radio would do well. This 433 mhz one would have long range with a bidirectional link. https://www.adafruit.com/product/3179

Haven't heard of LoRa before - is it some kind of alternative to zigbee?

It has been presented to me as an alternative to GSM. It's short for Long Range. They marketed it as a product for smart city, not smart home.

But of course that doesn't mean you can't use it that way.

Re: Show HN: Raspberry Pi garage door opener

#45

Earlier quoted context omitted.

I second this. Pi is well suited for HA if you don't do have database stuff. And the Shelly allows to still keep manual controls in case your automation is broken. Although I've grown cautious of products like Shelly which use Wifi as they will become obsolete once their Wifi security protocol becomes broken (like WEP en WPA). But then again the same probably goes for more expensive Zigbee and Zwave devices.

My WiFi-connected IOT devices run on a separate network, with outgoing connections disabled, but that's more out of a privacy concern. I'm a big fan of IOT and home automation, with one exception: door locks. I wouldn't trust any electronic device with my door lock. There's just so much more that can go wrong, both from a technical and a security standpoint. Also, electronic door locks aren't THAT more convenient tha…

With locks it's kinda reverse that a homebrew solution might actually be more secure than a commercial one (consumer grade at least). Mostly due to security by obscurity. The average thief won't take the time to reverse engineer your lock solution but just pick the next best break-in option which would be smashing a window or breaking the lock/frame. (Unless of course you have really dedicated enemies that want to specifically get something, but then no solution would be perfect. They will just bash your door in with an axe). But a thief might scan for Bluetooth signatures of known broken lock systems and just do drive by brake ins that way.

I'm thinking of building a elektronic lock solution myself because it would actually increase security for me. As currently I often neglect to lock the doors when going to the back of the yard. Mostly because I don't have the key on me. And my kids are at an age that they will still neglect it for many years. A quick drive-by thief could be in and out in no time. An electric lock with a rfid and keypad would be a proper solution as it always locks when you close the door and are never locked out (unless the power fails but then you use a backup key stored somewhere safe).

Re: Show HN: Raspberry Pi garage door opener

#46
post #20

Earlier quoted context omitted.

The UI is built with that in mind. - User has to keep pressing UP/DOWN buttons in order the door to work. - If connection is lost door stops. - If there are both actions door stops. - If there are hardware actions and phone actions door stops. The beams are also considered as a feature.

Since it’s WLAN the door can operated outside line of sight. Door should reverse, otherwise someone could get pinned. I don’t have small children so I’m not personally worried, but I do question if the deviation from standard automatic door UX is a good decision.

This definitely seems like one of those situations where following what the industry has been doing with regards to system behaviors is the best way to go.

Garage door manufacturers have probably seen it all at this point, and I imagine just about every behavior has a tragic story (and probably a big lawsuit) behind its being implemented.

Re: Show HN: Raspberry Pi garage door opener

#47
post #36
post #3

Earlier quoted context omitted.

.. all data stored on SD card and lost during one of power outages / if someone bumps the cable / if it gets too hot in the summer

Not sure this actually happens. In practice. A friend works at an oil company, and they have dozens of rpis deployed on offshore rigs, and in land rigs in the middle east. They are working in pretty harsh conditions, with high salinity, sand in the air, high vibrations, very low temps, very high temps... and yet over the 6 years they have been running, not 1 has had a fault. All use SD cards, and they haven't been gl…

Not my experience with commodity SD card, power supply and stock settings of Raspbian. They must be using some "secret sauce" to make them run 6 years without outages. I would suspect some industrial grade SD card (SLC or at least AMLC), high quality power supply (e.g. UPS with surge protection) and also some way to limit writes on the SD-card.

Re: Show HN: Raspberry Pi garage door opener

#48
post #47
post #36

Earlier quoted context omitted.

Not sure this actually happens. In practice. A friend works at an oil company, and they have dozens of rpis deployed on offshore rigs, and in land rigs in the middle east. They are working in pretty harsh conditions, with high salinity, sand in the air, high vibrations, very low temps, very high temps... and yet over the 6 years they have been running, not 1 has had a fault. All use SD cards, and they haven't been gl…

Not my experience with commodity SD card, power supply and stock settings of Raspbian. They must be using some "secret sauce" to make them run 6 years without outages. I would suspect some industrial grade SD card (SLC or at least AMLC), high quality power supply (e.g. UPS with surge protection) and also some way to limit writes on the SD-card.

They are running stock Raspbian. For SD cards, they are using a mix of SanDisk, Kingston and others - consumer versions.

They are indeed using UPS', and the workloads naturally have a low write load.

Re: Show HN: Raspberry Pi garage door opener

#49
Cool. I have been thinking about this myself recently, and I had a different approach in mind. If you already have a remote (which I suppose is mostly the case with garage doors), why not integrate with the remote directly?

I.e. clone an additional remote, then integrate with the buttons from a micro-controller to open/close. In addition, have some kind of way of detecting whether the door is open or closed, so I suppose the remote can be placed near the motor.

That way you can also easily integrate into your house's alarm system later on if need be, as it's most likely linked to your remote.

Re: Show HN: Raspberry Pi garage door opener

#50
One of my first projects with the gen 1 raspberry pi in 2013 was controlling my garage door opener by pulsing a optocoupler and that could be triggered via a simple http endpoint that would run a out script It worked well , but didn't quite pass the WAF. So switched to a commercial product that had a mobile app. (zwave/Samsung smart things)
Post reply on HN