Skip to content

IoT System ​

FastBee IoT system overview

The FastBee IoT platform is a feature-rich IoT solution designed specifically for small and medium-sized enterprises and individual users. By providing a series of easy-to-use tools and features, the platform enables users to effectively manage and control various smart devices. The following is a detailed introduction to the FastBee IoT platform:

Page Guide ​

What This Page CoversAn overall introduction to the FastBee IoT platform: project background, system features, tech stack, application scenarios, and system architecture.
Use CasesFor readers learning about the commercial edition's capabilities and architecture for the first time, to build a complete picture of the product.
PrerequisitesNone; afterwards, continue with the architecture design and installation chapters along the recommended path.

Edition Comparison ​

FastBee offers three editions: Open Source, Commercial, and Cluster. The key differences are listed below; for the full licensing policy and itemized feature list, see Commercial License.

DimensionOpen SourceCommercialCluster
LicenseAGPL v3, free for non-commercial usePerpetual commercial license (certificate-based)Perpetual commercial license (certificate-based)
Source & UpdatesPublic source, updated via Gitee/GitHubPrivate Git server updates after licensing, one year of source updates includedSame as Commercial
DeploymentOne-click single-node deployment with Docker ComposeSingle-node deployment (Docker Compose quick install supported)FMQ server cluster + Web cluster, with Kafka and load balancing for high availability
Access ProtocolsMQTT, GB/T 28181 (live streaming only)Adds TCP, UDP, CoAP, HTTP, Modbus, JT808, and moreSame as Commercial
Feature ScopeCore capabilities: product/device/thing-model management, rule scripts, access controlAdds visual dashboard, alert center, multi-tenancy, OTA updates, data bridge, work orders, IoT SIM card management, and more (SCADA and smart speaker are optional modules)Same features as Commercial, differs in supported device scale
Use CasesPersonal learning and non-commercial useCommercial projects of small and medium-sized enterprisesCommercial projects with large device scale and high-availability requirements

1. Platform Introduction ​

  • Project Background: Originally named Wumei Smart (wumei-smart), later renamed FastBee. This change not only reflects the brand's update, but also marks its development in the IoT field and the expansion of its service scope.
  • Main Support: The platform backend adopts the Spring Boot framework and the frontend uses Vue technology. The selection of these technologies ensures the platform's usability and a good user experience.

2. System Functions ​

  • Product Management: Supports product details, Thing Models, classification, and device authorization, helping enterprises better organize and manage their smart products.
  • Device Management: Provides management functions such as device details, grouping, logging, and real-time status monitoring, ensuring efficient and secure device operation.
  • Thing Model Management: Allows defining device properties, functions, and events to achieve effective interaction between devices and the cloud.
  • Rule Engine: Supports writing rules based on Groovy (same syntax as Java), enabling the system to automatically handle complex business logic.
  • Scene Linkage: Supports direct or visual configuration of automation scenes, enabling seamless collaboration between smart devices.
  • Alert Center: Integrates with multiple communication methods such as voice, SMS, and Enterprise WeChat to promptly notify device abnormalities or failures, ensuring quick response.
  • Multi-tenant System: Supports data isolation and independent configuration, suitable for multi-tenant environments, enhancing system flexibility and security.
  • Video Surveillance Access: Supports surveillance devices using the GB/T28181 protocol, providing live streaming, recording playback, and PTZ control for security monitoring needs.
  • Scene Management: Supports aggregating multiple devices for display, and can be extended with input and computed variables to support complex data operations.
  • Data Bridging: Acts as a bridge to external data systems, supporting data input and output.
  • Data Center: Supports generating data reports, viewing historical data, and analyzing device data.
  • Communication Protocols: Supports a rich set of device communication protocols, including MQTT, Modbus, TCP, GB28182, HTTP, CoAP, and more.
  • IoT Cards: Manages the SIM cards connecting devices, supports integration with different reseller platforms, and provides card status and traffic views with traffic alerts.
  • Work Order Management: Supports automated, intelligent, and full-process management of maintenance, repair, inspection, and other tasks for devices or assets.

3. Technology Stack ​

  • Backend Technologies: Include Spring Boot, MyBatis, Spring Security, Jwt, Redis, TDengine, and more, ensuring the stability and efficiency of backend services.
  • Frontend Technologies: Use modern frontend technologies such as ES6, ES7, Vue, Vuex, uView, and H5, enhancing the interactivity and visual experience of the user interface.
  • Mobile Support: Supports multiple mobile platforms such as WeChat Mini Programs, Android, and iOS, and enables cross-platform application development through Uniapp, making it convenient for users to operate and manage on different devices.

4. Application Scenarios ​

