forked from openhab/openhab-addons
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Documentation] Markdown improvements f to m (openhab#13866)
Signed-off-by: Jerome Luckenbach <[email protected]> Signed-off-by: Andras Uhrin <[email protected]>
- Loading branch information
1 parent
8f3c7b1
commit abc627f
Showing
39 changed files
with
2,387 additions
and
2,236 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2,158 changes: 1,079 additions & 1,079 deletions
2,158
bundles/org.openhab.binding.fmiweather/README.md
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,99 +1,80 @@ | ||
# FolderWatcher Binding | ||
|
||
This binding is intended to monitor a local folder, FTP and S3 bucket and their subfolders and notify of new files. | ||
This binding is intended to monitor FTP and local folder and its subfolders and notify of new files | ||
|
||
## Supported Things | ||
|
||
The binding support three types of things: `localfolder`, `ftpfolder` and `s3bucket`. | ||
Currently the binding support two types of things: `ftpfolder` and `localfolder`. | ||
|
||
## Thing Configuration | ||
|
||
The `localfolder` thing has the following configuration options: | ||
The `ftpfolder` thing has the following configuration options: | ||
|
||
| Parameter | Name | Description | Required | Default value | | ||
| ------------------ | --------------------------- | ----------------------------------- | -------- | ------------- | | ||
| localDir | Local Directory | Local directory to be watched | yes | n/a | | ||
| listHiddenLocal | List Hidden | Allow listing of hidden files | yes | No | | ||
| pollIntervalLocal | Polling interval in seconds | Interval for polling folder changes | yes | 60 | | ||
| listRecursiveLocal | List Sub Folders | Allow listing of sub folders | yes | No | | ||
| 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 `ftpfolder` thing has the following configuration options: | ||
The `localfolder` thing has the following configuration options: | ||
|
||
| Parameter | Name | Description | Required | Default value | | ||
|-------------|--------------|------------------------------------------------------------------------------------------------------------------------|----------|---------------| | ||
| localDir | Local Directory | Local directory to be watched | yes | n/a | | ||
| listHiddenLocal | List Hidden | Allow listing of hidden files | yes | No | | ||
| pollIntervalLocal | Polling interval, s | Interval for polling folder changes | yes | 60 | | ||
| listRecursiveLocal | List Sub Folders | Allow listing of sub folders | yes | No | | ||
|
||
| 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: | ||
|
||
| Parameter | Name | Description | Required | Default value | | ||
|----------------|----------------------|----------------------------------------------------|----------|---------------| | ||
| s3BucketName | S3 Bucket Name | Name of the S3 bucket to be watched | yes | n/a | | ||
| s3Path | S3 Path | S3 path (folder) to be monitored | no | n/a | | ||
| pollIntervalS3 | Polling Interval | Interval for polling S3 bucket changes, in seconds | yes | 60 | | ||
| awsKey | AWS Access Key | AWS access key | no | n/a | | ||
| awsSecret | AWS Secret | AWS secret | no | n/a | | ||
| awsRegion | AWS Region | AWS region of S3 bucket | yes | "" | | ||
| s3Anonymous | Anonymous Connection | Connect anonymously (works for public buckets) | yes | true | | ||
## Events | ||
|
||
This binding supports the following event: | ||
This binding currently supports the following events: | ||
|
||
| Channel Type ID | Item Type | Description | | ||
|-----------------|-----------|----------------------------| | ||
| newfile | String | A new file name discovered | | ||
| Channel Type ID | Item Type | Description | | ||
|-----------------|--------------|----------------------------------------------------------------------------------------| | ||
| newftpfile | String | A new file name discovered on FTP | | ||
| newlocalfile | String | A new file name discovered on in local folder | | ||
|
||
## Full Example | ||
|
||
Thing configuration: | ||
|
||
```java | ||
folderwatcher:localfolder:myLocalFolder [ localDir="/myfolder", pollIntervalLocal=60, listHiddenLocal="false", listRecursiveLocal="false" ] | ||
folderwatcher:ftpfolder:myLocalFolder [ ftpAddress="X.X.X.X", ftpPort=21, secureMode="EXPLICIT", ftpUsername="username", ftpPassword="password", ftpDir="/myfolder/", listHidden="true", listRecursiveFtp="true", connectionTimeout=33, pollInterval=66, diffHours=25 ] | ||
folderwatcher:s3bucket:myS3bucket [ s3BucketName="mypublic-bucket", pollIntervalS3=60, awsRegion="us-west-1", s3Anonymous="true" ] | ||
|
||
folderwatcher:ftpfolder:myLocalFolder [ ftpAddress="X.X.X.X", ftpPort=21, secureMode="EXPLICIT", ftpUsername="username", ftpPassword="password",ftpDir="/myfolder/",listHidden="true",listRecursiveFtp="true",connectionTimeout=33,pollInterval=66,diffHours=25] | ||
``` | ||
|
||
### Using in a rule: | ||
|
||
Local folder example: | ||
|
||
```java | ||
rule "New Local file" | ||
when | ||
Channel "folderwatcher:localfolder:myLocalFolder:newfile" triggered | ||
then | ||
logInfo("NewLocalFile", receivedEvent.toString()) | ||
end | ||
``` | ||
|
||
FTP example: | ||
|
||
```java | ||
rule "New FTP file" | ||
when | ||
Channel "folderwatcher:ftpfolder:myFTPFolder:newfile" triggered | ||
when | ||
Channel 'folderwatcher:ftpfolder:XXXXX:newfile' triggered | ||
then | ||
logInfo("NewFTPFile", receivedEvent.toString()) | ||
|
||
logInfo('NewFTPFile', receivedEvent.toString()) | ||
|
||
end | ||
``` | ||
|
||
S3 bucket example: | ||
Local folder example: | ||
|
||
```java | ||
rule "New S3 file" | ||
when | ||
Channel "folderwatcher:s3bucket:myS3bucket:newfile" triggered | ||
rule "New Local file" | ||
when | ||
Channel 'folderwatcher:localfolder:XXXXX:newfile' triggered | ||
then | ||
logInfo("NewS3File", receivedEvent.toString()) | ||
|
||
logInfo('NewLocalFile', receivedEvent.toString()) | ||
|
||
end | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.