Implementing SCADA Data Viewing in Mobile IoT Applications
A SCADA system — Supervisory Control and Data Acquisition — lives on stationary operator workstations. WinCC, Ignition, InduSoft, Aveva — each has its own data format, API, and compatibility history. A mobile application for viewing SCADA data is not a replacement for the desktop client, but rather a "second pair of eyes" for a shift supervisor walking the factory floor. The task: current tag values, trends, and alerts — read-only, no control permissions.
OPC UA: The Universal Path to SCADA Data
Most modern SCADA systems support OPC UA servers. This is the standard way to access data without proprietary APIs. Mobile applications connect to OPC UA servers via TCP or WebSocket (OPC UA over WebSocket, UA Binary transport).
For Android/Kotlin, use Eclipse Milo through JVM layer or Eclipse4J. For Flutter, there is no official OPC UA library; use Platform Channels to native clients or a REST gateway:
// Android, Eclipse Milo OPC UA Client
val client = OpcUaClient.create(
"opc.tcp://scada-server.factory.local:4840",
endpointFilter = { endpoints ->
endpoints.filter { it.securityMode == MessageSecurityMode.SignAndEncrypt }
.minByOrNull { it.securityPolicyUri }
},
configConsumer = { configBuilder ->
configBuilder.setIdentityProvider(
UsernameProvider("operator", "password")
)
configBuilder.setRequestTimeout(UInteger.valueOf(5000))
}
)
client.connect().get()
// Read tags by NodeId
val nodeId = NodeId(2, "Furnace1.Temperature")
val dataValue = client.readValue(0.0, TimestampsToReturn.Both, nodeId).get()
val temperature = (dataValue.value.value as Float).toDouble()
val serverTimestamp = dataValue.serverTime
To monitor hundreds of tags simultaneously, use OPC UA Subscription instead of polling:
val subscription = client.subscriptionManager
.createSubscription(1000.0) // publishing interval 1000ms
.get()
val monitoredItems = nodeIds.map { nodeId ->
MonitoredItemCreateRequest(
ReadValueId(nodeId, AttributeId.Value.uid(), null, null),
MonitoringMode.Reporting,
MonitoringParameters(
UInteger.valueOf(clientHandleCounter++),
500.0, // sampling interval
null,
UInteger.valueOf(10), // queue size
true
)
)
}
subscription.createMonitoredItems(
TimestampsToReturn.Both,
monitoredItems,
{ item, value -> handleTagUpdate(item.readValueId.nodeId, value) }
).get()
Ignition SCADA: REST API and WebDev Module
Ignition (Inductive Automation) is popular in new production facilities. It includes a WebDev module that allows REST endpoints to be created directly from Ignition Python scripts. A more modern approach is Ignition Perspective with WebSocket API for mobile clients.
For direct REST access to tags via Ignition Gateway REST API:
GET https://ignition.factory.com/system/webdev/api/tags?tagPaths=
Furnaces/Furnace1/Temperature,
Furnaces/Furnace1/Pressure
Authorization: Bearer {token}
Ignition returns tag values with quality (Good, Bad, Uncertain) and timestamp. Quality is an important parameter: if a sensor loses connection, the value may be stale with quality = Bad, and the UI should display this.
WinCC REST API via OpenPCS
WinCC (Siemens) is accessed via REST API OpenPCS or WinCC OA WebClient. Siemens TIA Portal V18+ supports WinCC Unified, which has its own WebSocket API through nginx proxy.
For older WinCC Classic — only OPC DA (DCOM) or OPC UA with a gateway (Matrikon/Kepware) installed on the SCADA server.
Trends: Requesting Historical Data
SCADA systems store tag history in built-in databases (Ignition uses MySQL/MSSQL, WinCC uses SIMATIC historian). Request through OPC UA Historical Data Access (HDA):
val historyReadRequest = HistoryReadValueId(
nodeId = NodeId(2, "Furnace1.Temperature"),
indexRange = null,
dataEncoding = null
)
val readDetails = ReadRawModifiedDetails(
isReadModified = false,
startTime = startDateTime.toOpcDateTime(),
endTime = endDateTime.toOpcDateTime(),
numValuesPerNode = UInteger.valueOf(500),
isReturnBounds = true
)
val historyData = client.historyRead(
readDetails,
TimestampsToReturn.Source,
false,
listOf(historyReadRequest)
).get()
For trend display in Flutter — fl_chart with LineChart. With 500+ data points, use showingTooltipIndicators only for the selected range, otherwise the chart lags during scrolling.
Security and Access Control
SCADA data is sensitive information. Several mandatory measures:
- Mobile applications must never have direct access to OPC UA servers from the internet. Access only through VPN or reverse proxy with mTLS.
- Authorization through corporate IdP (Active Directory / LDAP).
- Read-only access: "mobile viewer" role without write permissions to tags.
- Session logs: who read which tags and when.
Developing a mobile SCADA viewer with OPC UA and historical trends: 4-6 weeks for one platform. Supporting multiple SCADA systems simultaneously and complex dashboards with real-time charts: 2-3 months. Cost is calculated individually.







