Imagine a production line with 500 vibration, temperature, and pressure sensors. Every second — 250,000 samples. The operator can't monitor everything. They need a mobile app that shows only critical deviations. We build such solutions — from data collection from PLCs to smartphone notifications. Our experience: over 10 years in the Industrial Internet of Things (IIoT), over 50 projects for factories. Without proper architecture, the app drowns in data flow. That's why our first step is designing the data collection and normalization system on edge gateways, then building a reliable real-time transmission channel.
Mobile Monitoring of Industrial Equipment: Key Technical Solutions
Edge Component for Data Collection
The edge component — an industrial gateway (Moxa, Advantech, Siemens IPC) or a custom Linux server — normalizes data from various protocols and publishes aggregates via MQTT or exposes them via REST/WebSocket. For the mobile app, two streams matter: real-time — current values of key parameters, updated every 1-5 seconds via WebSocket; and history — trends over shift, day, week via REST API with pagination and aggregation.
How Real-Time Data Collection Works?
At the equipment level, data is collected by the edge component. It normalizes data from different protocols (OPC-UA, Modbus, MQTT) and publishes aggregates via MQTT or serves via REST/WebSocket.
Sensors → PLC / Edge Gateway → Time-Series DB (InfluxDB / TimescaleDB) ↓ Backend API (REST + WebSocket) ↓ Mobile App Aggregation and Normalization on the Edge Gateway
According to OPC-UA Part 6 documentation, the gateway converts OPC-UA address space into flat tags. For Modbus — register-to-physical-value mapping (e.g., register 40001 = temperature with coefficient 0.1). Aggregation: average, min, max over a 1-second window. This reduces traffic by 10-100 times.
| Protocol | Application | Polling Frequency | Integration Complexity |
|---|---|---|---|
| OPC-UA | PLC, CNC | 1-1000 ms | Medium |
| Modbus RTU/TCP | Sensors, controllers | 10-1000 ms | Low |
| MQTT | IoT devices | 1-60 s | Low |
| Siemens S7 | SIMATIC S7 | 10-100 ms | High |
Why Data Collection Architecture is the Main Challenge?
We use Flutter with WebSocket. For reliability — automatic reconnection with exponential backoff.
class EquipmentMonitorRepository { WebSocketChannel? _channel; final StreamController<EquipmentState> _stateController = StreamController.broadcast(); Stream<EquipmentState> get stateStream => _stateController.stream; void connect(String equipmentId, String token) { _channel = WebSocketChannel.connect( Uri.parse('wss://iiot.factory.com/ws/equipment/$equipmentId'), ); _channel!.stream .map((event) => json.decode(event as String)) .map(EquipmentState.fromJson) .listen( _stateController.add, onError: _handleError, onDone: _scheduleReconnect, ); _channel!.sink.add(json.encode({'auth': token})); } void _scheduleReconnect() { Future.delayed(const Duration(seconds: 5), () => connect(_lastId, _lastToken)); } } Example BLoC implementation for state management
class EquipmentMonitorBloc extends Bloc<EquipmentEvent, EquipmentMonitorState> { StreamSubscription<EquipmentState>? _subscription; EquipmentMonitorBloc(this._repository) : super(EquipmentMonitorInitial()) { on<StartMonitoring>((event, emit) async { _subscription = _repository.stateStream.listen( (state) => add(StateUpdated(state)), ); _repository.connect(event.equipmentId, event.token); }); on<StateUpdated>((event, emit) { final current = event.state; final isAlert = current.temperature > 85.0 || current.vibrationRms > 12.5; emit(EquipmentMonitorRunning(state: current, hasAlert: isAlert)); }); } } WebSocket is 20 times faster than HTTP polling for telemetry delivery. Compare:
| Method | Latency | Battery Load | Server Load |
|---|---|---|---|
| HTTP polling | >1 sec | High | High |
| WebSocket | <100 ms | Low | Low |
| gRPC-stream | <50 ms | Medium | Medium |
Trend and Deviation Visualization
For historical data we use fl_chart (Flutter) or MPAndroidChart. Key optimization: aggregation on the API side. Request to InfluxDB-based API:
GET /api/v1/equipment/{id}/trend? parameter=temperature& from=2024-01-15T06:00:00Z& to=2024-01-15T18:00:00Z& resolution=300 # 5-minute aggregation Response returns an array of 144 points instead of 43,200. The chart draws without lag.
Baseline and Deviations
A useful feature is displaying the baseline (normal range) on the chart. If motor current normally is 12-15A, highlight that zone so the operator immediately sees deviation:
LineChartData buildTrendChart(List<TrendPoint> data, Range baseline) { return LineChartData( extraLinesData: ExtraLinesData( horizontalLines: [ HorizontalLine(y: baseline.min, color: Colors.green.withOpacity(0.3)), HorizontalLine(y: baseline.max, color: Colors.green.withOpacity(0.3)), ], ), betweenBarsData: [ BetweenBarsData( fromIndex: 0, toIndex: 0, color: Colors.green.withOpacity(0.1), ), ], lineBarsData: [ LineChartBarData( spots: data.map((p) => FlSpot(p.timestamp.toDouble(), p.value)).toList(), color: data.any((p) => p.value > baseline.max || p.value < baseline.min) ? Colors.red : Colors.blue, ), ], ); } What to Consider During Development?
- Data aggregation — do not transmit raw samples, only aggregates.
- Offline mode — cache latest readings and alerts in local DB.
- Alert escalation — if operator doesn't acknowledge an alert within 5 minutes, notify the supervisor.
- Security — TLS, JWT, device-level encryption.
- Testing — simulate up to 10,000 devices.
To reduce traffic, the edge gateway uses a sliding window: from 25,600 vibration sensor samples, 1-10 aggregates are formed — average, peak, RMS, fundamental frequency.
Development Stages
- Audit of data sources — protocol analysis and polling frequency.
- Architecture design — selection of edge component and Time-Series DB.
- Backend development — aggregation API, WebSocket, alerts.
- Mobile app development — UI, trends, push notifications.
- Integration and testing — on real equipment.
- Deployment and support — App Store / Google Play, monitoring.
What's Included?
- Source code of the mobile app (iOS/Android/Flutter).
- Backend service with API and WebSocket.
- Integration and deployment documentation.
- Repository and CI/CD access.
- Operator training (up to 2 hours).
- 6-month warranty on bugs.
Cost and Timeline
Development of an app for one equipment type with WebSocket and trends takes 4-8 weeks. Full cycle including offline mode and escalation takes 2-4 months. Pricing is individual after analysis of your data sources. Typical savings from implementation amount to millions of rubles annually due to reduced downtime and unplanned shutdown costs. Contact us for a free consultation with an engineer on mobile development.







