Skip to content

Redis Driver

dc3-driver-redis treats Redis as a data source: a point reads a STRING key (GET) or a HASH field (HGET), and a write sets a STRING key (SET) or HASH field (HSET). It is useful for bridging cached values, counters, and lightweight state into the platform.

Protocol background

Redis is an in-memory key/value store. This driver maps a Point to a key (and optional field for hashes), polling the value on the collection cycle; writes propagate back to the same key.

  • Driver name / code: Redis Driver / RedisDriver
  • Type: DRIVER_CLIENT (connects to Redis and reads/writes keys)
  • Underlying library: Spring Data Redis (StringRedisTemplate)

Attribute configuration

Driver attributes (device-level driver-attribute)

AttributecodeTypeDefaultDescription
(broker connection)spring.data.redis.*envConfigured via Spring Boot spring.data.redis.* properties

Point attributes (point-attribute)

AttributecodeTypeDefaultDescription
KeykeySTRING(empty)Redis key to read/write
Data TypedataTypeSTRINGSTRINGSTRING or HASH
FieldfieldSTRING(empty)Hash field (required when dataType=HASH)

Collection and health

  • Collection cycle: default cron 0/30 * * * * ? (one polling round over all points every 30 seconds).
  • Health/online: device health defaults to cron 0/15 * * * * ?, lease timeout 45 seconds.

Capability matrix

CapabilitySupportedNotes
Read
Write
Subscribe

Implementation status: available ::

Connection is configured through Spring Boot spring.data.redis.* (REDIS_HOST / REDIS_PORT environment variables); no driver-level connection attribute is required.

Minimal onboarding example

  1. Create a Device using Redis Driver.
  2. Add a Point (READ_ONLY) with key=counter:total and dataType=STRING.
  3. Start the driver; within 30 seconds the value appears in PointValue.

Further reading

Last updated:

Released under the AGPL-3.0 License