Software RedRat Hub

RedRat Hub

RedRat HUb

The RedRat Hub is an application that manages communication with RedRat hardware, allowing straightforward integration of RedRat devices with third party software and systems. There are two methods of communication:

  1. Using sockets to send simple text messages
  2. Via an HTTP REST API

It also allows multiplexing of multiple commands from different applications to RedRat devices.

RedRat Hub runs on both Windows and Linux using ASP.NET Core and includes a Web UI for monitoring and configuration.

A demo version is running here which has detailed documentation on the APIs.

Architechture

Client applications connect to RedRat Hub on a socket or via an HTTP REST API and send commands which are then interpreted and the appropriate instruction sent on to a RedRat device. The Hub can take connections from multiple clients and ensures that they are handled appropriately for the RedRat hardware.

It is uses minimal resources so can be used just to manage one RedRat device, but can also scale to handle 100s of client connections sending commands to man RedRat devices.

At startup, RedRatHub loads the IR signal data from one or more files, handling all IR data management itself. An optional configuration file can also be used to modify its behaviour, for example to ensure that an instance only uses certain RedRat devices.

redrat-hub-architecture

Installing and Running RedRatHub

Windows

  1. RedRatHub requires the .NET Core 3.1 (or greater) runtime to be installed. This can be downloaded from Microsoft here.
  2. Download the most recent RedRatHub version at the bottom of this page and unzip in a suitable location.
  3. It can be run with either of the following commands:
    > .\RedRatHub.exe [command line parameters]
    > dotnet RedRatHub.dll [command line parameters]
  4. Once running, navigate to its web interface and check out the documentation. An on-line demo version is available here.
  5. A Windows Service version if it is intended to be run continuously. Please contact RedRat support.

Linux

  1. Install .NET Core 3.1. There is comprehensive information here from Microsoft. For example, using Ubuntu 18.04, the following commands can be used:
    • wget https://packages.microsoft.com/config/ubuntu/18.04/packages-microsoft-prod.deb -O packages-microsoft-prod.deb
    • sudo dpkg -i packages-microsoft-prod.deb
    • sudo apt-get update
    • [sudo apt-get install -y apt-transport-https. Optional as this may already be installed.]
    • [sudo apt-get update. Only needed if the previous line was executed.]
    • sudo apt-get install -y dotnet-sdk-3.1
  2. Download the most recent RedRatHub version at the bottom of this page and unzip in a suitable location.
  3. Run with the command dotnet RedRatHub.dll
  4. Once running, navigate to its web interface and check out the documentation. An on-line demo version is available here.
  5. It can be setup as a service to run when Linux boots, for example on Ubuntu creating a service startup script.

Raspberry-Pi

This is a great way to run a RedRatHub instance. The instructions are a little more involved than for a standard Linux installation, so are given separate page here.

Online Demo

An on-line demo is available showing the Web interface and HTTP REST API:

Example Socket Server Client Code

Writing RedRatHub clients which send messages via the socket server is quite straightforward, but to help get started, some example client code is available here. Let us know if the language you want to use is not included in the list: