How To Use a ThingsBoard IoT Gateway To Build Smart Retail Solutions?

Smart retail solutions built using IoT require server-side infrastructure to analyze and process the data coming from the connected devices. ThingsBoard provides this server-side platform and using this free open-source platform has one primary benefit. This article will introduce a method that use Thingsboard and a range of IoT devices to build a smart retail solution.
using thingsboard to build smart retail solution
Table of Contents

ThingsBoard has multiple IoT solution templates that drastically reduce the time to market for your retail IoT devices. These include the interactive and feature-rich dashboards, sample devices, processing logic, and all the required entities, each serving as a complete proof of concept.

With the server side sorted, you still need the right smart gateway, smart sensors, and other connected devices to build a complete smart retail solution. Here’s a close look at the steps you need to take to build this solution using ThingsBoard and the devices you need.

Required IoT Devices in Retail

A smart retail solution can cover several aspects of a business. Therefore, you’re recommended to use the following IoT devices to build complete products for use cases like Bluetooth proximity marketing, RLTS BLE location tracking, security alarm systems, and forklift tracking in the warehouse.

DSGW-210 IoT Edge Gateway

The central hub for this system is a ThingsBoard IoT gateway and you need one that can handle multiple end nodes and their different communication protocols. The DSGW-210 IoT Edge gateway fits this bill.

ThingsBoard IoT Gateway Dusun 5

This gateway supports ZigBee 3.0, Z-Wave Plus 800, 4G LTE (Cat M1, Cat 1, and Cat 4), Bluetooth 5.2, and Wi-Fi wireless communication and has one LAN/WAN port. The device can run on Debian 12, Android 11, Ubuntu 20.04, or Yocto 4.0, providing an off-the-shelf solution that you can customize to meet your requirements.

But most importantly, the DSGW-210 gateway has edge computing capabilities. This means you can build custom applications or transplant the ones you’ve already made to locally process data in the smart retail environment before uploading to ThingsBoard.

Also Read: How to Choose the Right Thingsboard Gateway?

The device also features a lithium battery backup that keeps the gateway powered in case the lights go off or before the backup generator kicks in. It is important to have the smart retail environment remain fully functional even when the power goes off, so this feature is an important selling point to your clients.

Base Station for AoA Indoor Positioning

The base stations for positioning purpuse collect location info from BLE beacons, tags, ID card and send to the platform with positioning engine or a local AI edge computing gateway hub like DSGW-290 AI Smart Controller with built-in positioning engine, in order to to process the data.

But remember the DSGW-210 smart gateway also has edge computing capabilities, so you can also choose to develop or install a third-party positioning engine to work with the DSLA-N400 positioning base station. This solution is highly flexible.

AoA positioning base station like DSLA-N100 can connect up to 1000 devices and support two-dimentional positioning. Some also have two cameras to capture images so as to count store traffic at the entry/exit points.

Dusun makes it easy for you by providing a vertically integrated solution (proximity marketing, location tracking for people and assets, environmental comfort management, security alarms, warehouse asset maangement, etc.,) that you can launch to the market with zero or minimal modifications.

Security Alarm Sensors

Brick and mortar retail spaces need intrusion detection and deterrence systems as well. The detection part should consist of the following end nodes.

  • Zigbee PIR sensors: These devices use Fresnel lenses to capture and focus the IR light emitted by the human body to detect movement, meaning they can work in the dark and ensure round-the-clock surveillance and security for your shop.
  • IoT Door and window sensors: These sensors monitor the opening and closing status of entry points like doors, windows, drawers, cabinet doors, etc., and trigger siren activation when necessary.
  • Window vibration sensors: Alerts the store owner or manager when there is a break in by detecting the breakage vibration, striking, movement, or shaking on the glass or window material.

The deterrence part consists of Zigbee alarm sirens, which should be loud enough to scare the intruder and alert people nearby. You should also integrate emergency panic buttons into the security aspect of the smart retail solution to send discreet panic alerts when an emergency arises.

All these devices communicate via ZigBee and have internal batteries (except the window vibration sensor) with a battery life of over 1 year. The window vibration sensor requires two AAA batteries, which can last over 2 years when powering the device.

Indoor Tracking Devices

Proximity marketing is an important aspect in smart retail environments and you should include Bluetooth beacons in your solution to detect and connect to the phones of passersby, then send messages like discounts so that they might be compelled to go into the store and shop.

Some of these beacons utilize Bluetooth AoA for high-precision positioning, while others have waterproof designs with PAs for outdoor applications.

You can also include asset and BLE tracking tags or wearable wristband beacons for retail or warehouse employees, which will enable the store owner to keep track of the movements in the store.

BLE Aoa positioning block diagram

  • Beacons (wristband, outdoor, tracking ID cards, with PA, and keyfobs)
  • BLE tags
  • Wearable beacons with emergency buttons

Room Comfort Monitoring Devices

Smart retail spaces should have automated temperature and humidity level adjustment and control to keep the indoor space comfortable all the time. The intention is to keep the customers in the store for the maximum time possible because this can increase sales.

A temperature and humidity sensor is the core end node in this setup, and it should display the current detected levels while also transmitting the data to the gateway.

Also Read: How to Send Temperature and Humidity Sensor Data to the Cloud By Using Zigbee2MQTT?

On the control side, a programmable thermostat with a built-in control panel should compare the sensor data with the preset levels, then adjust accordingly. It also provides an interface for manual control.

