WLED icon indicating copy to clipboard operation
WLED copied to clipboard

WIP: enhance Serial API JSON

Open JonnyTech opened this issue 1 year ago • 4 comments

The Serial API for JSON currently does not support writing to cfg.json - this is an attempt to add it with code taken from wled_server.cpp - feedback and guidance is needed please because as I am non-developer there is something wrong with my implementation that I cannot figure out.

JonnyTech avatar Apr 29 '24 07:04 JonnyTech

Hello. I am still trying to figure this out. Are there any developers who can provide some input, please. FYI there is a discourse chat too: https://wled.discourse.group/t/11728 if that is easier, and there is interest from at least another user here https://wled.discourse.group/t/11683/16/ - thank you in advance.

JonnyTech avatar May 01 '24 08:05 JonnyTech

Hey! This pull request has been open for quite some time without any new comments now. It will be closed automatically in a week if no further activity occurs. Thank you for contributing to WLED! ❤️

github-actions[bot] avatar Aug 29 '24 12:08 github-actions[bot]

Is anybody able to help or comment, please? This is currently a showstopper for me to use WLED.

JonnyTech avatar Aug 29 '24 14:08 JonnyTech

Why don't you use Improv? It is used to configure WiFi and may be repurposed to configure Ethernet.

BTW I do not use JSON over serial so can't help you there.

blazoncek avatar Aug 29 '24 17:08 blazoncek

I think this should be tackled and should be expanded. At the moment, you are missing alot of important features with json over serial. All get routes (https://kno.wled.ge/interfaces/json-api/#api) are unavailable except State, Info, Effects and Palettes. (By setting "v": true in a post request). And you can't choose to get only some of this data.

Furthermore (And this seems an issue for the normal json api aswell), presets aren't exposed by the json api and are instead requested by calling /presets.json, making a change can then be done by settings the current state to something and posting psave to the json api. This seems clunky to me and you cant create a preset without altering the state, like you can with playlists. It also sets n (name), ib, sb and sc (various booleans) Which seem undocumented. Now, presets.json Can't seem to be called from json over serial, which seems like a clear oversight. Why would I want to cycle to a different preset when I don't even know which presets exists. Idem for creating playlists

joosthoi1 avatar Jan 03 '25 15:01 joosthoi1