SLIDE 1 Making petrol stations “talk”
Challenges when implementing an end to end IoT solution
SLIDE 2
About DiUS
▪ Technology services company ▪ End to end solutions (including hardware) ▪ AWS Innovation Partner of the Year ▪ dius.com.au
SLIDE 3
Petrol stations
SLIDE 4
Petrol station
SLIDE 5 Tank connections
Image from http://www.interspecllc.net/Content/Images/UST_Diagram.jpg
SLIDE 6 Petrol station current loop
FCC PCM Pump Pump Pump Pump Pump POS
SLIDE 7
ATG - Automatic Tank Gauge
▪ Connects to tanks ▪ Collects relevant tank information ▪ Limited storage
SLIDE 8
ATG - Automatic Tank Gauge
▪ Connects to tanks ▪ Collects relevant tank information ▪ Limited storage ▪ Introvert
SLIDE 9 Data retrieval
Image from http://www.interspecllc.net/Content/Images/UST_Diagram.jpg
SLIDE 10
The problem
▪ Old hardware and protocols ▪ Reactive system ▪ Slow response times
SLIDE 11
What if we can predict problems before they occur?
The problem
SLIDE 12
How can I monitor the pumps on the forecourt as well?
The problem
SLIDE 13 DiUS embedded team
Joo Bernie Johny
SLIDE 14
Power sensor
SLIDE 15
PCM - Pump Communication Module
SLIDE 16 Petrol station current loop
FCC PCM Pump Pump Pump Pump Pump POS
SLIDE 17
- 1. Fuel dispensed events
- 2. Pump online / offline
- 3. Fuel not dispensed events
- 4. “Current loop” status
PCM - Pump Communication Module
SLIDE 18
SDA - Station Data Aggregator
SLIDE 19
- 1. System information events
- 2. System configuration
management
- 3. Priceboard configuration
- 4. Data aggregation and
transformation
SDA - Station Data Aggregator
SLIDE 20
Fuelscan
SLIDE 21
AWS IoT
SLIDE 22
Fuelsuite
SLIDE 23
Fuelscan + Fuelsuite
▪ Proactive system ▪ Predictive analytics ▪ Identify unknown unknowns
SLIDE 24
Challenges
▪ Monitor and manage remote devices at a large scale nationally? ▪ Visualise the data captured? ▪ Manage all this data coming down?
SLIDE 25
Device configuration
SLIDE 26 Device shadow
What is it?
▪
A JSON document that is used to store and retrieve current state information for a device.
- AWS IoT Developer Guide
- http://docs.aws.amazon.com/iot/latest/developerguide/iot-thing-shadows.html
SLIDE 27
Device shadow
{ "state": { "desired": { "online": true }, "reported": { "online": false } } }
SLIDE 28
Device shadow
{ "state": { "desired": { "online": true }, "reported": { "online": false } } }
Fuelsuite Fuelscan
SLIDE 29 Priceboard shadow JSON
{ "state": { "reported": { "priceboard": { "display": { "1": "Unleaded", "3": "Diesel" } } } } }
SLIDE 30 Priceboard shadow JSON
{ "state": { "desired": { "priceboard": { "display": { "1": "Diesel" } } }, "reported": { "priceboard": { "display": { "1": "Unleaded", "3": "Diesel" } } } } }
SLIDE 31 Priceboard shadow JSON
{ "state": { "desired": { "priceboard": { "display": { "1": "Diesel" } } }, "reported": { "priceboard": { "display": { "1": "Unleaded", "3": "Diesel" } } } } } { "state": { "reported": { "priceboard": { "display": { "1": "Diesel", "3": "Diesel" } } } } }
SLIDE 32 Priceboard shadow JSON
{ "state": { "desired": { "priceboard": { "display": { "1": "Diesel", "3": null } } }, "reported": { "priceboard": { "display": { "1": "Unleaded", "3": "Diesel" } } } } } { "state": { "reported": { "priceboard": { "display": { "1": "Diesel", "3": "Diesel" } } } } }
SLIDE 33
Device shadow
▪ Caveat ▪ a request for deletion of a property in the desired section does not get passed through to the device for deletion ▪AWS Docs ▪ To delete a key, send a null value ▪ { … “key”: null, … }
SLIDE 34 Priceboard shadow JSON
{ "state": { "desired": { "priceboard": { "display": { "1": "Diesel", "3": [] } } }, "reported": { "priceboard": { "display": { "1": "Unleaded", "3": "Diesel" } } } } }
SLIDE 35 Priceboard shadow JSON
{ "state": { "desired": { "priceboard": { "display": { "1": "Diesel", "3": [] } } }, "reported": { "priceboard": { "display": { "1": "Unleaded", "3": "Diesel" } } } } } { "state": { "reported": { "priceboard": { "display": { "1": "Diesel" } } } } }
SLIDE 36
Device shadow
Be explicit.
SLIDE 37
Message consumption
SLIDE 38
Message consumption
Many types of messages ▪ Alarms ▪ Inventory ▪ Leak tests ▪ Tank tests ▪ Deliveries ▪ Tank configuration ▪ Sensor configuration ▪ Pricing
SLIDE 39
Message consumption
What is the problem? ▪We need to configure a petrol station by consuming messages ensuring historical data was captured
SLIDE 40 Tank configuration message
{ ... "LabelList": [ { "Tank": 1, "Label": "DIESEL " }, { "Tank": 2, "Label": " " } ], ... }
SLIDE 41 Tank activation message
{ ... "ConfigList": [ { "Tank": 1, "Flag": 1 }, { "Tank": 2, "Flag": 0 } ], ... }
SLIDE 42 Alarm event message
{ ... "AlarmEvent": { "Tank": 1, "Category": 2, "Type": 5, "SensorCategory": 2, "State": 2, "EventTime": "1706020638" }, ... }
SLIDE 43 Message consumption
AWS IoT AWS Kinesis Fuelsuite API
SLIDE 44 Message consumption
AWS IoT AWS Kinesis Fuelsuite API
SLIDE 45
Message consumption
Classes of messages ▪ Configuration ▪ Configuration flags ▪ Live ▪ Monitor ▪ History
SLIDE 46
Message consumption
SLIDE 47 Scalability
▪ Horizontal scaling ▪ Add more boxes ▪ Vertical scaling ▪ Add more resources to a box
SLIDE 48
Scalability
SLIDE 49
Data management
SLIDE 50
Classes of messages
▪ Configuration ▪ Configuration flags ▪ Live ▪ Monitor ▪ History
SLIDE 51 Alarm event message
{ ... "AlarmEvent": { "Tank": 1, "Category": 2, "Type": 5, "SensorCategory": 2, "State": 2, "EventTime": "1706020638" }, ... }
Frequency ▪ every time there’s a change ▪ checked every 30 seconds
SLIDE 52 Inventory levels message
{ ... "InventoryList": [ { "Tank": 1, "Type": "2", "Status": 0, "Volume": 34943.12, "TCVolume": 34856.07, "Ullage": 17306.9, "Height": 1495.77, "Water": 0, "Temperature": 16.95, "WaterVolume": 0 }, ... ], ... }
Frequency ▪every 30 seconds
SLIDE 53 Windows of interest
Immediate Monitor Report
1 ~ 5 min 1 ~ 90 days 90+ days
SLIDE 54
Windows of interest
▪ Identify time/date range ▪ Identify frequency of access of data ▪ Storage requirements for each window Immediate Monitor Report
SLIDE 55
Closing thoughts
SLIDE 56
Lesson learned
▪ Real time does not mean “streaming” ▪ Ensure UX understands the domain ▪ Keep it lean
SLIDE 57 Thank you!
@tarciosaraiva @dius_au