From 4c314419732ea40c5bb86e58b80fb01f896809aa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AD=99=E5=B0=8F=E4=BA=91?= Date: Wed, 28 Jan 2026 09:59:37 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=89=A9=E4=BD=99=E9=87=8C?= =?UTF-8?q?=E7=A8=8B=E7=9A=84=E8=8E=B7=E5=8F=96=E6=96=B9=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docker/thingsboard/dji.conf | 449 ++++++++---------------------------- 1 file changed, 101 insertions(+), 348 deletions(-) diff --git a/docker/thingsboard/dji.conf b/docker/thingsboard/dji.conf index ef58a29..eee4b07 100644 --- a/docker/thingsboard/dji.conf +++ b/docker/thingsboard/dji.conf @@ -1,354 +1,107 @@ { - "broker": { - "host": "mqtt.t-aaron.com", - "port": 10883, - "version": 5, - "clientId": "ThingsBoard_gateway", + "thingsboard": { + "host": "220.154.136.137", + "port": 1883, + "remoteShell": false, + "remoteConfiguration": true, + "checkConnectorsConfigurationInSeconds": 60, + "statistics": { + "enable": true, + "enableCustom": true, + "statsSendPeriodInSeconds": 60, + "customStatsSendPeriodInSeconds": 3600, + "commands": [] + }, + "maxPayloadSizeBytes": 8196, + "minPackSendDelayMS": 50, + "minPackSizeToSend": 500, + "handleDeviceRenaming": true, + "checkingDeviceActivity": { + "checkDeviceInactivity": false, + "inactivityTimeoutSeconds": 300, + "inactivityCheckPeriodSeconds": 10 + }, "security": { - "type": "basic", - "username": "admin", - "password": "admin" + "type": "accessToken", + "accessToken": "J3ZlDINlAoUhjBIE0CIr" }, - "maxNumberOfWorkers": 100, - "maxMessageNumberPerWorker": 10 - }, - "mapping": [ - { - "topicFilter": "thing/product/7C+/osd", - "subscriptionQos": 0, - "converter": { - "type": "json", - "deviceInfo": { - "deviceNameExpression": "(?<=thing/product/)[^/]+(?=/osd)", - "deviceNameExpressionSource": "topic", - "deviceProfileExpressionSource": "message", - "deviceProfileExpression": "default" - }, - "attributes": [ - { - "key": "dock_sn", - "type": "string", - "value": "${gateway}" - }, - { - "key": "sub_device.device_sn", - "type": "string", - "value": "${data.sub_device.device_sn}" - }, - { - "key": "mode_code", - "type": "integer", - "value": "${data.mode_code}" - }, - { - "key": "firmware_version", - "type": "string", - "value": "${data.firmware_version}" - }, - { - "key": "latitude", - "type": "double", - "value": "${data.latitude}" - }, - { - "key": "longitude", - "type": "double", - "value": "${data.longitude}" - } - ], - "timeseries": [ - { - "key": "air_conditioner.air_conditioner_state", - "type": "string", - "value": "${data.air_conditioner.air_conditioner_state}" - }, - { - "key": "flighttask_step_code", - "type": "integer", - "value": "${data.flighttask_step_code}" - }, - { - "key": "drone_in_dock", - "type": "string", - "value": "${data.drone_in_dock}" - }, - { - "key": "sub_device.device_online_status", - "type": "integer", - "value": "${data.sub_device.device_online_status}" - }, - { - "key": "drone_charge_state.state", - "type": "integer", - "value": "${data.drone_charge_state.state}" - }, - { - "key": "air_conditioner.air_conditioner_state", - "type": "integer", - "value": "${data.air_conditioner.air_conditioner_state}" - }, - { - "key": "humidity", - "type": "double", - "value": "${data.humidity}" - }, - { - "key": "temperature", - "type": "double", - "value": "${data.temperature}" - }, - { - "key": "acc_time", - "type": "integer", - "value": "${data.acc_time}" - }, - { - "key": "network_state.type", - "type": "integer", - "value": "${data.network_state.type}" - }, - { - "key": "wind_speed", - "type": "double", - "value": "${data.wind_speed}" - }, - { - "key": "rainfall", - "type": "integer", - "value": "${data.rainfall}" - }, - { - "key": "position_state.rtk_number", - "type": "integer", - "value": "${data.position_state.rtk_number}" - }, - { - "key": "alternate_land_point.longitude", - "type": "double", - "value": "${data.alternate_land_point.longitude}" - }, - { - "key": "alternate_land_point.latitude", - "type": "double", - "value": "${data.alternate_land_point.latitude}" - }, - { - "key": "environment_temperature", - "type": "double", - "value": "${data.environment_temperature}" - }, - { - "key": "network_state.rate", - "type": "double", - "value": "${data.network_state.rate}" - }, - { - "key": "cover_state", - "type": "integer", - "value": "${data.cover_state}" - } - ] - } - }, - { - "topicFilter": "thing/product/158+/osd", - "subscriptionQos": 0, - "converter": { - "type": "json", - "deviceInfo": { - "deviceNameExpression": "(?<=thing/product/)[^/]+(?=/osd)", - "deviceNameExpressionSource": "topic", - "deviceProfileExpressionSource": "message", - "deviceProfileExpression": "default" - }, - "attributes": [ - { - "key": "mode_code", - "type": "integer", - "value": "${data.mode_code}" - }, - { - "key": "dock_sn", - "type": "string", - "value": "${gateway}" - } - ], - "timeseries": [ - { - "key": "total_flight_sorties", - "type": "string", - "value": "${data.total_flight_sorties}" - }, - { - "key": "height_limit", - "type": "integer", - "value": "${data.height_limit}" - }, - { - "key": "distance_limit_status.distance_limit", - "type": "integer", - "value": "${data.distance_limit_status.distance_limit}" - }, - { - "key": "battery", - "type": "string", - "value": "${data.battery}" - }, - { - "key": "position_state.rtk_number", - "type": "integer", - "value": "${data.position_state.rtk_number}" - } - ] - } - }, - { - "topicFilter": "thing/product/7C+/state", - "subscriptionQos": 0, - "converter": { - "type": "json", - "deviceInfo": { - "deviceNameExpression": "(?<=thing/product/)[^/]+(?=/state)", - "deviceNameExpressionSource": "topic", - "deviceProfileExpressionSource": "constant", - "deviceProfileExpression": "default" - }, - "attributes": [ - { - "key": "firmware_version", - "type": "string", - "value": "${data.firmware_version}" - } - ], - "timeseries": [] - } - }, - { - "topicFilter": "thing/product/158+/state", - "subscriptionQos": 0, - "converter": { - "type": "json", - "deviceInfo": { - "deviceNameExpression": "(?<=thing/product/)[^/]+(?=/state)", - "deviceNameExpressionSource": "topic", - "deviceProfileExpressionSource": "constant", - "deviceProfileExpression": "default" - }, - "attributes": [ - { - "key": "firmware_version", - "type": "string", - "value": "${data.firmware_version}" - } - ], - "timeseries": [ - { - "key": "psdk_widget_values", - "type": "string", - "value": "${data.psdk_widget_values}" - }, - { - "key": "home_latitude", - "type": "double", - "value": "${data.home_latitude}" - }, - { - "key": "home_longitude", - "type": "double", - "value": "${data.home_longitude}" - }, - { - "key": "total_flight_time", - "type": "integer", - "value": "${data.total_flight_time}" - } - ] - } + "qos": 1, + "reportStrategy": { + "type": "ON_RECEIVED" } - ], - "requestsMapping": { - "connectRequests": [ - { - "topicFilter": "sensor/connect", - "deviceInfo": { - "deviceNameExpressionSource": "message", - "deviceNameExpression": "${serialNumber}", - "deviceProfileExpressionSource": "constant", - "deviceProfileExpression": "Thermometer" - } - }, - { - "topicFilter": "sensor/+/connect", - "deviceInfo": { - "deviceNameExpressionSource": "topic", - "deviceNameExpression": "(?<=sensor/)(.*?)(?=/connect)", - "deviceProfileExpressionSource": "constant", - "deviceProfileExpression": "Thermometer" - } - } - ], - "disconnectRequests": [ - { - "topicFilter": "sensor/disconnect", - "deviceInfo": { - "deviceNameExpressionSource": "message", - "deviceNameExpression": "${serialNumber}" - } - }, - { - "topicFilter": "sensor/+/disconnect", - "deviceInfo": { - "deviceNameExpressionSource": "topic", - "deviceNameExpression": "(?<=sensor/)(.*?)(?=/connect)" - } - } - ], - "attributeRequests": [ - { - "retain": false, - "topicFilter": "v1/devices/me/attributes/request", - "deviceInfo": { - "deviceNameExpressionSource": "message", - "deviceNameExpression": "${serialNumber}" - }, - "attributeNameExpressionSource": "message", - "attributeNameExpression": "${versionAttribute}, ${pduAttribute}", - "topicExpression": "devices/${deviceName}/attrs", - "valueExpression": "${attributeKey}: ${attributeValue}" - } - ], - "attributeUpdates": [ - { - "retain": true, - "deviceNameFilter": ".*", - "attributeFilter": "firmwareVersion", - "topicExpression": "sensor/${deviceName}/${attributeKey}", - "valueExpression": "{\"${attributeKey}\":\"${attributeValue}\"}" - } - ], - "serverSideRpc": [ - { - "type": "twoWay", - "deviceNameFilter": ".*", - "methodFilter": "echo", - "requestTopicExpression": "sensor/${deviceName}/request/${methodName}/${requestId}", - "responseTopicExpression": "sensor/${deviceName}/response/${methodName}/${requestId}", - "responseTopicQoS": 1, - "responseTimeout": 10000, - "valueExpression": "${params}" - }, - { - "type": "oneWay", - "deviceNameFilter": ".*", - "methodFilter": "no-reply", - "requestTopicExpression": "sensor/${deviceName}/request/${methodName}/${requestId}", - "valueExpression": "${params}" - } - ] }, - "name": "dajiang", - "id": "28239240-5e44-4fb8-9f66-c29c638903ae", - "logLevel": "INFO", - "enableRemoteLogging": false, - "configVersion": "3.7.8" + "storage": { + "type": "memory", + "read_records_count": 100, + "max_records_count": 100000, + "data_folder_path": "./data/", + "max_file_count": 10, + "max_read_records_count": 10, + "max_records_per_file": 10000, + "data_file_path": "./data/", + "messages_ttl_check_in_hours": 1, + "messages_ttl_in_days": 7, + "ts": 1769419043112 + }, + "grpc": { + "enabled": false, + "serverPort": 9595, + "keepAliveTimeMs": 10001, + "keepAliveTimeoutMs": 5000, + "keepAlivePermitWithoutCalls": true, + "maxPingsWithoutData": 0, + "minTimeBetweenPingsMs": 10000, + "minPingIntervalWithoutDataMs": 5000, + "ts": 1769419043112 + }, + "connectors": [], + "logs": { + "local": { + "service": { + "logLevel": "INFO", + "filePath": "./logs", + "backupCount": 7, + "savingTime": 3, + "savingPeriod": "D" + }, + "connector": { + "logLevel": "INFO", + "filePath": "./logs", + "backupCount": 7, + "savingTime": 3, + "savingPeriod": "D" + }, + "converter": { + "logLevel": "INFO", + "filePath": "./logs", + "backupCount": 7, + "savingTime": 3, + "savingPeriod": "D" + }, + "tb_connection": { + "logLevel": "INFO", + "filePath": "./logs", + "backupCount": 7, + "savingTime": 3, + "savingPeriod": "D" + }, + "storage": { + "logLevel": "INFO", + "filePath": "./logs", + "backupCount": 7, + "savingTime": 3, + "savingPeriod": "D" + }, + "extension": { + "logLevel": "INFO", + "filePath": "./logs", + "backupCount": 7, + "savingTime": 3, + "savingPeriod": "D" + } + }, + "logFormat": "%(asctime)s.%(msecs)03d - |%(levelname)s| - [%(filename)s] - %(module)s - %(funcName)s - %(lineno)d - %(message)s", + "dateFormat": "%Y-%m-%d %H:%M:%S", + "logLevel": "NONE" + } } \ No newline at end of file