Skip to main content

Refrigerator Inventory Monitoring Application Guide

Introduction​

CamThink is a new developer-centric brand from Milesight, designed to make Edge AI simpler for everyone. We build open, developer-friendly Edge AI hardware for community builders and enterprise engineers, helping them transition from early prototypes to reliable real-world deployments—accelerating your Edge AI strategy implementation.

CamThink NeoEyes NE301 is powered by the STM32N6 (Cortex-M55) processor equipped with Neural-ART NPU, enabling real-time AI inference and professional-grade image processing with ultra-low power consumption.

Home Assistant is a free and open-source home automation platform designed to be the central "brain" of your smart applications, prioritizing local control and privacy. By early 2026, Home Assistant has become even more user-friendly through its "Year of Voice" and "Collective Intelligence" initiatives.

In this use case, we will show you how to manage the status of refrigerator beverages in the smart retail and warehousing industry.

Hardware and Software Requirements​

Hardware:

  • CamThink NeoEyes NE301, ultra-low power vision AI camera.

Software Platform:

  • CamThink AI Tool Stack: An end-to-end AI toolset covering the entire workflow from data collection, annotation, training, quantization to deployment.
  • Home Assistant Platform: You need to install it on your server in advance.

Operation Guide​

In this section, we will show you step-by-step how to implement this complete use case.

Correct Installation of NE301​

First, correctly install the CamThink NE301 and press the button for 2 to 3 seconds to activate WiFi.

refrigerator1refrigerator2

Configure Network and MQTT Data Forwarding​

Connect to the WiFi endpoint starting with NE301_<last 6 digits of MAC> and enter the default IP address: 192.168.10.10

connect login
  • Default Username: admin
  • Default Password: hicamthink

Click login to view the live view with detailed settings.

live

Navigate to System Settings to connect to network access.

system

CamThink NE301 supports both WiFi and Cellular modules. Select the appropriate method to ensure network connectivity works.

Navigate to Application Management to configure where data and images will be forwarded.

application-management

Enter definitions for your own MQTT Broker or AI Stack Server:

  • Server Address: IP address of the MQTT Broker.
  • Port: Port of the MQTT Server, default: 1883.
  • Data Receive Topic: Downlink command topic for control and triggering image capture.
  • Data Send Topic: Uplink command topic for transmitting data and pictures.
  • Client ID: MQTT Client ID, some servers verify this value.
  • Username: Username for connecting to the MQTT server, please input according to server requirements.
  • Password: Password for connecting to the MQTT server, please input according to server requirements.

Collect Images, Train and Quantize Model​

Login to your own AI Tool Stack server to create a new project.

AI-tool-stack

Click to create a new AI Model project, enter name and description:

stack1stack2

Open this project and bind the device for image collection. You need to create this device first.

stack3stack4

Refrigerator pictures taken by NE301 will be uplinked as configured. If you already have images prepared, you can directly upload them to this platform for model training.

stack5

Before starting training, create a class here, we name it Beverage.

stack6

Select the appropriate type to label objects.

stack7stack8

Go through one by one to ensure all objects are labeled correctly. If you already have a dataset, you can upload it directly here.

Click "Train Model" to start training.

stack9

Click "New Training" to create a new task, keep all default settings.

stack10

Then start training. This will take some time.

stack11stack12

To deploy the model to NE301, we need to quantize it before uploading to the device. Click the Quantization button.

stack13stack14

Click it to start, keep default settings here.

stack15

It takes a little time to complete. The NE301 model package (*.bin) is the precisely quantized model. Click to download.

stack16

You can also test the model here to confirm if everything is working fine.

stack17

Verify and Deploy New Model​

Let's go back to the device to upload the new model. Click the upload button to install.

stack18stack19stack20

After completion, beverage cans are marked correctly.

stack21

You can upload more pictures to verify performance.

stack22stack23

Configure Home Assistant Application​

To make the data more valuable for customers, we chose Home Assistant for integration and visualization. You can also connect it to other third-party platforms.

Open “Devices & Services” to install MQTT integration.

stack24

Click Add Integration button to install the MQTT plugin.

stack25

Just type MQTT to search for it.

stack26stack27

Choose the second one, and input the MQTT Broker configured in NE301.

stack28 stack29

Submit to save. MQTT connection is ready.

Create an MQTT device to ensure data can be subscribed correctly.

stack30

Other settings keep default.

stack31

Select type Numeric and enter entity name here.

stack32

Keep these settings empty.

stack33

Please enter specific MQTT details correctly here, especially downlink and uplink topics, and templates.

stack34
{{ value_json.ai_result.ai_result.detection_count }}

For more details on how to set value templates, you can visit the Home Assistant website or contact us. Click "Next" and save.

stack35

The first entity for beverage count is created well.

Let's create the second entity to identify names.

stack36

Input value template for name.

stack37

The value template name is different here.

{{ value_json.ai_result.ai_result.detections[0].class_name }}

Click submit to save it.

stack38

Refresh the page to view activities with values correctly.

stack39

Home Assistant supports viewing on dashboards, including history records.

stack40

Quick Test​

Let's take some beverages to test.

stack41

The quantity of beverages changes immediately.

stack42

These values are also updated on the Home Assistant platform where customers can verify all historical data.

stack43

The Home Assistant platform supports other applications triggering alerts, which you can configure for comprehensive management.

FAQ​

1. Q: Can I use the same MQTT Broker and CamThink AI Tool Stack for model training and quantization?

A: The server in this guide is for internal use only. You need to install your own AI Tool Stack.

2. Q: How to take full images more easily using NE301?

A: We recommend connecting a tablet/phone to NE301's WiFi and capturing via the button here.

stack44

3. Q: How to set value templates in Home Assistant?

A: You can visit the Home Assistant website for detailed information on how to use it. Here is an example of data reported by NE301:

{
"metadata": {
"image_id": "cam01_1767513409",
"timestamp": 1767513409,
"format": "jpeg",
"width": 1280,
"height": 720,
"size": 51464,
"quality": 60},
"device_info": {
"device_name": "NE301-2A3E75",
"mac_address": "44:9f:da:2a:3e:75",
"serial_number": "SN202500001",
"hardware_version": "V1.1",
"software_version": "1.0.1.1146",
"power_supply_type": "full-power",
"battery_percent": 0,
"communication_type": "wifi"},
"ai_result": {
"model_name": "YOLOv8 Nano Object Detection Model",
"model_version": "1.0.0",
"inference_time_ms": 50,
"confidence_threshold": 0.5,
"nms_threshold": 0.5,
"ai_result": {
"type": 1,
"detections": [{
"index": 0,
"class_name": "Baverage",
"confidence": 0.9015386700630188,
"x": 0.0039368569850921631,
"y": 0.17518982291221619,
"width": 0.53541159629821777,
"height": 0.82280164957046509}],
"detection_count": 1,
"poses": [],
"pose_count": 0,
"type_name": "object_detection"}},
"image_data": "data:image/jpeg;base64,/9j/2wBDAA0J",
"encoding": "base64"
}