Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Python script] Create fake alerts thourgh the API #11

Open
RonanMorgan opened this issue Jan 30, 2025 · 0 comments
Open

[Python script] Create fake alerts thourgh the API #11

RonanMorgan opened this issue Jan 30, 2025 · 0 comments
Labels
good first issue Good for newcomers Small

Comments

@RonanMorgan
Copy link
Collaborator

RonanMorgan commented Jan 30, 2025

Current Behavior

The only alerts created for development purpose are created by the false cameras (you can check cameras' behavior here : #10).
But the the timestamp of the alerts are set by the engine which means :

  1. we cannot create alerts in the past
  2. all the alerts will be attached to the same Sequence object in the API database (which means a Wildfire) because we need to have a pause of 30min between two alerts in order to create a new Sequence.

Wanted Behavior

We would like to be able to create Detections with a python script, using the /detections/ POST endpoint of the dev env API (documentation here)

In order to link the detections to an existing cameras you will have to generate a token thankts to the endpoint /cameras/{camera_id}/token. For that you can hardcode camera_id=1 for the static camera and camera_id=2 for the ptz camera.

  • No need to containerized the script, you can use the localhost:5050 url.
  • You can use these images saved in a new directory
@fe51 fe51 added the good first issue Good for newcomers label Jan 31, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers Small
Projects
None yet
Development

No branches or pull requests

2 participants