FastBee is suitable for various scenarios such as smart homes, smart offices, smart communities, agricultural monitoring, water conservancy monitoring, and industrial control. These application scenarios cover a wide range of needs from home to industrial levels, demonstrating the extensive potential of FastBee in the IoT field.

FastBee application scenarios

5. System Architecture ​

┌──────────────────────────────────────────────────────────────────┐
│                        Browser / Mobile                          │
│         Vue2 Web (PC)    +    Vant (H5 / Mini Program)           │
└───────────────────────────────┬──────────────────────────────────┘
                                │ HTTP REST / WebSocket(MQTT)
                                ▼
┌──────────────────────────────────────────────────────────────────┐
│                       Nginx (Reverse Proxy)                      │
│           /  → static frontend assets    /prod-api/ → backend    │
└───────────────────────────────┬──────────────────────────────────┘
                                │
                                ▼
┌──────────────────────────────────────────────────────────────────┐
│                  Spring Boot Service (8080)                      │
│  ┌────────────────────────────────────────────────────────────┐  │
│  │                fastbee-open-api (Controller layer)         │  │
│  │  device / product / ruleEngine / media / system / ...     │  │
│  └────────────────────────┬───────────────────────────────────┘  │
│  ┌─────────────────────────▼──────────────────────────────────┐  │
│  │               fastbee-service (Service layer)              │  │
│  │     IotService / SceneService / NotifyService / ...        │  │
│  └────────────────────────┬───────────────────────────────────┘  │
│  ┌─────────────────────────▼──────────────────────────────────┐  │
│  │               fastbee-server (protocol access)             │  │
│  │   MQTT Broker(1883) / HTTP(8081) / CoAP(5683) / TCP(8888) │  │
│  └────────────────────────────────────────────────────────────┘  │
└───────────┬──────────────────┬────────────────────┬──────────────┘
            │                  │                    │
         MySQL              Redis              TDengine
     (metadata/config)   (cache/real-time)  (time-series history)

6. Code Structure ​

fastbee/
├── vue/                        ← Frontend Vue2 project
│   ├── src/
│   │   ├── api/                ← API request functions for each module
│   │   ├── assets/             ← Static assets (images/icons/styles)
│   │   ├── components/         ← Global common components (28)
│   │   ├── directive/          ← Global custom directives
│   │   ├── lang/               ← Internationalization language packs
│   │   ├── layout/             ← Main framework layout
│   │   ├── plugins/            ← Vue plugin registration
│   │   ├── router/             ← Router configuration
│   │   ├── store/              ← Vuex state management
│   │   ├── utils/              ← Utility functions (request/mqttTool, etc.)
│   │   └── views/              ← Business page views
│   ├── package.json
│   └── vue.config.js
│
├── springboot/                 ← Backend Spring Boot multi-module project
│   ├── fastbee-admin/          ← Admin controllers + configuration
│   ├── fastbee-open-api/       ← Open API layer (IoT business Controllers)
│   ├── fastbee-service/        ← Business service layer (iot-service / system-service)
│   ├── fastbee-server/         ← Protocol access services
│   │   ├── iot-server-core/    ← IoT core service logic
│   │   ├── mqtt-broker/        ← Built-in Netty MQTT Broker
│   │   ├── http-server/        ← HTTP device access
│   │   ├── coap-server/        ← CoAP device access
│   │   ├── sip-server/         ← SIP video access
│   │   └── boot-strap/         ← Startup entry
│   ├── fastbee-protocol/       ← Protocol parsing (Modbus/custom)
│   ├── fastbee-mq/             ← Message queue integration
│   ├── fastbee-notify/         ← Notification service (SMS/email/WeChat, etc.)
│   ├── fastbee-plugs/          ← Plugins (OSS/OAuth/Quartz/code generation)
│   ├── fastbee-iot-data/       ← IoT data processing
│   ├── fastbee-record/         ← Recording service
│   ├── fastbee-common-extend/  ← Common utility extensions
│   └── sql/                    ← Database initialization/upgrade scripts
│
├── docker/                     ← Docker Compose deployment files
└── sdk/                        ← Device-side SDK

7. Functional Module Descriptions ​

Device Management ​

FunctionDescription
Device registration/importAdd devices manually or import them in batches via Excel
Device assignment/recyclingAssign devices by organization/user dimension, with recycling support
Real-time status refreshUpdate online/offline status in real time by subscribing to /+/{sn}/status/post over MQTT
Device QR codeGenerate binding QR codes with printing support
OTA firmware upgradeVersion management + upgrade task delivery
Command deliveryThing Model property delivery / function invocation
Shadow modeCache the latest values in the shadow while the device is offline

Page route: /iot/device/list → views/iot/device/index.vue

