A small FastAPI service on a home server or VPS can poll the Arduino over HTTP on the LAN, then expose a stable HTTPS URL to the internet. That keeps TLS and authentication off the microcontroller while preserving the JSON your dashboard already understands. If the Uno should push instead of waiting for a pull, run sketches/relay/push_https_forward.py and the ethernet_dht22_ingest sample: see Python feeds.
Minimal architecture
- Scheduler or on-demand fetch hits
http://arduino.local/...on the LAN. - FastAPI route returns the latest cached body with correct
Content-Type. - Reverse proxy (Caddy, nginx) terminates TLS on a public hostname.
Configuration tips
- Set reasonable timeouts: garage uplink is slower than datacenter RTT.
- Log upstream errors separately from client 404s.
- Version the relay when JSON schema changes.
Caching layer
Add Redis cache so Cloudflare Workers and the Astro site do not hammer your home IP on every page view. Security: relay security.