iklein99 / homebridge-smartthings

This is a plugin to Homebridge to connect your Smartthings network into Apple Home Kit.
Apache License 2.0
150 stars 52 forks source link

Fanimation ceiling fans defined in SmartThings not discovered #221

Open dficken opened 9 months ago

dficken commented 9 months ago

Describe The Bug: I have 2 Fanimation ceiling fans and 1 Samsung TV defined in SmartThings. The plugin discovers and enables the TV, but not the ceiling fans

To Reproduce:

  1. Define fans in SmartThings
  2. Operate fans using SmartThings app (confirm SmartThings setup)
  3. Install and configure SmartThings Hombridge plugin
  4. Restart Homebridge

Expected behavior: Fans and TV instantiated in Homebridge

Logs: Attached

Plugin Config: Attached

Screenshots: None

Environment:

SmartThings.txt config.txt

iklein99 commented 8 months ago

@dficken , Thanks for the logs. I am looking into this now. It would seem from what you sent, the fan should be detected.

dficken commented 8 months ago

Thanks for the update. Please let me know if I can do anything more to help Thanks again, Dave Sent from my iPhoneOn Oct 7, 2023, at 11:16 AM, iklein99 @.***> wrote: @dficken , Thanks for the logs. I am looking into this now. It would seem from what you sent, the fan should be detected.

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: @.***>

iklein99 commented 8 months ago

@dficken , upgrade to 1.5.19 and give it a try. Please let me know how that works.

dficken commented 8 months ago

Fans are discovered, but light control is wrong (should be dimmable) 

And, controls don’t work

[10/9/2023, 4:54:16 PM] [Smartthings Plug (IK)] [{"capability":"switch","command":"on"}] failed for Lanai Dining Fan: AxiosError: Request failed with status code 422 [10/9/2023, 4:54:16 PM] [Smartthings Plug (IK)] Command failed for Lanai Dining Fan [10/9/2023, 4:54:19 PM] [Smartthings Plug (IK)] [{"capability":"fanSpeed","command":"setFanSpeed","arguments":[2]}] failed for Lanai Dining Fan: AxiosError: Request failed with status code 422 [10/9/2023, 4:54:19 PM] [Smartthings Plug (IK)] Failed to send setLevel command for Lanai Dining Fan [10/9/2023, 4:54:25 PM] [Smartthings Plug (IK)] [{"capability":"fanSpeed","command":"setFanSpeed","arguments":[3]}] failed for Lanai Living Fan: AxiosError: Request failed with status code 422 [10/9/2023, 4:54:25 PM] [Smartthings Plug (IK)] Failed to send setLevel command for Lanai Living Fan [10/9/2023, 4:54:25 PM] [Smartthings Plug (IK)] [{"capability":"fanSpeed","command":"setFanSpeed","arguments":[2]}] failed for Lanai Living Fan: AxiosError: Request failed with status code 422 [10/9/2023, 4:54:25 PM] [Smartthings Plug (IK)] Failed to send setLevel command for Lanai Living Fan [10/9/2023, 4:54:25 PM] [Smartthings Plug (IK)] [{"capability":"fanSpeed","command":"setFanSpeed","arguments":[2]}] failed for Lanai Living Fan: AxiosError: Request failed with status code 422 [10/9/2023, 4:54:25 PM] [Smartthings Plug (IK)] Failed to send setLevel command for Lanai Living Fan [10/9/2023, 4:54:25 PM] [Smartthings Plug (IK)] [{"capability":"fanSpeed","command":"setFanSpeed","arguments":[2]}] failed for Lanai Living Fan: AxiosError: Request failed with status code 422 [10/9/2023, 4:54:25 PM] [Smartthings Plug (IK)] Failed to send setLevel command for Lanai Living Fan [10/9/2023, 4:54:27 PM] [Smartthings Plug (IK)] [{"capability":"switch","command":"on"}] failed for Lanai Living Fan: AxiosError: Request failed with status code 422 [10/9/2023, 4:54:27 PM] [Smartthings Plug (IK)] Command failed for Lanai Living Fan [10/9/2023, 4:54:28 PM] [Smartthings Plug (IK)] [{"capability":"switch","command":"on"}] failed for Lanai Living Fan: AxiosError: Request failed with status code 422 [10/9/2023, 4:54:28 PM] [Smartthings Plug (IK)] Command failed for Lanai Living Fan [10/9/2023, 4:54:28 PM] [Smartthings Plug (IK)] [{"capability":"switch","command":"on"}] failed for Lanai Living Fan: AxiosError: Request failed with status code 422 [10/9/2023, 4:54:28 PM] [Smartthings Plug (IK)] Command failed for Lanai Living Fan [10/9/2023, 4:54:28 PM] [Smartthings Plug (IK)] [{"capability":"switch","command":"on"}] failed for Lanai Living Fan: AxiosError: Request failed with status code 422 [10/9/2023, 4:54:28 PM] [Smartthings Plug (IK)] Command failed for Lanai Living Fan

