-
-
Notifications
You must be signed in to change notification settings - Fork 3.5k
/json/state updates with v: true not published to MQTT #4643
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
AFAIK WLED has not special treatment for HA. If HA uses the API incorrectly, not much we can do. |
There are two aspects when MQTT message is not published: one is cooldown the other is WS only notification. |
Thanks for the response, after some digging intro the HA code I isolated the problem, updates are not sent when |
This is intentional. "v" is verbose response, meaning client is interested in getting the state response. |
But then what's the point of subscribing to MQTT? Whoever subscribed is also interested in the same info. Moreover, websocket clients get the updates even when "v" is set, why are they different than MQTT clients? |
Not my code and can't judge why it was implemented so. Feel free to provide a patch. |
What happened?
When the
"v": true
option is passed to/json/state
API, the updated values are not published to MQTT. If"v"
is missing then the MQTT updates are published as expected.This is always reproducible under both 0.15.1.beta2 and 0.14.4.
To Reproduce Bug
curl -X POST "http://<host>/json/state" -d '{"bri": 91, "on": true,"v":true}' -H "Content-Type: application/json"
curl -X POST "http://<host>/json/state" -d '{"bri": 100, "on": true}' -H "Content-Type: application/json"
Expected Behavior
Updates with
"v": true
should be published to MQTT.Install Method
Binary from WLED.me
What version of WLED?
0.15.1.beta2
Which microcontroller/board are you seeing the problem on?
ESP32
Relevant log/trace output
Anything else?
No response
Code of Conduct
The text was updated successfully, but these errors were encountered: