Get events working

This commit is contained in:
Nick Mowen 2023-06-19 08:00:47 -06:00
parent cc0cb3a78d
commit 5c230ee0f5
3 changed files with 4 additions and 5 deletions

View File

@ -393,9 +393,7 @@ class FrigateApp:
def start_audio_processors(self) -> None: def start_audio_processors(self) -> None:
audio_process = mp.Process( audio_process = mp.Process(
target=listen_to_audio, target=listen_to_audio, name=f"audio_capture", args=(self.config,)
name=f"audio_capture",
args=(self.config)
) )
audio_process.daemon = True audio_process.daemon = True
audio_process.start() audio_process.start()

View File

@ -163,9 +163,10 @@ class AudioEventMaintainer(threading.Thread):
) )
if resp.status_code == 200: if resp.status_code == 200:
event_id = resp.json["event_id"] event_id = resp.json()[0]["event_id"]
self.detections[label] = { self.detections[label] = {
"id": event_id, "id": event_id,
"label": label,
"last_detection": datetime.datetime.now().timestamp(), "last_detection": datetime.datetime.now().timestamp(),
} }

View File

@ -71,7 +71,7 @@ class EventProcessor(threading.Thread):
except queue.Empty: except queue.Empty:
continue continue
logger.error( logger.debug(
f"Event received: {source_type} {event_type} {camera} {event_data['id']}" f"Event received: {source_type} {event_type} {camera} {event_data['id']}"
) )