Copiling for TLS and User Module Generic(18)

16 views
Skip to first unread message

Ulf Holt

unread,
Aug 26, 2026, 9:22:09 AM (5 days ago) Aug 26
to TasmotaUsers
I have been trying to use VSCode and platformIO to compile tasmota. This works fine for me, but there are two thing I am not able to implement.

1. I would lit to enal\ble TLS so I do not have to mark TLS enabled in the menyu:

2026-08-26_15-16-36.png

2. I also wold like to specify the Mudule typed to be Generic(18)

2026-08-26_15-20-04.png

Best regards

Ulf H.

Ulf Holt

unread,
Aug 26, 2026, 9:40:36 AM (5 days ago) Aug 26
to TasmotaUsers
Might be an idea to supply my user_config_override:

/*
  user_config_override.h - user configuration overrides my_user_config.h for Tasmota

  Copyright (C) 2021  Theo Arends

  This program 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.

  This program 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/>.
*/

#ifndef _USER_CONFIG_OVERRIDE_H_
#define _USER_CONFIG_OVERRIDE_H_
// Aktiver TLS/SSL-støtte for MQTT
#ifndef USE_MQTT_TLS
#define USE_MQTT_TLS                             // Aktiverer TLS for MQTT
#endif
#ifndef MQTT_TLS_ENABLED
#define MQTT_TLS_ENABLED   true     // Setter SetOption103 = 1 som standard
#endif
// HiveMQ Cloud krever Server Name Indication (SNI)
#ifndef USE_MQTT_TLS_FORCE_EC_CIPHER
#define USE_MQTT_TLS_FORCE_EC_CIPHER             // Optimaliserer for moderne ECC-sertifikater
#endif
#undef CFG_HOLDER
#define CFG_HOLDER 4618
#define USER_TEMPLATE "{\"NAME\":\"Generic\",\"GPIO\":[1,1,1,1,1,1,1,1,1,1,1,1,1,1],\"FLAG\":0,\"BASE\":18}"  // [Template] Set JSON template
//#define MODULE USER_MODULE                       // Set template enabled by default

/*****************************************************************************************************\
 * USAGE:
 *   To modify the stock configuration without changing the my_user_config.h file:
 *   (1) copy this file to "user_config_override.h" (It will be ignored by Git)
 *   (2) define your own settings below
 *
 ******************************************************************************************************
 * ATTENTION:
 *   - Changes to SECTION1 PARAMETER defines will only override flash settings if you change define CFG_HOLDER.
 *   - Expect compiler warnings when no ifdef/undef/endif sequence is used.
 *   - You still need to update my_user_config.h for major define USE_MQTT_TLS.
 *   - All parameters can be persistent changed online using commands via MQTT, WebConsole or Serial.
\*****************************************************************************************************/

/*
Examples :

// -- Master parameter control --------------------
#undef  CFG_HOLDER
#define CFG_HOLDER        4617                   // [Reset 1] Change this value to load SECTION1 configuration parameters to flash

// -- Setup your own Wifi settings  ---------------
*/
#undef  STA_SSID1
#define STA_SSID1         "xxxxxxxx"             // [Ssid1] Wifi SSID

#undef  STA_PASS1
#define STA_PASS1         "xxxxxxxx"     // [Password1] Wifi password

// -- Setup your own MQTT settings  ---------------
#undef  MQTT_HOST
#define MQTT_HOST         "xxxxxxxx" // [MqttHost]

#undef  MQTT_PORT
#define MQTT_PORT         8883                   // [MqttPort] MQTT port (10123 on CloudMQTT)

#undef  MQTT_USER
#define MQTT_USER         "xxxxxxxx"         // [MqttUser] Optional user

#undef  MQTT_PASS
#define MQTT_PASS         "xxxxxxxx"         // [MqttPassword] Optional password

// You might even pass some parameters from the command line ----------------------------
// Ie:  export PLATFORMIO_BUILD_FLAGS='-DUSE_CONFIG_OVERRIDE -DMY_IP="192.168.1.99" -DMY_GW="192.168.1.1" -DMY_DNS="192.168.1.1"'
/*
#ifdef MY_IP
#undef  WIFI_IP_ADDRESS
#define WIFI_IP_ADDRESS     MY_IP                // Set to 0.0.0.0 for using DHCP or enter a static IP address
#endif

#ifdef MY_GW
#undef  WIFI_GATEWAY
#define WIFI_GATEWAY        MY_GW                // if not using DHCP set Gateway IP address
#endif

#ifdef MY_DNS
#undef  WIFI_DNS
#define WIFI_DNS            MY_DNS               // If not using DHCP set DNS IP address (might be equal to WIFI_GATEWAY)
#endif

#ifdef MY_DNS2
#undef  WIFI_DNS2
#define WIFI_DNS2           MY_DNS2              // If not using DHCP set DNS IP address (might be equal to WIFI_GATEWAY)
#endif

// !!! Remember that your changes GOES AT THE BOTTOM OF THIS FILE right before the last #endif !!!
*/





#endif  // _USER_CONFIG_OVERRIDE_H_

Philip Knowles

unread,
Aug 27, 2026, 7:48:08 AM (4 days ago) Aug 27
to Ulf Holt, TasmotaUsers
It's a while but I think those changes are done using #define USER_BACKLOG (for example setoption103 1 to enable TLS)

From: sonof...@googlegroups.com <sonof...@googlegroups.com> on behalf of Ulf Holt <ulf....@gmail.com>
Sent: 26 August 2026 14:40
To: TasmotaUsers <sonof...@googlegroups.com>
Subject: Re: Copiling for TLS and User Module Generic(18)
 
--
You received this message because you are subscribed to the Google Groups "TasmotaUsers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sonoffusers...@googlegroups.com.
To view this discussion, visit https://groups.google.com/d/msgid/sonoffusers/ef26caea-4c85-4b45-b690-edecab9cb9d9n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages