Skip to main content
Harmanpreet Singh

Sensor playback

Step through a short stretch of smart-home sensor events and see the four representations built from the same window of events.

Synthetic data, educational illustration. The floor plan, sensors and events on this page were invented for the demo. They are not CASAS data, and the views simplify what my thesis implements. Differences are listed below the demo.

What the demo shows

A smart home like those in the CASAS datasets has no cameras. It logs events such as a motion sensor turning on or a door opening. To classify what a resident is doing, I cut the log into short windows of consecutive events and derive several representations from each window. They are four views of one stream, not four separate sensors.

  1. Sensor log

    • Timestamped motion and door events
    • One house, one metadata file
  2. Event windows

    • 30 events, stride 15
    • Windows never mix activity labels
  3. Four derived views

    • Sequence of event features
    • Deterministic text summary
    • Floor-plan raster image
    • Event graph
  4. Encoders

    • Transformer
    • Transformer
    • CNN
    • Graph network
  5. Fusion and classifier

    • Fusion transformer
    • Auxiliary heads per view
    • Activity label
Sequence
The events in the window, in order, each described by numbers: which sensor, its state, how far into the window it happened, the gap since the previous event and the time of day.
Text
A deterministic summary written by fixed rules: time of day, dominant room, rooms visited in order, pace and the busiest sensors.
Raster
The activations blurred onto a grid laid over the floor plan, so a model can see where in the home activity happened.
Graph
Events as nodes joined in time order, to later events from the same sensor, and to the physical sensor that produced them.

Try it

Press play, drag the timeline or pick an event. The floor plan and all four views update together.

BedroomBathroomKitchenHallwayLiving area01M0102M0203M0304M0405M0506M06D01 closed
  • Filled: active (ON or open)
  • Outlined: inactive (OFF or closed)
  • Ring: current event

The dashed line is an inferred path joining the last few motion activations. It is a guess drawn between sensor positions, not tracked movement: sparse motion and door sensors cannot give exact continuous tracking.

Current event (synthetic)

Timestamp
06:52:10
Sensor
M01 (Bedroom motion, Bedroom)
State
ON
Annotation
Wake upHand-written label for this synthetic day, not a model prediction.
Playback speed
06:52:10Event 1 of 26: 06:52:10, M01 ON07:21:30

Events

Select a row to jump to that event.

Four views of the same window

The window is the last 8 events up to the current one. All four views are computed from it.

Each event in the window becomes a row of numbers, in time order. A transformer reads this to see order and timing. The current window holds 1 event.

Per-event features for the current window
eventsensorstatetime in windowlog gaphour sin / cos
1M0110.000.000.97 / -0.23

How this differs from the research implementation

Read the full case study of the thesis projectSee the platform built around it: HomeSense