file headers
Signed-off-by: HeshamTB <hishaminv@gmail.com>
This commit is contained in:
parent
7f90e104d3
commit
fc9f1c5c05
10
sql_app/TODO
10
sql_app/TODO
@ -15,7 +15,7 @@
|
||||
- [X] Expose data analysis
|
||||
- [X] Load backend onto RPi
|
||||
- [X] Test connections in lab network
|
||||
- [ ] Define emrgancy triggers (manual and automatic)
|
||||
- [X] Define emrgancy triggers (manual and automatic)
|
||||
- [ ] Expose temporary control in case of emergancy
|
||||
- Triggers
|
||||
- Acccess
|
||||
@ -36,6 +36,10 @@
|
||||
- [ ] Write unit tests
|
||||
- [ ] Develop a program to visualize the data
|
||||
- [ ] CLI frontend
|
||||
|
||||
|
||||
- [X] Emergaency
|
||||
- [X] Send state with accesslist
|
||||
- [X] Split monitor into different class
|
||||
- [ ] Make a script that adds types, and thier basic database ops?? (avoid writing boiler-plate)
|
||||
- [ ] Make a script that emulates a door and monitor
|
||||
- [ ] Check file premissions on .env file, if global reject
|
||||
eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJibHVldG9vdGhfbWFjIjoic3RyaW5nIn0.ELl5AfBR1NdM4_OFhl_SCTm9EMPpqjiCKOSS0CrOJps
|
@ -1,3 +1,5 @@
|
||||
# May 2022
|
||||
# Hesham T. Banafa <hishaminv@gmail.com>
|
||||
|
||||
from typing import Optional
|
||||
from decouple import config
|
||||
@ -65,4 +67,4 @@ def valid_monitor_token(token: str, db: Session):
|
||||
|
||||
mac_signed = payload.get("bluetooth_mac")
|
||||
monitor = crud.get_monitor_bluetooth(db, mac_signed)
|
||||
return monitor
|
||||
return monitor
|
||||
|
@ -1,3 +1,6 @@
|
||||
# March 2022
|
||||
# Hesham T. Banafa <hishaminv@gmail.com>
|
||||
|
||||
# CRUD (Create, Read, Update, Delete) from db
|
||||
|
||||
from sqlalchemy import select, join
|
||||
|
@ -1,3 +1,5 @@
|
||||
# March 2022
|
||||
# Hesham T. Banafa <hishaminv@gmail.com>
|
||||
|
||||
import os
|
||||
from hashlib import pbkdf2_hmac
|
||||
|
@ -1,3 +1,6 @@
|
||||
# March 2022
|
||||
# Hesham T. Banafa <hishaminv@gmail.com>
|
||||
|
||||
from sqlalchemy import create_engine
|
||||
from sqlalchemy.ext.declarative import declarative_base
|
||||
from sqlalchemy.orm import sessionmaker
|
||||
|
@ -1,3 +1,5 @@
|
||||
# June 2022
|
||||
# Hesham T. Banafa <hishaminv@gmail.com>
|
||||
|
||||
from . import crud, main, schemas, auth_helper
|
||||
from decouple import config
|
||||
@ -132,4 +134,4 @@ def init():
|
||||
init_open_close_requests()
|
||||
init_user_connections()
|
||||
init_link_room_monitor()
|
||||
|
||||
|
||||
|
@ -1,3 +1,6 @@
|
||||
# March 2022
|
||||
# Hesham T. Banafa <hishaminv@gmail.com>
|
||||
|
||||
from fastapi import Depends, FastAPI, HTTPException, status
|
||||
from fastapi.security import OAuth2PasswordBearer, OAuth2PasswordRequestForm, OAuth2AuthorizationCodeBearer
|
||||
from fastapi.security.api_key import APIKey
|
||||
@ -447,4 +450,4 @@ def get_allowed_usernames(request: schemas.IotDoorPollingRequest,
|
||||
def get(db: Session = Depends(get_db)):
|
||||
mon = crud.get_monitor(db, "ff:ff:ff:ff")
|
||||
|
||||
return mon.door
|
||||
return mon.door
|
||||
|
@ -1,3 +1,6 @@
|
||||
# March 2022
|
||||
# Hesham T. Banafa <hishaminv@gmail.com>
|
||||
|
||||
from sqlalchemy import Boolean, Column, ForeignKey, Integer, String, DateTime
|
||||
from sqlalchemy.orm import relationship
|
||||
|
||||
@ -96,4 +99,4 @@ class EmergancyNotice(Base):
|
||||
smoke_sensor_reading = Column(Integer)
|
||||
timestamp = Column(DateTime)
|
||||
|
||||
# TODO: Add table to store active sessions. May periodically clear.
|
||||
# TODO: Add table to store active sessions. May periodically clear.
|
||||
|
@ -1,3 +1,6 @@
|
||||
# March 2022
|
||||
# Hesham T. Banafa <hishaminv@gmail.com>
|
||||
|
||||
from typing import Any, List, Optional
|
||||
|
||||
from pydantic import BaseModel
|
||||
|
@ -1,3 +1,5 @@
|
||||
# May 2022
|
||||
# Hesham T. Banafa <hishaminv@gmail.com>
|
||||
|
||||
from .database import SessionLocal
|
||||
|
||||
@ -11,3 +13,4 @@ def get_db():
|
||||
EMERG_TEMP = 50
|
||||
EMERG_SMOKE = 1000
|
||||
EMERG_OPEN_TIME_SEC = 500
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user