Migrated MQTT to internal Docker network #1
Squashed commit of the following: commit cc7419ff856867009e48aae1f1685382352a1ded Author: Ashish D'Souza <[email protected]> Date: Sun Oct 29 20:32:38 2023 -0500 Removed MQTT auth from pipeline commit ef80c5a56a9d0f5adb821bfc3e83d9f2d3726c7b Author: Ashish D'Souza <[email protected]> Date: Sun Oct 29 20:32:09 2023 -0500 Removed forced MQTT auth from source commit 4c00200f8e77c1c4c24d1e6ac9f425e1f3ed83a6 Author: Ashish D'Souza <[email protected]> Date: Sun Oct 29 20:31:35 2023 -0500 Updated configs
This commit is contained in:
1 parent
415d4e0094
commit
3642e26c7a
7 files changed
+41
-46
No files matched your search
@@ -53,7 +53,11 @@ def reset_all_camera_detection_at_sunset():
|
||||
def set_camera_detection(camera: str, value: bool, delay: int = 0) -> None:
|
||||
sleep(delay)
|
||||
|
||||
mqtt_publish.single(f'frigate/{camera}/detect/set', 'ON' if value else 'OFF', hostname='mqtt', port=1883, auth={'username': os.environ['MQTT_USERNAME'], 'password': os.environ['MQTT_PASSWORD']})
|
||||
mqtt_auth = {'username': os.environ.get('MQTT_USERNAME'), 'password': os.environ.get('MQTT_PASSWORD')}
|
||||
if not all(mqtt_auth.values()):
|
||||
mqtt_auth = None
|
||||
|
||||
mqtt_publish.single(f'frigate/{camera}/detect/set', 'ON' if value else 'OFF', hostname='mqtt', port=1883, auth=mqtt_auth)
|
||||
|
||||
|
||||
@blueprint.route('/camera/<string:camera>/detect', methods=['POST'])
|
||||
|
||||
Reference in new issue
Block a user