diff --git a/README.md b/README.md index 734622f..440c5f1 100644 --- a/README.md +++ b/README.md @@ -12,9 +12,9 @@ After getting the distance and comparing it to the threshold, the peripheral sen This is how it actually looks like on the door frame: -![door alarm peripheral device close up](img1.png "Close up") +![door alarm peripheral device close up](img1.jpg "Close up") -![door alarm peripheral device on door frame](img2.png "On door frame") +![door alarm peripheral device on door frame](img2.jpg "On door frame") ### License diff --git a/peripheral/main.py b/peripheral/main.py index 1d2e0d9..8e48c16 100644 --- a/peripheral/main.py +++ b/peripheral/main.py @@ -16,8 +16,8 @@ print("Starting door alarm...") ssid = "HUAWEI-2EEt-2G" password = "hxtU2dvx" -server = "http://192.168.100.4:1323" -token = "test123" +server = "https://192.168.100.16:5031" +token = "" ultra_counter = 0 ultra_threshold = 3 @@ -66,9 +66,9 @@ def send_req(opened: bool): r = urequests.post(f"{server}/write", headers={"Authorization": token, "Content-Type": "application/json"}, data=raw) + print(f"State updated [{r.status_code}]") except Exception as e: print(f"Error occurred: {e}") - print(f"State updated [{r.status_code}]") def ultra():