Software RedRat SDK

RedRat SDK

The RedRat SDK is intended for the development of applications based on RedRat devices or to support its integration into third party systems. The most recent version supports both the .NET Framework and also .NET Core for use on Windows, Linux and Mac. Installation is via Nuget.

Using the SDK

Windows Prerequisites

  • The .NET Framework 4.7.2.
  • Microsoft Visual Studio 2019.
  • If using a USB device (RedRat-X or RedRat3-II), then the appropriate device driver.

Linux & Mac Prerequisites

The RedRat.dll on Linux supports the irNetBox and RedRat-X (network and USB), but does not currently support the USB RedRat3-II.

To run non-UI applications on Linux, the following are needed:

  • .NET Core 3.1: Installation instructions are available here.
  • LibUsb: This is generally installed with a package manager:
    • Ubuntu: sudo apt-get install libusb-1.0-0-dev.
    • Mac: using Homebrew: brew install libusb. It may be necessary to set the library load path so that dotnet finds libusb, for example export DYLD_LIBRARY_PATH=/usr/local/lib

Code Examples

Various short code examples giving an introduction to using the RedRat SDK.

Sample Code

The sample Visual Studio 2019 solution (zip) contains a number of projects demonstrating how to work with RedRat devices. RedRat.dll itself needs to be included from Nuget:

  • Simple Signal Output: Loads an IR signal database file and transmits signals from this file via a USB RedRat device.
  • RR_CLI: Command line interface for basic operations using USB RedRat devices. Can also be used for scripting, however RedRatHub is generally recommended as a better approach.
  • Signal Decoding: Demonstrates the code needed to handle input IR signals from a remote control via a USB RedRat. The signals are decoded and a small window is moved around the screen in response to the remote control button presses.
  • Custom Signal: Shows how to construct custom IR signals, and then save them in the standard Signal DB Utility XML file format for editing, viewing and future use.
  • irNetBox Demo: Transmits IR signals via an irNetBox. This uses both the old synchronous API (sending one signal at a time for older irNetBox versions) and the new asynchronous API which supports simultaneous transmission of multiple IR signals from the MK-III and MK-IV irNetBoxs.
  • Key Press Logger: Logs incoming IR signals via a USB RedRat and attempts to decode them.
  • Macro Sample: Reads a file containing macros (i.e. sequences of IR signals) and transmits one.
  • Test Remote: WinForms application showing a very simple, configurable on-screen remote control.
  • RedRatX Demo: Demonstrates most aspects of using the RedRat-X's API.
  • IronPython Sample: A .NET version of python which can directly use RedRat.dll for IR input/output operations. To use standard python with RedRat devices, RedRatHub is recommended.