You can buy an intercom with a video function, or you can make it yourself. In this article, the wizard will just tell us how to make a video intercom. The intercom itself is installed in front of the entrance to the house, and the video from it is transmitted to the device.
If you decide to assemble the device yourself, you will need the following
Tools and materials: -Raspberry Pi 3; -MicroSD memory card; -Power supply 5V/2.5A; -Plastic case; -Camera module; -Speaker with built-in amplifier; -Microphone; -Power button;
-Aerosol can with paint;
Step one: preparing the case < br>Take the plastic case and mark where you want to drill holes as shown.
Drill three small holes where the speaker will be. Then drill a larger hole in the upper right corner to install the button.
After drilling an edge, there is usually a sharp edge around the holes. It must be removed with a knife.
The body can be left transparent or painted. A primer works well for cars.
button Preparing the speaker and the button. Solders wires, insulates them.
Step Three: Build
All components are now ready for installation. First, installs the button into the housing cover. Then the speaker. Lays wires and fixes with tape. Installs the camera module.
Solders a wire to connect the speaker.
Installs the Raspberry Pi into the base of the case and connects all the wires. Connects speaker power to contact No. 1. Speaker ground to No. 6. Button wires to contacts No. 7 and No. 9.
Connects the white speaker wire to the wire that was soldered to the back of the Pi.
Step four: settings
For Raspberry Pi 3 (or 3+) downloads and unzips the Raspbian Stretch.
Download and installs the Raspberry Pi Imager.
Installs a microSD card into the computer. Formats it. Then launches the Raspberry Pi Imager.
Goes to the Raspbian Stretch file that you downloaded and unpacked earlier. Selects the microSD card and presses “WRITE”.
When everything is ready, you need to install a microSD card in the Raspberry Pi.
Next, connect the monitor using an HDMI cable and connect a USB mouse and keyboard. Turns on the Raspberry Pi.
Once the device is up and running, you need to connect to Wi-Fi. Then click on the Raspberry icon in the upper left corner, then “Preferences” — “Raspberry Pi Configuration”.
Then click on “Interfaces”. Turns on the camera. Presses OK and confirms the reboot.
To test the operation of the camera, open the console by clicking the black console icon in the upper left corner.
Then enter the following value:
raspistill -o cam.jpg
Then open the file manager by clicking the yellow folder icon in the upper left corner.
Double-click cam.jpg to check if the image is correct.
Next, you need to configure and check the speaker.
Right-click the volume icon in top right corner and select “Analog”.
Left-clicks on the same volume icon and sets the volume to the desired value (in this case 80%).
Opens the console again and runs the following command:
Noise should be heard.
You can then enter the following command:
A person's voice should be heard from the speaker.
Now you need to configure the microphone.
Right-click the volume icon and then “USB Device Settings”.
Then he clicks the drop-down menu “Sound card” and selects “USB PnP sound device”.
Clicks “Select Controls …” — “Microphone” — “Auto Gain Control” — “Close”.
Sets the microphone slider to about 80% and clicks OK.
The Raspberry Pi is now properly assembled and configured, so it's time to get into the software.
Step five: iOS setup
Open the raspberry pi browser and enter the seajei address .com or seajei.webflow.io.
Scroll down a bit and click Free SDK.
On the next page, scroll down a bit and click “Download SDK”. The file will download to your Downloads folder.
Open your file manager and navigate to your Downloads folder.
Right-click the Seajei SDK zip file, then unzip it. Move the Seajei SDK folder to your desktop.
Then open the console and go to the doorbell demo with the following command:
View what's in the README file by typing:
Then, as mentioned, run the sudo apt update command, copy and paste another sudo apt command and run it. You can run it all in one line:
sudo apt install libopus-dev libssl-dev portaudio19-dev
When done, run the build script for the Pi 3, which is the following command:
Then run the doorbell executable by typing:
Take note of the device ID because you will need it to connect from the smartphone app. In this case, it is “vmy9dj”.
Next, check the button operation by pressing it several times.
Next, the wizard configures the application for working with iOS. This assumes you already have XCode and an Apple developer account.
Go to the same seajei.com site on your computer and download the SDK.
Unzip it and go to SamplePrograms/iOS/SeajeiDemoApp. Double-click the SeajeiDemoApp.xcodeproj project file to open it in Xcode.
You will need to configure the command for signing and compilation capabilities.
Then select the target. It can be a simulator or an iOS device. Compile and run the application.
After starting the application for the first time, you need to set the device ID that was in the Raspberry Pi sample program (in this case vmy9dj).
Then press “CONNECT” and the device should work. The video may look a little weird on the simulator, so it's best to run the app on a real device.
At this point, if you press the Pi button, you won't see a notification. This is because notifications require your app to be configured for them in iTunes Connect.
Step Six: Push Notifications
You need an iOS device for notifications to work. They won't work if you run the demo application in the simulator.
Go back to the Seajei SDK and open the SeajeiDeveloperGuideIOS.pdf file. There, go to push notifications at the bottom.
Follow all the steps so that there is a .p12 file at the end. Send it to [email protected] within a day or so you will receive a notification with a token.
In Raspberry Pi, open the console and go to the doorbell example program:
Edit the doorbell.c file, just type:
Then scroll down a bit to the company token and replace the free trial token with a new one.
Save, exit, and run the build_pi_3_4.sh script again. Then run the doorbell program again.
Return to the iOS demo app to replace the token there as well. It is located in the file PhoneAppViewController.m.
Recompile and run the application.
Enter the device ID again.
Now, when you press the call button on iOS, you will receive a message. To turn on the camera, you need to click on the message. To turn on automatically, follow the next step.
Step Seven: Turn on automatically
Return to the Raspberry Pi and the doorbell sample:
Open the README file again with cat README.
There are 4 commands at the end to run:
cp doorbell/home/pi/Desktop; sudo cp raspidoorbell.service/lib/systemd/system; sudo systemctl start raspidoorbell.service; sudo systemctl enable raspidoorbell.service
That's it. Reboot the Pi and you will see the red camera module indicator light up automatically. This means that the doorbell program has started.