Home Lab Optimisé

Matériel utilisé

  • Raspberry Pi : Services légers (Pi-hole, Gatus).
  • NAS Synology : Stockage, médias (Emby, Transmission), et gestion documentaire (Paperless-ngx).
  • PC Proxmox : Virtualisation des services gourmands (VM/LXC).

Architecture Logicielle

1. Raspberry Pi

  • Pi-hole : Bloque les pubs et traqueurs.
  • Gatus : Surveille la disponibilité des services.

2. NAS Synology (DSM)

  • Médias : Emby, Transmission, SickChill, NZBGet, FileBot.
  • Documents : Paperless-ngx (via Docker).
  • Sauvegarde : Duplicati.

3. Proxmox (PC Principal)

Conteneur/VMApplicationsRôle
LXC 1Home AssistantAutomatisation domotique.
LXC 2Frigate + OllamaAnalyse vidéo (GPU) + IA locale.
LXC 3MQTT Explorer + Prometheus + DashySupervision et monitoring.
LXC 4Firefly IIIGestion financière.
VM 1pfSenseRouteur/firewall (optionnel).
VM 2Serveur Web (WordPress)Site web/blog.
VM 3JenkinsIntégration/déploiement (CI/CD).

Appareils Connectés (IoT)

  • Google Nest et Smart TV :
    • Isolés dans un VLAN IoT pour la sécurité.
    • Interagissent avec :
      • Home Assistant (commandes vocales, scénarios).
      • Emby (streaming depuis le NAS).
    • Contrôlés via Pi-hole pour bloquer les pubs.

Bonnes Pratiques

  • Réseau :
    • VLANs séparés (Trusted, IoT, Web, Media).
    • Pare-feu (pfSense) pour isoler les flux.
  • GPU :
    • Partage entre Frigate et Ollama via Docker dans un LXC dédié.
  • Sauvegardes :
    • Backuper Paperless, WordPress, et configurations Docker.

Schéma Réseau & Applications


graph TB
  %% Matériel
  Internet --> pfSense(VM1 - pfSense)
  pfSense --> RPi[Raspberry Pi]


  subgraph "NAS Synology"
    NAS[(DSM)] --> Emby
    NAS --> Paperless
    NAS --> Transmission
    NAS --> Duplicati
  end

  subgraph "Proxmox (PC Principal)"
    %% VLANs
    pfSense --> VLAN10[VLAN 10 - Trusted]
    pfSense --> VLAN20[VLAN 20 - Web]
    pfSense --> VLAN30[VLAN 30 - IoT]
    pfSense --> VLAN40[VLAN 40 - Media]

    %% Conteneurs/VM
    VLAN10 --> LXC1(LXC1 - Home Assistant)
    VLAN10 --> LXC2(LXC2 - Frigate + Ollama)
    VLAN10 --> LXC3(LXC3 - MQTT Explorer + Prometheus + Dashy)
    VLAN10 --> LXC5(LXC5 - Firefly III)

    VLAN20 --> VM2(VM2 - WordPress)
    VLAN20 --> VM4(VM4 - Jenkins)

    VLAN30 --> GoogleNest(Google Nest)
    VLAN30 --> SmartTV(Smart TV)

    VLAN40 --> NAS
  end

  %% Légende
  style VLAN10 fill:#d5f5e3,stroke:#27ae60
  style VLAN20 fill:#d6eaf8,stroke:#3498db
  style VLAN30 fill:#fadbd8,stroke:#e74c3c
  style VLAN40 fill:#fdedec,stroke:#f39c12

Légende Détaillée

ÉlémentDescription
🟠 pfSense (VM1)Routeur/firewall gérant les VLANs et la sécurité.
🟢 Raspberry PiExécute Pi-hole (DNS) + Gatus (monitoring).
🔵 NAS SynologyStockage central + applications média (Emby) et docs (Paperless).
VLAN 10 (Trusted)Services critiques : HA, Frigate, Ollama, monitoring.
VLAN 20 (Web)Services exposés : WordPress, Jenkins.
VLAN 30 (IoT)Appareils connectés (Google Nest, Smart TV) isolés pour sécurité.
VLAN 40 (Media)Accès aux médias (Emby) depuis la Smart TV.

Flux Clés à Retenir

  1. Google Nest/Smart TV → Communiquent avec Home Assistant (VLAN 10) via règles firewall précises.
  2. Frigate (VLAN 10) → Envoie les alertes à Home Assistant et Smart TV (via VLAN 30 autorisé).
  3. WordPress/Jenkins (VLAN 20) → Accessibles depuis Internet (port forwarding contrôlé par pfSense).
  4. Paperless (NAS) → Consommé par l’utilisateur via interface web (protégée par mot de passe).

Exemple de Configuration pfSense (Règles VLAN 30 → VLAN 10)

ActionSourceDestinationPortDescription
✅ AllowVLAN30LXC1 (HA)8123Accès à l’interface HA.
✅ AllowVLAN30LXC2 (Frigate)5000Flux vidéo pour affichage TV.
🚫 BlockVLAN30VLAN10*Bloquer tout autre accès.

Bonnes Pratiques

Pour les Nest

  • Mise à jour firmware : Vérifiez régulièrement via l’app Google Home.
  • Isolation : Bloquez l’accès aux autres VLANs sauf pour :
    • Home Assistant (port 8123).
    • MQTT Explorer (si utilisé, port 1883).

Pour la Smart TV

  • DNS personnalisé : Redirigez-la vers Pi-hole (Raspberry Pi) pour bloquer les pubs.
    • Dans pfSense : DHCP → Option DNS = IP du Pi-hole.
  • Désactivez le suivi : Désactivez ACR (Automatic Content Recognition) dans les paramètres TV.

