<mxfile host="Electron" agent="Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) draw.io/29.6.1 Chrome/142.0.7444.265 Electron/39.8.0 Safari/537.36" version="29.6.1">
  <diagram id="homelab" name="Architettura Homelab">
    <mxGraphModel dx="983" dy="745" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="1300" pageHeight="960" math="0" shadow="0">
      <root>
        <mxCell id="0" />
        <mxCell id="1" parent="0" />
        <mxCell id="title" parent="1" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;fontSize=16;fontStyle=1;" value="Architettura Homelab — sciaccaweb.net (aggiornato 09/09/2026)" vertex="1">
          <mxGeometry height="30" width="880" x="330" y="5" as="geometry" />
        </mxCell>
        <mxCell id="ext_intervals" parent="1" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#f5f5f5;strokeColor=#666666;" value="Intervals.icu API&#xa;(wellness/atleti)" vertex="1">
          <mxGeometry height="60" width="220" x="40" y="70" as="geometry" />
        </mxCell>
        <mxCell id="ext_sensors" parent="1" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#f5f5f5;strokeColor=#666666;" value="Sensori IoT&#xa;(Tuya / Meross / SwitchBot)" vertex="1">
          <mxGeometry height="60" width="220" x="40" y="240" as="geometry" />
        </mxCell>
        <mxCell id="ext_tp" parent="1" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#f5f5f5;strokeColor=#666666;" value="Travelpayouts Data API&#xa;(prezzi voli)" vertex="1">
          <mxGeometry height="60" width="220" x="40" y="420" as="geometry" />
        </mxCell>
        <mxCell id="ext_telegram" parent="1" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#f5f5f5;strokeColor=#666666;" value="Telegram Cloud&#xa;(Bot API)" vertex="1">
          <mxGeometry height="60" width="220" x="40" y="560" as="geometry" />
        </mxCell>
        <mxCell id="ext_users" parent="1" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#f5f5f5;strokeColor=#666666;" value="Utenti / Browser" vertex="1">
          <mxGeometry height="60" width="220" x="40" y="700" as="geometry" />
        </mxCell>
        <mxCell id="host" parent="1" style="rounded=0;whiteSpace=wrap;html=1;verticalAlign=top;fontSize=14;fontStyle=1;fillColor=none;strokeColor=#000000;strokeWidth=2;dashed=0;align=left;spacingLeft=10;" value="Host sciaccaweb.net (utente opc) — SELinux Enforcing — Node 22 · Python3 + Playwright" vertex="1">
          <mxGeometry height="880" width="880" x="330" y="40" as="geometry" />
        </mxCell>
        <mxCell id="docker" parent="1" style="rounded=1;whiteSpace=wrap;html=1;verticalAlign=top;fontStyle=1;fillColor=#fafafa;strokeColor=#999999;dashed=1;" value="Docker — dashboard/docker-compose.yml" vertex="1">
          <mxGeometry height="320" width="460" x="370" y="110" as="geometry" />
        </mxCell>
        <mxCell id="mosquitto" parent="1" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#dae8fc;strokeColor=#6c8ebf;" value="Mosquitto&#xa;(broker MQTT — systemd)" vertex="1">
          <mxGeometry height="60" width="180" x="400" y="70" as="geometry" />
        </mxCell>
        <mxCell id="tuya2mqtt" parent="1" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#dae8fc;strokeColor=#6c8ebf;" value="tuya2mqtt&#xa;(Tuya Cloud → MQTT — systemd)" vertex="1">
          <mxGeometry height="60" width="190" x="620" y="70" as="geometry" />
        </mxCell>
        <mxCell id="sala2mqtt" parent="1" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#dae8fc;strokeColor=#6c8ebf;" value="sala2mqtt&#xa;(Sala Temp → MQTT — systemd)" vertex="1">
          <mxGeometry height="60" width="180" x="840" y="70" as="geometry" />
        </mxCell>
        <mxCell id="docker" parent="1" style="rounded=1;whiteSpace=wrap;html=1;verticalAlign=top;fontStyle=1;fillColor=#fafafa;strokeColor=#999999;dashed=1;" value="Docker — dashboard/docker-compose.yml" vertex="1">
          <mxGeometry height="180" width="460" x="370" y="150" as="geometry" />
        </mxCell>
        <mxCell id="influxdb" parent="1" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#ffe6cc;strokeColor=#d79b00;" value="InfluxDB 2.7 :8086&#xa;buckets: switchbot · voli · cycling · bike" vertex="1">
          <mxGeometry height="70" width="180" x="630" y="155" as="geometry" />
        </mxCell>
        <mxCell id="homeassistant" parent="1" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#dae8fc;strokeColor=#6c8ebf;" value="Home Assistant&#xa;https://homeassistant.sciaccaweb.net&#xa;(rete host, :8123)" vertex="1">
          <mxGeometry height="60" width="180" x="400" y="260" as="geometry" />
        </mxCell>
        <mxCell id="grafana" parent="1" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#dae8fc;strokeColor=#6c8ebf;" value="Grafana :3000&#xa;grafana.sciaccaweb.net&#xa;(viewer anonimo)" vertex="1">
          <mxGeometry height="70" width="180" x="630" y="255" as="geometry" />
        </mxCell>
        <mxCell id="collector" parent="1" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#d5e8d4;strokeColor=#82b366;" value="collector.py&#xa;(cron ogni 1 min)&#xa;tinytuya / meross / switchbot" vertex="1">
          <mxGeometry height="80" width="180" x="400" y="480" as="geometry" />
        </mxCell>
        <mxCell id="viaggi" parent="1" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#e1d5e7;strokeColor=#9673a6;" value="viaggi — Node 22 + TS&#xa;Playwright scraper&#xa;check_prezzi_auto.ts (cron 06:00)&#xa;scrape kayak GOA-NYC (06:30)" vertex="1">
          <mxGeometry height="110" width="220" x="380" y="640" as="geometry" />
        </mxCell>
        <mxCell id="training" parent="1" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#e1d5e7;strokeColor=#9673a6;" value="training-data — Section 11&#xa;sync.py (cron 1 min)&#xa;export_influx.py (10 min)&#xa;export_athletes_influx.py (30 min)" vertex="1">
          <mxGeometry height="90" width="220" x="660" y="640" as="geometry" />
        </mxCell>
        <mxCell id="bike_dash" parent="1" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#d5e8d4;strokeColor=#82b366;" value="bike-dashboard (FastAPI :8010)&#xa;Garmin Edge 1050 LiveTrack&#xa;→ bucket bike · MQTT bike/live&#xa;WebSocket frontend Leaflet" vertex="1">
          <mxGeometry height="100" width="300" x="380" y="350" as="geometry" />
        </mxCell>
        <mxCell id="tennis" parent="1" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#d5e8d4;strokeColor=#82b366;" value="tennis — ATP&#xa;check_results_cron.py (08:00)&#xa;pubblica tabellone su WP" vertex="1">
          <mxGeometry height="60" width="200" x="400" y="575" as="geometry" />
        </mxCell>
        <mxCell id="shopping" parent="1" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#d5e8d4;strokeColor=#82b366;" value="shopping — prezzi Vittoria Corsa&#xa;scraper + storico" vertex="1">
          <mxGeometry height="60" width="180" x="620" y="575" as="geometry" />
        </mxCell>
        <mxCell id="agents" parent="1" style="rounded=1;whiteSpace=wrap;html=1;verticalAlign=top;fontStyle=1;fillColor=#fafafa;strokeColor=#999999;dashed=1;" value="Agenti / Automazione — /home/opc/system" vertex="1">
          <mxGeometry height="150" width="460" x="370" y="760" as="geometry" />
        </mxCell>
        <mxCell id="tg_bot" parent="1" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#d5e8d4;strokeColor=#82b366;" value="telegram-opencode-bot&#xa;(Telegram → OpenCode)" vertex="1">
          <mxGeometry height="70" width="140" x="390" y="805" as="geometry" />
        </mxCell>
        <mxCell id="opencode" parent="1" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#ffe6cc;strokeColor=#d79b00;" value="opencode serve :4096&#xa;(API HTTP — big-pickle)" vertex="1">
          <mxGeometry height="70" width="140" x="545" y="805" as="geometry" />
        </mxCell>
        <mxCell id="shell_bot" parent="1" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#d5e8d4;strokeColor=#82b366;" value="telegram-shell-bot&#xa;(comandi shell/SSH)" vertex="1">
          <mxGeometry height="70" width="130" x="700" y="805" as="geometry" />
        </mxCell>
        <mxCell id="web" parent="1" style="rounded=1;whiteSpace=wrap;html=1;verticalAlign=top;fontStyle=1;fillColor=#fafafa;strokeColor=#999999;dashed=1;" value="Web — /var/www/html_wp" vertex="1">
          <mxGeometry height="180" width="250" x="930" y="640" as="geometry" />
        </mxCell>
        <mxCell id="nginx" parent="1" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#fff2cc;strokeColor=#d6b656;" value="nginx — vhost: sciaccaweb.net ·&#xa;wordpress · training&#xa;+ PHP-FPM 8.0 (Certbot TLS)" vertex="1">
          <mxGeometry height="70" width="200" x="955" y="675" as="geometry" />
        </mxCell>
        <mxCell id="mysql" parent="1" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#fff2cc;strokeColor=#d6b656;" value="MySQL&#xa;(wordpress)" vertex="1">
          <mxGeometry height="50" width="200" x="955" y="755" as="geometry" />
        </mxCell>
        <mxCell id="backup" parent="1" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#d5e8d4;strokeColor=#82b366;dashed=1;" value="influxdb-backup.sh&#xa;(cron 02:00)" vertex="1">
          <mxGeometry height="60" width="220" x="930" y="420" as="geometry" />
        </mxCell>
        <mxCell id="e1" edge="1" parent="1" source="ext_sensors" style="edgeStyle=orthogonalEdgeStyle;rounded=1;html=1;" target="collector">
          <mxGeometry relative="1" as="geometry">
            <Array as="points">
              <mxPoint x="370" y="270" />
              <mxPoint x="370" y="520" />
            </Array>
          </mxGeometry>
        </mxCell>
        <mxCell id="e1l" parent="1" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;" value="API cloud (lettura sensori)" vertex="1">
          <mxGeometry height="30" width="160" x="40" y="390" as="geometry" />
        </mxCell>
        <mxCell id="e2" edge="1" parent="1" source="collector" style="edgeStyle=orthogonalEdgeStyle;rounded=1;html=1;exitX=0;exitY=0.5;entryX=0.5;entryY=1;" target="mosquitto">
          <mxGeometry relative="1" as="geometry">
            <Array as="points">
              <mxPoint x="340" y="520" />
              <mxPoint x="340" y="140" />
              <mxPoint x="490" y="140" />
            </Array>
          </mxGeometry>
        </mxCell>
        <mxCell id="e3" edge="1" parent="1" source="mosquitto" style="edgeStyle=orthogonalEdgeStyle;rounded=1;html=1;exitY=1;" target="influxdb">
          <mxGeometry relative="1" as="geometry">
            <Array as="points">
              <mxPoint x="490" y="180" />
            </Array>
          </mxGeometry>
        </mxCell>
        <mxCell id="e4" edge="1" parent="1" source="mosquitto" style="edgeStyle=orthogonalEdgeStyle;rounded=1;html=1;" target="homeassistant">
          <mxGeometry relative="1" as="geometry" />
        </mxCell>
        <mxCell id="e5" edge="1" parent="1" source="ext_intervals" style="edgeStyle=orthogonalEdgeStyle;rounded=1;html=1;" target="training">
          <mxGeometry relative="1" as="geometry" />
        </mxCell>
        <mxCell id="e6" edge="1" parent="1" source="ext_tp" style="edgeStyle=orthogonalEdgeStyle;rounded=1;html=1;" target="viaggi">
          <mxGeometry relative="1" as="geometry" />
        </mxCell>
        <mxCell id="e7" edge="1" parent="1" source="training" style="edgeStyle=orthogonalEdgeStyle;rounded=1;html=1;" target="influxdb" value="bucket: cycling">
          <mxGeometry relative="1" as="geometry" />
        </mxCell>
        <mxCell id="e8" edge="1" parent="1" source="viaggi" style="edgeStyle=orthogonalEdgeStyle;rounded=1;html=1;" target="influxdb" value="bucket: voli">
          <mxGeometry relative="1" as="geometry" />
        </mxCell>
        <mxCell id="e9" edge="1" parent="1" source="influxdb" style="edgeStyle=orthogonalEdgeStyle;rounded=1;html=1;" target="grafana">
          <mxGeometry relative="1" as="geometry" />
        </mxCell>
        <mxCell id="e11" edge="1" parent="1" source="ext_users" style="edgeStyle=orthogonalEdgeStyle;rounded=1;html=1;" target="nginx" value="https :80/443">
          <mxGeometry relative="1" as="geometry" />
        </mxCell>
        <mxCell id="e12" edge="1" parent="1" source="nginx" style="edgeStyle=orthogonalEdgeStyle;rounded=1;html=1;" target="mysql">
          <mxGeometry relative="1" as="geometry" />
        </mxCell>
        <mxCell id="e13" edge="1" parent="1" source="influxdb" style="edgeStyle=orthogonalEdgeStyle;rounded=1;html=1;dashed=1;" target="backup">
          <mxGeometry relative="1" as="geometry" />
        </mxCell>
        <mxCell id="e14" edge="1" parent="1" source="nginx" style="edgeStyle=orthogonalEdgeStyle;rounded=1;html=1;" target="homeassistant" value="proxy :8123">
          <mxGeometry relative="1" as="geometry">
            <Array as="points">
              <mxPoint x="955" y="570" />
              <mxPoint x="580" y="570" />
              <mxPoint x="580" y="320" />
            </Array>
          </mxGeometry>
        </mxCell>
        <mxCell id="e15" edge="1" parent="1" source="nginx" style="edgeStyle=orthogonalEdgeStyle;rounded=1;html=1;" target="grafana" value="proxy :3000">
          <mxGeometry relative="1" as="geometry">
            <Array as="points">
              <mxPoint x="1055" y="570" />
              <mxPoint x="720" y="570" />
              <mxPoint x="720" y="325" />
            </Array>
          </mxGeometry>
        </mxCell>
        <mxCell id="e16" edge="1" parent="1" source="ext_telegram" style="edgeStyle=orthogonalEdgeStyle;rounded=1;html=1;" target="tg_bot">
          <mxGeometry relative="1" as="geometry">
            <Array as="points">
              <mxPoint x="150" y="640" />
              <mxPoint x="150" y="845" />
            </Array>
          </mxGeometry>
        </mxCell>
        <mxCell id="e17" edge="1" parent="1" source="ext_telegram" style="edgeStyle=orthogonalEdgeStyle;rounded=1;html=1;exitX=0;exitY=1;entryX=0.5;entryY=0;" target="shell_bot" value="webhook / polling">
          <mxGeometry relative="1" as="geometry">
            <Array as="points">
              <mxPoint x="30" y="620" />
              <mxPoint x="30" y="895" />
              <mxPoint x="765" y="895" />
            </Array>
          </mxGeometry>
        </mxCell>
        <mxCell id="e18" edge="1" parent="1" source="tg_bot" style="edgeStyle=orthogonalEdgeStyle;rounded=1;html=1;entryX=0;entryY=0.5;" target="opencode" value="API">
          <mxGeometry relative="1" as="geometry" />
        </mxCell>
        <mxCell id="e19" edge="1" parent="1" source="ext_sensors" style="edgeStyle=orthogonalEdgeStyle;rounded=1;html=1;exitX=1;exitY=0.5;entryX=0;entryY=0.5;" target="tuya2mqtt" value="Tuya Cloud">
          <mxGeometry relative="1" as="geometry">
            <Array as="points">
              <mxPoint x="340" y="270" />
              <mxPoint x="340" y="100" />
              <mxPoint x="620" y="100" />
            </Array>
          </mxGeometry>
        </mxCell>
        <mxCell id="e20" edge="1" parent="1" source="ext_sensors" style="edgeStyle=orthogonalEdgeStyle;rounded=1;html=1;exitX=1;exitY=0.5;entryX=0.5;entryY=0;" target="sala2mqtt" value="Tuya Cloud">
          <mxGeometry relative="1" as="geometry">
            <Array as="points">
              <mxPoint x="340" y="270" />
              <mxPoint x="340" y="150" />
              <mxPoint x="930" y="150" />
            </Array>
          </mxGeometry>
        </mxCell>
        <mxCell id="e21" edge="1" parent="1" source="tuya2mqtt" style="edgeStyle=orthogonalEdgeStyle;rounded=1;html=1;exitX=0;exitY=0.5;entryX=1;entryY=0.5;" target="mosquitto" value="MQTT">
          <mxGeometry relative="1" as="geometry" />
        </mxCell>
        <mxCell id="e22" edge="1" parent="1" source="sala2mqtt" style="edgeStyle=orthogonalEdgeStyle;rounded=1;html=1;exitY=1;entryX=0.5;entryY=1;" target="mosquitto" value="MQTT">
          <mxGeometry relative="1" as="geometry">
            <Array as="points">
              <mxPoint x="930" y="150" />
              <mxPoint x="490" y="150" />
            </Array>
          </mxGeometry>
        </mxCell>
        <mxCell id="e23" edge="1" parent="1" source="bike_dash" style="edgeStyle=orthogonalEdgeStyle;rounded=1;html=1;exitX=1;exitY=0.5;entryX=1;entryY=0.5;" target="influxdb" value="bucket: bike">
          <mxGeometry relative="1" as="geometry">
            <Array as="points">
              <mxPoint x="850" y="400" />
              <mxPoint x="850" y="190" />
            </Array>
          </mxGeometry>
        </mxCell>
        <mxCell id="e24" edge="1" parent="1" source="bike_dash" style="edgeStyle=orthogonalEdgeStyle;rounded=1;html=1;exitX=0.5;exitY=0;entryX=0;entryY=1;" target="mosquitto" value="MQTT bike/live">
          <mxGeometry relative="1" as="geometry">
            <Array as="points">
              <mxPoint x="530" y="340" />
              <mxPoint x="340" y="340" />
              <mxPoint x="340" y="130" />
              <mxPoint x="400" y="130" />
            </Array>
          </mxGeometry>
        </mxCell>
        <mxCell id="e25" edge="1" parent="1" source="tennis" style="edgeStyle=orthogonalEdgeStyle;rounded=1;html=1;exitX=1;exitY=0.5;" target="nginx" value="pubblica tabellone">
          <mxGeometry relative="1" as="geometry">
            <Array as="points">
              <mxPoint x="1050" y="605" />
            </Array>
          </mxGeometry>
        </mxCell>
      </root>
    </mxGraphModel>
  </diagram>
</mxfile>
