rooi / homebridge-lightwaverf

LightwaveRF plugin for HomeBridge
9 stars 7 forks source link

Add 3sec delay #33

Closed marathonworks closed 6 years ago

marathonworks commented 7 years ago

I have had wonderful results with your ICS-1000 integration into my homebridge setup. I do have a proposal:

Triggering scenes from the Trust Smart Home results in all lamps being triggered with a 3 second delay between them. In my experience it results in a 99% compatibility with my lights. Using your plugin (creating a scene in homekit on iOS) I notice that often one or two lamps fail to trigger an "off" or "on" state.

Is it possible to add a setting where you can define a delay in seconds between the devices on/off commands?

rooi commented 7 years ago

There is a one second delay when executing commands. Is this the delay you want to extend? If so, perhaps you could try the following change to de index.js before we can integrate it:

Change line 95 from: var api = new lightwaverf({ip:that.ip_address,email:that.email,pin:that.pin,host:that.host}, function(devices) {

to: var api = new lightwaverf({ip:that.ip_address,email:that.email,pin:that.pin,host:that.host,timeout:3000}, function(devices) {

Thanks

marathonworks commented 7 years ago

Thank you Rooi! This was exactly what I needed. Changing the timeout to 2500 did the trick.

rooi commented 6 years ago

Added to code