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

Retry Interval for Failed `getOnlineDevices` Calls #204

Open Areson opened 10 months ago

Areson commented 10 months ago

Is your feature request related to a problem? Please describe: In the event Homebridge restarts and internet is not available the SmartThings plugin will fail to get device information and never try again, leaving Homebridge devices orphaned/unresponsive.

Describe the solution you'd like: I would like to be able to set an interval for having the plugin retry the request to the SmartThings API for devices in the event that the API request fails.

Describe alternatives you've considered: Causing Homebridge to restart entirely is possible, as reloading the plugin would cause it to attempt the API request again, but this is poor behavior in my opinion.

Additional context: It appears that devices loaded from the cache still appear properly in the Home app, but they do not work as expected if getOnlineDevices fails.