New: the AI firewall watches the whole platform and explains each incident in plain words. See how it works

Reply To: Case counter on an Uno web server keeps hanging; our ERP needs the shift totals

Then flip it around so nobody calls the Uno at all. The Uno posts its counter to Hermetry, and the ERP pulls the shift total from Hermetry. Inbound to your network stays closed.

Uno: send the running total (never reset it on the Uno) every minute to the device HTTP API with its token. A W5100 can’t do TLS, so either put a small TLS-capable board in front or, simplest, swap the Uno for an ESP32 with Ethernet and post over HTTPS. The body is just {"cases_total": 184233}.

ERP side: an API key with the Read only preset for telemetry, allowlisted to the ERP server’s address. At 06:05, 14:05 and 22:05 the import job asks for the increase over the shift:

GET /tenant/{tenantId}/api/telemetry/series?kind=iot_device&entityId={line3}
    &keys=cases_total&from={shift_start_ms}&to={shift_end_ms}&bucket=1h&agg=increase

Add up the 8 hourly values. increase handles the counter properly and you don’t care if the device was offline for 10 minutes in between, the total catches up. On the board, the same key on a chart with increase gives ops the live cases per hour.

I’d avoid pushing from a flow to the ERP in your case: the HTTP request block refuses private addresses, so it can’t reach 10.x anyway. The pull keeps IT happy. Reference: The history API.

Accepted solution♥ 1