Things/things/DeviceIrTx.h

21 lines
502 B
C++

#pragma once
#include "Device.h"
#include <Homie.h>
#include <IRremoteESP8266.h> // https://github.com/markszabo/IRremoteESP8266
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;
bool irTxHandler(String message);
HomieNode irTxNode = HomieNode("irtx", "irtx");
};