Devenir Sentinelle VigiNet

Ce guide est fait pour brancher une premiere camera sans etre developpeur. L'objectif n'est pas une detection parfaite: l'objectif est de faire tourner une sentinelle fiable qui envoie un signal regulier au reseau.

1

Creer l'identifiant

Va sur /viginet, remplis le formulaire, puis garde le camera_id et le camera_token.

2

Installer l'agent

Sur Raspberry Pi ou Linux, l'installateur telecharge l'agent et installe Pillow si possible.

3

Tester puis lancer

Le mode doctor verifie l'API, Python, Pillow, libcamera et la configuration locale.

Installation rapide Raspberry Pi

curl -fsSL https://vigi-sky.fr/downloads/install_viginet_agent.sh | bash
cd ~/viginet-agent
python3 viginet_agent.py doctor

Enregistrer la camera

python3 viginet_agent.py register \
  --label "Toit nord" \
  --lat 48.8566 \
  --lon 2.3522 \
  --location "Paris"

Test de connexion

python3 viginet_agent.py test
python3 viginet_agent.py doctor

Si le test repond status: ok, la sentinelle apparait dans le reseau.

Lancer avec une camera Raspberry Pi

python3 viginet_agent.py run \
  --image-command "libcamera-still -n --timeout 1 -o {path} --width 1280 --height 720"

Lancer avec une webcam USB

sudo apt-get install -y fswebcam
python3 viginet_agent.py run \
  --image-command "fswebcam -r 1280x720 --no-banner {path}"

Mode debug sans risque

python3 viginet_agent.py run --once --dry-run --debug \
  --image-command "libcamera-still -n --timeout 1 -o {path} --width 1280 --height 720"

Le mode --dry-run calcule les scores mais n'upload rien. C'est le meilleur test avant de laisser tourner la camera toute la nuit.

Problemes courants

Permission camera

Sur Raspberry Pi, active la camera avec sudo raspi-config, puis redemarre.

Pillow absent

Lance sudo apt-get install python3-pil. Sans Pillow, l'agent peut envoyer un heartbeat mais pas mesurer les images.

Token perdu

Le token est stocke dans ~/.viginet/config.json. Garde ce fichier prive.

Trop de bruit

Monte --motion-threshold a 0.25 ou 0.35, nettoie la lentille et evite les reflets proches.