iklein99 / homebridge-smartthings

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

Light Polling Issue #39

Closed kevinjonsutton closed 1 year ago

kevinjonsutton commented 1 year ago

Thank you very much for adding the polling for the lights. It's been working great and fixed the previous issues I was having of not receiving status, however 2 new issues have appeared that I wanted to bring to your attention that might help other users.

  1. I keep getting errors on multiple lights and switches "Failed to request status from : AxiosError: Request failed with status code 500" These lights and switches then show as no response in HomeKit but are not offline in SmartThings and operate fine in SmartThings. If I restart home bridge the device will go back online and I can then use it in HomeKit. It has been happening with multiple fixtures. (See attached image)

  2. Secondly when I either turn on a light in HomeKit it will show the light being turned on and then turn off right away. Then you have to wait several seconds for it to report on in HomeKit again. Same issue happens in reverse when turning off the light. In the video I am simply pressing each device once. (See attached videos)

Thanks again for all the hard work on this plugin, it's greatly appreciated IMG_0319

https://user-images.githubusercontent.com/45573456/194602375-94425b8f-c84e-4db6-9691-05df4a628b3e.MP4

https://user-images.githubusercontent.com/45573456/194602819-cbe56190-4ab3-4339-92b9-6c33b0651160.MP4

!

iklein99 commented 1 year ago

Please make sure you are running the latest version (1.4.3), which should help with the first issue. The problem is that with all of the polling, occasionally you will get a 500 error returned from Smartthings. In the latest version, the plugin will try again for 5 times in a row before it quits and marks the device as offline. It will then retry it in about 10 minutes.

kevinjonsutton commented 1 year ago

Thanks, I have 1.4.3 running and it seems to be working better for the first issue. I'll keep an eye on it. How about issue number two? Any way to fix that so it shows the correct status in the app right away when turning on or off the light?

Also, with 1.4.3 the plugin pulled in only 1 one contact sensor out of the 34 I have connected in my house. It happens to be a z-wave contact sensor. The rest are the SmartThings branded contact sensors happen to be Zigbee. Not sure if that makes a difference or not but none of those are showing or being added to the plugin. I checked in the homebridge log and those don't show as being added there either so for some reason they are not being added.

iklein99 commented 1 year ago

I will have a fix for the second issue in a few days. I know what the problem is.

As for the other contact sensors, I’d have to look at how they are reported from Smartthings when the plugin loads. To do this, clear your logs, set Debug on, then restart. Once all of the scrolling slows down (about 30 seconds). Turn off debug then reset SmartThings. Send me the logs.

You can email me directly at @. @.>.

Send me the name of one of the contact sensors so I can see how it is being reported.

On Oct 8, 2022, at 10:09 AM, kevinjonsutton @.***> wrote:

Thanks, I have 1.4.3 running and it seems to be working better for the first issue. I'll keep an eye on it. How about issue number two? Any way to fix that so it shows the correct status in the app right away when turning on or off the light?

Also, with 1.4.3 the plugin pulled in only 1 one contact sensor out of the 34 I have connected in my house. It happens to be a z-wave contact sensor. The rest are the SmartThings branded contact sensors happen to be Zigbee. Not sure if that makes a difference or not but none of those are showing or being added to the plugin. I checked in the homebridge log and those don't show as being added there either so for some reason they are not being added.

— Reply to this email directly, view it on GitHub https://github.com/iklein99/homebridge-smartthings/issues/39#issuecomment-1272328797, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABG55EXUC46RT43H5VQ3MJLWCF6CJANCNFSM6AAAAAAQ7XZXIQ. You are receiving this because you commented.

iklein99 commented 1 year ago

The delay in status problem should be fixed in 1.4.4. I'll leave this open for a couple of days. Please let me know if it is resolved for you.

kevinjonsutton commented 1 year ago

Thanks, I updated to 1.4.4 but the delay in status is still happening. Basically what is happening is if you turn on a light the status will turn on and then off right away and then after several seconds show on. Same thing happens in reverse when you turn a light off. These are all light switches and dimmer switches if that makes a difference.

