Flow Gateway v4 (FGv4): functionality, connectivity and data flows

1. What it does

The FGv4 is a small gateway fitted to an espresso machine. It reads the machine's flow meter signals, detects each shot and its volume, applies the recipe configured for that grouphead, shows status on its touchscreen, and sends shot and device data to the Flow cloud service. Flow can update its configuration and firmware over the air.

2. Connectivity requirements

All connections are made by the device to Flow. The device does not listen for inbound connections on the network.

Purpose Destination Protocol and port Notes
Cloud messaging mqtt-2.iot.flowcoffee.co.nz (units on the current platform), mqtt.iot.flowcoffee.co.nz (units on the earlier platform) MQTT over TLS, TCP 8883 Mutual TLS: the device authenticates with its own certificate. Keep-alive 60 s. Please allow both endpoints. Cannot pass through TLS inspection.
Device enrolment and certificate issue provision.iot.flowcoffee.co.nz HTTPS, TCP 443 Used when a unit is first enrolled or its identity is renewed
Firmware updates Delivered over the same MQTT connection, in chunks (this is how FGv4 units are updated) TCP 8883 An HTTPS download route also exists (http-ota.iot.flowcoffee.co.nz, TCP 443) but is not currently used for FGv4 updates
Time The server offered by the site's DHCP, plus pool.ntp.org, time.cloudflare.com and 216.239.35.0 (a Google time server, given as a number so it works without DNS) NTP, UDP 123
Name resolution The site's DNS DNS

Wi-Fi: 2.4 GHz only, WPA2. Bluetooth Low Energy is used only while an installer has put the device into setup mode, within a few metres of a phone running the Flow app; it is not used in normal operation.

Bandwidth impact: low. A status message and a state message are sent every 60 seconds, plus two messages for each flow event (a shot or a purge), plus log messages (warnings and errors only by default, sent at most every 5 seconds). Data use depends on the number of flow events and the number of pulses per event. The daily figures below count flow events, which include both shots and purges. Based on message sizes measured on live units: a quiet site uses about 0.9 MB per day for status messages; a busy site (about 1,700 flow events a day) uses roughly 5 MB per day (about 150 MB per month); a busy site with a high pulse rate machine (Astoria Storm, Tempesta and Vintage TFT) with thousands of pulses per event uses roughly 25 MB per day.

3. Data flows

Direction Data Protection
Device to Flow cloud Device status and health, firmware version, connectivity state (every 60 s) MQTT over TLS, device certificate
Device to Flow cloud Flow event data (each shot or purge): pulse timing, volume, grouphead, matched recipe (per flow event) As above
Device to Flow cloud Log messages (warnings and errors by default; Flow support can temporarily raise the level for diagnosis) As above
Flow cloud to device Configuration, recipe updates, restart and firmware update commands As above. Firmware images are signed and the device checks the signature at boot (Secure Boot v2)
Installer phone to device Wi-Fi network details and recipe configuration, during setup only Bluetooth LE with an encrypted session; the device shows a blue light and a full-screen "Setup Mode" message while open, and does not send data to the cloud while in setup mode

What the device holds: the Wi-Fi network details it was given, its certificate and keys, its configuration and recipes, and recent shot data. Stored in flash with flash encryption enabled. It does not store customer names, contact details or payment information.