Closed rfkd closed 3 years ago
I was also not able to set the brightness via mqtt. Instead of {"command":"brightness_up"}
try {"command":"level_up"}
. That was working for me. See #666 for a fix.
Actually I was not setting the "command" key at all, the "command" key from the log above was set by MiLight Hub in the update topic. However when setting the "command" key to "level_up/down" via mosquitto_pub -t milight/commands/0xABCD/rgb/1 -m '{"command":"level_down"}'
as you suggested it's at least possible to control the brightness, so thanks for that. But shouldn't it be possible to directly set the "level" key as well (by using mosquitto_pub -t milight/commands/0xABCD/rgb/1 -m '{"level":10}'
)?
By the way, setting the mode also works similar with e.g. mosquitto_pub -t milight/commands/0xABCD/rgb/1 -m '{"command":"next_mode"}'
, thanks again.
It should be possible to set the value directly, with a few caveats:
looking at the code, it's possible something is broken with this, will take a look.
Does look like this was a bug -- will fix it in the next patch release (should go out this morning).
Describe the bug
First of all, controlling my FUT027 (remote type RGB) via the MiLight Hub web interface completely works without any problems, thanks for that. Unfortunately I'm neither able to control the brightness of the LED strip nor receive (or change) the mode via MQTT, although controlling hue and state works just fine via MQTT.
When sending a specific level the LED brightness is actually increased by that level instead of it being applied directly. As sending negative levels has no impact I see no way to reduce the brightness via MQTT.
The "mode" key is not even part of the JSON string although it's enabled in the settings.
Steps to reproduce
mosquitto_pub -t milight/commands/0xABCD/rgb/1 -m '{"level":10}'
).MQTT result is:
Expected behavior
Setup information
Firmware version
See below.
Output of http://milight-hub.local/about
Output of http://milight-hub.local/settings
Additional context
None.