Browse Source

updated rule node templatization help pages with new screenshots and updated key names in text

pull/8786/head
ShvaykaD 3 years ago
parent
commit
b271baefd4
  1. 12
      ui-ngx/src/assets/help/en_US/rulenode/customer_attributes_node_fields_templatization.md
  2. 20
      ui-ngx/src/assets/help/en_US/rulenode/originator_fields_node_fields_templatization.md
  3. 95
      ui-ngx/src/assets/help/en_US/rulenode/originator_telemetry_node_fields_templatization.md
  4. 13
      ui-ngx/src/assets/help/en_US/rulenode/related_entity_data_node_fields_templatization.md
  5. 12
      ui-ngx/src/assets/help/en_US/rulenode/tenant_attributes_node_fields_templatization.md
  6. BIN
      ui-ngx/src/assets/help/images/rulenode/examples/customer-attributes-ft.png
  7. BIN
      ui-ngx/src/assets/help/images/rulenode/examples/originator-attributes-ft.png
  8. BIN
      ui-ngx/src/assets/help/images/rulenode/examples/originator-fields-ft.png
  9. BIN
      ui-ngx/src/assets/help/images/rulenode/examples/originator-telemetry-ft-2.png
  10. BIN
      ui-ngx/src/assets/help/images/rulenode/examples/originator-telemetry-ft-3.png
  11. BIN
      ui-ngx/src/assets/help/images/rulenode/examples/originator-telemetry-ft.png
  12. BIN
      ui-ngx/src/assets/help/images/rulenode/examples/related-device-attributes-ft.png
  13. BIN
      ui-ngx/src/assets/help/images/rulenode/examples/related-entity-data-ft-2.png
  14. BIN
      ui-ngx/src/assets/help/images/rulenode/examples/related-entity-data-ft.png
  15. BIN
      ui-ngx/src/assets/help/images/rulenode/examples/tenant-attributes-ft.png

12
ui-ngx/src/assets/help/en_US/rulenode/customer_attributes_node_fields_templatization.md

@ -11,8 +11,8 @@ Let's assume that we have a customer-based solution where customer manage two ty
Additionally, let's assume that customer configured the thresholds settings for each device type.
Threshold settings stored as an attributes on a customer level:
- *temperature_min_threshold* and *temperature_max_threshold* for temperature sensor with values set to *10* and *30* accordingly.
- *humidity_min_threshold* and *humidity_max_threshold* for humidity sensor with values set to *70* and *85* accordingly.
- *temperatureMinThreshold* and *temperatureMaxThreshold* for temperature sensor with values set to *10* and *30* accordingly.
- *humidityMinThreshold* and *humidityMaxThreshold* for humidity sensor with values set to *70* and *85* accordingly.
Each message received from device includes `deviceType` property in the message metadata
with either `temperature` or `humidity` value according to the sensor type.
@ -73,8 +73,8 @@ Rule node configuration set to fetch data to the message metadata. In the follow
"deviceType": "temperature",
"deviceName": "TH-001",
"ts": "1685379440000",
"min_threshold": "10",
"max_threshold": "30"
"minThreshold": "10",
"maxThreshold": "30"
}
}
```
@ -92,8 +92,8 @@ Rule node configuration set to fetch data to the message metadata. In the follow
"deviceType": "humidity",
"deviceName": "HM-001",
"ts": "1685379440000",
"min_threshold": "70",
"max_threshold": "85"
"minThreshold": "70",
"maxThreshold": "85"
}
}
```

20
ui-ngx/src/assets/help/en_US/rulenode/originator_fields_node_fields_templatization.md

@ -9,10 +9,10 @@
Let's assume that we have two device types in our use case:
- `smart_door_lock`
- `motion_detector`
- `smartDoorLock`
- `motionDetector`
Let's assume that device of type `smart_door_lock` and name `SDL-001` publish next type of messages to the system:
Let's assume that device of type `smartDoorLock` and name `SDL-001` publish next type of messages to the system:
```json
{
@ -21,7 +21,7 @@ Let's assume that device of type `smart_door_lock` and name `SDL-001` publish ne
},
"metadata": {
"deviceName": "SDL-001",
"deviceType": "smart_door_lock",
"deviceType": "smartDoorLock",
"ts": "1685379440000"
}
}
@ -29,7 +29,7 @@ Let's assume that device of type `smart_door_lock` and name `SDL-001` publish ne
<br>
and device of type `motion_detector` and name `MD-001` publish next type of messages to the system:
and device of type `motionDetector` and name `MD-001` publish next type of messages to the system:
```json
{
@ -38,7 +38,7 @@ and device of type `motion_detector` and name `MD-001` publish next type of mess
},
"metadata": {
"deviceName": "MD-001",
"deviceType": "motion_detector",
"deviceType": "motionDetector",
"ts": "1685379440000"
}
}
@ -70,11 +70,11 @@ Rule node configuration set to fetch data to the message. In the following way:
{
"msg": {
"status": "locked",
"smart_door_lock": "Grocery warehouse door"
"smartDoorLock": "Grocery warehouse door"
},
"metadata": {
"deviceName": "SDL-001",
"deviceType": "smart_door_lock",
"deviceType": "smartDoorLock",
"ts": "1685379440000"
}
}
@ -88,11 +88,11 @@ Rule node configuration set to fetch data to the message. In the following way:
{
"msg": {
"motionDetected": "true",
"motion_detector": "Grocery Warehouse motion detector"
"motionDetector": "Grocery Warehouse motion detector"
},
"metadata": {
"deviceName": "MD-001",
"deviceType": "motion_detector",
"deviceType": "motionDetector",
"ts": "1685379440000"
}
}

95
ui-ngx/src/assets/help/en_US/rulenode/originator_telemetry_node_fields_templatization.md

