Skip to content
All work

Undergraduate thesis, UniFacens, 2026

NexusCSI

NexusCSI is my undergraduate thesis in Computer Engineering at UniFacens, defended and approved in 2026. It recognises human activity from Wi-Fi channel state information and acts on it through Home Assistant. A live prototype with an ESP32-S3 transmitter and a Raspberry Pi receiver reaches 86.3% balanced accuracy, and the thesis measures how far recognition carries over to people and rooms the model never saw.

Private repository

The problem

Activity sensing at home usually means a camera or a wearable. A camera in a bedroom is a privacy problem, and a wearable works while somebody remembers to wear it. Wi-Fi is already in the room and already reacts to bodies moving through it. Published results in this area look excellent, yet most of them are tested on the same people and the same room used for training. Those numbers say little about a house the model has never seen.

What I did

With my co-author Matheus Simon, I trained eleven deep learning architectures under one protocol on three public CSI datasets, UT-HAR, CSI-HAR and Widar3.0, holding out whole subjects and whole domains. I partially reproduced DATTA, a 2026 domain adaptation method, over the 4,000 epochs of the original paper. Then I built the system around the model. A FastAPI inference server feeds a React dashboard and publishes each prediction over MQTT, and Home Assistant announces the class on an Echo Dot, changes the colour of a Zigbee lamp and sends a fall alert on Telegram above 70% confidence. For live capture, an ESP32-S3 sends about 400 packets per second to a Raspberry Pi 4 running Nexmon, which reads 64 subcarriers from each packet. An extra trees classifier on 30 amplitude features separates four levels of movement.

What came out of it

With radio, people and room fixed, the best model reaches 98.8% on UT-HAR. Changing the user costs about twenty points, and changing the whole domain drops accuracy to around 49%. Domain adaptation raises cross-domain F1 from 61.7% to 69.5%, in line with the state of the art, and fails in one domain. I traced that failure to a single user who gestures more slowly, and compressing that user’s samples in time doubles the accuracy of the domain and lifts F1 to 71.3%. The live prototype reaches 86.3% balanced accuracy on a separate session, or 84.2% with every model choice made blind to it, and drives voice and light in real time. The main finding is that within-domain validation does not predict generalisation.

In pictures

Live recognition screen of the dashboard showing a wave gesture, class probabilities and the CSI signal
The live screen of the dashboard while a wave is recognised. The figure on the stage illustrates the class, next to the probabilities of the last 4 second window and the CSI of 64 subcarriers at 400 Hz.
Three live screens with the classes standing still, wave and whole body
Standing still, waving and whole body movement, each recognised live from the Wi-Fi signal.
Simulation mode of the dashboard replaying a clap gesture from Widar3.0
Simulation mode replays recorded samples from the public datasets, here a Widar3.0 clap, with the predicted class, the probability of each class and the spectrogram of the sample.
Diagram of the data path from the ESP32-S3 and Raspberry Pi through FastAPI, MQTT and Home Assistant to the lamp, Echo Dot and Telegram
The path of the data, from the two radios in the room to the actuators. Everything except the voice announcement and the Telegram alert runs without internet. Diagram from the thesis, in Portuguese.
ESP32-S3 board and Raspberry Pi 4 in its case
The two radios of the live prototype, an ESP32-S3 transmitter and a Raspberry Pi 4 receiver.
Amazon Echo Dot smart speaker and a Zigbee smart lamp lit in red
The actuators, an Echo Dot for the voice announcement and a Zigbee lamp that changes colour with the class.