Skip to content

electric-sheep-co/arduino-redis

Repository files navigation

Arduino Redis Library

Arduino Redis

A Redis client library for Arduino.

Known to support the ESP8266 & ESP32 platforms; may support others without modification (see documentation).

Available via the Arduino Library Manager: simply search for "redis".

Latest release always available for direct download here.

Questions & Discussion

If you have any issue with the library please open a ticket here or email [email protected].

To discuss the project via real-time chat with other developers, you're invited to join the #arduino-redis channel on Libera.chat. If you'd prefer to just open an asynchronous discussion in a forum-like system, create a new Discussion here.

Developing

After cloning this repository, you must initialize and update the submodules:

$ git submodule init && git submodule update --recursive

This will download EpoxyDuino and AUnit, dependencies for the test harness described below.

Test harness

Available in ./test. There are two variants, unit & integration.

Build

Requires the same build depedencies as ExpoyDuino.

$ cd test
$ make

This will produce binaries named <variant>.out in the test/<variant> directories.

Running

(Using the integration tests variant as an example)

$ cd test
$ make run   # will clean & rebuild
rm unit/unit-tests.out
rm integration/integration-tests.out
cd unit && make
make[1]: Entering directory '/home/ryan/arduino-redis/test/unit'
...
TestRunner started on 27 test(s).
Test IntegrationTests_append passed.
...
Test IntegrationTests_wait_for_expiry_ms passed.
TestRunner duration: 2.654 seconds.
TestRunner summary: 27 passed, 0 failed, 0 skipped, 0 timed out, out of 27 test(s).

Requires Redis server available by default at localhost:6379. The hostname, port and authentication (if necessary) can be specified at runtime by setting the following environment variables:

  • ARDUINO_REDIS_TEST_HOST
  • ARDUINO_REDIS_TEST_PORT
  • ARDUINO_REDIS_TEST_AUTH

Tests can be filtered by setting ARDUINO_REDIS_TEST_INCLUDE, the value of which will be used as the specification to TestRunner::include().

Submitting a PR

Please review the contribution guidelines before submission taking important note of the requirement that integration tests must pass and any changed or added functionality include appropriate additional tests. Thank you!

Authors