Skip to content

sj57/garage-service

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

garage-service

A simple hack, to remotely open a garage.

This code is a Discord bot that allows you to control a garage door using a Raspberry Pi. When the bot receives a message, it will attempt to open the garage door by triggering a low signal on the specified output pin for 1 second and then returning it to a high signal.

PXL_20221226_122529600

Setup

  1. Get a Raspberry pi and install a simple OS. I'm using Ubuntu

  2. Connect the output pin specified in the OUTPUT_PIN variable to your garage door opener circuit

  3. Create a Discord bot (see this on how to create a bot)

  4. Clone the project somewhere

  5. Create a .env file in the root directory of the project and set the DISCORD_TOKEN environment variable to your Discord bot's token.

    DISCORD_TOKEN=<discord bot token>
  6. Run the script with python3 main.py and test by sending any message to the bot

  7. Install as systemd service

    sudo nano /etc/systemd/system/garage.service
    

    add the content of the garage.service file to the file and save it

    sudo systemctl daemon-reload
    sudo systemctl enable garage
    sudo systemctl start garage
    

About

Discord bot to open the garage on incoming message

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages