Difference between revisions of "User:Martinus/IR Gateway"

From Let's Control It
Jump to navigation Jump to search
Line 18: Line 18:
 
*ESP8266 ESP01 module (1MB Flash version)
 
*ESP8266 ESP01 module (1MB Flash version)
 
*Marmitek IR Control Pro 8 (used to distribute all IR traffic to several devices (DVD, PVR, HDMI switch)
 
*Marmitek IR Control Pro 8 (used to distribute all IR traffic to several devices (DVD, PVR, HDMI switch)
 +
[[file:User-Martinus-Marmitek.png]]
 
*Logitech Harmony 650 (added the Kaku device)
 
*Logitech Harmony 650 (added the Kaku device)
  

Revision as of 17:50, 21 October 2017

IR Gateway

Introduction

User-Martinus-IR Gateway.JPG

This small box has been my IR gateway for many years and it will likely serve many years to come. It started out using Nodo firmware (the ESP module socket wasn't there yet) but is has been replaced with a small RFLink edition that runs on Atmage328P. The ESP socket was added and it runs ESP Easy Mega edition.

The module has always worked autonomous so it does not depend on other controllers. It has always been rock solid stable and it controls several Kaku light around my house.

It used 3.5" jack plugs to connect two IR sensors that are located in other rooms (living and bedroom). These are the two jack connectors at the bottom side. The right side jack plug is for serial, to upgrade the RFLink firmware when needed.

Hardware

  • Atmega 328P (but any Arduino Uno, Pro mini will also work)
  • IR receiver
  • 433MHz transmitter
  • ESP8266 ESP01 module (1MB Flash version)
  • Marmitek IR Control Pro 8 (used to distribute all IR traffic to several devices (DVD, PVR, HDMI switch)

User-Martinus-Marmitek.png

  • Logitech Harmony 650 (added the Kaku device)

Software

Configuration

The ESP Easy module has only the Serial Server configure to listen to the serial output from the RFLink module. While another server could connect to the Serial Server, it is not in use. The Serial Server creates events that can be handled within the rule engine. The SerialSend command from the plugin can control the RFLink module.

Incoming events are to be treated as literal strings so these events are preceded with the '!' symbol. This means that the '=' symbol is ignored and the entire event can be used as a trigger.

In my case, the Logitech harmony emulates a Kaku transmitter on IR using the same protocol. So RFLink just thinks that is gets events from a real KAKU transmitter.

ESP Easy rules sample

on !RFLink#Kaku;ID=44;SWITCH=1;CMD=ON; do
  SerialSend 10;NewKaku;000001;2;2;
  delay 500
  SerialSend 10;NewKaku;000002;2;7;
  delay 500
  SerialSend 10;NewKaku;00000A;2;5;
endon

on !RFLink#Kaku;ID=44;SWITCH=2;CMD=ON; do
  SerialSend 10;NewKaku;000001;2;15;
  delay 500
  SerialSend 10;NewKaku;000002;2;15;
  delay 500
  SerialSend 10;NewKaku;00000A;2;8;
endon

on !RFLink#Kaku;ID=44;SWITCH=1;CMD=OFF; do
  SerialSend 10;NewKaku;000001;2;OFF;
  delay 500
  SerialSend 10;NewKaku;000002;2;OFF;
  delay 500
  SerialSend 10;NewKaku;00000A;2;OFF;
endon