@ -24,27 +24,28 @@ Additionally let's imagine that devices periodically publishes other telemetry m
- `speed` - current speed value.
- `direction` - compass direction in which the device is moving.
- `acceleration` - how quickly the speed of the device is changing.
- `fuel_level` - current fuel level.
- `battery_level` - current battery level.
- `parked_location` - precise location where the device is parked.
- `parked_duration` - current park duration value.
- `parked_time` - timestamp when the device was parked.
- `fuelLevel` - current fuel level.
- `batteryLevel` - current battery level.
- `parkedLocation` - precise location where the device is parked.
- `parkedDuration` - current park duration value.
- `parkedTime` - timestamp when the device was parked.
Let's imagine that we need to make some historical analysis by fetching 3 latest telemetry readings for the keys listed below if the `event` value is set to *motion*:
Let's imagine that we need to make some historical analysis by fetching 3 latest telemetry readings in the range from 1 hour ago to 1 millisecond ago.
If the `event` value is set to *motion* we need to fetch data for keys:
- `speed`
- `direction`
- `acceleration`
- `fuel_level`
- `battery_level`
- `fuelLevel`
- `batteryLevel`
Otherwise, if the `event` value is set to *parked* value we need to fetch 3 latest telemetry readings for the following data keys:
Otherwise, if the `event` value is set to *parked* value we need to fetch data for keys:
- `parked_location`
- `parked_duration`
- `parked_time`
- `fuel_level`
- `battery_level`
- `parkedLocation`
- `parkedDuration`
- `parkedTime`
- `fuelLevel`
- `batteryLevel`
Imagine that you created a script node that depending on the `event` value adds to the message metadata appropriate keyToFetch fields.
@ -83,9 +84,9 @@ Imagine that you created a script node that depending on the `event` value adds
"deviceName": "GPS-001",
"deviceType": "GPS Tracker",
"ts": "1685379440000",
"keyToFetch1": "parked_location",
"keyToFetch2": "parked_duration",
"keyToFetch3": "parked_time"
"keyToFetch1": "parkedLocation",
"keyToFetch2": "parkedDuration",
"keyToFetch3": "parkedTime"
}
}
```
@ -96,8 +97,6 @@ In order to fetch the additional telemetry key values to make some historical an
![image](${helpBaseUrl}/help/images/rulenode/examples/originator-telemetry-ft.png)
![image](${helpBaseUrl}/help/images/rulenode/examples/originator-telemetry-ft-2.png)
<br>
Rule node configuration is set to retrieve the telemetry from the fetch interval with configurable query parameters that you can check above.
@ -106,11 +105,11 @@ So let's imagine that 3 latest values for the keys that we are going to fetch ar
- `speed` - 5.2, 15.7, 30.2 (mph).
- `direction` - N(North), NE(North-East), E(East).
- `acceleration` - 2.2, 2.4, 2.5 (m/s²).
- `fuel_level` - 61.5, 57.4, 55.6 (%).
- `battery_level` - 88.1, 87.8, 87.2 (%).
- `parked_location` - dr5rtwceb (geohash). Same value for 3 latest data readings.
- `parked_duration` - 6300000, 7300000, 8300000 (ms).
- `parked_time` - 1685339240000 (ms). Same value for 3 latest data readings.
- `fuelLevel` - 61.5, 57.4, 55.6 (%).
- `batteryLevel` - 88.1, 87.8, 87.2 (%).
- `parkedLocation` - dr5rtwceb (geohash). Same value for 3 latest data readings.
- `parkedDuration` - 6300000, 7300000, 8300000 (ms).
- `parkedTime` - 1685339240000 (ms). Same value for 3 latest data readings.
In the following way:
@ -133,8 +132,8 @@ In the following way:
"speed": "[{\"ts\":1685476840000,\"value\":5.2},{\"ts\":1685477840000,\"value\":15.7},{\"ts\":1685478840000,\"value\":30.2}]",
"direction": "[{\"ts\":1685476840000,\"value\":\"N\"},{\"ts\":1685477840000,\"value\":\"NE\"},{\"ts\":1685478840000,\"value\":\"N\"}]",
"acceleration": "[{\"ts\":1685476840000,\"value\":2.2},{\"ts\":1685477840000,\"value\":2.4},{\"ts\":1685478840000,\"value\":2.5}]",
"fuel_level": "[{\"ts\":1685476840000,\"value\":61.5},{\"ts\":1685477840000,\"value\":57.4},{\"ts\":1685478840000,\"value\":55.6}]",
"battery_level": "[{\"ts\":1685476840000,\"value\":88.1},{\"ts\":1685477840000,\"value\":87.8},{\"ts\":1685478840000,\"value\":87.2}]"
"fuelLevel": "[{\"ts\":1685476840000,\"value\":61.5},{\"ts\":1685477840000,\"value\":57.4},{\"ts\":1685478840000,\"value\":55.6}]",
"batteryLevel": "[{\"ts\":1685476840000,\"value\":88.1},{\"ts\":1685477840000,\"value\":87.8},{\"ts\":1685478840000,\"value\":87.2}]"
}
}
```
@ -154,14 +153,14 @@ In the following way:
"deviceName": "GPS-001",
"deviceType": "GPS Tracker",
"ts": "1685379440000",
"keyToFetch1": "parked_location",
"keyToFetch2": "parked_duration",
"keyToFetch3": "parked_time",
"parked_location": "[{\"ts\":1685376840000,\"value\":\"dr5rtwceb\"},{\"ts\":1685377840000,\"value\":\"dr5rtwceb\"},{\"ts\":1685378840000,\"value\":\"dr5rtwceb\"}]",
"parked_duration": "[{\"ts\":1685376840000,\"value\":6300000},{\"ts\":1685377840000,\"value\":7300000},{\"ts\":1685378840000,\"value\":8300000}]",
"parked_time": "[{\"ts\":1685376840000,\"value\":1685376840000},{\"ts\":1685377840000,\"value\":1685377840000},{\"ts\":1685378840000,\"value\":1685378840000}]",
"fuel_level": "[{\"ts\":1685376840000,\"value\":61.5},{\"ts\":1685377840000,\"value\":57.4},{\"ts\":1685378840000,\"value\":55.6}]",
"battery_level": "[{\"ts\":1685376840000,\"value\":88.1},{\"ts\":1685377840000,\"value\":87.8},{\"ts\":1685378840000,\"value\":87.2}]"
"keyToFetch1": "parkedLocation",
"keyToFetch2": "parkedDuration",
"keyToFetch3": "parkedTime",
"parkedLocation": "[{\"ts\":1685376840000,\"value\":\"dr5rtwceb\"},{\"ts\":1685377840000,\"value\":\"dr5rtwceb\"},{\"ts\":1685378840000,\"value\":\"dr5rtwceb\"}]",
"parkedDuration": "[{\"ts\":1685376840000,\"value\":6300000},{\"ts\":1685377840000,\"value\":7300000},{\"ts\":1685378840000,\"value\":8300000}]",
"parkedTime": "[{\"ts\":1685376840000,\"value\":1685376840000},{\"ts\":1685377840000,\"value\":1685377840000},{\"ts\":1685378840000,\"value\":1685378840000}]",
"fuelLevel": "[{\"ts\":1685376840000,\"value\":61.5},{\"ts\":1685377840000,\"value\":57.4},{\"ts\":1685378840000,\"value\":55.6}]",
"batteryLevel": "[{\"ts\":1685376840000,\"value\":88.1},{\"ts\":1685377840000,\"value\":87.8},{\"ts\":1685378840000,\"value\":87.2}]"
}
}
```
@ -210,9 +209,9 @@ In the following way:
"deviceName": "GPS-001",
"deviceType": "GPS Tracker",
"ts": "1685379440000",
"keyToFetch1": "parked_location",
"keyToFetch2": "parked_duration",
"keyToFetch3": "parked_time",
"keyToFetch1": "parkedLocation",
"keyToFetch2": "parkedDuration",
"keyToFetch3": "parkedTime",
"dynamicIntervalStart": "1685375840000"
}
}
@ -223,7 +222,7 @@ In the following way:
In order to fetch the data using dynamic interval we need enable *Use dynamic interval* option in the rule node configuration and specify the templates for the *Interval start* and *Interval end*:
![image](${helpBaseUrl}/help/images/rulenode/examples/originator-telemetry-ft-3.png)
![image](${helpBaseUrl}/help/images/rulenode/examples/originator-telemetry-ft-2.png)
<br>
@ -250,8 +249,8 @@ In the following way:
"speed": "[{\"ts\":1685476840000,\"value\":5.2},{\"ts\":1685477840000,\"value\":15.7},{\"ts\":1685478840000,\"value\":30.2}]",
"direction": "[{\"ts\":1685476840000,\"value\":\"N\"},{\"ts\":1685477840000,\"value\":\"NE\"},{\"ts\":1685478840000,\"value\":\"N\"}]",
"acceleration": "[{\"ts\":1685476840000,\"value\":2.2},{\"ts\":1685477840000,\"value\":2.4},{\"ts\":1685478840000,\"value\":2.5}]",
"fuel_level": "[{\"ts\":1685476840000,\"value\":61.5},{\"ts\":1685477840000,\"value\":57.4},{\"ts\":1685478840000,\"value\":55.6}]",
"battery_level": "[{\"ts\":1685476840000,\"value\":88.1},{\"ts\":1685477840000,\"value\":87.8},{\"ts\":1685478840000,\"value\":87.2}]"
"fuelLevel": "[{\"ts\":1685476840000,\"value\":61.5},{\"ts\":1685477840000,\"value\":57.4},{\"ts\":1685478840000,\"value\":55.6}]",
"batteryLevel": "[{\"ts\":1685476840000,\"value\":88.1},{\"ts\":1685477840000,\"value\":87.8},{\"ts\":1685478840000,\"value\":87.2}]"
}
}
```
@ -271,15 +270,15 @@ In the following way:
"deviceName": "GPS-001",
"deviceType": "GPS Tracker",
"ts": "1685379440000",
"keyToFetch1": "parked_location",
"keyToFetch2": "parked_duration",
"keyToFetch3": "parked_time",
"keyToFetch1": "parkedLocation",
"keyToFetch2": "parkedDuration",
"keyToFetch3": "parkedTime",
"dynamicIntervalStart": "1685375840000",
"parked_location": "[{\"ts\":1685376840000,\"value\":\"dr5rtwceb\"},{\"ts\":1685377840000,\"value\":\"dr5rtwceb\"},{\"ts\":1685378840000,\"value\":\"dr5rtwceb\"}]",
"parked_duration": "[{\"ts\":1685376840000,\"value\":6300000},{\"ts\":1685377840000,\"value\":7300000},{\"ts\":1685378840000,\"value\":8300000}]",
"parked_time": "[{\"ts\":1685376840000,\"value\":1685376840000},{\"ts\":1685377840000,\"value\":1685377840000},{\"ts\":1685378840000,\"value\":1685378840000}]",
"fuel_level": "[{\"ts\":1685376840000,\"value\":61.5},{\"ts\":1685377840000,\"value\":57.4},{\"ts\":1685378840000,\"value\":55.6}]",
"battery_level": "[{\"ts\":1685376840000,\"value\":88.1},{\"ts\":1685377840000,\"value\":87.8},{\"ts\":1685378840000,\"value\":87.2}]"
"parkedLocation": "[{\"ts\":1685376840000,\"value\":\"dr5rtwceb\"},{\"ts\":1685377840000,\"value\":\"dr5rtwceb\"},{\"ts\":1685378840000,\"value\":\"dr5rtwceb\"}]",
"parkedDuration": "[{\"ts\":1685376840000,\"value\":6300000},{\"ts\":1685377840000,\"value\":7300000},{\"ts\":1685378840000,\"value\":8300000}]",
"parkedTime": "[{\"ts\":1685376840000,\"value\":1685376840000},{\"ts\":1685377840000,\"value\":1685377840000},{\"ts\":1685378840000,\"value\":1685378840000}]",
"fuelLevel": "[{\"ts\":1685376840000,\"value\":61.5},{\"ts\":1685377840000,\"value\":57.4},{\"ts\":1685378840000,\"value\":55.6}]",
"batteryLevel": "[{\"ts\":1685376840000,\"value\":88.1},{\"ts\":1685377840000,\"value\":87.8},{\"ts\":1685378840000,\"value\":87.2}]"
}
}
```

13
ui-ngx/src/assets/help/en_US/rulenode/related_entity_data_node_fields_templatization.md

@ -15,8 +15,8 @@ and is responsible for overseeing two categories of devices:
Additionally, let's assume that this asset has configured thresholds set as attributes for each device type:
- *temperature_min_threshold* and *temperature_max_threshold* for temperature sensor with values set to *10* and *30* accordingly.
- *humidity_min_threshold* and *humidity_max_threshold* for humidity sensor with values set to *70* and *85* accordingly.
- *temperatureMinThreshold* and *temperatureMaxThreshold* for temperature sensor with values set to *10* and *30* accordingly.
- *humidityMinThreshold* and *humidityMaxThreshold* for humidity sensor with values set to *70* and *85* accordingly.
Each message received from device includes `deviceType` property in the message metadata
with either `temperature` or `humidity` value according to the sensor type.
@ -24,7 +24,6 @@ with either `temperature` or `humidity` value according to the sensor type.
In order to fetch the threshold value for the further message processing you can define next node configuration:
![image](${helpBaseUrl}/help/images/rulenode/examples/related-entity-data-ft.png)
![image](${helpBaseUrl}/help/images/rulenode/examples/related-entity-data-ft-2.png)
Imagine that you receive message defined below from the `temperature` sensor
and forwarded it to the **related entity data** node with configuration added above.
@ -78,8 +77,8 @@ Rule node configuration set to fetch data to the message metadata. In the follow
"deviceType": "temperature",
"deviceName": "TH-001",
"ts": "1685379440000",
"min_threshold": "10",
"max_threshold": "30"
"minThreshold": "10",
"maxThreshold": "30"
}
}
```
@ -97,8 +96,8 @@ Rule node configuration set to fetch data to the message metadata. In the follow
"deviceType": "humidity",
"deviceName": "HM-001",
"ts": "1685379440000",
"min_threshold": "70",
"max_threshold": "85"
"minThreshold": "70",
"maxThreshold": "85"
}
}
```

12
ui-ngx/src/assets/help/en_US/rulenode/tenant_attributes_node_fields_templatization.md

@ -11,8 +11,8 @@ Let's assume that tenant manage two type of devices: `temperature` and `humidity
Additionally, let's assume that tenant configured the thresholds settings for each device type.
Threshold settings stored as an attributes on a tenant level:
- *temperature_min_threshold* and *temperature_max_threshold* for temperature sensor with values set to *10* and *30* accordingly.
- *humidity_min_threshold* and *humidity_max_threshold* for humidity sensor with values set to *70* and *85* accordingly.
- *temperatureMinThreshold* and *temperatureMaxThreshold* for temperature sensor with values set to *10* and *30* accordingly.
- *humidityMinThreshold* and *humidityMaxThreshold* for humidity sensor with values set to *70* and *85* accordingly.
Each message received from device includes `deviceType` property in the message metadata
with either `temperature` or `humidity` value according to the sensor type.
@ -73,8 +73,8 @@ Rule node configuration set to fetch data to the message metadata. In the follow
"deviceType": "temperature",
"deviceName": "TH-001",
"ts": "1685379440000",
"min_threshold": "10",
"max_threshold": "30"
"minThreshold": "10",
"maxThreshold": "30"
}
}
```
@ -92,8 +92,8 @@ Rule node configuration set to fetch data to the message metadata. In the follow
"deviceType": "humidity",
"deviceName": "HM-001",
"ts": "1685379440000",
"min_threshold": "70",
"max_threshold": "85"
"minThreshold": "70",
"maxThreshold": "85"
}
}
```

