Giter Site home page Giter Site logo

auto-unlock-app's Introduction

auto-unlock-app

This is a script for unlocking the auto-lock of an apartment using Switch Bot's Bot.
It triggers when the room's intercom sounds, performs pass-phrase authentication, and presses the unlock button.
It is intended to be used in combination with Auto Unlock Server.

License LICENSE
Environment Raspberry Pi Python
Technology SwitchBot API

Devices

This repository can be run on the following environment:

  • Raspberry Pi Zero W
  • OS: Raspbian GNU/Linux 12 (bookworm)
  • Kernel: Linux 6.6.28+rpt-rpi-v6
  • Architecture: armv6l

Getting Started

1. Clone & Set PYTHONPATH

$ git clone -b v0.2.0 https://github.com/nglcobdai/auto-unlock-app.git
$ cd auto-unlock-app
$ export PYTHONPATH=$PWD

2. Create .env

Copy .env.example to .env

$ cp .env{.example,}

You need to edit the following items

Key Description Reference
AUTO_UNLOCK_API_URL Auto Unlock API URL API endpoint by Auto Unlock Server
SWITCH_BOT_TOKEN Switch Bot Token Switch Bot
SWITCH_BOT_SECRET Switch Bot Secret Switch Bot
UNLOCK_BOT_ID Bot ID for Unlock button Refer to the output of python app/src/switch_bot.py

3. Install Dependencies

$ pip install -r requirements.txt

4. Install Required Libraries

$ sudo apt-get install jackd2
$ sudo apt-get install libopenjp2-7
$ sudo apt-get install libtiff5
$ sudo apt-get install libatlas-base-dev
$ sudo apt-get install libjasper-dev
$ sudo apt-get install libqtgui4
$ sudo apt-get install libqt4-test

5. Run

$ python app/main.py

auto-unlock-app's People

Contributors

nglcobdai avatar

Watchers

 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.