From 5086863322a24f22050fefc58641df27e7963c29 Mon Sep 17 00:00:00 2001 From: Theo Arends <11044339+arendst@users.noreply.github.com> Date: Sat, 5 Jul 2025 15:57:51 +0200 Subject: [PATCH] Add commands `LoRaWanDecoder "` and `LoRaWanName "` to clear name (#23394) --- CHANGELOG.md | 1 + RELEASENOTES.md | 1 + tasmota/tasmota_xdrv_driver/xdrv_73_8_lorawan_bridge.ino | 6 ++++-- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 49a1e98a6..446d7375b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ All notable changes to this project will be documented in this file. - NeoPool add Redox tank alarm (#19811) - Berry f-strings now support ':' in expression (#23618) - Universal display driver for ZJY169S0800TG01 ST7789 280x240 (#23638) +- Commands `LoRaWanDecoder "` and `LoRaWanName "` to clear name (#23394) ### Breaking Changed diff --git a/RELEASENOTES.md b/RELEASENOTES.md index 86a82cf5c..905489462 100644 --- a/RELEASENOTES.md +++ b/RELEASENOTES.md @@ -116,6 +116,7 @@ The latter links can be used for OTA upgrades too like ``OtaUrl https://ota.tasm ## Changelog v15.0.1.1 ### Added +- Commands `LoRaWanDecoder "` and `LoRaWanName "` to clear name (#23394)[#23394](https://github.com/arendst/Tasmota/issues/23394) - Universal display driver for ZJY169S0800TG01 ST7789 280x240 [#23638](https://github.com/arendst/Tasmota/issues/23638) - NeoPool add Redox tank alarm [#19811](https://github.com/arendst/Tasmota/issues/19811) - I2S additions [#23543](https://github.com/arendst/Tasmota/issues/23543) diff --git a/tasmota/tasmota_xdrv_driver/xdrv_73_8_lorawan_bridge.ino b/tasmota/tasmota_xdrv_driver/xdrv_73_8_lorawan_bridge.ino index d45e27cd6..de0443077 100644 --- a/tasmota/tasmota_xdrv_driver/xdrv_73_8_lorawan_bridge.ino +++ b/tasmota/tasmota_xdrv_driver/xdrv_73_8_lorawan_bridge.ino @@ -1075,6 +1075,7 @@ void CmndLoraWanName(void) { // LoraWanName - Show current name // LoraWanName 1 - Set to short DevEUI (or 0x0000 if not yet joined) // LoraWanName2 LDS02a + // LoraWanName2 " - Clear name if ((XdrvMailbox.index > 0) && (XdrvMailbox.index <= Lora->nodes)) { uint32_t node = XdrvMailbox.index -1; if (XdrvMailbox.data_len) { @@ -1083,7 +1084,7 @@ void CmndLoraWanName(void) { ext_snprintf_P(name, sizeof(name), PSTR("0x%04X"), Lora->settings.end_node[node]->DevEUIl & 0x0000FFFF); Lora->settings.end_node[node]->name = name; } else { - Lora->settings.end_node[node]->name = XdrvMailbox.data; + Lora->settings.end_node[node]->name = ('"' == XdrvMailbox.data[0]) ? "" : XdrvMailbox.data; } } ResponseCmndIdxChar(Lora->settings.end_node[node]->name.c_str()); @@ -1095,10 +1096,11 @@ void CmndLoraWanDecoder(void) { // LoraWanDecoder<1..16> // LoraWanDecoder LDS02 - Set Dragino LDS02 message decoder for node 1 // LoraWanDecoder2 DW10 - Set MerryIoT DW10 message decoder for node 2 + // LoraWanDecoder2 " - Clear decoder name if ((XdrvMailbox.index > 0) && (XdrvMailbox.index <= Lora->nodes)) { uint32_t node = XdrvMailbox.index -1; if (XdrvMailbox.data_len) { - Lora->settings.end_node[node]->decoder = XdrvMailbox.data; + Lora->settings.end_node[node]->decoder = ('"' == XdrvMailbox.data[0]) ? "" : XdrvMailbox.data; } ResponseCmndIdxChar(Lora->settings.end_node[node]->decoder.c_str()); }