Smart thermostat smart home

Besides being a comfort feature, this automation helps to reduce energy consumption, which lowers the power bills.

Environmental Safety Monitoring Devices

Fire-causing accidents can occur in stores and warehouses, leading to smoke poisoning and property destruction. To mitigate this, your solution should incorporate Zigbee smoke sensors to detect and raise alarms if the smoke levels are significantly high.

How To Use ThingsBoard IoT Gateway To Build Smart Retail Solutions

Once you have all the required hardware in place, the next step is to build the smart retail solution using ThingsBoard using these steps.

Step 1: Install ThingsBoard In DSGW-210 Gateway (If Not Already Installed)

To install ThingsBoard, first install OpenJDK using these commands.

sudo apt get
sudo apt install openjdk-11-jdk

Next, install the ThingsBoard service using this command.

# Download installation package
Wget https://github.com/thingsboard/thingsboard/releases/download/v3.3.3/thingsboard-3.3.3.deb
# Install ThingsBoard as a service

Open the ThingsBoard configuration file and configure the database.

# Edit Thingsboard configuration file
sudo nano /etc/thingsboard/conf/thingsboard.conf

Then add these lines to the file.

# Edit Thingsboard configuration file# DB Configuration
export DATABASE_TS_TYPE=sql
export SPRING_JPA_DATABASE_PLATFORM=org.hibernate.dialect.PostgreSQLDialect

Next, pick the queue service using these commands.

# Edit Thingsboard configuration file
sudo nano /etc/thingsboard/conf/thingsboard.conf

Then run this installation script.

# --loadDemo option will load demo data: users, devices, assets, rules, widgets.
sudo /usr/share/thingsboard/bin/install/install.sh –loadDemo

Start the ThingsBoard service using this command.

sudo service thingsboard start

Then open the Web UI using the localhost link.

http://localhost:8080/

Step 2: Set Up ThingsBoard

To configure ThingsBoard, first sign up at https://thingsboard.cloud/signup to create an account then login. Under device management, click the “devices” menu.

find device management section on thingsboard

Click the + button at the top right to add a new device.

add devices on thingsboard

Enter the device’s name (gateway), click the “is gateway” checkbox, then click the add button. Copy the access token then head over the gateway to configure it.

Step 3: Connect Your Gateway To ThingsBoard

Connect to the gateway then login to the admin section using the root username and password. Under the “IoT Services” menu at the top, pick Cloud config.

find thingsboard on iot gateway

Enter the ThingsBoard connection credentials in the cloud connection manager, which include the ThingsBoard server (thingsboard.cloud), server port (1883), and the access token you copied earlier.

enter the thingsboard connection credentials

Step 4: Test the Uploading of Sensor Data

Activate and connect a sensor (such as the ZigBee temperature and humidity sensor) to the gateway, and trigger it manually to upload data.

send temperature and humidity sensor data to the thingsboard

You should see the data in a bar chart format indicating the data per time.

sensor data shown on thingsboard

Note: You don’t have to worry about configuring the sensor to gateway connection because Dusun IoT has taken care of this to ensure you get the smart retail solution to market faster.

Why Invest In Smart Retail Solutions?

Brick and mortar stores are making a comeback after the pandemic (twice as many store openings than closings for US retailers in 2021)

Shoppers want a shopping experience.

DTC brands are increasingly viewing brick and mortar stores as having a competitive edge

Store owners need smart retail solutions to run these increasing retail stores and smart retail solutions enhance the shopping experience, cut costs, simplify marketing (proximity marketing), improve store security, make it easy to monitor employees, and provide critical data like number of visitors to monitor growth.

ThingsBoard IoT Gateway Troubleshooting Tips

Here are four LED error indicators to look out for when operating the ThingsBoard IoT gateway.

LED Color and StatusCause and Solution
Flashing Blue LEDThingsBoard gateway is rebooting.
Flashing Red LEDGateway not connecting to the cloud. Try reconnecting.
Steady Red LEDInternet link is down. Activate the backup link or check the connection.
Steady Yellow LEDLow battery. Recharge the gateway.

FAQs

What if the gateway fails to connect to ThingsBoard?

Connection failures are mostly attributed to incorrect configurations, so check the authentication information on the gateway (server address and port). Try to copy the access token again and paste it in the textbox.

Also, check the accessibility to the ThingsBoard server and go through the logs to pinpoint the error if it persists.

What smart retail application can I build using ThingsBoard IoT gateways?

They are quite a number, from visitor heat maps to traffic counting, proximity marketing, asset tracking, and geofencing.

Do you have 5G smart retail hardware solutions?

Yes, we do. DSGW-380, for instance, is a 5G IoT gateway with Wi-Fi 6 wireless connectivity. It also features two gigabit-ethernet ports for cable connections, a built-in Neural Processing Engine with 6 TOPS for AI computation, and strong capabilities for multimedia applications.

Leave a Reply

Looking For An IoT Device Supplier For Your Projects?

CONTACT US

    This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

    IoT Gateways for Recommendation

    CONTACT US

      This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

      Welcome to DusunIoT

      Hi there 👋 Is there anything we can help you with today? Please fill in the form below for the team to follow up if you become disconnected.

        Download

          This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

          Ultimate IoT White Paper for Developer Gateway

          DusunIoT Distributor Program

            This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

              This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.