dvdgeisler / DirigeraClient

Dirigera Client API: Java written client API to interface IKEA's new smarthome hub DIRIGERA
MIT License
74 stars 9 forks source link

Brightness lost in MQTT client when turning lights of using the Dirigera/Home Smart IKEA app #100

Open Johboh opened 6 months ago

Johboh commented 6 months ago

Hi!

When turning a light off and on again using the app, the brightness is not reported on MQTT. To reproduce:

0a. Make sure to have some lights with brightness support connected to the Dirigera hub and then run dirigera-client-mqtt. 0b. Verify that the lights show up with color_mode: true and supported_color_modes: ['brightness']

  1. Using the Dirigera/Home Smart IKEA app, turn on a light and set brightness to 50%. Notice that the state is set to {"brightness": 50, "color": {} }
  2. Turn off the light using the app, the state is now: {"state": "OFF", "color": {} }
  3. Turn o the light again using the app: {"state": "ON", "color": {} }

The light is at 50% brightness, as the app will set the lamp to the latest brightness when turning on again, but the brightness is not reported in MQTT. Expected the brightness to be reported (as 50) when turning on the light again.

Lemme know if you want me to include some logs or test something and I will gladly do so.