jvmahon / Homebridge-HomeSeer4

Homebridge Plugin for HomeSeer 3 and 4
29 stars 8 forks source link

Implement while loop for initial fetches #130

Closed marthoc closed 3 years ago

marthoc commented 3 years ago

Simple while loop prevents the initialization from continuing unless both fetches (status and control) return successfully. This blocks the startup of Homebridge until HomeSeer is started, ensuring that HomeSeer devices will be set up in Homebridge.

Related issues/PRs: #120. #116.

Tested with HS4:

jvmahon commented 3 years ago

I made the retry time a little longer -- 15 seconds instead of 5 -- but otherwise incorporated the change. Thanks.

marthoc commented 3 years ago

@jvmahon Thanks for merging! Just tested the published version and it works well on my setup.