Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clarified statusPattern readme section #104

Merged
merged 2 commits into from
Dec 23, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -419,8 +419,6 @@ could specify the following pattern:
}
```

<br>

However using Regular Expressions much more complex patterns are possible. Let's assume your http enabled device responds
with the following json string as body, where one property has an random value an the other indicates the status of the
switch:
Expand All @@ -436,6 +434,16 @@ Then you could use the following pattern:
"statusPattern": "{\n \"perRequestRandomValue\": [0-9]+,\n \"switchState\": true\n}"
}
```
**Note:** The `statusPattern` must be placed on the same level as the `statusUrl` property, not inside the `statusUrl` object. See below for example.

```json
{
"statusUrl": {
},
"statusPattern": "....",
}
```

More on how to build regex patterns: https://www.w3schools.com/jsref/jsref_obj_regexp.asp

## Notification Server
Expand Down