redis
The Redis binding allows you to connect to Redis databases and use them as a DataValue source.
A Redis database can be used to store and retrieve data from various sources, such as sensors, devices, or other applications. The binding supports reading and writing data to Redis using keys.
Redis binding
brownfieldDevices:
redis:
- name: r1
endpoint: redis://localhost:6379
The Redis database can be efficienlty uuse with interaction with a Node-RED flow, allowing you to process and manipulate the data before exposing it in the OPC UA address space. In typicial case, you would use Node-RED to read data from sensors or devices, process it, and then store it in Redis. The OPC UA server can then read the data from Redis and expose it in the OPC UA address space.
binding examples
you can use the jsonata expression $redisGet to extract the value from a Redis key and bind it to an OPC UA node.
- node: /di:DeviceSet/own:MyObject/own:MyInt32
value: $redisGet("r1","MyInt32")
format of the Redis key
The redis key can be a DataValue, encoded as a OPCUA JSON string, or a simple value.
You can use @opcua/for-node-red modue to read and OPCUA variable and dump it in to the DataValue OPCUA JSON format, and then use this as a example to form your
the $redisPut function to store it in Redis.
for instance
{
"value": 42,
"statusCode": "Good"
}