Android
We've developed our own Android app in Java to gather data from the phone's various sensors.
Temperature and crowd data, instead, are simulated since phones don't have sensors to gather such information.
It uses the Eclipse Paho Java library, which manages connection and message transmission using MQTT protocol.
NodeRED
Our workflow aims to achieve different objectives:
- Simulate the crowding and temperature sensors.
- Act as an intermediary between the application, utilizing an MQTT broker node powered by aedes.js and a ThingWorx node responsible for communicating with ThingWorx via the HTTP REST protocol.
- Manage the Telegram bot to send alerts when needed.
- Display real-time location on a map.
ThingWorx
We have several entities working together in order to properly visualize data:
- Thing: Representing a single bus.
- Thing Value Stream: Representing the bus associated with the thing. Deriving from data of the value stream.
- Alerts: Triggered when Thing’s properties satisfy a specific condition.
- Application Key: Needed to pass data from NodeRED to Thingworx.
- Mashups: Dashboards showing data as tables, line charts or gauges.
Dashboards
Map - NodeRED
Pointer Movement Link to Dashboards Icon of the vehicle moving Line representing vehicle movements Links to ThingWorx Mashups
Mashups - ThingWorx
- Accelerometers: Showing Gauges and Charts of Accelerometers X, Y, and Z, to monitor respectively the current value and its evolution over time.
- Noise/Temperature/Crowding: Same structure of accelerometers mashup but on these three metrics: Noise, Crowding, Temperature.
- Alerts: Showing the last alert triggered for each parameter and listing the information about it.