Product Management ​

FunctionDescription
Product templateDefine device types and Thing Models
Thing ModelThe three elements: Property / Function / Event
Protocol configurationMQTT / HTTP / CoAP / TCP / Modbus / JT808
Product releaseAfter release, the Thing Model of devices can no longer be modified
Drag-and-drop editorVisually configure the device running status panel

Rule Engine ​

FunctionDescription
Scene LinkageVisual orchestration of trigger → condition → action (driven by LiteFlow)
Device alertsTriggered by threshold/range/boolean, with silence period support
Rule scriptsGroovy/JavaScript scripts for processing raw data
One-click triggerManually trigger a scene linkage

Data Center ​

FunctionDescription
Real-time dataThe latest Thing Model values reported by devices (Redis cache)
Historical dataQuery by time range (TDengine time-series database)
Data reportsGenerate Excel files on a schedule, with email notification support
Data exportDownload historical data

Video Surveillance ​

FunctionDescription
Device accessSupports the GB28181 (SIP) protocol
Live playbackRTMP / RTSP / FLV / HLS / WebRTC
Recording playbackQuery historical recordings by time range (ZLMediaKit)
PTZ controlPTZ command delivery
Voice intercomSIP TCP active mode

Notification Service ​

Supported channels: SMS (Alibaba Cloud/Tencent), email, WeChat Official Account, Enterprise WeChat, DingTalk, HTTP push, MQTT push.

System Management ​

Users / roles / organizations (multi-tenant) / menus / dictionaries / logs / system monitoring / code generation.

8. API Documentation ​

The complete API documentation is available through Swagger: http://localhost:8080/swagger-ui/index.html (development environment)

All APIs use a unified response format:

json
{
  "code": 200,
  "msg": "Operation successful",
  "data": { ... }
}

Paged list response format:

json
{
  "code": 200,
  "msg": "Operation successful",
  "rows": [ ... ],
  "total": 100
}

Authentication APIs ​

MethodPathDescription
POST/loginAccount password login
POST/registerUser registration
POST/logoutLogout
GET/getInfoGet current user information
GET/captchaImageGet image captcha
POST/auth/sms/loginSMS code login
GET/auth/login/{loginId}Third-party social login
POST/auth/ssoLoginSSO single sign-on

Login example:

bash
POST /login
Content-Type: application/json

{
  "username": "admin",
  "password": "admin123",
  "code": "1234",
  "uuid": "xxx-xxx-xxx",
  "sourceType": 1
}
json
{
  "code": 200,
  "msg": "Operation successful",
  "data": {
    "token": "eyJhbGciOiJIUzI1NiIs..."
  }
}

Subsequent requests must carry the header: Authorization: Bearer {token}

Device APIs (/iot/device) ​

MethodPathPermissionDescription
GET/iot/device/listiot:device:listDevice paged list
GET/iot/device/shortListiot:device:listDevice short list (home page)
GET/iot/device/alliot:device:listShort list of all devices
GET/iot/device/{deviceId}iot:device:queryDevice details
GET/iot/device/getDeviceBySerialNumber/{sn}iot:device:queryQuery by serial number
POST/iot/deviceiot:device:addAdd device
PUT/iot/deviceiot:device:editEdit device
DELETE/iot/device/{deviceId}iot:device:removeDelete device
POST/iot/device/exportiot:device:exportExport Excel
POST/iot/device/assignmentiot:device:assignmentAssign device to organization
POST/iot/device/user/assignmentiot:device:assignmentAssign device to user
POST/iot/device/recoveryiot:device:recoveryRecycle device
GET/iot/device/runningStatusiot:device:queryRunning status
GET/iot/device/thingsModelValue/{deviceId}iot:device:queryThing Model real-time values
GET/iot/device/statistic-Monitoring data statistics

Product APIs (/iot/product) ​

MethodPathDescription
GET/iot/product/listProduct paged list
GET/iot/product/shortListProduct short list
GET/iot/product/{productId}Product details
POST/iot/productAdd product
PUT/iot/productEdit product
DELETE/iot/product/{productId}Delete product
PUT/iot/product/statusPublish/unpublish product
POST/iot/product/copy?productId=Copy product

Thing Model APIs (/iot/thingsModel) ​

MethodPathDescription
GET/iot/thingsModel/listThing Model list
POST/iot/thingsModelAdd Thing Model
PUT/iot/thingsModelEdit Thing Model
DELETE/iot/thingsModel/{modelId}Delete Thing Model
POST/iot/thingsModel/syncSync to devices

Rule Engine APIs (/iot/scene) ​

