jeremynoesen/homebridge-dyson-bp01

Allow broadlink rm to reconnect if it disconnects

jeremynoesen opened this issue · 1 comments

Split up methods to make this cleaner:

async initState // load the states from persist or defaults. Called in the constructor.

async initBroadLink // connect to the BroadLink device and update the value of device after it has been found. Device initially set to null.

async startKeepAlive // start a loop to keep pinging the rm every so often. A failed ping will call initBroadLink. Called in the constructor.

async startStateUpdates // current loop function. Check if device is not null first. Called within the constructor

The device already does this automatically.