Skip to content

feat: send fake alerts to a remote alert API with the fake cameras - #66

Open
MateoLostanlen wants to merge 12 commits into
feat/fake-reolink-camerafrom
feat/fake-camera-preprod
Open

MateoLostanlen wants to merge 12 commits into
feat/fake-reolink-camerafrom
feat/fake-camera-preprod

Conversation

@MateoLostanlen

@MateoLostanlen MateoLostanlen commented Oct 22, 2026 •

Copy link
Copy Markdown
Member
  • LOOP=true replays a scenario forever, so the fake cameras generate alerts continuously.
  • make run-engine-preprod runs the real camera API and engine against the API of DISTANT_API_URL (preprod) without the local stack. The fake cameras play as fake-cam-01 and fake-cam-02 of the fake-cam organization, placed where the scenario frames were shot.
  • Tokens are fetched by scripts/preprod_credentials.py into a gitignored file, created owner-only. Before asking any token, the script checks that each camera id has the expected name on that API, and stops otherwise.
  • The fake-camera image embeds the default scenario so it runs alone on a test station (see pi-manager-template). API URL, credentials file, engine image tag and loop are compose variables with the local values as defaults.
  • Based on feat: fake Reolink camera driven by scenarios #65, to be retargeted to main once it is merged.

LOOP=true replays the scenario from the start after the last frame, to
generate alerts continuously.
make run-engine-preprod makes fakecam-1 impersonate a camera of
data/credentials-preprod.json (st-peray-01 on preprod) and runs the real
camera API and engine against DISTANT_API_URL, without the local stack.
API URL, credentials file, engine image tag and loop are compose
variables with the local values as defaults.
The token script reads a committed template and writes a gitignored file
with mode 0600.
So the image runs alone, e.g. on a test station; a volume on /scenarios
still overrides it. The build takes data/scenarios as a named context.
With a single clear frame a looped replay never lets the engine close the
sequence. The credentials mount of the camera API is read-only.
Both fake cameras play as fake-cam-01 and fake-cam-02 of the fake-cam
organization on preprod, placed where the scenario frames were shot,
instead of impersonating a St Peray camera.
@MateoLostanlen
MateoLostanlen requested a review from fe51 October 26, 2026 17:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant