mirror of
https://github.com/openhab/openhab-addons.git
synced 2025-01-10 23:22:02 +01:00
[FolderWatcher] Formatting and write out of abbreviations in Docs (#14793)
* Formatting and write out of abbreviations of time - `s` --> `in seconds` - `h` --> `in hours` - formatting of tables, things and rules - Unifiy usage of `'` and `"` * Formatting and rephrasing * Unify the order of localfolder, ftpfolder and s3bucket Signed-off-by: Felix Schneider <fs@felix-schneider.org>
This commit is contained in:
parent
f607dde3a5
commit
3130a67d8d
@ -1,37 +1,37 @@
|
|||||||
# FolderWatcher Binding
|
# FolderWatcher Binding
|
||||||
|
|
||||||
This binding is intended to monitor FTP, local folder and S3 bucket and its subfolders and notify of new files
|
This binding is intended to monitor a local folder, FTP and S3 bucket and their subfolders and notify of new files.
|
||||||
|
|
||||||
## Supported Things
|
## Supported Things
|
||||||
|
|
||||||
Currently the binding support three types of things: `ftpfolder`, `localfolder` and `s3bucket`.
|
The binding support three types of things: `localfolder`, `ftpfolder` and `s3bucket`.
|
||||||
|
|
||||||
## Thing Configuration
|
## Thing Configuration
|
||||||
|
|
||||||
The `ftpfolder` thing has the following configuration options:
|
|
||||||
|
|
||||||
| Parameter | Name | Description | Required | Default value |
|
|
||||||
|-------------------|--------------------------|-------------------------------------|----------|---------------|
|
|
||||||
| ftpAddress | FTP server | IP address of FTP server | yes | n/a |
|
|
||||||
| ftpPort | FTP port | Port of FTP server | yes | 21 |
|
|
||||||
| secureMode | FTP Security | FTP Security | yes | None |
|
|
||||||
| ftpUsername | Username | FTP user name | yes | n/a |
|
|
||||||
| ftpPassword | Password | FTP password | yes | n/a |
|
|
||||||
| ftpDir | RootDir | Root directory to be watched | yes | n/a |
|
|
||||||
| listRecursiveFtp | List Sub Folders | Allow listing of sub folders | yes | No |
|
|
||||||
| listHidden | List Hidden | Allow listing of hidden files | yes | false |
|
|
||||||
| connectionTimeout | Connection timeout, s | Connection timeout for FTP request | yes | 30 |
|
|
||||||
| pollInterval | Polling interval, s | Interval for polling folder changes | yes | 60 |
|
|
||||||
| diffHours | Time stamp difference, h | How many hours back to analyze | yes | 24 |
|
|
||||||
|
|
||||||
The `localfolder` thing has the following configuration options:
|
The `localfolder` thing has the following configuration options:
|
||||||
|
|
||||||
| Parameter | Name | Description | Required | Default value |
|
| Parameter | Name | Description | Required | Default value |
|
||||||
|--------------------|---------------------|-------------------------------------|----------|---------------|
|
| ------------------ | --------------------------- | ----------------------------------- | -------- | ------------- |
|
||||||
| localDir | Local Directory | Local directory to be watched | yes | n/a |
|
| localDir | Local Directory | Local directory to be watched | yes | n/a |
|
||||||
| listHiddenLocal | List Hidden | Allow listing of hidden files | yes | No |
|
| listHiddenLocal | List Hidden | Allow listing of hidden files | yes | No |
|
||||||
| pollIntervalLocal | Polling interval, s | Interval for polling folder changes | yes | 60 |
|
| pollIntervalLocal | Polling interval in seconds | Interval for polling folder changes | yes | 60 |
|
||||||
| listRecursiveLocal | List Sub Folders | Allow listing of sub folders | yes | No |
|
| listRecursiveLocal | List Sub Folders | Allow listing of sub folders | yes | No |
|
||||||
|
|
||||||
|
The `ftpfolder` thing has the following configuration options:
|
||||||
|
|
||||||
|
| Parameter | Name | Description | Required | Default value |
|
||||||
|
| ----------------- | ------------------------------ | ----------------------------------- | -------- | ------------- |
|
||||||
|
| ftpAddress | FTP server | IP address of FTP server | yes | n/a |
|
||||||
|
| ftpPort | FTP port | Port of FTP server | yes | 21 |
|
||||||
|
| secureMode | FTP Security | FTP Security | yes | None |
|
||||||
|
| ftpUsername | Username | FTP user name | yes | n/a |
|
||||||
|
| ftpPassword | Password | FTP password | yes | n/a |
|
||||||
|
| ftpDir | RootDir | Root directory to be watched | yes | n/a |
|
||||||
|
| listRecursiveFtp | List Sub Folders | Allow listing of sub folders | yes | No |
|
||||||
|
| listHidden | List Hidden | Allow listing of hidden files | yes | false |
|
||||||
|
| connectionTimeout | Connection timeout in seconds | Connection timeout for FTP request | yes | 30 |
|
||||||
|
| pollInterval | Polling interval in seconds | Interval for polling folder changes | yes | 60 |
|
||||||
|
| diffHours | Time stamp difference in hours | How many hours back to analyze | yes | 24 |
|
||||||
|
|
||||||
The `s3bucket` thing has the following configuration options:
|
The `s3bucket` thing has the following configuration options:
|
||||||
|
|
||||||
@ -46,7 +46,7 @@ The `s3bucket` thing has the following configuration options:
|
|||||||
| s3Anonymous | Anonymous Connection | Connect anonymously (works for public buckets) | yes | true |
|
| s3Anonymous | Anonymous Connection | Connect anonymously (works for public buckets) | yes | true |
|
||||||
## Events
|
## Events
|
||||||
|
|
||||||
This binding currently supports the following events:
|
This binding supports the following event:
|
||||||
|
|
||||||
| Channel Type ID | Item Type | Description |
|
| Channel Type ID | Item Type | Description |
|
||||||
|-----------------|-----------|----------------------------|
|
|-----------------|-----------|----------------------------|
|
||||||
@ -65,19 +65,6 @@ folderwatcher:s3bucket:myS3bucket [ s3BucketName="mypublic-bucket", pollIn
|
|||||||
|
|
||||||
### Using in a rule:
|
### Using in a rule:
|
||||||
|
|
||||||
FTP example:
|
|
||||||
|
|
||||||
```java
|
|
||||||
rule "New FTP file"
|
|
||||||
when
|
|
||||||
Channel "folderwatcher:ftpfolder:myLocalFolder:newfile" triggered
|
|
||||||
then
|
|
||||||
|
|
||||||
logInfo("NewFTPFile", receivedEvent.toString())
|
|
||||||
|
|
||||||
end
|
|
||||||
```
|
|
||||||
|
|
||||||
Local folder example:
|
Local folder example:
|
||||||
|
|
||||||
```java
|
```java
|
||||||
@ -85,9 +72,18 @@ rule "New Local file"
|
|||||||
when
|
when
|
||||||
Channel "folderwatcher:localfolder:myFTPFolder:newfile" triggered
|
Channel "folderwatcher:localfolder:myFTPFolder:newfile" triggered
|
||||||
then
|
then
|
||||||
|
|
||||||
logInfo("NewLocalFile", receivedEvent.toString())
|
logInfo("NewLocalFile", receivedEvent.toString())
|
||||||
|
end
|
||||||
|
```
|
||||||
|
|
||||||
|
FTP example:
|
||||||
|
|
||||||
|
```java
|
||||||
|
rule "New FTP file"
|
||||||
|
when
|
||||||
|
Channel "folderwatcher:ftpfolder:myLocalFolder:newfile" triggered
|
||||||
|
then
|
||||||
|
logInfo("NewFTPFile", receivedEvent.toString())
|
||||||
end
|
end
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -98,8 +94,6 @@ rule "New S3 file"
|
|||||||
when
|
when
|
||||||
Channel "folderwatcher:s3bucket:myS3bucket:newfile" triggered
|
Channel "folderwatcher:s3bucket:myS3bucket:newfile" triggered
|
||||||
then
|
then
|
||||||
|
|
||||||
logInfo("NewS3File", receivedEvent.toString())
|
logInfo("NewS3File", receivedEvent.toString())
|
||||||
|
|
||||||
end
|
end
|
||||||
```
|
```
|
||||||
|
Loading…
Reference in New Issue
Block a user