fix(fusion_iot): point poller at public URL so Pi is site-portable

Pi is at our office today but moves to the client's shop in the next
few days. The client accesses Odoo at https://erp.enplating.ca (not a
LAN/Tailscale path — it's the same HTTPS URL any browser uses). By
pointing the poller at the public URL instead of the internal
10.200.1.26 LAN IP, the Pi works IDENTICALLY wherever it's plugged
in — no reconfiguration when it physically relocates.

- Updated poller's docstring + example config to use
  https://erp.enplating.ca
- Updated fusion_iot/CLAUDE.md with the portable-deployment notes and
  the failed-Tailscale-on-entech side-story (LXC can't create tun,
  apt state broken from a pre-existing python3-lxml-html-clean
  conflict — skipped because public URL is simpler anyway).

Verified live: poller restarted against https://erp.enplating.ca,
HTTP 200, TLS valid, 121ms RTT, two consecutive readings accepted
(46.25°C, 45.94°C — probe still cooling from the out-of-spec test).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
gsinghpal
2026-04-20 16:03:11 -04:00
parent efb11df983
commit dd575135ae
2 changed files with 23 additions and 3 deletions

View File

@@ -6,9 +6,14 @@ and POSTs each reading to the configured Odoo instance. Runs forever under
systemd; reads a config file at /etc/fp-iot/poller.conf.
Config file format:
ODOO_URL=http://10.200.1.26:8069
ODOO_URL=https://erp.enplating.ca
INGEST_TOKEN=fp-iot-XXXXXXXXXXXXX
INTERVAL_SECONDS=30
Use the customer-facing public URL (whatever their browser uses to
log into Odoo) — not an internal LAN IP. This way the Pi is site-
portable: same image/config works at office, client, or anywhere
with internet.
"""
import glob
import json