Aircoookie / WLED

Control WS2812B and many more types of digital RGB LEDs with an ESP8266 or ESP32 over WiFi!
https://kno.wled.ge
MIT License
14.2k stars 3.03k forks source link

Websocket response when changing the parameters Target brightness and Target time when setting the timer #4007

Closed VolchkovVlad closed 1 month ago

VolchkovVlad commented 1 month ago

What happened?

When sending parameters such as nl.tbri and so nl.dr WLED responds with {"success":true}

To Reproduce Bug

Connect to WLED via WebSocket, send {"nl":{"tbri":255}} or {"nl":{"dur":3}}

Expected Behavior

Снимок экрана 2024-05-30 в 01 12 32

Install Method

Binary from WLED.me

What version of WLED?

"0.15.0-b2" build 2404100

Which microcontroller/board are you seeing the problem on?

ESP32

Relevant log/trace output

No response

Anything else?

Output from POSTMAN

Снимок экрана 2024-05-30 в 01 30 42

Code of Conduct

blazoncek commented 1 month ago

You need to add "verbose" command, "v":true.

VolchkovVlad commented 1 month ago

"v":true will simply return the current state. I have no problem getting the current state. I'm just pointing out the inconsistency of the documentation

blazoncek commented 1 month ago

You are missing the crucial detail. When you send JSON API via websockets and do not include "v":true you will only get {"success":true} or {"error":X} as a response (in that session) but a websocket broadcast (to all clients) that will follow will include state and info.

VolchkovVlad commented 1 month ago

No, I am sending data without "v:true". In response, I receive /json/si. Again, the documentation says that you need to use v:true only to provide additional information. Nowhere does it say that this is a mandatory key

blazoncek commented 1 month ago

You are welcome to update documentation if you feel it is incorrect.

VolchkovVlad commented 1 month ago

If there is such a problem with people, we can discuss it. But in my opinion, developers should write documentation

blazoncek commented 1 month ago

If you pay me, perhaps I will. Or someone else for that matter. Until then WLED is a collaboration project where people contribute out of their free will without any compensation. That is also why you get to use (and abuse) WLED for free.

VolchkovVlad commented 1 month ago

What does the payment have to do with it? I just pointed out an inaccuracy in the documentation. (go to the data exchange protocol) and that's it. I don't demand to fix it urgently. I'm just sharing what I saw, maybe it will help the development of the project.

I have bypassed this problem, it does not bother me.