How do you remap wizmote buttons with json file in 0.15?

New user here, enjoying faffing around with wled, but don’t know what I’m doing.

I have just updated my dig2go with 0.15 in order to remap the on/off/night light buttons.
I could not find how to do this in the ESP-NOW section, are you supposed to upload the file in the IR remote section?

Also does anyone have an example of a json file for the wizmote that I could modify as I don’t know the button codes. Neither google nor chatgpt were very helpful.

Thanks!

I have a write-up. here:

you can also find examples in the remote-json folder

Thanks for the reply and the link, but is this code separate from 0.15 or is this part of 0.15 now? Also where I am supposed to upload the json file to?

If you go to: http:///edit, you’ll see all the “files” saved internally for the WLED install.
Type “remote.json” after the “/” in the empty white box, then click “Create”. That will create an empty “remote.json” file in the list.
Click on that file entry and it’s content will appear in the edit window (probably a single “.”).
Delete the current contents and copy in the contents from your created, Remote.Wiz file.
Click Save to save it the the ESP.
Reboot to ESP to promote the changes.

it is seperate but the description contains the part about how to remap using remote.json

Thanks for the step by step walkthrough, all working now!

Ah of course, thanks, I used your remote.json as a template to get it to work.

if you want you can update the documentation for others. GitHub - Aircoookie/WLED-Docs: Documentation for the WLED project (kno.wled.ge)

Sound good, for now I’ve added the answer to wled reddit so at least it’s googleable!
Unfortunately either I’m doing something wrong or there is a bug, as uploading the remote.json even if I don’t change anything has stopped some of my preset apis from working. Specfically any api call to cycle through a list of presets doesn’t work anymore. In fact any api that does action on repeated button presses doesn’t seem to work anymore. Deleting the remote.json restores the functionality.

Even more strangely, applying the http api: P1=100&P2=102&PL=~ to a preset linked to a wizmote button will call the 100 preset on button press but won’t recognise any further button presses, but the json equivalent: {“ps”:“100~102~”} won’t even recognise the first button press, nothing happens.

I have it up and running and all preset triggering works, but I use json commands in the remote file to cycle presets instead of calling a preset to cycle presets
if you just want to call a preset, there is no need for the remote.json file. also keys you do not specify in the remote should use the default action.

Thanks for the tips! Moving the commands from the presets to the json file seems to work. Calling api in the presets associated with the remote’s buttons as defined in a remote.json does not work as expected. Api in unrelated presets still seems to work. I’m using the remote.json to repurpose the off & night light buttons.

Interestingly I can change the preset while the lights are off now but maybe that was always the case.

I was wondering, have you stripped the white space from your remote.json file? I have to do that regularly to my preset file to stop it getting corrupted and I noticed the cfg.json also has no whitespace.

yes, no white space.

ok thanks.