paulw11 / homebridge-wiser

Clipsal C-Bus Wiser plugin for home bridge
MIT License
11 stars 5 forks source link

Dimming up flashes at 100% #11

Closed daniellisoff closed 3 years ago

daniellisoff commented 3 years ago

Hi, When dimming up a light from OFF to any low setting, flashes the lights at 100% before setting at the correct brightness. This is also evident in the debug logs.

When level is selected manually:

[1/8/2021, 05:08:45] [Wiser] Setting switch to true [1/8/2021, 05:08:45] [Wiser] [1/8/2021, 05:08:45] [Wiser] [1/8/2021, 05:08:45] [Wiser] Setting group Bathroom(7) to 53 [1/8/2021, 05:08:45] [Wiser] New brightness = 20 [1/8/2021, 05:08:45] [Wiser] Setting group Bathroom(7) to 255 [1/8/2021, 05:08:45] [Wiser] New brightness = 100 [1/8/2021, 05:08:45] [Wiser] New brightness = 32 [1/8/2021, 05:08:45] [Wiser] Setting dimmer to 32 [1/8/2021, 05:08:45] [Wiser] [1/8/2021, 05:08:45] [Wiser] [1/8/2021, 05:08:45] [Wiser] Setting group Bathroom(7) to 81 [1/8/2021, 05:08:45] [Wiser] New brightness = 31

When level is set via a scene:

[1/8/2021, 05:07:30] [Wiser] Setting switch to true [1/8/2021, 05:07:30] [Wiser] [1/8/2021, 05:07:30] [Wiser] [1/8/2021, 05:07:30] [Wiser] Setting group Bed - WR(0) to 76 [1/8/2021, 05:07:30] [Wiser] New brightness = 29 [1/8/2021, 05:07:30] [Wiser] Setting group Living Sensor(1) to 0 [1/8/2021, 05:07:30] [Wiser] Setting group Bed - WR(0) to 255 [1/8/2021, 05:07:30] [Wiser] New brightness = 100

It appears that the first command is always 'seton' before immediately issuing a 'setbrightness' command which is sometimes ignored as per scene example.

paulw11 commented 3 years ago

Unfortunately I had to revert this change. When you turn on a dimmer by tapping from the Home app it sends an "on" followed by a "set brightness to 100%", so that works fine. When you ask Siri "turn on XXX", only an "on" command is issued, resulting in the light coming on at 1%. For the moment I have reverted the old behaviour.

paulw11 commented 3 years ago

This issue is fixed in version 2.0