/dooropener

My very own door opener, based on simple servo and RPI0

Primary LanguageGo

dooropener

My very own door opener, using simple servo (taken from Arduino projects), glued to the domophone. :)

Controlled via Telegram bot command or simple HTTP request to secret endpoint. Under the hood it uses Pi-Blaster to set PWM (for servo angle control).

pic1

pic2

pic3

pic4

Usage

  1. Create Telegram bot: https://core.telegram.org/bots

Set below commands for your bot (using BotFather):

open - Open door
  1. Install Golang.

  2. Install Pi-blaster.

  3. Install dooropener service:

cd ~
git clone https://github.com/erkexzcx/dooropener
cd dooropener
go build -ldflags="-s -w" -o dooropener ./cmd/dooropener/dooropener.go

cp dooropener.example.yml dooropener.yml
vim dooropener.yml

sudo cp dooropener.service /etc/systemd/system/
sudo vim /etc/systemd/system/dooropener.service

systemctl start dooropener.service
systemctl enable dooropener.service

Upgrade

Upgrade dooropener using below commands:

cd ~/dooropener
git pull
go build -ldflags="-s -w" -o dooropener ./cmd/dooropener/dooropener.go
systemctl restart dooropener.service