修改剩余里程的获取方式
This commit is contained in:
parent
ec2dbd8cf7
commit
4c31441973
|
|
@ -1,354 +1,107 @@
|
||||||
{
|
{
|
||||||
"broker": {
|
"thingsboard": {
|
||||||
"host": "mqtt.t-aaron.com",
|
"host": "220.154.136.137",
|
||||||
"port": 10883,
|
"port": 1883,
|
||||||
"version": 5,
|
"remoteShell": false,
|
||||||
"clientId": "ThingsBoard_gateway",
|
"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": {
|
"security": {
|
||||||
"type": "basic",
|
"type": "accessToken",
|
||||||
"username": "admin",
|
"accessToken": "J3ZlDINlAoUhjBIE0CIr"
|
||||||
"password": "admin"
|
|
||||||
},
|
},
|
||||||
"maxNumberOfWorkers": 100,
|
"qos": 1,
|
||||||
"maxMessageNumberPerWorker": 10
|
"reportStrategy": {
|
||||||
},
|
"type": "ON_RECEIVED"
|
||||||
"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}"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
],
|
|
||||||
"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",
|
"storage": {
|
||||||
"id": "28239240-5e44-4fb8-9f66-c29c638903ae",
|
"type": "memory",
|
||||||
"logLevel": "INFO",
|
"read_records_count": 100,
|
||||||
"enableRemoteLogging": false,
|
"max_records_count": 100000,
|
||||||
"configVersion": "3.7.8"
|
"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"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
Loading…
Reference in New Issue