BIN
ui-ngx/src/assets/help/images/rulenode/examples/customer-attributes-ft.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 83 KiB

After

Width:  |  Height:  |  Size: 87 KiB

BIN
ui-ngx/src/assets/help/images/rulenode/examples/originator-attributes-ft.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 72 KiB

After

Width:  |  Height:  |  Size: 84 KiB

BIN
ui-ngx/src/assets/help/images/rulenode/examples/originator-fields-ft.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 69 KiB

After

Width:  |  Height:  |  Size: 74 KiB

BIN
ui-ngx/src/assets/help/images/rulenode/examples/originator-telemetry-ft-2.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 59 KiB

After

Width:  |  Height:  |  Size: 126 KiB

BIN
ui-ngx/src/assets/help/images/rulenode/examples/originator-telemetry-ft-3.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 76 KiB

BIN
ui-ngx/src/assets/help/images/rulenode/examples/originator-telemetry-ft.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 68 KiB

After

Width:  |  Height:  |  Size: 112 KiB

BIN
ui-ngx/src/assets/help/images/rulenode/examples/related-device-attributes-ft.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 59 KiB

After

Width:  |  Height:  |  Size: 92 KiB

BIN
ui-ngx/src/assets/help/images/rulenode/examples/related-entity-data-ft-2.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 75 KiB

BIN
ui-ngx/src/assets/help/images/rulenode/examples/related-entity-data-ft.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 58 KiB

After

Width:  |  Height:  |  Size: 110 KiB

BIN
ui-ngx/src/assets/help/images/rulenode/examples/tenant-attributes-ft.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 81 KiB

After

Width:  |  Height:  |  Size: 86 KiB

Loading…
Cancel
Save