Phase A of the IoT initiative — gets the server-side infrastructure
in place before the Raspberry Pi hardware arrives, so the iot admin
UI + /fp/iot/ingest endpoint are ready to accept the first real
temperature reading as soon as the Pi is wired up.
New top-level folder: fusion_iot/
1. **iot_base/** — Odoo S.A. iot_base module, copied from
RePackaged-Odoo verbatim. LGPL-3 upstream, no changes needed.
2. **iot/** — Odoo S.A. iot module, repackaged:
- `models/update.py` neutralised (removed the publisher_warranty
IoT-Box-counting report that phones home to odoo.com for
enterprise licence enforcement)
- `iot_handlers/lib/load_worldline_library.sh` deleted (proprietary
Worldline payment lib fetch from download.odoo.com, not needed)
- `wizard/add_iot_box.py._connect_iot_box_with_pairing_code` —
upstream called odoo.com's iot-proxy to resolve pairing codes;
replaced with a no-op. Pi-side iot_drivers proxy registers
directly with this Odoo server instead.
- Manifest rebranded with an explicit changelog preamble.
3. **fusion_plating_iot/** — new plating-specific wrapper:
- `fp.tank.sensor` — maps an iot.device (or a direct-HTTP-ingest
sensor) to a fusion.plating.tank + fusion.plating.bath.parameter.
Supports DS18B20, PT100/1000, pH, conductivity, level. Per-sensor
alert_min/max overrides.
- `fp.tank.reading` — append-only time-series. On create, evaluates
against sensor's alert range. On in-spec → out-of-spec TRANSITION,
auto-raises a fusion.plating.quality.hold (once per excursion,
no spam during sustained out-of-spec).
- `POST /fp/iot/ingest` — shared-secret HTTP endpoint for sensors
bypassing the Pi proxy. Token via X-FP-IOT-Token header OR body.
Accepts single-reading or batch payloads.
- Menu under Plating → Operations → Sensors & Readings.
- Tank form inherits get a Sensors tab inline.
Deployed to entech. Verified end-to-end:
- Install: iot_base + iot + fusion_plating_iot all 'installed'
- Smoke test: in-spec → out-of-spec → hold raised (HOLD-0010);
continued excursion → NO duplicate hold; back-in-spec → NEW
excursion → NEW hold (HOLD-0011) ✓
- HTTP endpoint: correct token → 200 accepted; wrong token → 401;
unknown device_serial → 404; batch payload → 200 accepted=N ✓
Phase B (when Raspberry Pi hardware arrives): DS18B20 iot_handler
driver for the Pi-side iot_drivers proxy + systemd service on
vanilla Raspberry Pi OS + first live reading from physical probe.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 line
11 KiB
XML
1 line
11 KiB
XML
<?xml version="1.0" encoding="UTF-8"?><svg id="b" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 280 280"><g id="bh"><g style="isolation:isolate;"><path d="m148.9667,97.8172l56.3836,32.7666c-2.0144-1.1706-4.7973-.9794-7.82.7658l-56.3837-32.7666c3.0227-1.7452,5.8056-1.9364,7.82-.7658Z" style="fill:#c1dbf6;"/><path d="m131.7331,257.6382l-56.3837-32.7666c-2.4807-1.4416-3.7587-4.9083-2.9969-9.7052l56.3837,32.7666c-.7618,4.7968.5162,8.2635,2.9969,9.7052Z" style="fill:#fff;"/><polygon points="146.9 160.581 90.5163 127.8144 141.1467 98.583 197.5303 131.3496 146.9 160.581" style="fill:#c1dbf6;"/><polygon points="128.7362 247.933 72.3525 215.1664 79.7868 144.1208 136.1705 176.8874 128.7362 247.933" style="fill:#fff;"/><path d="m197.5303,131.3496c5.2227-3.0153,9.7294-1.3917,10.7932,3.8803l7.0972,62.6558c1.4204,7.0136-3.7623,17.3467-10.7152,21.361l-65.1618,37.6212c-6.9529,4.0142-12.1772-.3104-10.8074-8.9349l7.4343-71.0456c1.0304-6.481,5.5133-13.2948,10.7295-16.3064l50.6303-29.2314Z" style="fill:#fbdbd0;"/><path d="m84.3463,133.5685c-2.2941,3.1274-3.9775,6.8926-4.5594,10.5522l56.3837,32.7666c.515-3.2388,1.8923-6.5605,3.7924-9.4497l-55.6166-33.8691Z" style="fill:#fff;"/><path d="m146.9,160.5812l-56.3836-32.7666c-2.2707,1.3105-4.4017,3.3433-6.1701,5.7539l55.6166,33.8691c1.902-2.8921,4.3278-5.3501,6.9371-6.8564Z" style="fill:#c1dbf6;"/></g><path d="m173.1554,157.8091c-16.1085,9.3002-29.1226,31.8414-29.0701,50.3513s13.1517,25.9749,29.2601,16.6747c16.1085-9.3003,29.1226-31.8418,29.0701-50.3517s-13.1516-25.9746-29.2601-16.6743" style="fill:#fff;"/><line x1="172.7846" y1="214.2643" x2="172.8106" y2="223.4419" style="fill:none; stroke:#374874; stroke-linecap:round; stroke-linejoin:round; stroke-width:2px;"/><line x1="159.3881" y1="215.3274" x2="153.7591" y2="225.0773" style="fill:none; stroke:#374874; stroke-linecap:round; stroke-linejoin:round; stroke-width:2px;"/><line x1="153.9807" y1="202.8458" x2="145.9938" y2="207.457" style="fill:none; stroke:#374874; stroke-linecap:round; stroke-linejoin:round; stroke-width:2px;"/><line x1="200.059" y1="176.2425" x2="192.0722" y2="180.8537" style="fill:none; stroke:#374874; stroke-linecap:round; stroke-linejoin:round; stroke-width:2px;"/><line x1="186.3242" y1="200.2744" x2="191.9899" y2="203.5031" style="fill:none; stroke:#374874; stroke-linecap:round; stroke-linejoin:round; stroke-width:2px;"/><line x1="173.3589" y1="169.2584" x2="173.3328" y2="160.0808" style="fill:none; stroke:#374874; stroke-linecap:round; stroke-linejoin:round; stroke-width:2px;"/><line x1="186.7554" y1="168.1953" x2="192.3844" y2="158.4454" style="fill:none; stroke:#374874; stroke-linecap:round; stroke-linejoin:round; stroke-width:2px;"/><line x1="192.1628" y1="180.6769" x2="200.1496" y2="176.0657" style="fill:none; stroke:#374874; stroke-linecap:round; stroke-linejoin:round; stroke-width:2px;"/><line x1="146.0844" y1="207.2802" x2="154.0713" y2="202.669" style="fill:none; stroke:#374874; stroke-linecap:round; stroke-linejoin:round; stroke-width:2px;"/><line x1="159.8193" y1="183.2483" x2="154.1536" y2="180.0196" style="fill:none; stroke:#374874; stroke-linecap:round; stroke-linejoin:round; stroke-width:2px;"/><path d="m170.4637,195.9413c.1789-2.9607,1.871-6.0278,4.1338-7.9184,1.2925-1.0563,3.1972-2.0126,4.811-1.1171-.0709-.0421-2.1156-1.236-2.1135-1.2189-.3153-.1516-.6601-.2345-1.0091-.257-2.1287-.0811-4.0875,1.6395-5.3194,3.2303-.9548,1.2463-1.6885,2.6704-2.114,4.1832-.5856,1.9635-.5242,4.7487,1.1923,5.7087,0,0,1.94,1.1274,1.94,1.1274-1.0251-.535-1.6433-2.1076-1.5211-3.7382Z" style="fill:#374874;"/><path d="m174.8243,197.2543c2.0933-1.2086,3.7849-4.1379,3.7781-6.5433-.0029-1.0354-.3213-1.803-.8486-2.2471-.5959-.1048-1.3068.0436-2.0696.484-2.0845,1.2035-3.7749,4.1314-3.7681,6.5273.003,1.0586.3374,1.8381.8893,2.2753.5852.0861,1.2773-.0681,2.0189-.4962Z" style="fill:#fff;"/><path d="m178.3736,188.6865s-.2054-.1447-.6197-.2225c.5273.4442.8457,1.2118.8486,2.2471.0068,2.4053-1.6849,5.3347-3.7781,6.5433-.7416.4281-1.4337.5823-2.0189.4962-.2325-.1841.2147.1473.2147.1473.0069.004.0138.008.0208.0119.0079.0044.0164.0076.0244.0119.0456.0248.0923.0476.1401.0685.0088.0038.017.0089.0259.0127.0072.003.0149.0049.0221.0078.0564.0228.1137.0436.1728.061.0018.0005.0034.0013.0052.0018.0005.0001.0009.0002.0014.0004.002.0006.004.001.006.0016.0417.0119.0842.0221.1272.0313.0125.0027.0252.0052.0378.0076.0135.0026.0267.0058.0403.0081.0233.004.047.007.0707.0103.0103.0014.0203.0032.0307.0044.042.0052.0844.0094.1274.0121.0046.0003.0093.0002.0139.0005.0124.0007.025.0008.0374.0013.037.0015.0744.0021.1122.0018.0161-.0001.0322-.0004.0484-.0009.0129-.0003.0256-.0001.0386-.0007.0227-.001.046-.0033.069-.005.0173-.0012.0344-.0022.0517-.0037.0479-.0045.0963-.0102.1452-.0175.0047-.0007.0093-.0011.014-.0018.0007,0,.0013-.0001.002-.0002.0558-.0086.1122-.0192.1691-.0314.0165-.0036.0334-.0083.05-.0121.0376-.0087.075-.0171.1131-.0275.0032-.0009.0065-.0021.0097-.003.0672-.0185.1351-.0393.2037-.0628.0147-.005.0297-.0112.0444-.0164.0542-.0193.1087-.0398.1637-.0623.0077-.0032.0151-.0055.0228-.0087.0448-.0186.0898-.0384.1351-.0592.0057-.0026.0114-.0055.017-.0081.0516-.0239.1035-.0495.1557-.0761.0151-.0077.0302-.0155.0453-.0234.0577-.0303.1156-.0616.1739-.0953.0608-.0351.1211-.072.1811-.1099.0193-.0122.0384-.0251.0576-.0375.0408-.0265.0815-.0533.1219-.0811.0223-.0154.0445-.0311.0668-.0469.0374-.0264.0746-.0533.1116-.0808.0225-.0167.0449-.0336.0673-.0506.0375-.0287.0748-.058.1119-.0877.0208-.0166.0416-.033.0622-.0499.0422-.0347.0841-.0702.1258-.1061.0148-.0128.0298-.0251.0445-.038.0561-.0492.1116-.0995.1666-.1509.0125-.0116.0246-.0238.037-.0355.0354-.0336.0709-.067.1058-.1015.0056-.0055.011-.0114.0165-.0169.0651-.0646.1296-.1303.193-.1979.0006-.0006.0011-.0012.0017-.0019.0629-.067.1246-.1358.1857-.2055.0053-.0061.0108-.0118.0161-.0179.0233-.0268.0459-.0544.0689-.0816.0239-.0282.048-.0561.0716-.0847.0293-.0354.0579-.0716.0867-.1076.0227-.0284.0457-.0566.0682-.0854.0039-.005.008-.0098.0119-.0148.0067-.0087.0129-.0179.0196-.0266.0722-.0938.1426-.1894.2114-.2866.0069-.0098.0144-.019.0212-.0288.0033-.0047.0062-.0095.0095-.0142.0656-.0939.1293-.1893.1915-.2859.006-.0093.0124-.0181.0184-.0274.0089-.014.0171-.0285.0259-.0425.0502-.0794.0992-.1596.1469-.2405.0075-.0127.0156-.025.023-.0376.0028-.0048.0053-.0098.0081-.0146.054-.093.1063-.187.157-.2817.0041-.0077.0087-.0153.0128-.023.0082-.0155.0156-.0313.0237-.0468.0397-.0757.0783-.1519.1158-.2285.0077-.0157.0162-.0312.0238-.047.0045-.0092.0084-.0186.0128-.0279.0461-.0965.0908-.1935.1332-.2911.0014-.0033.0031-.0065.0045-.0098.0047-.0109.0088-.022.0135-.033.0375-.0875.0733-.1754.1077-.2634.0057-.0145.0122-.0288.0177-.0434.0045-.0117.0082-.0235.0126-.0352.0397-.1047.0778-.2096.1129-.3148.0008-.0024.0018-.0048.0026-.0072.0024-.0071.0042-.0143.0065-.0214.0356-.1077.0682-.2156.0987-.3234.0038-.0135.0086-.027.0124-.0406.0034-.0121.0062-.0242.0095-.0363.0088-.0324.017-.0648.0254-.0972.0112-.0434.0222-.0868.0325-.1301.0079-.033.0153-.066.0226-.0989.0053-.0236.0112-.0473.0162-.0709.0034-.016.0059-.0319.0092-.0479.0102-.0494.0195-.0987.0285-.1481.0062-.0341.0125-.0682.0182-.1021.0085-.051.0158-.1018.023-.1525.0034-.0241.0078-.0483.0109-.0723.0013-.0097.0021-.0194.0033-.0292.0029-.0229.0052-.0457.0078-.0685.0055-.0488.0105-.0974.0148-.146.0022-.0249.0043-.0497.0061-.0745.0037-.0489.0066-.0976.0089-.1462.0011-.0218.0024-.0437.0032-.0655.0026-.0695.0041-.1386.0039-.2072-.0034-1.1903-.425-2.0285-1.1041-2.4232Z" style="fill:#374874;"/><path d="m175.6796,187.2682c-2.891,1.6691-5.2352,5.7294-5.2258,9.0515.0094,3.3218,2.369,4.6666,5.26,2.9974,2.891-1.6691,5.2352-5.7294,5.2258-9.0515-.0094-3.3221-2.369-4.6666-5.26-2.9974Z" style="fill:#fff;"/><path d="m173.2944,199.5506c-1.5176,0-2.4639-1.209-2.4697-3.1543-.0088-3.1104,2.3281-7.0918,5.1045-8.6953.7373-.4248,1.4629-.6494,2.0986-.6494,1.4824,0,2.4062,1.2314,2.4121,3.2158.0088,3.1621-2.2236,7.0283-4.9766,8.6172-.7549.4355-1.5049.666-2.168.666h-.001Z" style="fill:#fff;"/><path d="m178.0277,187.5511c1.7668,0,1.9101,2.0796,1.9119,2.7173.0084,2.9517-2.1558,6.6992-4.7258,8.1826-.6793.3921-1.343.5996-1.9194.5996-1.7711,0-1.9675-1.8569-1.9698-2.6553-.0082-2.9028,2.2604-6.7632,4.855-8.2607.6608-.3818,1.2998-.5835,1.848-.5835m0-1c-.7075,0-1.5052.2305-2.3481.7173-2.8911,1.6689-5.3644,5.8076-5.355,9.1299.0066,2.333,1.2366,3.6523,2.9698,3.6523.7344,0,1.559-.2368,2.4193-.7334,2.8911-1.6689,5.2352-5.7295,5.2258-9.0518-.0067-2.353-1.1929-3.7144-2.9119-3.7144h0Z" style="fill:#374874;"/><path d="m175.6879,190.2167c-1.4761.8522-2.6731,2.9254-2.6683,4.6216.0048,1.6961,1.2096,2.3827,2.6857,1.5305,1.4761-.8522,2.6731-2.9254,2.6683-4.6216s-1.2096-2.3827-2.6857-1.5305Z" style="fill:#374874;"/><polygon points="173.2485 186.4478 173.5346 166.8439 175.6321 167.8439 176.2858 185.4298 173.2485 186.4478" style="fill:#374874;"/><polygon points="176.2855 198.9368 175.9994 205.8288 173.9019 204.8288 173.2481 199.2947 176.2855 198.9368" style="fill:#374874;"/><polygon points="76.0534 103.9603 155.8672 58.7511 150.3687 14.0851 38.6581 78.9523 76.0534 103.9603" style="fill:#fbdbd0;"/><polygon points="211.7229 89.1142 155.8672 58.7511 150.3687 14.0851 244.3321 67.3556 211.7229 89.1142" style="fill:#c1dbf6;"/><polygon points="79.631 101.9338 155.8672 58.7511 208.1125 87.1516 130.0888 130.2355 79.631 101.9338" style="fill:#fff;"/><path d="m28.9837,79.6031s.3721,6.3646,8.186,11.3609,99.0231,55.5544,99.0231,55.5544l-7.0145-10.7165L28.9837,79.6031Z" style="fill:#c1dbf6;"/><path d="m129.1783,135.8019l121.0143-68.4463s-9.1163,28.3357-24.3255,36.7344l-62.314,37.2966s-30.8486,17.2713-34.3747-5.5846Z" style="fill:#fbdbd0;"/><path d="m151.4021,8.5187L28.9837,79.6031l100.1945,56.1987,121.0143-68.4463L151.4021,8.5187ZM38.6581,78.9523L150.3687,14.0851l90.1495,53.6909-110.4294,62.4595-91.4307-51.2832Z" style="fill:#fff;"/><path d="m151.4021,8.5189l98.7904,58.8369h0c-.0005.0015-9.1167,28.3359-24.3256,36.7344l-32.5659,19.4917,12.0493,7.002c-.0256-.0146-.0546-.0234-.0804-.0381,1.506.8413,2.5977,2.4248,3.0535,4.6841l7.0972,62.6562c1.4203,7.0137-3.7623,17.3467-10.7152,21.3608l-65.1619,37.6211c-1.7753,1.0249-3.4343,1.5005-4.9001,1.5005-1.1864,0-2.2462-.3115-3.1384-.896.0785.0513.147.1187.228.166l-56.3837-32.7666c-2.4807-1.4419-3.7587-4.9087-2.9969-9.7056l7.4343-71.0454c1.0305-6.481,5.5133-13.2949,10.7296-16.3062l5.8995-3.4062c-25.6365-14.2852-54.9639-30.7061-59.2462-33.4443-7.8135-4.9961-8.186-11.3604-8.186-11.3608h0L151.4021,8.5189m.0257-4.6401l-2.0343,1.1812L26.9752,76.1444l-1.8043,1.0474-.1732,2.0796c-.1447,1.7363,1.1313,9.3809,10.0173,15.063,3.3396,2.1353,21.2615,12.269,53.2971,30.1362-6.1561,3.6582-11.2703,11.4419-12.4755,19.0225l-.0168.1055-.0111.106-7.4238,70.9453c-.9549,6.2104.8929,11.3198,4.9546,13.6807l56.384,32.7666.0109-.0186c1.4565.8457,3.1432,1.29,4.9093,1.29,2.2379,0,4.5594-.6851,6.9001-2.0361l65.1619-37.6211c8.4413-4.8735,14.3224-16.7119,12.6718-25.4346l-7.0792-62.4971-.0194-.1714-.0342-.1694c-.6595-3.2686-2.3925-5.8569-4.8877-7.3076l.0034-.0059-6.1854-3.5942,26.6904-15.9751c6.9912-3.8862,13.5262-11.6753,19.4254-23.1533,4.3504-8.4648,6.6954-15.7764,6.7179-15.8477l.9484-3.0176-2.7176-1.6182L153.4489,5.0824l-2.0211-1.2036h0Z" style="fill:#374874;"/><path d="m28.9837,79.6031s.3721,6.3647,8.186,11.3608c7.814,4.9961,99.0231,55.5542,99.0231,55.5542l-.1223-.1865c10.1683,4.748,27.4825-4.9453,27.4825-4.9453l62.314-37.2964c15.2093-8.3989,24.3256-36.7344,24.3256-36.7344" style="fill:none; stroke:#374874; stroke-linecap:round; stroke-linejoin:round; stroke-width:2px;"/></g></svg> |