frigate

package
v0.2.6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 1, 2024 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var LastEventTime float64 = float64(time.Now().Unix())

LastEventTime tracks the timestamp of the last event seen

Functions

func CheckForEvents

func CheckForEvents()

CheckForEvents queries for all detection events since last alert time

func GetSnapshot

func GetSnapshot(snapshotURL, eventID string) io.Reader

GetSnapshot downloads a snapshot from Frigate

func SubscribeMQTT

func SubscribeMQTT()

SubscribeMQTT establishes subscription to MQTT server & listens for messages

Types

type Event

type Event struct {
	Area               interface{} `json:"area"`
	Box                interface{} `json:"box"`
	Camera             string      `json:"camera"`
	EndTime            interface{} `json:"end_time"`
	FalsePositive      interface{} `json:"false_positive"`
	HasClip            bool        `json:"has_clip"`
	HasSnapshot        bool        `json:"has_snapshot"`
	ID                 string      `json:"id"`
	Label              string      `json:"label"`
	PlusID             interface{} `json:"plus_id"`
	Ratio              interface{} `json:"ratio"`
	Region             interface{} `json:"region"`
	RetainIndefinitely bool        `json:"retain_indefinitely"`
	StartTime          float64     `json:"start_time"`
	SubLabel           interface{} `json:"sub_label"`
	Thumbnail          string      `json:"thumbnail"`
	TopScore           float64     `json:"top_score"`
	Zones              []string    `json:"zones"`
	CurrentZones       []string    `json:"current_zones"`
	EnteredZones       []string    `json:"entered_zones"`
}

Event stores Frigate alert attributes

type MQTTEvent

type MQTTEvent struct {
	Before struct {
		Event
	} `json:"before,omitempty"`
	After struct {
		Event
	} `json:"after,omitempty"`
	Type string `json:"type"`
}

MQTTEvent stores incoming MQTT payloads from Frigate

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL