Skip to main content

This is a new service. Help us improve it and give your feedback by email.

Step 2: View Real-Time Occupancy Data - Smart Car Park Walkthrough

Explore the CloudWatch dashboard widgets showing live car park occupancy metrics

Walkthrough progress

Step 2 of 4 • 2 minutes

Step 2 2 minutes

View Real-Time Occupancy Data

Explore the dashboard widgets to understand current car park occupancy across all zones.

Find both dashboard URLs in your CloudFormation stack Outputs tab
The Function URL dashboard provides instant access to live occupancy data
CloudWatch dashboard offers deeper metric exploration and time range controls

Expected outcome

  • You can see current occupancy percentage
  • Zone breakdown shows Ground, Level 1, Level 2 data
  • Available spaces count is visible
  • Historical trends show 24-hour patterns

Understanding the dashboard widgets

Your CloudWatch dashboard contains several widgets, each showing different aspects of car park occupancy. Let's explore what each widget tells you:

1. Occupied Spaces Over Time

Widget type: Line graph

What it shows: Count of occupied spaces (0-50) over the last 24 hours

What to look for: Peak hours (~42 occupied around 8-10am, 12-2pm, 5-7pm), off-peak periods (~30 occupied), and overnight (~10 occupied). The line should show clear daily patterns.

Insight: Consistent peak patterns help predict future demand. If 8-10am is always busy, you can guide overflow traffic to nearby car parks during those hours.

2. Occupancy by Zone

Widget type: Stacked area chart

What it shows: Number of occupied spaces in each zone (Ground Floor, Level 1, Level 2) stacked on top of each other

What to look for: Ground Floor typically fills first (90% occupancy at peak), followed by Level 1 (87%), then Level 2 (73%). This shows user preference for lower floors and accessible spaces.

Operational insight: Knowing which zones fill first helps optimize signage ("Level 2 has spaces") and pricing (charge more for Ground Floor during peak hours).

3. Available Spaces

Widget type: Number (metric math expression)

What it shows: The current count of available (empty) parking spaces, calculated as 50 minus occupied spaces

What to look for: This number updates as sensors detect vehicles entering and leaving. In our simulation, expect to see 5-25 available spaces depending on time of day patterns.

Example: If you see "18", that means 18 out of 50 spaces are currently empty, so occupancy is 64% (32 spaces occupied).

4. Sensors Reporting

Widget type: Number

What it shows: How many sensors reported in the last batch cycle (expected: 50)

What to look for: This should consistently show 50. If it drops below 45, the SensorOffline alarm will fire. This is the quick health check — per-sensor detail (battery levels, individual status) is available in the Function URL dashboard.

Maintenance alert: CloudWatch alarms automatically monitor this metric. If fewer than 45 sensors report, the alarm triggers — indicating potential connectivity or hardware issues.

Watch for real-time updates

The dashboard is set to auto-refresh every 10 seconds. Watch the widgets closely:

  • Available spaces number should change - As the IoT simulator publishes new sensor readings, you'll see the count update
  • Line graphs extend to the right - New data points are added to the trailing edge of the time series
  • Zone chart colors shift - Stacked area heights adjust as occupancy changes per zone
  • No page refresh needed - CloudWatch handles updates automatically in the background

Behind the scenes: Every time a sensor detects a vehicle entering or leaving, it publishes an MQTT message to AWS IoT Core. Lambda processes the message and updates CloudWatch metrics within 2-5 seconds. Your dashboard shows these updates 10 seconds later at most.

Something went wrong? Troubleshooting help

Dashboard shows "No data available"

Possible solutions:

  • Wait 30-60 seconds - The IoT simulator may still be initializing. Click the refresh button (circular arrow icon, top-right) after waiting.
  • Check DynamoDB has data - Open the DynamoDB console, find the table matching your stack name, click the Items tab, and click "Scan" to see recent sensor readings.
  • Verify simulator is running - Open the Lambda console, find the simulator function, and check the Monitor tab shows invocations every minute.

Data is stale (not updating)

Possible solutions:

  • Check auto-refresh is enabled - Look for "Auto refresh" toggle in top-right, ensure it's ON and set to 10 seconds
  • Verify IoT simulator is still running - The simulator runs on a 1-minute EventBridge schedule. Check the Lambda console Monitor tab for recent invocations.
  • Check CloudWatch Logs - Open Logs for the processor Lambda function to see if it's receiving and processing sensor messages

Numbers don't match expected patterns

Possible causes:

  • Simulation randomness - The IoT simulator uses random occupancy changes within typical patterns. Your data may vary from the examples shown.
  • Time zone differences - Peak hours are based on simulated data timestamps, not your local time. Check the graph time axis to understand the pattern.