Repository navigation
User Guide: Agent Overview
Agents can be put into the following categories:
- Specialised agents (Velbus, Z-Wave, KNX, etc.)
- Generic agents (HTTP, TCP, UDP, WS, MQTT, etc.)
Specialised agents are ones that understand the message structure of the underlying devices/service and therefore generally require much less configuration in order to link attributes to them.
Generic agents on the other hand understand nothing about the underlying devices/service and therefore generally require more configuration in order to link attributes to them. This gives a lot of flexibility in terms of what devices/services you can communicate with and the Agent Link configuration options make it possible to easily configure generic inbound/outbound value processing (convert data type, insert value into bigger message payload etc.), see below for details on these Agent Link configuration options.
Regular assets are connected to agents by adding an Agent Link configuration item to attributes that need connecting, each agent has its' own Agent Link configuration options but below are the options that are common to all and can be found in the Agent link class.
The agent ID that is the target for this agent link
valueFilters [ValueFilter[]]
When an agent protocol updates the value of a linked attribute it can be desirable to filter that value to extract a specific piece of information that should actually be written to the linked attribute; this defines a series of value filters that incoming messages should pass through before being passed to the agent protocol, the incoming message is passed to each filter in array order and the result of one is the input to the next (i.e. they are composite). The available value filters can be found from the known types in the javadoc but at the time of writing they are:
[
{
"type": "json",
"path": [
"response",
"body"
]
},
{
"type": "regex",
"pattern": ".*(\\d)$",
"matchGroup": 1
}
]
When writing to linked attributes it can be desirable to insert the written value into a bigger payload before sending to the agent protocol; the dynamic value placeholder {$value} makes this possible and every occurrence within the bigger payload is replaced by the value written to the linked attribute.
messageMatchPredicate [ValuePredicate]
messageMatchFilters [ValueFilter[]]
Source · Documentation · Forum · Issues · Docker Images · OpenRemote Inc.