tonesto7 / homebridge-smartthings

SmartThings Homebridge Plugin
385 stars 770 forks source link

Device status sync #443

Open fate8383 opened 3 years ago

fate8383 commented 3 years ago

Verify the following before opening an trouble issue

Go over all the following points, and put an x in all the boxes that apply. If you're unsure about any of these, don't hesitate to ask. We're here to help!


About Your Setup

Expected Behavior

Tell us what you think should be happening Device status don't sync with home app after triggered and app closed/reopened

Current Behavior

What happens instead of the expected behavior?

Device status after I turn on or off are ok until I keep the home app on screen but if I hide app and reopen all shows incorrect. After long time, I mean really long time then they sync again. I checked on Logs all seems to be fine, commands are received on homebridge and I also checked command is received on SmartThings IDE live logs. But issue still happens when hide app.

Steps to Reproduce (for bugs)

Provide a link to a live example, or an unambiguous set of steps to reproduce this bug. Include code to reproduce, if relevant

You can produce this simply, turn on a TV or air con from home app and stay on the screen if you want but go ahead and click to see accessories page in Homebridge GUI, this will immediately trigger those turned on devices to be off on HOME app on screen while you are looking at it as well as homebridge accessories page they will look off. Or vice versa, if you turned them off they will still be on. I tired this several times and never showed once correctly. Inspite that I see on the logs of HB commands are sent to be off and I see also in IDE logs command is there. Other way is just close home app and reopen and status will be on as oppose it will be off or vice versa.

After sometime of refreshing data i guess they sync. This could be minutes hours, i don't know. If I can find out how to decrease the device refresh data frequency I guess it can be a work around.

Context

How has this issue affected you? What are you trying to accomplish? Providing context helps us come up with a solution that is most useful in the real world**


Please include a copy of any relevant log output to assist in tracking down the bug

Logs from SmartThings IDE 4:33:03 PM: info Homebridge (v2.3.3) | Command Successful for Device Livingroom air conditioner | Command off() 4:33:03 PM: info Homebridge (v2.3.3) | Command Successful for Device Bedroom air conditioner | Command off()

Logs from HB NOTICE: Sending Device Command: off | Name: (Livingroom air conditioner) | DeviceID: () | SendToLocalHub: (false) NOTICE: Sending Device Command: off | Name: (Bedroom air conditioner) | DeviceID: () | SendToLocalHub: (false)

Screen Shot 2021-06-10 at 4 48 55 PM

0x4a616e commented 3 years ago

I have a similar issue, except for me the status (also for an air conditioner) is always shown as "off". When I flip the switch on, the device turns on, but the switch immediately jumps back to the "off" state.