Skip to content

Device Configuration ​

Overview: Device configuration manages device basic information and system-level settings, including device name, firmware info, NTP time sync, debug options, etc. Configuration files are stored in LittleFS /config/device.json, supporting modification via Web interface or API, and batch backup/restore via configuration import/export.

Overview ​

The device configuration page manages device basic information and system-level settings, including device name, firmware info, NTP time sync, debug options, etc.

Device Configuration Page

The basic configuration on the page is used to maintain device identity and time sync; field protection items related to peripheral add/delete/edit are centralized in "Advanced Configuration".

Usage ​

  1. Enter Web interface → Device Configuration
  2. Modify required configuration items
  3. Click Save to apply changes
  4. Some configuration changes require device restart to take effect

Parameters ​

ConfigurationDescriptionDefault
Device NameDevice display name, used for MQTT and Web identificationFastBee-Device
Device IDDevice unique identifier (not modifiable)Auto-generated
NTP ServerTime sync server addresshttp://iot.fastbee.cn/prod-api/iot/tool/ntp
TimezoneTimezone offset (hours)8 (UTC+8)
Log LevelSystem log output levelINFO
Auto RestartAuto restart when memory insufficientEnabled
Restart ThresholdMinimum memory triggering auto restart (bytes)30000
Development FeaturesControls peripheral config, peripheral execution, Modbus sub-device add/delete/edit/mapping entriesEnabled

Advanced Configuration: Development Features ​

The "Advanced Configuration" page in Device Configuration provides a "Development Features" toggle, enabled by default. Disabling or re-enabling requires entering the current logged-in user's password to prevent field misoperations.

When disabled:

  • Add, edit, delete, enable/disable buttons in peripheral configuration are unavailable.
  • Add, edit, delete, enable/disable buttons in peripheral execution are unavailable; execute once remains available.
  • Add, delete, edit, register mapping of Modbus RTU sub-devices and collection tasks, and Modbus RTU configuration save are unavailable.
  • Device monitoring, sensor reading, Modbus real-time control, network configuration and general device information viewing are not affected.

The backend API also validates this state. Even if bypassing the Web page and directly calling peripheral, peripheral execution or Modbus RTU configuration write APIs, it will return 403 when development features are disabled.

Configuration Examples ​

Change Device Name ​

The device name will be part of the MQTT client ID, and displayed in the Web interface title bar.

NTP Time Configuration ​

After the device connects to the network, it automatically syncs time, used for Cron scheduled tasks and log timestamps.

Common NTP servers:

  • http://iot.fastbee.cn/prod-api/iot/tool/ntp — FastBee official (default)
  • cn.pool.ntp.org — Global NTP pool (backup)

Troubleshooting ​

IssuePossible CauseSolution
Incorrect timeNTP sync failedCheck network connectivity and NTP server address
Configuration not savedFlash write failedCheck LittleFS file system space
Restart loopConfiguration errorUse AP mode to restore default configuration

Configuration Import/Export Complete Guide ​

Location: Web interface → Device Configuration → Advanced Configuration → Configuration Import/Export

Supported Configuration Types ​

TypeFileDescription
Full Config Packagefastbee-config-*.jsonBackup package containing multiple configuration files
Device Infodevice.jsonDevice ID, name, cached time, NTP and other basic info
Network Confignetwork.jsonSTA/AP, static IP, custom local domain, and reconnection strategy
Peripheral Configperipherals.jsonLocal GPIO, UART, I2C, sensors, displays and other peripherals
Peripheral Executionperiph_exec.jsonLocal automation rules, trigger conditions, action lists
Communication Protocolprotocol.jsonMQTT, Modbus RTU, sub-devices, mapping tasks
Authentication Configusers.jsonAdministrator account configuration

Note: The unified release baseline enables FASTBEE_ENABLE_CONFIG_TRANSFER=1 and disables the optional file APIs (FASTBEE_ENABLE_FILE_MANAGER=0); there is no standalone file page. Four-megabyte single-app environments also disable OTA. The system uses authenticated administration for configuration APIs.

Daily backup recommends prioritizing export by type, especially:

  • Peripheral execution rules
  • Peripheral configuration
  • Communication protocol

This way when restoring, only the target module is overwritten, which is lower risk and easier to migrate between devices.

Full device migration then select "Full Config Package". After importing the full config package, it's recommended to restart the device so that peripheral initialization, protocol startup and rule scheduling all load cleanly from the new configuration.

Why Inline Import of Large Files is No Longer Used ​

The ESP32 Web server temporarily occupies RAM when parsing forms. Larger configuration files uploaded inline at once via /api/config/transfer/import are prone to triggering memory insufficiency.

The current version uses chunked upload + streaming parsing to avoid excessive single-time memory usage.

Import/Export Steps ​

Export Configuration ​

  1. Enter Device Configuration → Advanced Configuration → Configuration Import/Export
  2. Select export type:
    • Full Config Package: Export all configuration files
    • Export by Type: Select specific configuration type (recommended)
  3. Click Export, browser automatically downloads JSON file
  4. Save as local backup

Import Configuration ​

  1. Enter Device Configuration → Advanced Configuration → Configuration Import/Export
  2. Select import type:
    • Full Config Package: Import complete backup
    • Import by Type: Select specific configuration type
  3. Click Choose File, upload JSON file
  4. System validates configuration format
  5. Click Import, configuration written to LittleFS
  6. Restart device for configuration to take effect

Configuration Migration Best Practices ​

  1. Backup before migration: Export current device configuration
  2. Migrate by module: Prioritize migrating peripheral config, execution rules, protocol config
  3. Validate configuration: After import, check if peripherals initialize properly
  4. Restart device: Ensure all modules load from new configuration
  5. Test functionality: Verify automation rules and communication protocols work properly

Troubleshooting ​

IssuePossible CauseSolution
Import failedConfiguration format errorCheck if JSON format is correct
Peripherals not working after importPin conflictCheck if pin assignments conflict
Rules not executingTrigger configuration errorCheck trigger type and parameters
Some imported items are unavailableTarget environment does not compile the featureImport only compatible modules or use the matching hardware environment

FastBee | fastbee.cn