On Oct 9, 2023, at 1:47 PM, iklein99 @.***> wrote:

@dficken https://github.com/dficken , upgrade to 1.5.19 and give it a try. Please let me know how that works.

— Reply to this email directly, view it on GitHub https://github.com/iklein99/homebridge-smartthings/issues/221#issuecomment-1753414932, or unsubscribe https://github.com/notifications/unsubscribe-auth/AF4ACXSYJCAX7YLZMCVZ6STX6Q2CNAVCNFSM6AAAAAA5PHB3GKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTONJTGQYTIOJTGI. You are receiving this because you were mentioned.

dficken commented 8 months ago

Should have included this in my previous note. Here’s how the device appears in SmartThings:

On Oct 9, 2023, at 4:58 PM, David Ficken @.***> wrote:

Fans are discovered, but light control is wrong (should be dimmable)

And, controls don’t work [10/9/2023, 4:54:16 PM] [Smartthings Plug (IK)] [{"capability":"switch","command":"on"}] failed for Lanai Dining Fan: AxiosError: Request failed with status code 422 [10/9/2023, 4:54:16 PM] [Smartthings Plug (IK)] Command failed for Lanai Dining Fan [10/9/2023, 4:54:19 PM] [Smartthings Plug (IK)] [{"capability":"fanSpeed","command":"setFanSpeed","arguments":[2]}] failed for Lanai Dining Fan: AxiosError: Request failed with status code 422 [10/9/2023, 4:54:19 PM] [Smartthings Plug (IK)] Failed to send setLevel command for Lanai Dining Fan [10/9/2023, 4:54:25 PM] [Smartthings Plug (IK)] [{"capability":"fanSpeed","command":"setFanSpeed","arguments":[3]}] failed for Lanai Living Fan: AxiosError: Request failed with status code 422 [10/9/2023, 4:54:25 PM] [Smartthings Plug (IK)] Failed to send setLevel command for Lanai Living Fan [10/9/2023, 4:54:25 PM] [Smartthings Plug (IK)] [{"capability":"fanSpeed","command":"setFanSpeed","arguments":[2]}] failed for Lanai Living Fan: AxiosError: Request failed with status code 422 [10/9/2023, 4:54:25 PM] [Smartthings Plug (IK)] Failed to send setLevel command for Lanai Living Fan [10/9/2023, 4:54:25 PM] [Smartthings Plug (IK)] [{"capability":"fanSpeed","command":"setFanSpeed","arguments":[2]}] failed for Lanai Living Fan: AxiosError: Request failed with status code 422 [10/9/2023, 4:54:25 PM] [Smartthings Plug (IK)] Failed to send setLevel command for Lanai Living Fan [10/9/2023, 4:54:25 PM] [Smartthings Plug (IK)] [{"capability":"fanSpeed","command":"setFanSpeed","arguments":[2]}] failed for Lanai Living Fan: AxiosError: Request failed with status code 422 [10/9/2023, 4:54:25 PM] [Smartthings Plug (IK)] Failed to send setLevel command for Lanai Living Fan [10/9/2023, 4:54:27 PM] [Smartthings Plug (IK)] [{"capability":"switch","command":"on"}] failed for Lanai Living Fan: AxiosError: Request failed with status code 422 [10/9/2023, 4:54:27 PM] [Smartthings Plug (IK)] Command failed for Lanai Living Fan [10/9/2023, 4:54:28 PM] [Smartthings Plug (IK)] [{"capability":"switch","command":"on"}] failed for Lanai Living Fan: AxiosError: Request failed with status code 422 [10/9/2023, 4:54:28 PM] [Smartthings Plug (IK)] Command failed for Lanai Living Fan [10/9/2023, 4:54:28 PM] [Smartthings Plug (IK)] [{"capability":"switch","command":"on"}] failed for Lanai Living Fan: AxiosError: Request failed with status code 422 [10/9/2023, 4:54:28 PM] [Smartthings Plug (IK)] Command failed for Lanai Living Fan [10/9/2023, 4:54:28 PM] [Smartthings Plug (IK)] [{"capability":"switch","command":"on"}] failed for Lanai Living Fan: AxiosError: Request failed with status code 422 [10/9/2023, 4:54:28 PM] [Smartthings Plug (IK)] Command failed for Lanai Living Fan > On Oct 9, 2023, at 1:47 PM, iklein99 ***@***.***> wrote: > > > @dficken , upgrade to 1.5.19 and give it a try. Please let me know how that works. > > — > Reply to this email directly, view it on GitHub , or unsubscribe . > You are receiving this because you were mentioned. >
bgleonard commented 5 months ago

