rogierhofboer / com.ikea.tradfri.gateway

Athom Homey App for the IKEA Tradfri Gateway
MIT License
19 stars 21 forks source link

Group "off" doesn't update in Homey #9

Closed json81 closed 5 years ago

json81 commented 5 years ago

Version 0.0.8.

If using IKEA Trådfri App or five button remote to set a group to "off", Homey doesn't update it's value for the group. "On" and "dimmer" values works as expected. As you can see in the log, "Off" command doesn't change the group value correctly.

Example using Trådfri App:

Group set to 100%: 2018-10-31 19:59:13 [log] [IkeaTradfriGatewayApp] Light 1 updated 2018-10-31 19:59:13 [log] [IkeaTradfriGatewayApp] Light 2 updated 2018-10-31 19:59:13 [log] [IkeaTradfriGatewayApp] Light 2 updated 2018-10-31 19:59:13 [log] [IkeaTradfriGatewayApp] Light 1 updated 2018-10-31 19:59:14 [log] [IkeaTradfriGatewayApp] Light 1 updated 2018-10-31 19:59:14 [log] [IkeaTradfriGatewayApp] Light 2 updated 2018-10-31 19:59:14 [log] [ManagerDrivers] [group] [6] Adjusting dim value based on avg by devices: 100

Group set to 50.8%: 2018-10-31 20:00:24 [log] [IkeaTradfriGatewayApp] Light 2 updated 2018-10-31 20:00:24 [log] [IkeaTradfriGatewayApp] Light 1 updated 2018-10-31 20:00:24 [log] [ManagerDrivers] [group] [6] Adjusting dim value based on avg by devices: 50.8 2018-10-31 20:00:25 [log] [IkeaTradfriGatewayApp] Light 2 updated 2018-10-31 20:00:25 [log] [IkeaTradfriGatewayApp] Light 1 updated 2018-10-31 20:00:25 [log] [ManagerDrivers] [group] [6] Adjusting dim value based on avg by devices: 50.8

Group set to "Off": 2018-10-31 20:00:54 [log] [IkeaTradfriGatewayApp] Light 2 updated 2018-10-31 20:00:54 [log] [IkeaTradfriGatewayApp] Light 1 updated 2018-10-31 20:00:54 [log] [ManagerDrivers] [group] [6] Adjusting dim value based on avg by devices: 50.8

slasktrat commented 5 years ago

I have a fix for this ready. Will push soon :)

slasktrat commented 5 years ago

Correction. I have a fix that improves this, but there is also a bug in the IKEA gateway (or the library in between) where sometimes status is not updated for every bulb in the group/only some bulbs get new status. And when this occurs both dim calculation and on/off may be incorrect. Also turning off with 5 button remote tends to not trigger updates of bulb statuses. This bug also is present in the official IKEA app.

json81 commented 5 years ago

I have not seen the behavior you are describing. When using Trådfri App or 5-button, all my bulbs set the dim value / on / off normal. I can sometimes see status delays in Trådfri app if I use the 5-button, but it still updates correctly. Will have to try more.