Code Monkey home page Code Monkey logo

smart-doorbell's Introduction

Smart-Doorbell

A wifi-connected raspberry pi doorbell with video chat

Github repository for the Smart Doorbell Hackershack video

This project was run on a Raspberry Pi 3 with Raspbian Buster. The video call wasn't as smooth as I would've liked, so it would probably be better to run this on a Pi 4. However, I haven't run this on the Pi 4, so I can't guarantee that it works.

Instructions

Enable the Camera

Enable the camera with raspi-config

In the terminal, type:

sudo raspi-config

Navigate to Interfacing Options

Navigate to camera

Select yes and reboot

Test that the camera is working by running the following command in the terminal to save an image to your home directory

sudo raspistill -o test.jpg

Enable the Microphone

Open the sound input settings

alsamixer -c l

Press F4 to open the capture settings and bump the level up to 100. Press Esc to exit.

Test the audio capture with the following command:

arecord --device=hw:1,0 --format S16_LE --rate 44100 -c1 test.wav -V mono

press control-c to stop. It will generate a audio file in your local directory called test.wav

You can play the file with

aplay test.wav

Store the settings so that they persist on reboot

sudo alsactl store

Enable Video Calls

Visit Jitsi Meet and configure the site to use your camera/microphone

My settings were:

Camera: mmal service 16.1
Microphone: USB PnP Sound Device, USB Audio-Default Audio Device

Download the Code

I navigated to the repo from my Raspberry Pi in the browser and clicked "Download Zip". I extracted the package to my home directory and them moved the doorbell.py file to /home/pi/doorbell.py.

You can test that the program works by running

python doorbell.py

from /home/pi.

To edit the file, install vim and open the file

apt-get install vim

vim doorbell.py

press, i to enter edit mode then make your changes. To exit, press esc then upper-case ZZ to save.

The variables for the code are documented at the top. Feel free to change any of these for your program.

Rotate the Screen

Open the boot.txt file with vim

sudo vim /boot/config.txt

press i to enter insert mode then add a line

display_rotate=1

press esc then ZZ to save and exit. Reboot.

Start the Program on Boot

Create a autostart directory

mkdir /home/pi/.config/autostart

Create a file to run the doorbell program

vim /home/pi/.config/autostart/doorbell.desktop

press i, then add the following to the file

[Desktop Entry]
Type=Application
Name=Doorbell
Exec=python /home/pi/doorbell

press esc and ZZ to save and exit.

*WARNING: This will make your local display unusable. Make sure you have a way to connect to the pi through VNC or SSH to remove this file if you want to stop the program from starting at boot.

Reboot.

If you have any issues getting the doorbell to start, please leave an issue on this repository and the community will help you get it working.

smart-doorbell's People

Contributors

atainter avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

smart-doorbell's Issues

Jitsi now start with a 'Join meeting' page

If you go to a meeting link you will now get a 'Join meeting' page instead of immediately joining the meeting.
This breaks the whole system as the raspberry does not joins the meeting without clicking the 'Join' button...

107575648_275531767116633_1812312307624554403

Camera Config and code issues

I'm using raspberry pi 4 with a raspberry pi camera I have a problem while I'm configuring the camera in chromium settings it doesn't show my pi camera and I checked that the camera works by taking pictures and it works what should I do to get my camera in chromium settings?

my second problem is when I run the code it shows me this
Traceback (most recent call last):
File "/home/pi/doorbell.py", line 38, in
from email.MIMEMultipart import MIMEMultipart
ModuleNotFoundError: No module named 'email.MIMEMultipart')
what is the problem in the code?

My LCD screen goes white

The screen goes white when I enter the code is it because I am coding before setting up the pins?

xset: unable to open display

Hello
When I push the button I get the following error message :

pi@raspberrypi:~/Smart-Doorbell $ python doorbell.py
Starting Doorbell...
Powering off HDMI
Waiting for doorbell rings...
Powering on HDMI with preferred settings
xset: unable to open display ""
[1088:1088:0611/013447.984641:ERROR:browser_main_loop.cc(584)] Failed to put Xlib into threaded mode.

**(chromium-browser-v7:1088): Gtk-WARNING : 01:34:47.989: cannot open display:

Do you know why display can't be opened?

Thanks for your help !

Regards

Ben

Thanks for this super project !

Hello, first of all I would like to thanks you for your project.
Even if had some difficulties making ti works, seems that it do not like to run over ssh...

I may have a little request and im kind of stuck.

Due to civid 19 my shop isn't allowed to welcome more than a few people at the time, there is a lot of personne waiting outside and that why I was interested in this sytem.
Being able to start a conf call from outside and trying to serve them at our best.
In this situation I'm not able to use a define sleep time as every client is different.
I could not manage to find a solution at my problem, I would like to stop and loop the program from a distant computer, I'm thinking about remote button, or button but I'll find myself with 40m of wire.
I would like to know if you could think about something easy to do it right ?
I

Raspberry does not join the meeting

After pressing the button, I get a notification on gmail, on my phone I join the meeting, but I participate in it alone, raspberry does not join.

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.