Giter Site home page Giter Site logo

pipicogaragehomebridge's Introduction

PiPicoGarageHomebridge

Control a garage door using a Raspberry Pi Pico W, a relay, three resistors and Homebridge.

This project is meant for garage doors that only have a single input for start / stop / reverse.

Because these doors are quite "stupid", in some cases we'll have to make some assumptions on the door state, but it's still possible to make a fully functioning smart garage door controller with just the one input and two sensors that detect if the door is fully open or closed.

YouTube Video

To learn more, check out the YouTube video I made about the Garage Door Opener

IMAGE ALT TEXT HERE

Setting up the hardware

In order to control the door and detect if the door is opened or closed, we need to use three pins on the Raspberry Pi Pico.

The pins that I have chosen are:

Relay: Pin 21

Sensor to detect if the door is opened: Pin 19

Sensor to detect if the door is closed: Pin 20

The relay connects directly between Pin 21 and ground. The Impulse input is connected between COM and NO on the relay through a 180 Ohm resistor.

The Open and Closed sensors are connected to Pin 19 and 20 using 10k resistors.

Installation on the Pi Pico

Make sure that you have Micropython installed on your Raspberry Pi Pico.

Edit the wifi setting in the main.py file and upload through your favourite tool, such as Thonny.

Connecting to Homebridge

In order to connect the Pi Pico to Homebridge, I'm using the HTTP Advanced Accessory plugin by staromeste.

You can find the plugin here: https://github.com/staromeste/homebridge-http-advanced-accessory

This plugin is very powerful, but not very user friendly as it needs to be configured using JSON to talk to and understand accessories.

But don't despair. I included a working configuration file in this repository. Just copy and paste the contents into the plugin configuration. The only thing you need to do is replace "YOUR_PI_PICO" with the IP-address of your device.

pipicogaragehomebridge's People

Contributors

mannbro avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.