[mqtt.generic] Support transformationPattern for thing's availabilityTopic (#12167)

* [mqtt.generic] Support transformationPattern for thing's availability payload
* [mqtt] Remove org.apache.commons.lang3.StringUtils dependency

Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
This commit is contained in:
jimtng
2022-02-06 19:30:06 +10:00
committed by GitHub
parent 85ffbe37db
commit a3bd8caba9
6 changed files with 49 additions and 14 deletions

View File

@@ -58,6 +58,7 @@ The following optional parameters can be set for the Thing:
* __availabilityTopic__: The MQTT topic that represents the availability of the thing. This can be the thing's LWT topic.
* __payloadAvailable__: Payload of the `Availability Topic`, when the device is available. Default: `ON`.
* __payloadNotAvailable__: Payload of the `Availability Topic`, when the device is *not* available. Default: `OFF`.
* __transformationPattern__: An optional transformation pattern like [JSONPath](https://goessner.net/articles/JsonPath/index.html#e2) that is applied to the incoming availability payload. Transformations can be chained by separating them with the mathematical intersection character "∩". The result of the transformations is then checked against `payloadAvailable` and `payloadNotAvailable`.
## Supported Channels