I’m having the same issue with a 422 response code when I try to control the fan. The plugin detects the fan and shows the current state but any attempt to change state results in 422 like the post above.

jschlemmer704 commented 4 months ago

Same issue as above as I see the device but does not respond via HomeKit but does through Smart things - any update on this?

asvictory3 commented 4 months ago

I’m also getting the same error with code 422

jwilson2899 commented 3 months ago

I’m having similar issues as described above. My ceiling fan/light are seen by Homebridge and successfully added to HomeKit, and status correctly but the following errors happen:

  1. Light is shown as only off/on instead of off/on and dimmable
  2. Any attempt to control fan or light fails with a 422 error.

I did verify that if I go into the SmartThings app the devices are shown correctly, and I can control them from there. Additionally if I control the device from outside of HomeKit, the proper status gets reflected back to HomeKit. Seems like it’s communicating, I just can’t command it from HomeKit.

@iklein99 is there any logs or info I can provide or help with debugging this?

iklein99 commented 3 months ago

@jwilson2899 , follow the instructions the attached and send the logs directly to me. I need to see how Smartthings is reporting the capabilities to the plugin.

While you have the debug logs on, also reproduce the error / behavior.

Instructions for Producing a Detailed Log.pdf

jwilson2899 commented 3 months ago

@jwilson2899 , follow the instructions the attached and send the logs directly to me. I need to see how Smartthings is reporting the capabilities to the plugin.

While you have the debug logs on, also reproduce the error / behavior.

Instructions for Producing a Detailed Log.pdf

Thanks @iklein99, I gathered the log and emailed it to you as requested. Feel free to let me know if you need anything else.

jwilson2899 commented 1 month ago

@iklein99 is there anything else I can provide besides the logs I already sent you to try and move this forward? I'd like to help get this fixed since it's the last link of my Homekit setup I need to get everything fully functional.

iklein99 commented 1 month ago

@jwilson2899 , I've looked at the logs and I don't see why the device doesn't like the command that is being sent, but it doesn't. The setFanSpeed command looks right, yet a 422 status code is returned which simply means that the syntax is right, but the command cannot be executed. It doesn't appear that I can fix this.

jwilson2899 commented 1 month ago

@jwilson2899 , I've looked at the logs and I don't see why the device doesn't like the command that is being sent, but it doesn't. The setFanSpeed command looks right, yet a 422 status code is returned which simply means that the syntax is right, but the command cannot be executed. It doesn't appear that I can fix this.

Thanks for the update. Since this apparently affects multiple people based on the other comments here, is this something we can bring up with the SmartThings API people? Smart things app itself can control the device so it definitely seems to be something between when the plugin sends the request and it gets translated to send to the device.

rdhenrich commented 1 month ago

just adding my support here for figuring this out -- I'm having the same issue above as described. @Iklein99 I'd be happy to get in touch with the SmartThings team and see if if they can lend any thoughts about this issue if that might help move the ball forward.

jwilson2899 commented 1 month ago

just adding my support here for figuring this out -- I'm having the same issue above as described. @iklein99 I'd be happy to get in touch with the SmartThings team and see if if they can lend any thoughts about this issue if that might help move the ball forward.

That would be awesome if you could. It seems like @iklein99 is at a dead end from his end since it looks like all of his code is working as expected.