Merge pull request #1 from arendst/development

Update from source
This commit is contained in:
Max 2021-12-09 11:08:21 +03:00 committed by GitHub
commit 2f359e5039
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
13 changed files with 648 additions and 327 deletions

View File

@ -3,7 +3,15 @@ All notable changes to this project will be documented in this file.
## [Unreleased] - Development
## [10.0.0.4]
## [10.1.0.1]
## [Released]
## [10.1.0] 20211208
- Release Noelle
## [10.0.0.4] 20211208
### Added
- (Internal) Support for FUNC_BUTTON_MULTI_PRESSED in (light)drivers
- Support for GPE Multi color smart light as sold by Action in the Netherlands
@ -18,6 +26,7 @@ All notable changes to this project will be documented in this file.
### Fixed
- Tuya dimmer range issue (#13849)
- BLE Memory leak with update NimBLE v.1.3.1 to v.1.3.3
- Compile error BLE EQ3 driver with core 2.0.x (#13948)
## [10.0.0.3] 20211130
### Added
@ -77,8 +86,6 @@ All notable changes to this project will be documented in this file.
- Discovery of shutters (#13572)
- ESP32-C3 OneWire as used by DS18x20 (#13583)
## [Released]
## [10.0.0] 20211019
- Release Norman

View File

@ -18,7 +18,7 @@ See [CHANGELOG.md](https://github.com/arendst/Tasmota/blob/development/tasmota/C
## Development
[![Dev Version](https://img.shields.io/badge/development%20version-v10.0.x.x-blue.svg)](https://github.com/arendst/Tasmota)
[![Dev Version](https://img.shields.io/badge/development%20version-v10.1.x.x-blue.svg)](https://github.com/arendst/Tasmota)
[![Download Dev](https://img.shields.io/badge/download-development-yellow.svg)](http://ota.tasmota.com/tasmota/)
[![Tasmota CI](https://github.com/arendst/Tasmota/workflows/Tasmota%20CI/badge.svg)](https://github.com/arendst/Tasmota/actions?query=workflow%3A%22Tasmota+CI%22)
[![Tasmota ESP32 CI](https://github.com/arendst/Tasmota/workflows/Tasmota%20ESP32%20CI/badge.svg)](https://github.com/arendst/Tasmota/actions?query=workflow%3A%22Tasmota+ESP32+CI%22)

View File

@ -23,7 +23,7 @@ Easy initial installation of Tasmota can be performed using the [Tasmota WebInst
## Development
[![Dev Version](https://img.shields.io/badge/development%20version-v10.0.x.x-blue.svg)](https://github.com/arendst/Tasmota)
[![Dev Version](https://img.shields.io/badge/development%20version-v10.1.x.x-blue.svg)](https://github.com/arendst/Tasmota)
[![Download Dev](https://img.shields.io/badge/download-development-yellow.svg)](http://ota.tasmota.com/tasmota/)
[![Tasmota CI](https://github.com/arendst/Tasmota/workflows/Tasmota%20CI/badge.svg)](https://github.com/arendst/Tasmota/actions?query=workflow%3A%22Tasmota+CI%22)
[![Tasmota ESP32 CI](https://github.com/arendst/Tasmota/workflows/Tasmota%20ESP32%20CI/badge.svg)](https://github.com/arendst/Tasmota/actions?query=workflow%3A%22Tasmota+ESP32+CI%22)

View File

@ -66,12 +66,12 @@ Latest released binaries can be downloaded from
- http://ota.tasmota.com/tasmota/release
Historical binaries can be downloaded from
- http://ota.tasmota.com/tasmota/release-10.0.0
- http://ota.tasmota.com/tasmota/release-10.1.0
The latter links can be used for OTA upgrades too like ``OtaUrl http://ota.tasmota.com/tasmota/release/tasmota.bin.gz``
### ESP32 based
The following binary downloads have been compiled with ESP32/Arduino library core version **1.0.7.4**.
The following binary downloads have been compiled with ESP32/Arduino library core version **2.0.1.1**.
- **tasmota32.bin** = The Tasmota version with most drivers including additional sensors and KNX for 4M+ flash. **RECOMMENDED RELEASE BINARY**
- **tasmota32c3.bin** = The Tasmota version with most drivers including additional sensors and KNX for ESP32-C3 and 4M+ flash.
@ -90,7 +90,7 @@ Latest released binaries can be downloaded from
- http://ota.tasmota.com/tasmota32/release
Historical binaries can be downloaded from
- http://ota.tasmota.com/tasmota32/release-10.0.0
- http://ota.tasmota.com/tasmota32/release-10.1.0
The latter links can be used for OTA upgrades too like ``OtaUrl http://ota.tasmota.com/tasmota32/release/tasmota32.bin``
@ -100,49 +100,13 @@ The latter links can be used for OTA upgrades too like ``OtaUrl http://ota.tasmo
[Complete list](BUILDS.md) of available feature and sensors.
## Changelog v10.0.0.4
## Changelog v10.1.0.1
### Added
- One second heartbeat GPIO
- (Internal) Support for FUNC_BUTTON_MULTI_PRESSED in (light)drivers
- Command ``TcpConfig`` for TCPBridge protocol configuration [#13565](https://github.com/arendst/Tasmota/issues/13565)
- Support for HDC2010 temperature/humidity sensor by Luc Boudreau [#13633](https://github.com/arendst/Tasmota/issues/13633)
- WS2812 scheme 13 stairs effect [#13595](https://github.com/arendst/Tasmota/issues/13595)
- Command ``IfxPeriod `` to overrule ``Teleperiod`` for Influx messages [#13750](https://github.com/arendst/Tasmota/issues/13750)
- Support for GPE Multi color smart light as sold by Action in the Netherlands
- Shutter support for venetian blinds with tilt control
- Support for 74xx595 8-bit shift registers [#13921](https://github.com/arendst/Tasmota/issues/13921)
- ESP32 Proof of Concept Sonoff SPM with limited functionality (switching and energy monitoring) [#13447](https://github.com/arendst/Tasmota/issues/13447)
- ESP32 Autoconfiguration
- ESP32 Preliminary support for Tasmota Apps (.tapp extesions)
- ESP32 OTA over HTTPS
- ESP32 HTTPS support to ``WebQuery``
- ESP32 Berry support for neopixel (WS2812, SK6812)
- ESP32 Berry ``import re`` regex module
- ESP32 Berry add module ``python_compat`` to be closer to Python syntax [#13428](https://github.com/arendst/Tasmota/issues/13428)
### Breaking Changed
- ESP32-S2 TSettings memory usage fixed to 4096 bytes regression from v9.5.0.8
### Changed
- ESP32 core library from v1.0.7.4 to v2.0.1.1
- ESP32-C3 core library from v2.0.0-post to ESP32 core library
- IRremoteESP8266 library from v2.7.20 to v2.8.0
- (Internal) Range conversion edge values
- ESP8266 Gratuitous ARP enabled and set to 60 seconds [#13623](https://github.com/arendst/Tasmota/issues/13623)
- File editor no-wrap [#13427](https://github.com/arendst/Tasmota/issues/13427)
- ESP8266 Gratuitous ARP enabled and set to 60 seconds [#13623](https://github.com/arendst/Tasmota/issues/13623)
- Ethernet hostname ending in ``_eth`` to ``-eth`` according to RFC952
### Fixed
- Initial reset RTC memory based variables like EnergyToday and EnergyTotal
- ESP32 Telegram compile error [#13435](https://github.com/arendst/Tasmota/issues/13435)
- SML compile error [#13441](https://github.com/arendst/Tasmota/issues/13441)
- GUI checkbox MQTT TLS not saved regression from v9.2.0.3 [#13442](https://github.com/arendst/Tasmota/issues/13442)
- Discovery of shutters [#13572](https://github.com/arendst/Tasmota/issues/13572)
- ESP32-C3 OneWire as used by DS18x20 [#13583](https://github.com/arendst/Tasmota/issues/13583)
- ESP32 analog NTC temperature calculation [#13703](https://github.com/arendst/Tasmota/issues/13703)
- Tuya dimmer range issue [#13849](https://github.com/arendst/Tasmota/issues/13849)
### Removed
- ILI9488 driver in favour of Universal Display driver [#13719](https://github.com/arendst/Tasmota/issues/13719)

View File

@ -76,6 +76,9 @@ uDisplay::uDisplay(char *lp) : Renderer(800, 600) {
uint8_t section = 0;
dsp_ncmds = 0;
lut_num = 0;
lvgl_param.data = 0;
lvgl_param.fluslines = 40;
for (uint32_t cnt = 0; cnt < 5; cnt++) {
lut_cnt[cnt] = 0;
lut_cmd[cnt] = 0xff;

View File

@ -20,6 +20,6 @@
#ifndef _TASMOTA_VERSION_H_
#define _TASMOTA_VERSION_H_
const uint32_t VERSION = 0x0A000004;
const uint32_t VERSION = 0x0A010001;
#endif // _TASMOTA_VERSION_H_

File diff suppressed because it is too large Load Diff

View File

@ -96,6 +96,11 @@ void Get_display(uint8_t index) {
}
#endif // USE_MULTI_DISPLAY
#ifndef TXT_MAX_SFAC
#define TXT_MAX_SFAC 4
#endif // TXT_MAX_SFAC
const uint8_t DISPLAY_MAX_DRIVERS = 32; // Max number of display drivers/models supported by xdsp_interface.ino
const uint8_t DISPLAY_MAX_COLS = 64; // Max number of columns allowed with command DisplayCols
const uint8_t DISPLAY_MAX_ROWS = 64; // Max number of lines allowed with command DisplayRows
@ -875,9 +880,11 @@ void DisplayText(void)
break;
case 's':
// size sx
if (renderer) renderer->setTextSize(*cp&7);
var = atoiv(cp, &temp);
if (temp > TXT_MAX_SFAC) temp = TXT_MAX_SFAC;
if (renderer) renderer->setTextSize(temp);
//else DisplaySetSize(*cp&3);
cp += 1;
cp+=var;
break;
case 'f':
// font sx
@ -2011,7 +2018,7 @@ void CmndDisplayDimmer(void) {
}
void CmndDisplaySize(void) {
if ((XdrvMailbox.payload > 0) && (XdrvMailbox.payload <= 4)) {
if ((XdrvMailbox.payload > 0) && (XdrvMailbox.payload <= TXT_MAX_SFAC)) {
Settings->display_size = XdrvMailbox.payload;
if (renderer) renderer->setTextSize(Settings->display_size);
//else DisplaySetSize(Settings->display_size);

View File

@ -42,6 +42,8 @@
#include <TasmotaSerial.h>
/* from hvac */
bool temp_type = false;
struct miel_hvac_header {
uint8_t start;
#define MIEL_HVAC_H_START 0xfc
@ -68,11 +70,14 @@ struct miel_hvac_data_settings {
uint8_t widevane;
#define MIEL_HVAC_SETTTINGS_WIDEVANE_MASK \
0x0f
uint8_t temp05;
};
struct miel_hvac_data_roomtemp {
uint8_t _pad1[2];
uint8_t temp;
uint8_t _pad2[2];
uint8_t temp05;
};
struct miel_hvac_data_status {
@ -109,8 +114,10 @@ CTASSERT(offsetof(struct miel_hvac_data, data.settings.temp) == 5);
CTASSERT(offsetof(struct miel_hvac_data, data.settings.fan) == 6);
CTASSERT(offsetof(struct miel_hvac_data, data.settings.vane) == 7);
CTASSERT(offsetof(struct miel_hvac_data, data.settings.widevane) == 10);
CTASSERT(offsetof(struct miel_hvac_data, data.settings.temp05) == 11);
CTASSERT(offsetof(struct miel_hvac_data, data.roomtemp.temp) == 3);
CTASSERT(offsetof(struct miel_hvac_data, data.roomtemp.temp05) == 6);
/* to hvac */
@ -180,7 +187,8 @@ struct miel_hvac_msg_update {
#define MIEL_HVAC_UPDATE_WIDEVANE_LR 0x08
#define MIEL_HVAC_UPDATE_WIDEVANE_SWING 0x0c
#define MIEL_HVAC_UPDATE_WIDEVANE_ADJ 0x80
uint8_t _pad2[2];
uint8_t temp05;
uint8_t _pad2[1];
} __packed;
CTASSERT(sizeof(struct miel_hvac_msg_update) == 16);
@ -192,23 +200,42 @@ CTASSERT(offsetof(struct miel_hvac_msg_update, temp) == MIEL_HVAC_OFFS(10));
CTASSERT(offsetof(struct miel_hvac_msg_update, fan) == MIEL_HVAC_OFFS(11));
CTASSERT(offsetof(struct miel_hvac_msg_update, vane) == MIEL_HVAC_OFFS(12));
CTASSERT(offsetof(struct miel_hvac_msg_update, widevane) == MIEL_HVAC_OFFS(18));
CTASSERT(offsetof(struct miel_hvac_msg_update, temp05) == MIEL_HVAC_OFFS(19));
static inline uint8_t
miel_hvac_deg2temp(uint8_t deg)
miel_hvac_deg2temp(float deg)
{
return (31 - deg);
if (!temp_type) {
return (31 - deg);
}
else {
deg = 2*deg + 128;
return ((uint8_t) deg);
}
}
static inline uint8_t
static inline float
miel_hvac_temp2deg(uint8_t temp)
{
return (31 - temp);
if (!temp_type) {
return (31 - temp);
}
else {
temp -= 128;
return ((float) temp/2);
}
}
static inline unsigned int
static inline float
miel_hvac_roomtemp2deg(uint8_t roomtemp)
{
return ((unsigned int)roomtemp + 10);
if (!temp_type) {
return ((unsigned int)roomtemp + 10);
}
else {
roomtemp -= 128;
return ((float) roomtemp/2);
}
}
struct miel_hvac_msg_remotetemp {
@ -682,20 +709,27 @@ miel_hvac_cmnd_settemp(void)
{
struct miel_hvac_softc *sc = miel_hvac_sc;
struct miel_hvac_msg_update *update = &sc->sc_update;
unsigned long degc;
float degc;
if (XdrvMailbox.data_len == 0)
return;
degc = strtoul(XdrvMailbox.data, nullptr, 0);
degc = strtof(XdrvMailbox.data, nullptr);
if (degc < MIEL_HVAC_UPDATE_TEMP_MIN ||
degc > MIEL_HVAC_UPDATE_TEMP_MAX) {
miel_hvac_respond_unsupported();
return;
}
update->flags |= htons(MIEL_HVAC_UPDATE_F_TEMP);
update->temp = miel_hvac_deg2temp(degc);
if (!temp_type) {
update->temp = miel_hvac_deg2temp(degc);
update->temp05 = 0;
}
else {
update->temp = 0;
update->temp05 = miel_hvac_deg2temp(degc);
}
ResponseCmndNumber(degc);
}
@ -871,9 +905,15 @@ miel_hvac_publish_settings(struct miel_hvac_softc *sc)
ResponseAppend_P(PSTR(",\"HA" D_JSON_IRHVAC_MODE "\":\"%s\""),
set->power ? name : "off");
}
dtostrfd(ConvertTemp(miel_hvac_temp2deg(set->temp)),
Settings->flag2.temperature_resolution, temp);
if (set->temp05 == 0) {
dtostrfd(ConvertTemp(miel_hvac_temp2deg(set->temp)),
Settings->flag2.temperature_resolution, temp);
}
else {
temp_type = true;
dtostrfd(ConvertTemp(miel_hvac_temp2deg(set->temp05)),
Settings->flag2.temperature_resolution, temp);
}
ResponseAppend_P(PSTR(",\"" D_JSON_IRHVAC_TEMP "\":%s"), temp);
name = miel_hvac_map_byval(set->fan,
@ -1074,11 +1114,18 @@ miel_hvac_sensor(struct miel_hvac_softc *sc)
if (sc->sc_temp.type != 0) {
const struct miel_hvac_data_roomtemp *rt =
&sc->sc_temp.data.roomtemp;
unsigned int temp = miel_hvac_roomtemp2deg(rt->temp);
char room_temp[33];
dtostrfd(ConvertTemp(temp),
Settings->flag2.temperature_resolution, room_temp);
if(rt->temp05 == 0) {
unsigned int temp = miel_hvac_roomtemp2deg(rt->temp);
dtostrfd(ConvertTemp(temp),
Settings->flag2.temperature_resolution, room_temp);
}
else {
temp_type = true;
float temp = miel_hvac_roomtemp2deg(rt->temp05);
dtostrfd(ConvertTemp(temp),
Settings->flag2.temperature_resolution, room_temp);
}
ResponseAppend_P(PSTR("\"" D_JSON_TEMPERATURE "\":%s"),
room_temp);

View File

@ -128,7 +128,6 @@ print("".join(pin))
// for testing of BLE_ESP32, we remove xsns_62_MI_ESP32.ino completely, and instead add this modified xsns_52_ibeacon_BLE_ESP32.ino
#if CONFIG_IDF_TARGET_ESP32
#if ESP_IDF_VERSION <= ESP_IDF_VERSION_VAL(4, 0, 0)
#ifdef USE_EQ3_ESP32
#ifdef ESP32 // ESP32 only. Use define USE_HM10 for ESP8266 support
#ifdef USE_BLE_ESP32
@ -226,7 +225,7 @@ uint8_t pairing = 0;
#define EQ3_NUM_DEVICESLOTS 16
eq3_device_tag EQ3Devices[EQ3_NUM_DEVICESLOTS];
void *EQ3mutex = nullptr;
SemaphoreHandle_t EQ3mutex = nullptr;
int EQ3Period = 300;
uint8_t EQ3OnlyAliased = 0;
@ -1765,5 +1764,4 @@ bool Xdrv85(uint8_t function)
#endif // ESP32
#endif
#endif // ESP_IDF_VERSION <= ESP_IDF_VERSION_VAL(4, 0, 0)
#endif // CONFIG_IDF_TARGET_ESP32

View File

@ -55,7 +55,7 @@ void Core2DisplayDim(uint8_t dim);
#ifndef DISP_DESC_FILE
//#define DISP_DESC_FILE "/dispdesc.txt"
#define DISP_DESC_FILE "/display.ini"
#endif
#endif // DISP_DESC_FILE
/*********************************************************************************************/
#ifdef DSP_ROM_DESC
@ -95,7 +95,7 @@ int8_t cs;
AddLog(LOG_LEVEL_INFO, PSTR("DSP: File descriptor used"));
}
}
#endif
#endif // USE_UFILESYS
#ifdef USE_SCRIPT
@ -212,8 +212,8 @@ int8_t cs;
replacepin(&cp, Pin(GPIO_SPI_CLK, 1));
replacepin(&cp, Pin(GPIO_SPI_MOSI, 1));
replacepin(&cp, Pin(GPIO_SPI_DC, 1));
replacepin(&cp, Pin(GPIO_BACKLIGHT, 1));
replacepin(&cp, Pin(GPIO_OLED_RESET, 1));
replacepin(&cp, Pin(GPIO_BACKLIGHT));
replacepin(&cp, Pin(GPIO_OLED_RESET));
replacepin(&cp, Pin(GPIO_SPI_MISO, 1));
} else {
// soft spi pins
@ -280,9 +280,9 @@ int8_t cs;
else FT5206_Touch_Init(Wire1);
#else
if (!wire_n) FT5206_Touch_Init(Wire);
#endif
#endif // ESP32
}
#endif
#endif // USE_FT5206
#ifdef USE_XPT2046
cp = strstr(ddesc, ":TS,");
@ -291,7 +291,7 @@ int8_t cs;
uint8_t touch_cs = replacepin(&cp, Pin(GPIO_XPT2046_CS));
XPT2046_Touch_Init(touch_cs);
}
#endif
#endif // USE_XPT2046
uint8_t inirot = Settings->display_rotate;
@ -314,18 +314,18 @@ int8_t cs;
#ifdef USE_M5STACK_CORE2
renderer->SetPwrCB(Core2DisplayPower);
renderer->SetDimCB(Core2DisplayDim);
#endif
#endif // USE_M5STACK_CORE2
renderer->DisplayInit(DISPLAY_INIT_MODE, Settings->display_size, inirot, Settings->display_font);
Settings->display_width = renderer->width();
Settings->display_height = renderer->height();
ApplyDisplayDimmer();
#ifdef SHOW_SPLASH
renderer->Splash();
#endif
#endif // SHOW_SPLASH
udisp_init_done = true;
AddLog(LOG_LEVEL_INFO, PSTR("DSP: %s!"), renderer->devname());

View File

@ -1555,16 +1555,22 @@ void SML_Decode(uint8_t index) {
double vdiff = meter_vars[ind - 1] - dvalues[dindex];
dvalues[dindex] = meter_vars[ind - 1];
double dres = (double)360000.0 * vdiff / ((double)dtime / 10000.0);
#ifdef USE_SML_MEDIAN_FILTER
if (meter_desc_p[mindex].flag & 16) {
meter_vars[vindex] = sml_median(&sml_mf[vindex], dres);
} else {
meter_vars[vindex] = dres;
}
#else
meter_vars[vindex] = dres;
#endif
dvalid[vindex] += 1;
if (dvalid[vindex] >= 2) {
// differece is only valid after 2. calculation
dvalid[vindex] = 2;
#ifdef USE_SML_MEDIAN_FILTER
if (meter_desc_p[mindex].flag & 16) {
meter_vars[vindex] = sml_median(&sml_mf[vindex], dres);
} else {
meter_vars[vindex] = dres;
}
#else
meter_vars[vindex] = dres;
#endif
}
mp=strchr(mp,'@');
if (mp) {
mp++;
@ -1573,7 +1579,7 @@ void SML_Decode(uint8_t index) {
SML_Immediate_MQTT((const char*)mp, vindex, mindex);
}
}
dvalid[vindex] = 1;
//dvalid[vindex] = 1;
dindex++;
}
} else if (*mp == 'h') {
@ -2212,7 +2218,9 @@ uint8_t *script_meter;
#ifdef SML_REPLACE_VARS
#ifndef SML_SRCBSIZE
#define SML_SRCBSIZE 256
#endif
uint32_t SML_getlinelen(char *lp) {
uint32_t cnt;
@ -2404,10 +2412,53 @@ dddef_exit:
script_meter_desc[index].tsecs = strtol(lp, &lp, 10);
if (*lp == ',') {
lp++;
char txbuff[256];
#if 1
// look ahead
uint16_t txlen = 0;
uint16_t tx_entries = 1;
char *txp = lp;
while (*txp) {
if (*txp == ',') tx_entries++;
if (*txp == SCRIPT_EOL) {
if (tx_entries > 1) {
if (*(txp - 1) != ',' ) {
break;
}
// line ends with ,
} else {
// single entry
break;
}
}
txp++;
txlen++;
}
if (txlen) {
script_meter_desc[index].txmem = (char*)calloc(txlen + 2, 1);
if (script_meter_desc[index].txmem) {
// now copy send blocks
char *txp = lp;
uint16_t tind = 0;
for (uint32_t cnt = 0; cnt < txlen; cnt++) {
if (*txp == SCRIPT_EOL) {
txp++;
} else {
script_meter_desc[index].txmem[tind] = *txp++;
tind++;
}
}
}
//AddLog(LOG_LEVEL_INFO, PSTR(">>> %s - %d"), script_meter_desc[index].txmem, txlen);
script_meter_desc[index].index = 0;
script_meter_desc[index].max_index = tx_entries;
sml_send_blocks++;
lp += txlen;
}
#else
char txbuff[SML_SRCBSIZE];
uint32_t txlen = 0, tx_entries = 1;
for (uint32_t cnt = 0; cnt < sizeof(txbuff); cnt++) {
if (*lp == SCRIPT_EOL) {
if (*lp == SCRIPT_EOL && *(lp - 1) != ',' ) {
txbuff[cnt] = 0;
txlen = cnt;
break;
@ -2424,6 +2475,7 @@ dddef_exit:
script_meter_desc[index].max_index = tx_entries;
sml_send_blocks++;
}
#endif
}
}
if (*lp == SCRIPT_EOL) lp--;

View File

@ -2741,9 +2741,8 @@ void MI32ShowOneMISensor(){
kMI32DeviceType[p->type-1],
p->MAC[3], p->MAC[4], p->MAC[5]);
}
char SensorTopic[60];
sprintf(SensorTopic, "tele/tasmota_ble/%s",
id);
char SensorTopic[TOPSZ];
GetTopic_P(SensorTopic, TELE, (char*)"tasmota_ble", id);
MqttPublish(SensorTopic, Settings->flag.mqtt_sensor_retain);
//AddLog(LOG_LEVEL_DEBUG,PSTR("M32: %s: show some %d %s"),D_CMND_MI32, MI32.mqttCurrentSlot, ResponseData());
@ -2868,10 +2867,8 @@ void MI32DiscoveryOneMISensor(){
p->MAC[3], p->MAC[4], p->MAC[5]);
}
char SensorTopic[60];
sprintf(SensorTopic, "tele/tasmota_ble/%s",
id);
char SensorTopic[TOPSZ];
GetTopic_P(SensorTopic, TELE, (char*)"tasmota_ble", id);
//int i = p->nextDiscoveryData*3;
for (int i = 0; i < datacount*3; i += 3){
@ -3063,7 +3060,7 @@ void MI32ShowTriggeredSensors(){
#endif //USE_HOME_ASSISTANT
MI32.option.MQTTType == 1
){
char SensorTopic[60];
char SensorTopic[TOPSZ];
char idstr[32];
const char *alias = BLE_ESP32::getAlias(p->MAC);
const char *id = idstr;
@ -3074,7 +3071,7 @@ void MI32ShowTriggeredSensors(){
kMI32DeviceType[p->type-1],
p->MAC[3], p->MAC[4], p->MAC[5]);
}
snprintf_P(SensorTopic, sizeof(SensorTopic), PSTR("tele/tasmota_ble/%s"), id);
GetTopic_P(SensorTopic, TELE, (char*)"tasmota_ble", id);
MqttPublish(SensorTopic, Settings->flag.mqtt_sensor_retain);
AddLog(LOG_LEVEL_DEBUG, PSTR("M32: triggered %d %s"), sensor, ResponseData());
XdrvRulesProcess(0);