2016-04-22 22:32:36 +02:00
|
|
|
#pragma once
|
2016-04-20 22:34:15 +02:00
|
|
|
|
|
|
|
#include "Device.h"
|
|
|
|
#include <Homie.h>
|
2016-04-22 22:45:45 +02:00
|
|
|
#include <IRremoteESP8266.h> // https://github.com/markszabo/IRremoteESP8266
|
2016-04-20 22:34:15 +02:00
|
|
|
|
|
|
|
class DeviceIrTx : public Device {
|
|
|
|
public:
|
|
|
|
inline DeviceIrTx(byte irtxPin):irsend(irtxPin) {
|
|
|
|
pin_irtx = irtxPin;
|
|
|
|
}
|
|
|
|
virtual void deviceSetup();
|
|
|
|
virtual void deviceRegister();
|
|
|
|
virtual void deviceLoop();
|
|
|
|
private:
|
|
|
|
byte pin_irtx;
|
|
|
|
IRsend irsend;
|
2016-04-20 22:45:47 +02:00
|
|
|
bool irTxHandler(String message);
|
2016-04-20 22:34:15 +02:00
|
|
|
HomieNode irTxNode = HomieNode("irtx", "irtx");
|
|
|
|
};
|