I will send the log to you. What's the email to send it to because it's not showing in the comments?

kevinjonsutton commented 1 year ago

Actually when I turn on debug mode none of the other sensors even show in the log. Only the z-wave contact sensor shows in the log but none of the Zigbee contact sensors. All of my devices are on edge drivers if that makes a difference.

veonua commented 1 year ago

Zigbee contact sensors strange works ok with my Xiaomi Zigbee sensors

iklein99 commented 1 year ago

If Smartthings isn't reporting those devices to the API, the plugin can't control them.

kevinjonsutton commented 1 year ago

Sorry, I actually found them reported. The SmartThings branded contact sensors are listed as Multi-Sensor which is probably why they don't show. Where can I send the log?

iklein99 commented 1 year ago

@. @.>

On Oct 10, 2022, at 10:55 AM, kevinjonsutton @.***> wrote:

Sorry, I actually found them reported. The SmartThings branded contact sensors are listed as Multi-Sensor which is probably why they don't show. Where can I send the log?

— Reply to this email directly, view it on GitHub https://github.com/iklein99/homebridge-smartthings/issues/39#issuecomment-1273441184, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABG55EUPJUOSKGVOTQGNZUDWCQU5RANCNFSM6AAAAAAQ7XZXIQ. You are receiving this because you modified the open/close state.

iklein99 commented 1 year ago

I’m not sure how edge works with the API. If they aren’t showing in the log, then Smartthings isn’t returning them when I query for the devices. I’ll have to look into that, but I’m not sure there is a lot I can do.

On Oct 8, 2022, at 11:29 AM, kevinjonsutton @.***> wrote:

Actually when I turn on debug mode none of the other sensors even show in the log. Only the z-wave contact sensor shows in the log but none of the Zigbee contact sensors. All of my devices are on edge drivers if that makes a difference.

— Reply to this email directly, view it on GitHub https://github.com/iklein99/homebridge-smartthings/issues/39#issuecomment-1272342801, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABG55EWMCBMUEIIM3OVHJELWCGHN7ANCNFSM6AAAAAAQ7XZXIQ. You are receiving this because you commented.

veonua commented 1 year ago

the only difference in the API output is the extra field or something, otherwise, it works perfectly with API.

in fact the edge platform is the only that will stay in a couple of weeks

kevinjonsutton commented 1 year ago

Since the Samsung contact sensors show as a "MultiFunctionalSensor" because they can do open/close, vibration, temperature, and 3-axis sensing, I think that's why they don't show up. The good news is they do show in the log, that was my mistake initially saying that they did not.

Just a thought, maybe there is a way to filter out and remove these capabilities so it just shows as a contact sensor only without the other capability? I know the previous homebridge plugin that a lot of users were using (that will stop working once they shut down groovy) did this and the contact sensors showed in HomeKit ok.

https://github.com/tonesto7/homebridge-smartthings/#readme

iklein99 commented 1 year ago

I can do that. But I am in the middle of support multi-functional accessories that support multiple service types and want to finish that. Let me look at it.,

On Oct 11, 2022, at 5:06 PM, kevinjonsutton @.***> wrote:

Since the Samsung contact sensors show as a "MultiFunctionalSensor" because they can do open/close, vibration, temperature, and 3-axis sensing, I think that's why they don't show up. The good news is they do show in the log, that was my mistake initially saying that they did not.

Just a thought, maybe there is a way to filter out and remove these capabilities so it just shows as a contact sensor only without the other capability? I know the previous homebridge plugin that a lot of users were using (that will stop working once they shut down groovy) did this and the contact sensors showed in HomeKit ok.

https://github.com/tonesto7/homebridge-smartthings/#readme https://github.com/tonesto7/homebridge-smartthings/#readme — Reply to this email directly, view it on GitHub https://github.com/iklein99/homebridge-smartthings/issues/39#issuecomment-1275276142, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABG55ERXMCDIIINFREEZXYTWCXJGNANCNFSM6AAAAAAQ7XZXIQ. You are receiving this because you modified the open/close state.