MethodPathDescription
GET/iot/scene/listScene linkage list
POST/iot/sceneAdd scene
PUT/iot/sceneEdit scene
DELETE/iot/scene/{sceneId}Delete scene
POST/iot/scene/trigger/{sceneId}Manual trigger

Data Center APIs (/iot/datacenter) ​

MethodPathDescription
GET/iot/datacenter/latestDataLatest data
GET/iot/datacenter/historyDataHistorical data

9. Development Standards ​

Frontend Naming Conventions ​

TypeConventionExample
Files/directorieskebab-casedevice-edit.vue
Component namesPascalCaseDeviceCard
Variables/methodscamelCasedeviceList, handleQuery()
ConstantsUPPER_CASEMAX_PAGE_SIZE
API filescamelCasedevice.js, product.js
CSS class nameskebab-case.device-item

Backend Naming Conventions ​

TypeConventionExample
Package namesAll lowercase, dot-separatedcom.fastbee.iot.service
Class namesPascalCaseDeviceServiceImpl
Interface namesI + PascalCaseIDeviceService
Method namescamelCaselistDeviceByGroup()
ConstantsUPPER_SNAKEMAX_RETRY_COUNT
Database tablesLowercase with underscoresiot_device
Database fieldsLowercase with underscoresserial_number

API Design Conventions ​

  • RESTful style; resource names use plural nouns
  • Unified route prefixes: /iot/ (IoT module), /system/ (system module)
  • Controllers extend BaseController and use @PreAuthorize for permission checks
  • Use the @Log annotation to record operation logs
  • Return uniformly with AjaxResult.success() / getDataTable()
java
@PreAuthorize("@ss.hasPermi('iot:device:add')")
@Log(title = "Device", businessType = BusinessType.INSERT)
@PostMapping
@ApiOperation("Add device")
public AjaxResult add(@Validated @RequestBody Device device) {
    return toAjax(deviceService.insertDevice(device));
}

10. FAQ ​

Frontend ​

Q: Startup reports patch-package related errors after npm install?

Cause: node_modules is not fully installed or a cache issue.

bash
# Clear the cache and reinstall
rm -rf node_modules package-lock.json
npm cache clean --force
npm install

Q: APIs return 404 in the development environment?

Check whether VUE_APP_SERVER_API_URL in .env.development correctly points to the backend, and confirm the backend has been started.

Q: The Element UI dialog (MessageBox) cannot pop up?

Confirm that the component is registered globally. The project completes registration through Vue.use(Element) in main.js; no separate import is needed.

Q: MQTT connection fails?

  1. Confirm that VUE_APP_MQTT_SERVER_URL is configured correctly (ws://localhost:8083/mqtt in the development environment)
  2. Confirm that the built-in Broker is started (server.broker.enabled: true + server.broker.websocket-port: 8083)
  3. Check whether the Token is valid (mqttTool uses the Token as the MQTT password)

Q: vue-treeselect has a version conflict?

The project uniformly uses @riophae/vue-treeselect@0.4.0; do not mix other versions.

Q: The vue-qr component import reports an error?

javascript
// ✅ Correct way (default import)
import vueQr from 'vue-qr';
// ❌ Wrong way (named import fails)
import { VueQr } from 'vue-qr';

Backend ​

Q: Startup reports license related errors?

Configure the correct certificate path in application-dev.yml:

yaml
license:
  subject: common
  licensePath: classpath:license.lic

Apply to the official team for the certificate file (license.lic) and place it in the resources directory.

Q: TDengine reports a connection timeout?

  1. Confirm that TDengine is started (default port 6041)
  2. Check the taos data source configuration in application-dev.yml
  3. If the time-series database is not needed, set taos.enabled: false to skip it

Q: The rule engine does not trigger?

  1. Confirm that the scene linkage status is "Enabled"
  2. Check the trigger conditions (value range, comparison operators)
  3. Check the LiteFlow execution chain in the logs

Q: The device is online but the backend does not show the online status?

  1. Check MQTT authentication (EMQX Webhook configuration)
  2. Confirm that the device serialNumber matches the one entered in the system
  3. Check whether the backend logs contain device status processing records

Q: How to switch between EMQX and the built-in Broker?

yaml
# application.yml
server:
  broker:
    enabled: true   # true = built-in Netty Broker
                    # false = use external EMQX (requires spring.mqtt.host-url)

Q: How is multi-tenant data isolation implemented?

The platform isolates data through the tenant_id (organization ID) field. The Controller layer obtains the current login user's organization information from SecurityUtils.getLoginUser(), and the Service layer filters automatically when querying.

Q: How to access the Druid monitoring page?

Visit http://localhost:8080/druid/index.html in a browser. The default account and password are both fastbee (can be modified in application.yml).

FastBee | fastbee.cn