* some minor correction after coadcy checks * Put serial communication speed as a parameter in user_config.h * complete gateway file receiving ok sending ko #32 * add rfm69 to CI * change receiver key and minor improvments #32 now ok on receiving and sending with RFM69 * add schema and tested pinout for RFM69/RF/IR wiring #32 * RFM69 library add * Implement newremoteswitchlibrary for KlikAanKlikUit / ClickOnClickOff protocol #3 * add dependency for CI and link to the library * compilation error for arduino correction * Sketch size decrease * remove nano from CI * Divide user_config into one file per gateway/sensor for lisibility
87 lines
3.2 KiB
C
87 lines
3.2 KiB
C
/*
|
|
OpenMQTTGateway - ESP8266 or Arduino program for home automation
|
|
|
|
Act as a wifi or ethernet gateway between your 433mhz/infrared IR signal and a MQTT broker
|
|
Send and receiving command by MQTT
|
|
|
|
This files enables to set your parameter for the infrared gateway
|
|
|
|
Copyright: (c)Florian ROBERT
|
|
|
|
This file is part of OpenMQTTGateway.
|
|
|
|
OpenMQTTGateway is free software: you can redistribute it and/or modify
|
|
it under the terms of the GNU General Public License as published by
|
|
the Free Software Foundation, either version 3 of the License, or
|
|
(at your option) any later version.
|
|
|
|
OpenMQTTGateway is distributed in the hope that it will be useful,
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
GNU General Public License for more details.
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
*/
|
|
|
|
/*-------------------IR topics & parameters----------------------*/
|
|
//IR MQTT Subjects
|
|
#define subjectGTWIRtoMQTT "home/IRtoMQTT"
|
|
#define subjectIRtoMQTT "home/IRtoMQTT"
|
|
#define subjectMQTTtoIR "home/commands/MQTTtoIR"
|
|
#define subjectIRtoMQTTprotocol "home/IRtoMQTT/protocol"
|
|
#define subjectIRtoMQTTbits "home/IRtoMQTT/bits"
|
|
#define subjectIRtoMQTTRaw "home/IRtoMQTT/raw"
|
|
// subject monitored to listen traffic processed by other gateways to store data and avoid ntuple
|
|
#define subjectMultiGTWIR "+/IRtoMQTT"
|
|
#define IRbitsKey "IRBITS_" // bits will be defined if a subject contains IRbitsKey followed by a value of 2 digits
|
|
#define IRRptKey "RPT_" // repeats will be defined if a subject contains IRRptKey followed by a value of 1 digit
|
|
#define repeatIRwMQTT false // do we repeat a received signal by using mqtt
|
|
|
|
#define pubIRunknownPrtcl false // key to avoid mqtt publication of unknown IR protocol (set to true if you want to publish unknown protocol)
|
|
#define PanasonicAddress 0x4004 // Panasonic address (Pre data)
|
|
|
|
#ifdef ESP8266 //IR supported protocols on ESP8266, all supported per default
|
|
#define IR_GC
|
|
#define IR_Raw
|
|
#define IR_COOLIX
|
|
#define IR_Whynter
|
|
#define IR_LG
|
|
#define IR_Sony
|
|
#define IR_DISH
|
|
#define IR_RC5
|
|
#define IR_Sharp
|
|
#define IR_SAMSUNG
|
|
#define IR_PANASONIC
|
|
#define IR_RCMM
|
|
#else //IR supported protocols on arduino uncomment if you want to send with this protocol, NEC protocol is available per default
|
|
//#define IR_COOLIX
|
|
//#define IR_Whynter
|
|
//#define IR_LG
|
|
//#define IR_Sony
|
|
//#define IR_DISH
|
|
//#define IR_RC5
|
|
//#define IR_Sharp
|
|
//#define IR_SAMSUNG
|
|
//#define IR_Raw
|
|
//#define IR_PANASONIC
|
|
#endif
|
|
|
|
/*-------------------PIN DEFINITIONS----------------------*/
|
|
#define IR_RECEIVER_PIN 2 // put 2 = D4 on nodemcu, 2 = D2 on arduino
|
|
|
|
#ifdef I2C_Wiring // With Support for I2C Modules
|
|
#define IR_EMITTER_PIN 16 // 16 = D0 on nodemcu #define only usefull for ESP8266
|
|
#endif
|
|
|
|
#ifdef RFM69_Wiring // With Support for I2C Modules
|
|
#define IR_EMITTER_PIN 16 // 16 = D0 on nodemcu #define only usefull for ESP8266
|
|
#endif
|
|
|
|
#ifdef Classic_Wiring // Without Support for I2C Modules
|
|
#define IR_EMITTER_PIN 14 // 14 = D5 on nodemcu #define only usefull for ESP8266
|
|
#endif
|
|
|
|
|
|
|