Remote steuerbares Türschloss mittels abgesicherter Zero-trust networking Lösung (265bit end2end verschlüsselt).
Motor, welcher einen Bolzen (Schliessmechanismus) bewegt, ist ein 12V DC - Linearer angetriebener Motor und wird über ein Arduino zusammen mit einem externen Stepper Chip gesteuert. An dem Arduino ist ein Fingerprintsensor angehängt, welcher das Türschloss ebenfalls aktivieren kann. Die API-Anbindung ist mittels NodeJS, zusammen mit dem Zero-trust VPN relisiert. Das Raspberry ist wiederum via Serial-USB mit dem Arduino verbunden.
Folgende API-Endpoint ist momentan vorgesehen:
| Verb | Ressouce | Description |
|---|---|---|
| POST | /api/door | moves the bolt on the door (open/close) |
| GET | /api/status | return the motor state (e.g door open / close) |
| GET | /api/total_operations | returns operations executed by Arduino |
| GET | /api/total_access | returns the amount of door open / closed |
| GET | /api/total_locations | return a list of permitted access locations (Fingerprint & Remote) |
| POST | /api/location | add access location to DB and returns all locations accessed |
Die Halterung für Motor, Fingerprint, Verschalung für Raspberry & Arduino sind 3D-gedruckte Teile und in einer Miniatur Türe verbaut werden (für Demozwecke)
Requirements
Client (Windows, Android, IOS) Setup:
Download Zerotier-VPN to access the Webservice
- Download the zerotier client Windows, Android, IOS
- Join Network
abfd31bd47ba5b87 - Wait for confirmation of ZeroTier administrator
Once connected to the Zerotrust Network: API calls can be made using: https://3to5.ch:4001/api/
RaspberryPi (Server) Setup:
- Access Raspberry SSH console access
- install zerotier-cli
curl -s https://install.zerotier.com | sudo bash - or with GPG installed:
curl -s 'https://raw.githubusercontent.com/zerotier/ZeroTierOne/master/doc/contact%40zerotier.com.gpg' | gpg --import && \ if z=$(curl -s 'https://install.zerotier.com/' | gpg); then echo "$z" | sudo bash; fi - start service
sudo service zerotier-one restart - join network
sudo zerotier-one.zerotier-cli join <network id>
Prerequisite RaspberryPi has joined the Zerotier VPN and is configured properly
- navigate to RemoteDoorControl/Arduino/
- Compile and upload project to Arduino 00-Motor_Control.ino
The backend is a Nodejs application.
The frontend is a reactjs application.
Both applications run on a single raspberry connected to zerotier VPN network: playground: abfd31bd47ba5b87
- navigate to RemoteDoorControl/RPI/Nodejs/backend
- run
npm install - plug in Arduino on USB-Serial interface
npm run startwill start the backend server on https://3to5.ch:4001- nodemon for development purposes is configure and run with
npm run dev2.1) to start server in dispatched modeforever start server.js
Backend-API is reachable under: https://3to5.ch:4001/api/docs
Troubleshooting:
- Find blocking ports:
lsof -i :4001 -t-->kill xxx - To find which USB interface is used
dmesg | grep USB
- navigate to RemoteDoorControl/RPI/Nodejs/frontend
- run
npm install - make sure SSL certificates are places on repositories root path
(HTTPS=true SSL_CRT_FILE=cert.pem SSL_KEY_FILE=key.pem npm start&)run production in HTTPS will start the frontend-service
Webapp is reachable under: https://3to5.ch:3000
Create certificate and place it into root folder of Nodejs app. Files: key.pem, cert.pem
openssl genrsa -out key.pem
openssl req -new -key key.pem -out csr.pem
openssl x509 -req -days 9999 -in csr.pem -signkey key.pem -out cert.pem
rm csr.pem
Videos: Fingerprint - Demo Remote Acces - Demo
RemoteDoorControl - Webapp RemoteDoorControl - Backend (Swagger-UI)








