What happened?
After I sent a small POST /json/cfg that only changed the LED power cap, the WiZmote I had paired stopped working. GET /json/cfg showed "linked_remote": [] where it had shown my remote's MAC before, and the empty list survived a reboot.
Reading wled00/cfg.cpp (deserializeConfig), this seems to be what the code does when the posted document has no nw object: linked_remotes.clear() runs before the lookup of nw.linked_remote, and the list is only refilled when that key is present.
JsonObject nw = doc["nw"];
#ifndef WLED_DISABLE_ESPNOW
CJSON(enableESPNow, nw[F("espnow")]);
linked_remotes.clear();
JsonVariant lrem = nw[F("linked_remote")];
if (!lrem.isNull()) {
The neighbouring lists in the same function (nw.ins, dns, hw.btn.ins, bus ins, timers) appear to be guarded by an isNull() check, so a partial POST leaves them alone. I may be missing a reason why the remote list is handled differently; if the JSON API is expected to always send the complete nw block, this is a documentation question rather than a bug, and I would be glad to know.
As far as I can tell from the history, the earlier single-remote code used getStringFromJson, which does not touch the variable when the key is absent, and the behaviour changed with the multi-remote support in #4654. I have not bisected that, it is from reading the diff.
To Reproduce Bug
- Pair a WiZmote via WiFi settings → Linked MACs, confirm
GET /json/cfg shows the MAC under nw.linked_remote.
curl -X POST -H 'Content-Type: application/json' -d '{"hw":{"led":{"maxpwr":4000}}}' http://<wled>/json/cfg
GET /json/cfg → "linked_remote": [], remote no longer reacts, still empty after reboot.
Sending the same POST with "nw":{"espnow":true,"linked_remote":["<mac>"]} included keeps the remote, which is what I do now as a workaround.
Expected Behavior
I expected a /json/cfg write to leave settings it does not mention unchanged, as it does for the WiFi list and the buttons. If that expectation is right, moving the clear() inside the if (!lrem.isNull()) block, or guarding the block with if (!nw.isNull()), would be one possible fix. Happy to open a PR if a maintainer confirms the intended behaviour.
Install Method
Self-Compiled
What version of WLED?
16.0.0 (build 2605030) on the device; the same lines are present in the 16.0.1 tag and in main as of 2026-10-03, which I only checked by reading, not by flashing.
Which microcontroller/board are you seeing the problem on?
ESP32
Relevant log/trace output
GET /json/cfg -> "nw":{"espnow":true,"linked_remote":["4cebd6203de7"], ...}
POST /json/cfg {"hw":{"led":{"maxpwr":4000}}} -> {"success":true}
GET /json/cfg -> "nw":{"espnow":true,"linked_remote":[], ...}
Anything else?
Seen from home automation that writes single settings over the JSON API. The settings web form is not affected as far as I can see, since it submits the whole list every time.
Update 2026-10-04
Same function, 4 more settings reset on a partial POST, different cause: hw.led.rgbwm, hw.led.fps, light.gc.bri and light.gc.col fall back to a constant when the key is missing (cfg.cpp L183, L189, L531, L532 on main). After a POST with only hw.led.maxpwr: fps 30 back to 42, auto-white mode back to disabled, Brightness Gamma off, a disabled colour Gamma on again, all written to cfg.json. Confirmed on ESP8266 with 16.0.1 and main. Details in the comments, fix is in #5885 as a second commit.
What happened?
After I sent a small
POST /json/cfgthat only changed the LED power cap, the WiZmote I had paired stopped working.GET /json/cfgshowed"linked_remote": []where it had shown my remote's MAC before, and the empty list survived a reboot.Reading
wled00/cfg.cpp(deserializeConfig), this seems to be what the code does when the posted document has nonwobject:linked_remotes.clear()runs before the lookup ofnw.linked_remote, and the list is only refilled when that key is present.The neighbouring lists in the same function (
nw.ins,dns,hw.btn.ins, busins, timers) appear to be guarded by anisNull()check, so a partial POST leaves them alone. I may be missing a reason why the remote list is handled differently; if the JSON API is expected to always send the completenwblock, this is a documentation question rather than a bug, and I would be glad to know.As far as I can tell from the history, the earlier single-remote code used
getStringFromJson, which does not touch the variable when the key is absent, and the behaviour changed with the multi-remote support in #4654. I have not bisected that, it is from reading the diff.To Reproduce Bug
GET /json/cfgshows the MAC undernw.linked_remote.curl -X POST -H 'Content-Type: application/json' -d '{"hw":{"led":{"maxpwr":4000}}}' http://<wled>/json/cfgGET /json/cfg→"linked_remote": [], remote no longer reacts, still empty after reboot.Sending the same POST with
"nw":{"espnow":true,"linked_remote":["<mac>"]}included keeps the remote, which is what I do now as a workaround.Expected Behavior
I expected a
/json/cfgwrite to leave settings it does not mention unchanged, as it does for the WiFi list and the buttons. If that expectation is right, moving theclear()inside theif (!lrem.isNull())block, or guarding the block withif (!nw.isNull()), would be one possible fix. Happy to open a PR if a maintainer confirms the intended behaviour.Install Method
Self-Compiled
What version of WLED?
16.0.0 (build 2605030) on the device; the same lines are present in the 16.0.1 tag and in main as of 2026-10-03, which I only checked by reading, not by flashing.
Which microcontroller/board are you seeing the problem on?
ESP32
Relevant log/trace output
Anything else?
Seen from home automation that writes single settings over the JSON API. The settings web form is not affected as far as I can see, since it submits the whole list every time.
Update 2026-10-04
Same function, 4 more settings reset on a partial POST, different cause:
hw.led.rgbwm,hw.led.fps,light.gc.briandlight.gc.colfall back to a constant when the key is missing (cfg.cpp L183, L189, L531, L532 on main). After a POST with onlyhw.led.maxpwr: fps 30 back to 42, auto-white mode back to disabled, Brightness Gamma off, a disabled colour Gamma on again, all written to cfg.json. Confirmed on ESP8266 with 16.0.1 and main. Details in the comments, fix is in #5885 as a second commit.