SmartThingsEdgeDrivers icon indicating copy to clipboard operation
SmartThingsEdgeDrivers copied to clipboard

fix an issue of Fan device type sending command

Open pInksenberg opened this issue 1 year ago • 9 comments

Issue Description: We onboarding Yeelight Fan(bridged device) device to ST App, but we are unable to control device by sending fan mode or speed.

Problem Analysis: Upon reviewing the logs, it was found that the command send to a wrong endpoint (endpoint 0 for the yeelight bridge instead of endpoint 68 for the yeelight fan). It was caused by the local function "component_to_endpoint" in matter-thermostat/init.lua 158. We revised the edge driver by adding an "elseif" statement for returning Fan device type related endpoint. (As per Matter Device Library Spec, there are 3 device type in HVAC, including Thermostat, Fan and Air Purifier. However, It should be noted that the Fan device is currently absent from the function "component_to_endpoint".)

pInksenberg avatar Jul 11 '24 05:07 pInksenberg

(endpoint 0 for the yeelight bridge instead of endpoint 68 for the yeelight fan) -> (endpoint 1 for the yeelight bridge instead of endpoint 68 for the yeelight fan)

wangjinliang12345 avatar Jul 11 '24 10:07 wangjinliang12345

Invitation URL: https://bestow-regional.api.smartthings.com/invite/Q1jPLE7E4KjL

github-actions[bot] avatar Aug 01 '24 05:08 github-actions[bot]

Test Results

   60 files    375 suites   0s :stopwatch: 1 820 tests 1 820 :white_check_mark: 0 :zzz: 0 :x: 3 169 runs  3 169 :white_check_mark: 0 :zzz: 0 :x:

Results for commit fd231281.

github-actions[bot] avatar Aug 01 '24 05:08 github-actions[bot]

File Coverage
All files 80% :x:
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-thermostat/src/init.lua 82% :x:
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-thermostat/src/embedded-cluster-utils.lua 42% :x:

Minimum allowed coverage is 90%

Generated by :monkey: cobertura-action against fd231281781148f672348a50a2b2b030a097d713

github-actions[bot] avatar Aug 01 '24 05:08 github-actions[bot]

@ctowns could you plz help to review for the updated driver?

pInksenberg avatar Aug 07 '24 05:08 pInksenberg

Tagging @z-michel for awareness.

lelandblue avatar Aug 08 '24 13:08 lelandblue

this is issues from Yeelight WWST

wangjinliang12345 avatar Aug 09 '24 06:08 wangjinliang12345

@pInksenberg this has been approved and I think this is ready to merge. Can you confirm that this change has been tested and share the results? If it has been tested and is working, it can be merged.

ctowns avatar Aug 21 '24 14:08 ctowns

@ctowns I attached the test result in https://smartthings.atlassian.net/browse/MTR-780

pInksenberg avatar Aug 22 '24 03:08 pInksenberg

So can this change be merged? It looks like things are working as expected

hcarter-775 avatar Oct 02 '24 02:10 hcarter-775