You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/iot-gateway/config/ftp.md
+46-46Lines changed: 46 additions & 46 deletions
Original file line number
Diff line number
Diff line change
@@ -10,23 +10,23 @@ description: FTP protocol support for ThingsBoard IoT Gateway
10
10
11
11
This guide will help you to get familiar with FTP Connector configuration for ThingsBoard IoT Gateway.
12
12
Use [general configuration](/docs/iot-gateway/configuration/) to enable this Connector.
13
-
The purpose of this Connector is to connect to external FTP server and get data from files from specific paths.
14
-
Connector is also able to push data to FTP server files based on the updates/commands from ThingsBoard.
13
+
The purpose of this Connector is to connect to an external FTP server and get data from files from specific paths.
14
+
The connector is also able to push data to FTP server files based on the updates/commands from ThingsBoard.
15
15
16
-
This connector is useful when you have some FTP server in your device or some data in external resource and you would like to push this data to the ThingsBoard.
16
+
This connector is useful when you have some FTP server in your device or some data in an external resource and you would like to push this data to the ThingsBoard.
17
17
18
-
We will describe connector configuration file below.
18
+
We will describe the connector configuration file below.
19
19
20
20
## Connector configuration: ftp.json
21
21
22
-
Connector configuration is a JSON file that contains information about how to connect to external FTP server, what paths to use when reading data and how to process the data.
23
-
Let's review the format of the configuration file using example below.
22
+
Connector configuration is a JSON file that contains information about how to connect to an external FTP server, what paths to use when reading data, and how to process the data.
23
+
Let's review the format of the configuration file using the example below.
24
24
25
25
<b>Example of FTP Connector config file.</b>
26
26
27
-
Example listed below will connect to FTP server in a local network deployed on server with IP 0.0.0.0.
28
-
Connector will use basic FTP auth using username and password.
29
-
Then, connector will subscribe to a list of paths from mapping section. See more info in a description below.
27
+
The example listed below will connect to FTP server in a local network deployed on server with IP 0.0.0.0.
28
+
The connector will utilize basic FTP auth using username and password.
29
+
Then, connector will subscribe to a list of paths from the mapping section. See more info in the description below.
30
30
31
31
{% capture ftpConf %}
32
32
@@ -101,11 +101,11 @@ Then, connector will subscribe to a list of paths from mapping section. See more
101
101
102
102
### General section
103
103
104
-
|**Parameter**|**Default value**|**Description**|
105
-
|:-|:-|-
106
-
| host |**localhost**| Domain address or ip of the server. |
107
-
| port |**21**| Port of the server|
108
-
| TLSSupport |**true**| Verify or no TLS support on the server if available. |
| delimiter | , | Symbol that will use to split the data in file |
149
-
| readMode | FULL/PARTIAL | If parameter is equal to FULL, file will be reading from the start to the end. If parameter is equal to PARTIAL, file will be read from the line that was reading at the previous time|
150
-
| maxFileSize | 5 | The max file size in MB that will be reading (if file size is more than 5 MB, it will be passed) |
151
-
| pollPeriod | 60 | The period of time (in seconds) that files in the path will be reading|
148
+
| delimiter | , | Symbol that will be used to split the data in the file |
149
+
| readMode | FULL/PARTIAL | If parameter is equal to FULL, the file will be read from the start to the end. If parameter is equal to PARTIAL, the file will be read from the line that was previously being read|
150
+
| maxFileSize | 5 | The max file size in MB that will be read (if file size is more than 5 MB, it will be skipped) |
151
+
| pollPeriod | 60 | The period of time (in seconds) during which files in the path will be read|
152
152
| txtFileDataView | TABLE/SLICED | The txtFileDataView parameter is used only for .txt files |
153
-
| withSortingFiles | true/false |Is how the found files in path will append to array |
153
+
| withSortingFiles | true/false |This is how the found files in path will be appended to the array |
154
154
| attributes || This subsection contains parameters of the incoming message, that will be interpreted as attributes for the device. |
155
155
| timeseries || This subsection contains parameters of the incoming message, that will be interpreted as telemetry for the device. |
156
156
|---
157
157
158
-
Let's look how we can configure this section for different file extensions:
158
+
Let's look at how we can configure this section for different file extensions:
159
159
160
160
161
161
1. For .txt with TABLE data view and .csv files
@@ -194,7 +194,7 @@ Let's look how we can configure this section for different file extensions:
194
194
]
195
195
```
196
196
197
-
That mean that FTP converter will look for the next file structure:
197
+
That means that FTP converter will look for the following file structure:
198
198
```txt
199
199
temp,hum
200
200
1,2
@@ -278,7 +278,7 @@ Let's look how we can configure this section for different file extensions:
278
278
}
279
279
]
280
280
```
281
-
4. Combine attributes, telemetry and serverSideRpc section, for example .json file:
281
+
4. Combine attributes, telemetry, and serverSideRpc section, for example, in a .json file:
282
282
```json
283
283
"paths": [
284
284
{
@@ -316,19 +316,19 @@ Let's look how we can configure this section for different file extensions:
316
316
317
317
318
318
This configuration section is optional.
319
-
ThingsBoard allows to provision device attributes and fetch some of them from the device application. You can treat this as a remote configuration for devices. Your devices are able to request shared attributes from ThingsBoard. See user guide for more details.
319
+
ThingsBoard allows the provisioning of device attributes and fetches some of them from the device application. You can treat this as a remote configuration for devices, enabling them to request shared attributes from ThingsBoard. See [user guide](/docs/user-guide/attributes/) for more details.
320
320
321
-
The “attributeRequests” configuration allows configuring the format of the corresponding attribute data that will be written to the specific files.
321
+
The “attributeRequests” configuration allows you to configure the format of the corresponding attribute data that will be written to the specific files.
322
322
323
-
|**Parameter**|**Default value**|**Description**|
324
-
|:-|:-|-
325
-
| path |**fol/${attributeKey}/${attributeValue}.txt**| JSON-path expression that uses for finding specific files |
326
-
| deviceNameFilter |**.\***| Regular expression device name filter, uses to determine, which function to execute. |
327
-
| writingMode |**OVERRIDE/WRITE**| If writingMode is equal to OVERRIDE, the found files will we overwrite. If writingMode is equal to WRITE, a new data will be appended at the end of found files|
328
-
| valueExpression |**,,,,${attributeKey},,,${attributeValue}**| Expression uses for creating the message data that will send to FTP server. In this case ',' has a role as the delimiter and before him, you can insert your data. |
| path |**fol/${attributeKey}/${attributeValue}.txt**| JSON-path expression that is used for finding specific files|
326
+
| deviceNameFilter |**.\***| Regular expression device name filter, used to determine, which function to execute.|
327
+
| writingMode |**OVERRIDE/WRITE**| If writingMode is equal to OVERRIDE, the found files will be overwritten. If writingMode is equal to WRITE, new data will be appended at the end of the found files.|
328
+
| valueExpression |**,,,,${attributeKey},,,${attributeValue}**| Expression is used for creating the message data that will be sent to FTP server. In this case, ',' serves as the delimiter and you can insert your data before it.|
329
329
|---
330
330
331
-
This section in configuration file looks like:
331
+
This section in configuration file looks like this:
332
332
333
333
```json
334
334
"attributeUpdates": [
@@ -343,18 +343,18 @@ This section in configuration file looks like:
343
343
344
344
### Server side RPC commands
345
345
346
-
ThingsBoard allows sending RPC commands to the device that is connected to ThingsBoard directly or via Gateway.
346
+
ThingsBoard allows for sending RPC commands to devices connected directly to ThingsBoard or via Gateway.
347
347
348
348
Configuration, provided in this section uses for sending RPC requests from ThingsBoard to device.
349
349
350
-
|**Parameter**|**Default value**|**Description**|
351
-
|:-|:-|-
352
-
| deviceNameFilter |**.\***| Regular expression device name filter, uses to determine, which function to execute. |
353
-
| methodFilter |**read/write**| Mode for opening file |
354
-
| valueExpression |**,,,,${attributeKey},,,${attributeValue}**| JSON-path expression, uses for creating data for sending to FTP server, if methodFilter equal to write. If methodFilter is equal to read, this field will be passing.|
| deviceNameFilter |**.\***| Regular expression device name filter, used to determine, which function to execute.|
353
+
| methodFilter |**read/write**| Mode for opening file |
354
+
| valueExpression |**,,,,${attributeKey},,,${attributeValue}**| JSON-path expression, is used to create data for sending to FTP server, if methodFilter is equal to write. If methodFilter is equal to read, this field will be passing. |
355
355
|---
356
356
357
-
This section in configuration file looks like:
357
+
This section in configuration file looks like this:
0 commit comments