diff --git a/RELEASENOTES.md b/RELEASENOTES.md index 121e9e428..d8c865fdb 100644 --- a/RELEASENOTES.md +++ b/RELEASENOTES.md @@ -90,3 +90,4 @@ The following binary downloads have been compiled with ESP8266/Arduino library c - Add basic support for ESP32 ethernet adding commands ``Wifi 0/1`` and ``Ethernet 0/1`` both default ON - Add support for single wire LMT01 temperature Sensor by justifiably (#8713) - Add compile time interlock parameters (#8759) +- Add compile time user template (#8766) diff --git a/tasmota/CHANGELOG.md b/tasmota/CHANGELOG.md index 2a2a822f7..ce16e0478 100644 --- a/tasmota/CHANGELOG.md +++ b/tasmota/CHANGELOG.md @@ -7,6 +7,7 @@ - Add library to be used for decoding Teleinfo (French Metering Smart Meter) - Add support for single wire LMT01 temperature Sensor by justifiably (#8713) - Add compile time interlock parameters (#8759) +- Add compile time user template (#8766) - Fix exception or watchdog on rule re-entry (#8757) - Change ESP32 USER GPIO template representation decreasing template message size - Change define USE_TASMOTA_SLAVE into USE_TASMOTA_CLIENT diff --git a/tasmota/my_user_config.h b/tasmota/my_user_config.h index e0de6bbf3..45345c771 100644 --- a/tasmota/my_user_config.h +++ b/tasmota/my_user_config.h @@ -53,8 +53,10 @@ //#define MODULE SONOFF_BASIC // [Module] Select default module from tasmota_template.h #ifdef ESP8266 #define FALLBACK_MODULE SONOFF_BASIC // [Module2] Select default module on fast reboot where USER_MODULE is user template +//#define USER_TEMPLATE "{\"NAME\":\"Generic\",\"GPIO\":[255,255,255,255,255,255,255,255,255,255,255,255,255],\"FLAG\":15,\"BASE\":18}" // [Template] Set JSON template #else // ESP32 #define FALLBACK_MODULE WEMOS // [Module2] Select default module on fast reboot where USER_MODULE is user template +//#define USER_TEMPLATE "{\"NAME\":\"ESP32-DevKit\",\"GPIO\":[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,1,1,0,1,1,1,0,0,0,0,1,1,1,1,1,0,0,1],\"FLAG\":0,\"BASE\":1}" // [Template] Set JSON template #endif #define SAVE_DATA 1 // [SaveData] Save changed parameters to Flash (0 = disable, 1 - 3600 seconds) diff --git a/tasmota/settings.ino b/tasmota/settings.ino index e7a43b70a..1d7ab6d04 100644 --- a/tasmota/settings.ino +++ b/tasmota/settings.ino @@ -1087,6 +1087,10 @@ void SettingsDefaultSet2(void) flag3.pcf8574_ports_inverted |= PCF8574_INVERT_PORTS; flag4.zigbee_use_names |= ZIGBEE_FRIENDLY_NAMES; +#ifdef USER_TEMPLATE + JsonTemplate(USER_TEMPLATE); +#endif + Settings.flag = flag; Settings.flag2 = flag2; Settings.flag3 = flag3;