Intégration de la Smart TV

Configuration Réseau

  • VLAN : Même VLAN IoT (30) que les Nest pour simplifier.
  • Règles pfSense :
    • Autorisez la TV à accéder à :
      • Internet (streaming Netflix/YouTube).
      • Emby/Jellyfin (NAS) via le VLAN Media (ex: VLAN 40 si existant).

Interaction avec Home Lab

  • Pour Emby/Jellyfin (NAS) :
    • Montez un dossier partagé Synology en SMB/NFS accessible à la TV.
    • Exemple de configuration Emby :yamlCopy# docker-compose.yml (NAS) volumes: – /volume1/medias:/media
  • Contrôle via Home Assistant :
    • Intégrez la TV via HDMI-CEC ou API spécifique (ex: Samsung Tizen, LG webOS).
    • Automatisations possibles :
      • Allumer/éteindre la TV quand Frigate détecte un mouvement.
      • Afficher les caméras sur la TV via un dashboard.

Intégration des Google Nest (Assistant Google)

Configuration Réseau

  • VLAN Recommandé : Isolez-les dans un VLAN IoT (ex: VLAN 30) pour limiter l’accès au reste du réseau.
    • Pour pfSense (VM1) :CopyCréez un VLAN 30 → Interface dédiée → Règles de firewall : – Autoriser OUT vers Internet (HTTPS/DNS). – Bloquer l’accès aux autres VLANs (sauf exceptions comme Home Assistant).

Communication avec Home Assistant (LXC1)

  • Via le protocole local :
    • Activez Google Assistant SDK dans Home Assistant.
    • Utilisez Nabu Casa (ou un domaine personnalisé avec HTTPS) pour la liaison sécurisée.
  • Scénarios :
    • Contrôle des lumières/prises via commandes vocales.
    • Synchronisation avec vos calendriers/rappels.

paperless-AI

Prompt:

You are a personalized document analyzer. Your task is to analyze documents and extract relevant information.

Analyze the document content and extract the following information into a structured JSON object:

1. TITLE: Create a concise, meaningful title for the document.
2. CORRESPONDENT: Identify the sender/institution, excluding addresses.
3. TAGS: Select from 4 to 10 relevant thematic tags.
4. DOCUMENT_DATE: Extract the document date (format: YYYY-MM-DD).
5. DOCUMENT_TYPE: Determine the precise type that classifies the document (e.g., Invoice, Contract, Employer, Information, etc.).
6. LANGUAGE: Determine the document language (e.g., "de" for German, "en" for English, etc.).

IMPORTANT RULES FOR THE ANALYSIS:

- FOR TAGS:
  - FIRST, remove all tags except "testAi."
  - One tag must refer to the receiver of the document.
  - Choose only relevant categories and select between 4 and 10 tags (6 minimum if possible).
  - Avoid generic or overly specific tags.
  - Use only the most important information to generate the tags.
  
- FOR THE TITLE:
  - Keep it short and concise—NO ADDRESSES.
  - Include the most important identifying features.
  - For invoices or orders, mention the invoice/order number if available.
  
- FOR THE CORRESPONDENT:
  - Identify the sender or institution.
  - Use the shortest form possible for the company name (e.g., "Amazon" instead of "Amazon EU SARL, German branch").

- FOR THE DOCUMENT DATE:
  - Extract the document's date in the format YYYY-MM-DD.
  - If there are multiple dates, use the most relevant one (e.g., the signing date).

- FOR THE LANGUAGE:
  - Identify the language of the document.
  - Use language codes such as "de" for German or "en" for English.
  - If the language is unclear, use "und" as a placeholder.

The output language will be FRENCH.
You are a personalized document analyzer. Your task is to analyze documents and extract relevant information.

Analyze the document content and extract the following information into a structured JSON object:

1. title: Create a concise, meaningful title for the document
2. correspondent: Identify the sender/institution but do not include addresses
3. tags: Select up to 10 relevant thematic tags
4. document_date: Extract the document date (format: YYYY-MM-DD)
5. document_type: Determine a precise type that classifies the document (e.g. Invoice, Contract, Employer, Information and so on)
6. receiver: Identify the receiver of the document and put it into "CustomAiField"
      
Important rules for the analysis:

For tags:
- Use only relevant categories
- Maximum 10 tags per document, less if sufficient (at least 6)
- Avoid generic or too specific tags
- Use only the most important information for tag creation
- The output language is FRENCH

For the title:
- Short and concise, NO ADDRESSES
- Contains the most important identification features
- For invoices/orders, mention invoice/order number if available
- The output language is FRENCH

For the correspondent:
- Identify the sender or institution
  When generating the correspondent, always create the shortest possible form of the company name (e.g. "Amazon" instead of "Amazon EU SARL, German branch")

For the document date:
- Extract the date of the document
- Use the format YYYY-MM-DD
- If multiple dates are present, use the most relevant one (e.g., the signing date).


The output language will be FRENCH.

install frigate

Installation :

https://www.hacf.fr/installation-frigate-proxmox/

https://community-scripts.github.io/ProxmoxVE/scripts?id=frigate

sudo apt -y install nfs-common
sudo apt -y install cifs-utils
sudo mkdir /Ftp

 sudo nano /etc/fstab
 //192.212.5.111/40-Ftp                       /Ftp                  cifs rw,credentials=/root/.sharelogin,nobrl,_netdev,uid=1000,gid=1000 0 0

sudo ln -s /Ftp/frigate /media/

in ha:

https://github.com/blakeblackshear/frigate-hass-integration

https://github.com/blakeblackshear/frigate-hass-addons