diff --git a/OpenMQTTGateway.ino b/OpenMQTTGateway.ino index 4c7d42b..511cc8b 100644 --- a/OpenMQTTGateway.ino +++ b/OpenMQTTGateway.ino @@ -60,6 +60,44 @@ #include #include +// Modules config inclusion +#if defined(ZgatewayRF) || defined(ZgatewayRF2) + #include "config_RF.h" +#endif +#ifdef ZgatewayBT + #include "config_BT.h" +#endif +#ifdef ZgatewayIR + #include "config_IR.h" +#endif +#ifdef ZactuatorONOFF + #include "config_ONOFF.h" +#endif +#ifdef ZsensorINA226 + #include "config_INA226.h" +#endif +#ifdef ZsensorHCSR501 + #include "config_HCSR501.h" +#endif +#ifdef ZsensorADC + #include "config_ADC.h" +#endif +#ifdef ZsensorBH1750 + #include "config_BH1750.h" +#endif +#ifdef ZsensorTSL2561 + #include "config_TSL2561.h" +#endif +#ifdef ZsensorBME280 + #include "config_BME280.h" +#endif +#ifdef ZsensorDHT + #include "config_DHT.h" +#endif +#ifdef ZgatewayRFM69 + #include "config_RFM69.h" +#endif + // array to store previous received RFs, IRs codes and their timestamps #if defined(ESP8266) || defined(ESP32) #define array_size 12 diff --git a/User_config.h b/User_config.h index cdafa72..ca27a18 100644 --- a/User_config.h +++ b/User_config.h @@ -82,48 +82,22 @@ const byte subnet[] = { 255, 255, 255, 0 }; //ip adress // LED Resistor 270-510R /*-------------DEFINE THE MODULES YOU WANT BELOW----------------*/ -//Addons and module management, comment the Z line and the config file if you don't use +//Addons and module management, comment the Z line -#define ZgatewayRF //ESP8266, Arduino, ESP32 -#include "config_RF.h" - -//#define ZgatewayRF2 //ESP8266, Arduino, ESP32 - -//#define ZgatewaySRFB //Sonoff RF Bridge -//#include "config_SRFB.h" - -#define ZgatewayIR //ESP8266, Arduino, Sonoff RF Bridge -#include "config_IR.h" - -#define ZgatewayBT //ESP8266, Arduino, ESP32 -#include "config_BT.h" - -//#define ZactuatorONOFF //ESP8266, Arduino, ESP32, Sonoff RF Bridge -//#include "config_ONOFF.h" - -//#define ZsensorINA226 //ESP8266, Arduino, ESP32 -//#include "config_INA226.h" - -//#define ZsensorHCSR501 //ESP8266, Arduino, ESP32, Sonoff RF Bridge -//#include "config_HCSR501.h" - -//#define ZsensorADC //ESP8266, Arduino, ESP32 -//#include "config_ADC.h" - -//#define ZsensorBH1750 //ESP8266, Arduino, ESP32 -//#include "config_BH1750.h" - -//#define ZsensorTSL2561 //ESP8266, Arduino, ESP32 -//#include "config_TSL2561.h" - -//#define ZsensorBME280 //ESP8266, Arduino, ESP32 -//#include "config_BME280.h" - -//#define ZsensorDHT //ESP8266, Arduino, ESP32, Sonoff RF Bridge -//#include "config_DHT.h" - -//#define ZgatewayRFM69 //ESP8266, Arduino, ESP32 -//#include "config_RFM69.h" +#define ZgatewayRF //ESP8266, Arduino, ESP32 +#define ZgatewayIR //ESP8266, Arduino, Sonoff RF Bridge +#define ZgatewayBT //ESP8266, Arduino, ESP32 +//#define ZgatewayRF2 //ESP8266, Arduino, ESP32 +//#define ZgatewaySRFB // Sonoff RF Bridge +//#define ZactuatorONOFF //ESP8266, Arduino, ESP32, Sonoff RF Bridge +//#define ZsensorINA226 //ESP8266, Arduino, ESP32 +//#define ZsensorHCSR501 //ESP8266, Arduino, ESP32, Sonoff RF Bridge +//#define ZsensorADC //ESP8266, Arduino, ESP32 +//#define ZsensorBH1750 //ESP8266, Arduino, ESP32 +//#define ZsensorTSL2561 //ESP8266, Arduino, ESP32 +//#define ZsensorBME280 //ESP8266, Arduino, ESP32 +//#define ZsensorDHT //ESP8266, Arduino, ESP32, Sonoff RF Bridge +//#define ZgatewayRFM69 //ESP8266, Arduino, ESP32 /*----------------------------OTHER PARAMETERS-----------------------------*/ /*-------------------CHANGING THEM IS NOT COMPULSORY-----------------------*/