From 9853f75abdec7a7e1869bc429b5bd1af7818a8f0 Mon Sep 17 00:00:00 2001 From: iranintoavan Date: Wed, 22 Dec 2021 13:31:19 -0500 Subject: [PATCH 1/2] Updated README.md Added clarification and additional documentation on where the statusPattern property must be placed within the config file. --- README.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/README.md b/README.md index 75e3d5e..47e9c0d 100644 --- a/README.md +++ b/README.md @@ -436,6 +436,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 From 947bca42d2a04a797b65681417754af4ba3d4db1 Mon Sep 17 00:00:00 2001 From: iranintoavan Date: Wed, 22 Dec 2021 13:32:26 -0500 Subject: [PATCH 2/2] Update README.md Fixed unnecessary space --- README.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/README.md b/README.md index 47e9c0d..d13f771 100644 --- a/README.md +++ b/README.md @@ -419,8 +419,6 @@ could specify the following pattern: } ``` -
- 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: