Normal Frigate Event API
This commit is contained in:
		
							
								
								
									
										4
									
								
								main.py
									
									
									
									
									
								
							
							
						
						
									
										4
									
								
								main.py
									
									
									
									
									
								
							| @ -130,7 +130,7 @@ def handle_event(event_id): | ||||
|         logger.debug(f"Skipping already emailed event: {event_id}") | ||||
|         return | ||||
|  | ||||
|     clip_url = f"{HOMEASSISTANT_URL}/api/frigate/notifications/{event_id}/{event_info['camera']}/clip.mp4" | ||||
|     clip_url = f"{HOMEASSISTANT_URL}/api/events/{event_id}/snapshot.jpg" | ||||
|     message = f"A {event_info['event_label']} was detected on camera: {event_info['camera']}.\nEvent ID: {event_id}" | ||||
|  | ||||
|     send_email(message, event_info['snapshot_urls'], event_info['event_label'], clip_url) | ||||
| @ -161,7 +161,7 @@ def on_message(client, userdata, message): | ||||
|             logger.info(f"Event from camera '{camera}' with label '{event_label}' and zones '{zones}' blocked by alert rules.") | ||||
|             return | ||||
|  | ||||
|         snapshot_url = f"{HOMEASSISTANT_IP}/api/frigate/notifications/{event_id}/snapshot.jpg" | ||||
|         snapshot_url = f"{HOMEASSISTANT_IP}/api/events/{event_id}/snapshot.jpg" | ||||
|  | ||||
|         if event_id not in event_cache: | ||||
|             # First time seeing this event | ||||
|  | ||||
		Reference in New Issue
	
	Block a user