Remove mqtt
This commit is contained in:
@@ -1,7 +1,3 @@
|
||||
|
||||
import paho.mqtt.client as mqttClient
|
||||
import paho.mqtt.publish as publish
|
||||
|
||||
from sqlmodel import select
|
||||
from fastapi import Depends, HTTPException, status
|
||||
from sqlalchemy.orm import selectinload
|
||||
@@ -12,21 +8,19 @@ from app.services.database import Session, get_session
|
||||
from app.model.models import *
|
||||
|
||||
doorIsOpen = True
|
||||
client = mqttClient.Client(client_id="", userdata=None, protocol=mqttClient.MQTTv5)
|
||||
client.tls_set(tls_version=mqttClient.ssl.PROTOCOL_TLS)
|
||||
client.username_pw_set("username", "passwort")
|
||||
#client.connect("host", port=8883)
|
||||
# I think this could also be gpio controlled
|
||||
#See: https://github.com/technyon/nuki_hub#gpio-lock-control-optional
|
||||
|
||||
def openDoor():
|
||||
global doorIsOpen
|
||||
doorIsOpen = True
|
||||
publish.single(topic="/lock/action", payload="unlock")
|
||||
print("Still needs gpio out")
|
||||
pass
|
||||
|
||||
def closeDoor():
|
||||
global doorIsOpen
|
||||
doorIsOpen = False
|
||||
publish.single(topic="/lock/action", payload="lock")
|
||||
print("Still needs gpio out")
|
||||
pass
|
||||
|
||||
def isDoorOpen():
|
||||
|
||||
Reference in New Issue
Block a user