Skip to content

Communication Protocols ​

The device provides two protocol links: MQTT/MQTTS and Modbus RTU. MQTT handles platform connectivity, property/event reporting, and command delivery; Modbus RTU acts as a master that polls RS485 slaves and maps the results to local peripheral data.

Page Guide ​

What This Page CoversConfiguration entries for MQTT/MQTTS and Modbus RTU, topic types, rule integration, and the troubleshooting order.
Use CasesFor users who need to connect the device to an IoT platform, or poll Modbus slaves over RS485 and link them with local rules.
PrerequisitesThe device network is online; when using MQTTS, enable `mqtts` in "Feature Configuration" first.
Acceptance Points`/api/mqtt/status` shows `connected`, Modbus poll success/failure counters behave as expected, and the platform receives reports and can deliver commands.

Configuration Entries ​

ProtocolPageAPI
MQTT/MQTTSCommunication Protocols → MQTT/api/protocol/mqtt/config, /api/mqtt/status
Modbus RTUCommunication Protocols → Modbus RTU/api/protocol/modbus-rtu/config, /api/modbus/*
Seniverse Weather and Legacy Resource MigrationDevice Screen → Seniverse Weather component/api/screen-panel/weather

Confirm the network is online first, then save the protocol configuration. After saving, check the status and device logs; do not judge connection success solely by "saved".

MQTT Configuration

MQTT/MQTTS ​

Supported:

  • Plain MQTT (commonly port 1883) and TLS-encrypted MQTTS (commonly port 8883).
  • Custom Client ID, username/password, Keep Alive, and last-will messages.
  • Auto-reconnect, event reporting, property/monitoring data reporting, and platform command subscription.
  • WiFi, W5500, and EC801E-CN 4G network transports.

Configuration steps:

  1. Confirm the device network is online and enable the connection on the MQTT page; when using MQTTS, also enable mqtts in "Feature Configuration".
  2. Fill in the server, port, Client ID, and credentials on the MQTT page.
  3. Select the required publish/subscribe topics, save, and connect.
  4. Confirm connected in /api/mqtt/status or the dashboard, then verify platform messages.

/api/mqtt/test saves a restore record first, then temporarily applies the parameters for a connection-only test; business reporting and subscriptions are isolated, and restoration is attempted afterward. If restoration is pending, keep the evidence and verify the status; a successful handshake does not mean the platform received business messages.

Topic Configuration ​

Topics are determined by the publish/subscribe lists on the page; common types include:

TypePurpose
propertySensor and peripheral property reporting
infoDevice information/configuration messages
eventButton, fault, alarm, and device events
monitorStatus monitoring
ntpTime synchronization
HTTP upgradeImplemented remote upgrade control and results, subject to compile and partition capabilities

Do not hardcode topic prefixes in integration programs; read the actual configuration or use platform-assigned topics.

Modbus RTU ​

The current firmware provides Modbus master capability by default:

  • UART TX/RX and optional DE pin configuration.
  • Multiple slave addresses, function codes, register ranges, and data-type mapping.
  • Scheduled polling, adjacent-register read merging, failure retries, and timeout statistics.
  • Coil/register writes, and integration through Peripheral Execution rules.

Configuration steps:

  1. Wire the RS485 transceiver; confirm A/B, GND, termination resistors, and DE/RE direction control.
  2. Select the UART, baud rate, parity, and stop bits on the Modbus page.
  3. Add slave devices with their addresses and register mappings.
  4. After saving, check the poll success/failure counters before creating rules or MQTT reports.

The Modbus slave response feature is disabled by default (FASTBEE_MODBUS_SLAVE_ENABLE=0); do not configure this device as a slave following slave-device documentation.

Rule Integration ​

Modbus reads are handled by the existing scheduler and bus arbitration; currently valid mapped data can be used by independent event rules. Do not treat an output immediately following a collection action as threshold gating.

text
RS485 slave -> poll task -> register mapping -> local sensor cache
                                               |
                                      rule conditions/actions
                                               |
                                      GPIO, display, or MQTT

A rule supports up to 3 triggers and 4 actions; for detailed configuration see Peripheral Execution.

Troubleshooting ​

SymptomCheck First
MQTT not connectedDNS, server/port, credentials, Client ID, TLS feature, and system time
MQTT reconnects frequentlyWiFi signal, Keep Alive, broker logs, and device memory
All Modbus requests time outA/B reversed, baud rate/parity, slave address, DE pin, and common ground
Individual registers abnormalFunction code, register base, byte order, data type, and scaling factor
Rule takes no actionmodbus feature, poll task, target peripheral, and rule enabled state

For interfaces, status fields, and error codes, see the API Reference; for network transports, see Network Configuration.

The current PubSubClient publish actually uses QoS 0; a publish configuration of qos=1 does not provide QoS 1 delivery guarantees. Subscribe and last-will QoS are handled separately. The legacy remote channel is retired: the related old APIs return 410, and rules bound to the retired source are suspended as a whole. See each topic page for detailed boundaries.

FAQ ​

Does "saved" after saving the protocol configuration mean the connection succeeded? ​

No. Saving only writes the configuration; the connection counts as successful only after connected is confirmed in /api/mqtt/status or the dashboard, and platform message exchange is verified.

Can I configure this device as a Modbus slave? ​

No. The Modbus slave response feature is disabled by default (FASTBEE_MODBUS_SLAVE_ENABLE=0); the current firmware provides master capability only. Do not configure this device as a slave following slave-device documentation.

Does a publish configuration of qos=1 provide QoS 1 delivery guarantees? ​

No. The current PubSubClient publish actually uses QoS 0; subscribe and last-will QoS are handled separately. Do not take the publish configuration as evidence of delivery guarantees.

Can I hardcode topic prefixes in integration programs? ​

No. Topics are determined by the publish/subscribe lists on the page; integration programs should read the actual configuration or use platform-assigned topics.