Plan erstellen
This commit is contained in:
@@ -0,0 +1,67 @@
|
|||||||
|
Plan:
|
||||||
|
Hardware:
|
||||||
|
Raspberry Pi 3/4
|
||||||
|
Hacked Keymatic
|
||||||
|
Maybe RFID/NFC reader (RC522 is like 7€)
|
||||||
|
Software:
|
||||||
|
Frontend
|
||||||
|
By kali?
|
||||||
|
Backend
|
||||||
|
Python
|
||||||
|
Exposes REST API
|
||||||
|
By Ahtlon
|
||||||
|
|
||||||
|
API Specification
|
||||||
|
/door
|
||||||
|
Current status
|
||||||
|
GET
|
||||||
|
With header: access token
|
||||||
|
|
||||||
|
/door/unlock
|
||||||
|
Unlocks the door
|
||||||
|
POST
|
||||||
|
With header: access token (all)
|
||||||
|
restricted by schedule
|
||||||
|
/door/lock
|
||||||
|
Locks the door
|
||||||
|
POST
|
||||||
|
With header: access token (all)
|
||||||
|
not restricted by schedule
|
||||||
|
|
||||||
|
/user
|
||||||
|
List users
|
||||||
|
GET
|
||||||
|
With header: access token (all)
|
||||||
|
|
||||||
|
/user
|
||||||
|
Create users
|
||||||
|
POST
|
||||||
|
With header: access token (admin)
|
||||||
|
|
||||||
|
/user/{name}
|
||||||
|
Get user details
|
||||||
|
GET
|
||||||
|
With header: access token (admin)
|
||||||
|
/user/{name}
|
||||||
|
Delete user
|
||||||
|
DELETE #Didnt even know this was a http method
|
||||||
|
With header: access token (admin)
|
||||||
|
/user/{name}
|
||||||
|
change user details
|
||||||
|
PATCH
|
||||||
|
With header: access token (admin)
|
||||||
|
|
||||||
|
USER Parameters
|
||||||
|
{
|
||||||
|
"name": $name
|
||||||
|
"role": user or admin
|
||||||
|
"password": $password #dont send in answers
|
||||||
|
"schedule": siehe zeitplan
|
||||||
|
}
|
||||||
|
|
||||||
|
zeitplan
|
||||||
|
Hier bin ich nicht sicher, ich denke an cron style für wiederholende dinge aber das kann nur zeitpunkte und keine blöcke.
|
||||||
|
Villeicht ne liste von cron zeiten [ "0 16 * * 2" "0 18 * * 2" ](Wäre dienstag 16-18 uhr) - Ist aber warscheinlich schwer zu parsen
|
||||||
|
Oder startzeit + länge in minuten [ "0 16 "* * 2" "120" ]
|
||||||
|
Ganz simpel ["wochentag(1-7)" "Startzeit" "Endzeit"]
|
||||||
|
Was ist mit "aller 2 wochen" oder "3. Sonntag im monat"
|
||||||
Reference in New Issue
Block a user