See a 'live' (simulated) sensor reading changing in real-time on the CC dashboard [software 'steel-thread'] #92
Labels
command-center
communications-ecosystem
developer
epic-software-steel-thread
Stories that form part of the 'Software Steel Thread' epic
tester-qa
"As a Command Center (CC) leader, I need to see the live Temp value for each firefighter in the current event, so that I can determine when it's appropriate to remove them."
This story is about getting a sensor data stream from the API onto a bare-bones CC web app - in order to identify any integration problems in the new software architecture as early as possible.
Current Design Draft [may change]
API contracts
General contract notes:
null
placeholders, and that's OK. The point is to publish a stable API during the steel-thread phase, so that we can fill in these placeholders as we go, without having to make API-breaking changes (as these are disruptive and hard to manage).API : Mobile App sends data to the IOT platform
The API expects a LIST of SensorRecords from the Mobile App, in JSON format. Usually, the list will contain one SensorRecord, but it may contain more than one (e.g. when reconnecting after a period of disconnection).
YYYY-MM-DDTHH:MM:SS
. The mobile app is expected to ensure this is in sync with the TimeStamp provided by the server during registration (story #100) - e.g. possibly by adding the the device's 'number of seconds since boot' to the server TimeStamp, so that same-time sensor readings can be correlated and analyzed across all deployed devices.null
)null
(not zero) if unavailable. Sensors Names in the list are {temperature
,humidity
,CO
,NO2
,acrolein
,formaldehyde
,benzene
}null
null
null
LastStatusShown
above).false
by default. Only set totrue
when this SensorRecord failed to be sent within it's normal timeframe and was stored by the device or phone to be uploaded later. Armed with this, the server can tell what LED status colour the firefighter was shown during this period (as the server knows both the sensor value and the G/Y/R thresholds) and ensure that it is logged in the firefighter's history. It would also provide more data about outages for later analysis.API: Server returns acknowledgement and predicted status to Mobile App :
As with the previous API, this API expects a LIST of responses from the Server, in JSON format. Usually, the list will contain one SensorRecord response, but it may contain more than one (e.g. when reconnecting after a period of disconnection).
null
null
}. This is the overall status colour to be displayed in the mobile app and on the device LED.null
indicates that the machine learning component is down and the device should generate a status color itselfnull
null
}. This is so that the mobile app can display the right color for each sensor.null
indicates that the machine learning component is down for that gas, and the mobile app should generate a status color for that gas itselfAPI: Mobile App returns acknowledgement and predicted status to IOT Device :
This is just a pass-though - exactly the same information as the Mobile App got from the server, minus the ResponseStatusPerSensor list (because the device has no use for it).
Outstanding Questions:_
The text was updated successfully, but these errors were encountered: