about the project- Creating a system of limited access to the premises based on RFID tags.
- Remote opening of the door and viewing cameras from a mobile phone.
- CCTV system with saving to the cloud.
- Integration into an existing intercom system.
- Integration with HomeKit.
Components- Raspberry pi 3
- Display Waveshare 7 "
- Contactless identification module RFID RC522 (mounted in the bell button)
- Temperature and humidity sensor DHT22
- Motion Sensor HC-SR501
- Light Sensor Module
- RFID keys
- Logitech WebCam C170 webcam (mounted in the bell button)
- Electromagnetic lock 12V (put on the door)
Programs')
- Raspbian os
- MotionEye (for viewing cameras, recording to the cloud while moving)
- MySQL server (keeping door opening protocol)
- Apache HTTP server
- PHPMyAdmin
- Conky (to display the weather forecast, temperature and humidity in the room)
- Program for mobile phone (remote door opening, video viewing)
→
Installing OS Raspbian did through NOOBS .
→
Installing MotionEye→
Installing Apache, MySQL, PHPMyAdminMake the setting MotionEye. Go to http: // [your_ip]: 8765 /, connect the camera. Specify in the File Storage section where to save the video, I have it in Dropbox, in the IntercomMyHome folder

In the Movies section I specified MPEG-4, so you can watch the video directly from Dropbox.

In the General Settings section, do not forget to change the password for security reasons. In the Video Streaming section settings for streaming video. There are links for screenshot and integration into the page.
To work with an electromagnetic lock, opening buttons, ringing scripts are used.
Events of the opening of doors we write to the MySQL database
The device screen turned out like this:


An application was created for remote opening of doors and viewing cameras (while for iOS). Authorization in the application by Gmail. FireBase to store profile and settings.




To integrate with the existing intercom, we had to upgrade the handset so that we could track calls and open the door to the entrance.
As a result, the whole system looks like this:


Integration with HomeKit is done, but I'm disappointed in it. Remotely in HomeKit there is no possibility to open the door, it only works if you are connected to the same Wi-Fi point as the device. Unintelligible to me integration with the camera. Perhaps in the future they will change the technology and it will be possible to return to it.