diff --git a/CHANGELOG.md b/CHANGELOG.md index 53ec3fae0..af2888d71 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -25,6 +25,7 @@ All notable changes to this project will be documented in this file. - HASPmota fix and improve demo with pixel-perfect fonts (#20734) - NeoPool webUI pH alarms (4 & 5) completed (#20743) - Matter reduce memory usage when reading with wildcards (#20809) +- Prevent shutter MQTT broadcast with activated ShutterLock ### Fixed - ESP32 PWM activity on unconfigured PWM GPIOs (#20732) diff --git a/tasmota/tasmota_xdrv_driver/xdrv_27_esp32_shutter.ino b/tasmota/tasmota_xdrv_driver/xdrv_27_esp32_shutter.ino index f05f5e5b2..283be9951 100644 --- a/tasmota/tasmota_xdrv_driver/xdrv_27_esp32_shutter.ino +++ b/tasmota/tasmota_xdrv_driver/xdrv_27_esp32_shutter.ino @@ -294,7 +294,7 @@ bool ShutterButtonHandlerMulti(void) // reset button to default Button.press_counter[button_index] = 0; - + CmndShutterPosition(); } @@ -303,7 +303,7 @@ bool ShutterButtonHandlerMulti(void) char scommand[CMDSZ]; char stopic[TOPSZ]; for (uint32_t i = 0; i < MAX_SHUTTERS_ESP32; i++) { - if ((i==shutter_index) || (ShutterSettings.shutter_button[button_index].mqtt_all)) { + if (((i==shutter_index) || (ShutterSettings.shutter_button[button_index].mqtt_all)) && 0 == (ShutterSettings.shutter_options[i] & 2) ) { snprintf_P(scommand, sizeof(scommand),PSTR("ShutterPosition%d"), i+1); GetGroupTopic_P(stopic, scommand, SET_MQTT_GRP_TOPIC); Response_P("%d", position); @@ -318,7 +318,7 @@ bool ShutterButtonHandlerMulti(void) ResponseAppend_P(JSON_SHUTTER_BUTTON, shutter_index+1, Shutter[shutter_index].button_simu_pressed ? 0 : button_index+1, button_press_counter); ResponseJsonEnd(); MqttPublishPrefixTopicRulesProcess_P(RESULT_OR_STAT, PSTR(D_PRFX_SHUTTER)); - + // reset simu pressed record Shutter[shutter_index].button_simu_pressed = 0; diff --git a/tasmota/tasmota_xdrv_driver/xdrv_27_shutter.ino b/tasmota/tasmota_xdrv_driver/xdrv_27_shutter.ino index c09284573..db1f622fb 100644 --- a/tasmota/tasmota_xdrv_driver/xdrv_27_shutter.ino +++ b/tasmota/tasmota_xdrv_driver/xdrv_27_shutter.ino @@ -1092,7 +1092,7 @@ bool ShutterButtonHandler(void) char scommand[CMDSZ]; char stopic[TOPSZ]; for (uint32_t i = 0; i < MAX_SHUTTERS; i++) { - if ((i==shutter_index) || (Settings->shutter_button[button_index] & (0x01<<30))) { + if ( ((i==shutter_index) || (Settings->shutter_button[button_index] & (0x01<<30))) && 0 == (Settings->shutter_options[i] & 2) ) { snprintf_P(scommand, sizeof(scommand),PSTR("ShutterPosition%d"), i+1); GetGroupTopic_P(stopic, scommand, SET_MQTT_GRP_TOPIC); Response_P("%d", position);