Homematic Dimmer "flashing" for every "on" state
ronny332 opened this issue · 2 comments
Hi,
it's more a request for a code change than a bug report.
Please check line 1177:
this.mappings.On = { reading: 'pct', valueOff: '0', cmdOn: 'on', cmdOff: 'off' };
The 'on" for 'cmdOn' creates a very aggressive flashing of the device, especially when you are using a light source with lots of power.
In my case changing the line to
this.mappings.On = { reading: 'pct', valueOff: '0', cmdOn: '1', cmdOff: 'off' };
makes me really satisfied.
The device is starting at the lowest step and raises up to the desired value.
the problem is that homekit sends an on cmd before the pct command. this is regarded by most as a bug in homekit. with your change a normal on will not work anymore.
the current workaround is to use cmdalias in fhem to ignore the on cmd in certain circumstances.
i will try to change homebridge-fhem to ignore the on cmd if it arrives immediately before or after the pct.
thill then you can use the homebridgeMapping attribute to get your desired behavior.
Hi,
yeah, I understand what you mean, but for the used dimmers in my case (HM-LC-DIM1T-FM) this does not happen. Even with a command which sets the dimmer just to "on", the light starts at 1% and raises within 2-3 seconds to 100%.
This is what exactly is sent to the running FHEM instance:
[10/12/2017, 10:28:15 PM] [fhem] hm_dim_wzUnten: executing set cmd for On with value true [10/12/2017, 10:28:15 PM] [fhem] executing: http://127.0.0.1:8083/fhem?cmd=set%20hm_dim_wzUnten%201&XHR=1 [10/12/2017, 10:28:15 PM] [fhem] hm_dim_wzUnten delaying command Brightness with value 100 2017-10-12 22:28:15 caching: hm_dim_wzUnten-pct: 0.5 [10/12/2017, 10:28:15 PM] [fhem] caching: On: true (as boolean; from '0.5') [10/12/2017, 10:28:15 PM] [fhem] caching: Brightness: 1 (as number; from '0.5') [10/12/2017, 10:28:16 PM] [fhem] hm_dim_wzUnten: executing set cmd for Brightness with value 100 [10/12/2017, 10:28:16 PM] [fhem] executing: http://127.0.0.1:8083/fhem?cmd=set%20hm_dim_wzUnten%20pct%20100&XHR=1 2017-10-12 22:28:16 caching: hm_dim_wzUnten-pct: 1.5 [10/12/2017, 10:28:16 PM] [fhem] caching: On: true (as boolean; from '1.5') [10/12/2017, 10:28:16 PM] [fhem] caching: Brightness: 2 (as number; from '1.5')