I have Flutter web application. We are paying customer and I tried both PE and community version of dart client - we have this problem since version 1.0.2 till the latest.
There is one subscription to get latest device data and another to get latest alarm data.
The problems are:
AlarmDataCmd kills the other EntityDataQuery (as then the other does not receive any response).
AlarmDataCmd behaves incorrectly, as it creates a new websocket every 1 second or so, instead of communicating over the same open websocket (like EntityDataQuery does) - as you can see here in Developer Console:
So if there is no AlarmDataQuery - then everything works fine.
I have Flutter web application. We are paying customer and I tried both PE and community version of dart client - we have this problem since version 1.0.2 till the latest.
There is one subscription to get latest device data and another to get latest alarm data. The problems are:
So if there is no AlarmDataQuery - then everything works fine.
sample code that I am using:
var alarmFields = <EntityKey>[ EntityKey(type: EntityKeyType.ALARM_FIELD, key: "createdTime"), EntityKey(type: EntityKeyType.ALARM_FIELD, key: "type"), EntityKey(type: EntityKeyType.ALARM_FIELD, key: "severity"), EntityKey(type: EntityKeyType.ALARM_FIELD, key: "status"), ]; var alarmQuery = AlarmDataQuery( entityFilter: DeviceTypeFilter(deviceType: "v4"), alarmFields: alarmFields, pageLink: AlarmDataPageLink( pageSize: 1000, searchPropagatedAlarms: true, timeWindow: 604800000, sortOrder: EntityDataSortOrder(key: EntityKey(type: EntityKeyType.ALARM_FIELD, key: "createdTime"), direction: EntityDataSortOrderDirection.DESC))); subscription = TelemetrySubscriber(client.getTelemetryService(), [AlarmDataCmd(cmdId: 101, query: alarmQuery)]); subscription!.alarmDataStream.listen(onData, onError: onError, onDone: onDone, cancelOnError: true); subscription!.subscribe();