A DIY thermal camera detects thermal pattern movement and alerts Home Assistant, without sending the footage to the cloud.

A maker has turned a small ESP32-S3 thermal camera into a night-time occupancy detector after looking for a way to catch a possum eating vegetables in his garden. The open source project uses an 80×62 thermal sensor to detect warm regions, display them in a browser, and send local alerts to Home Assistant.
Created by William Rigby, the project started with a Waveshare ESP32 Thermal Camera Module that had been sitting unused. Rather than building a conventional security camera, Rigby used its thermal sensor to detect heat patterns. The resulting firmware provides a live thermal viewer, configurable detection areas, and MQTT-based Home Assistant integration. The project source is released under the MIT licence.
The hardware combines an ESP32-S3 with a MI0802 80×62 thermal sensor, 16MB of flash and 8MB of OPI PSRAM. Because the system works with thermal information rather than visible-light images, it can detect warm objects even when it is dark. The camera can also continue detection without a browser connected.
The firmware first learns the normal thermal pattern of the area being monitored. This is important because a wall, roof, or plant can naturally become warmer during the day. After an initial two-minute learning period, the system continuously updates its background model so that changes in the scene can be separated from persistent heat sources.
Users can draw a region of interest (ROI) directly on the browser-based interface. The camera then looks for warm regions inside that area rather than treating everything in the sensor’s field of view as a potential event. The default detector looks for a region at least 3°C above its per-pixel background, covering at least four connected pixels and remaining present for 500ms. The alert clears after the region has disappeared for two seconds.
The project has separate detection channels for small and large regions. This does not mean the camera can recognise whether something is a person, dog, or possum. Instead, it categorises connected regions according to their area in the thermal image. This distinction is important because the system is an occupancy detector rather than an AI-based object-recognition camera.
Setting up the project requires an Arduino IDE and the ESP32 board package from Espressif. The repository currently specifies ESP32 Arduino core 3.3.12, with the corresponding ESP-IDF 5.5.5 libraries. Users select the ESP32S3 Dev Module, 240MHz CPU operation, 16MB flash, and OPI PSRAM before uploading the firmware.
After flashing, the camera can create a temporary Wi-Fi setup network. Users connect to it, open the configuration page, and enter their home Wi-Fi details. The MQTT settings can then be configured for a local broker. Once connected, the camera can publish occupancy states and events to MQTT, while Home Assistant can automatically discover the three occupancy entities for the overall, small-object, and large-object channels.
The system also works as more than a smart-home sensor. Its native USB connection can expose the thermal image as a UVC video stream, allowing compatible computers to use it as a thermal camera without requiring a separate application. The latest firmware targets 20 frames per second for its 80×62 YUY2 stream. In one reported simultaneous test, the browser stream reached 19.4fps, while USB DirectShow reached 12.7fps. The developer says the 20fps USB target has not yet been consistently achieved.
The project remains experimental. The developer has not yet established reliable detection range, absolute temperature accuracy or long-term operating performance. Small-animal detection at around 12 metres has also not been established. The camera needs a fixed mounting position and continuous USB power, while sunlight, warm vegetation, rain, reflections and insufficient thermal contrast can affect detection.
There is also an important security consideration. The current HTTP and MQTT interfaces do not provide authentication, HTTPS or MQTT TLS. The project’s documentation therefore recommends keeping the camera on a trusted local network rather than exposing it directly to the internet.
For Indian makers, the project could be adapted for monitoring gardens, gates, storerooms, farms, or other areas where movement needs to be detected at night. Its local processing also means that the basic occupancy detection does not depend on a cloud account. A Home Assistant installation can turn the detected event into another action, such as switching on a light or triggering an alarm.
What makes the project interesting is its simplicity. Instead of using a powerful computer and an AI model to identify an intruder, the ESP32-S3 watches for changes in thermal patterns and reports them locally. It therefore demonstrates how a relatively small embedded platform can provide a useful night-time sensing system without relying on cloud-based computer vision.
For more information, click here.






