From f2a3b4ac6275beb5ca24e3f086b4bdd27dd186be Mon Sep 17 00:00:00 2001 From: Theo Arends <11044339+arendst@users.noreply.github.com> Date: Mon, 8 Dec 2025 15:13:32 +0100 Subject: [PATCH] Fix ArtNet single light color mapping using `ChannelRemap` (#24058) --- CHANGELOG.md | 4 +++- RELEASENOTES.md | 4 +++- tasmota/tasmota_xdrv_driver/xdrv_04_light_artnet.ino | 7 ++++++- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2b6951c50..4d2371706 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ All notable changes to this project will be documented in this file. - Support for Analog Gauges (#24153) - Support for MakeSkyBlue Solar Charger Energy Monitor (#24151) - Berry `tasmota.micros()` to get time in microseconds (#24192) +- Support for AGS02MA TVOC sensor (#24109) ### Breaking Changed @@ -20,7 +21,8 @@ All notable changes to this project will be documented in this file. - ESP32-P4 Hosted MCU updated to v2.6.6 solving WiFi boot issues (#24146) - ESP32-Solo1 using pre-compiled Arduino libraries (#24146) - PCA9685 V2 driver PWMTO fading logic and overflow (#24159) -- Fix RGBW handling in TasmotaLED and xlgt_01_ws2812_esp32 (#24172) +- RGBW handling in TasmotaLED and xlgt_01_ws2812_esp32 (#24172) +- ArtNet single light color mapping using `ChannelRemap` (#24058) ### Removed diff --git a/RELEASENOTES.md b/RELEASENOTES.md index a05835719..d60b05b1f 100644 --- a/RELEASENOTES.md +++ b/RELEASENOTES.md @@ -117,6 +117,7 @@ The latter links can be used for OTA upgrades too like ``OtaUrl https://ota.tasm - Support for ESP32-P4 rev.3 [#24146](https://github.com/arendst/Tasmota/issues/24118) - Support for Analog Gauges [#24153](https://github.com/arendst/Tasmota/issues/24153) - Support for MakeSkyBlue Solar Charger Energy Monitor [#24151](https://github.com/arendst/Tasmota/issues/24151) +- Support for AGS02MA TVOC sensor [#24109](https://github.com/arendst/Tasmota/issues/24109) - Commands `DaliSend` and `DaliQuery` allow extended commands with prefix for DeviceType defaulting to DT6 - ESP8266 GPIOViewer memory map if enabled with `#define GV_USE_ESPINFO` - HostedMCU file update using command `HostedLoad |` @@ -148,7 +149,8 @@ The latter links can be used for OTA upgrades too like ``OtaUrl https://ota.tasm - TuyaMCU v1 soft lock when WIFI_SELECT / WIFI_RESET is initiated [#24063](https://github.com/arendst/Tasmota/issues/24063) - PCA9685 V2 driver PWMTO fading logic and overflow [#24159](https://github.com/arendst/Tasmota/issues/24159) - DALI protocol errors -- Fix RGBW handling in TasmotaLED and xlgt_01_ws2812_esp32 [#24172](https://github.com/arendst/Tasmota/issues/24172) +- RGBW handling in TasmotaLED and xlgt_01_ws2812_esp32 [#24172](https://github.com/arendst/Tasmota/issues/24172) +- ArtNet single light color mapping using `ChannelRemap` [#24058](https://github.com/arendst/Tasmota/issues/24058) - TLS fix ECDSA and add `SetOption165 1` to enable ECDSA in addition to RSA [#24000](https://github.com/arendst/Tasmota/issues/24000) - ESP32-P4 Hosted MCU updated to v2.6.6 solving WiFi boot issues [#24146](https://github.com/arendst/Tasmota/issues/24118) - ESP32-Solo1 using pre-compiled Arduino libraries [#24146](https://github.com/arendst/Tasmota/issues/24118) diff --git a/tasmota/tasmota_xdrv_driver/xdrv_04_light_artnet.ino b/tasmota/tasmota_xdrv_driver/xdrv_04_light_artnet.ino index 142044766..0a2c8cf18 100644 --- a/tasmota/tasmota_xdrv_driver/xdrv_04_light_artnet.ino +++ b/tasmota/tasmota_xdrv_driver/xdrv_04_light_artnet.ino @@ -212,8 +212,13 @@ void ArtNetProcessPacket(uint8_t * buf, size_t len) { color[2] = changeUIntScale(b8, 0, 255, 0, b_dimmer); color[3] = changeUIntScale(w8, 0, 255, 0, w_dimmer); color[4] = changeUIntScale(ww8, 0, 255, 0, ww_dimmer); + // AddLog(LOG_LEVEL_DEBUG_MORE, PSTR("DMX: %02X-%02X-%02X univ=%i rows=%i max_univ=%i"), buf[idx+1], buf[idx], buf[idx+2], universe, row, artnet_conf.univ + artnet_conf.rows); - LightSetOutputs(color); + uint16_t mapped_color[LST_MAX] = {0}; + for (uint32_t i = 0; i < LST_MAX; i++) { + mapped_color[i] = color[Light.color_remap[i]]; + } + LightSetOutputs(mapped_color); } // AddLog(LOG_LEVEL_DEBUG_MORE, PSTR("DMX: ok universe=%i datalen=%i"), universe, datalen); artnet_conf.packet_accepted++;