porsager / busylight

node library for busylight
50 stars 17 forks source link

How to keep the light alive? #11

Closed robimac04 closed 6 years ago

robimac04 commented 6 years ago

Hello,

I've set the default options, with keepalive as true. However, this is not working. The light constantly turns off after 30 secs.

Is there a function of keepalive, so that I can use it in a one-liner?

Thank you very much.

porsager commented 6 years ago

Hi. I actually just released version 0.3.2 yesterday which has a fix for this in the new protocol. Are you using that version?

robimac04 commented 6 years ago

Yes, I'm using the latest version.

Thank you for your very quick response.

porsager commented 6 years ago

Ok good.

Does it turn back on after the 30 seconds? Do you know which busylight model you have? (does the mount have magnets or only tape?)

robimac04 commented 6 years ago

No, once it turns off, it stays off. The model I'm using is the one only with tape (UC Omega).

Here is the code I'm using:

var busylight = require('/usr/local/testdrive/busylight/lib');
var bl = busylight.get();

bl.defaults({
  keepalive: true,
  color: 'green'                                                                                                                                                                                                                                                                                                                                                                                                                            
});

bl.light(); 

Is there something missing?

porsager commented 6 years ago

Ah I see.. I haven't tested the Omega yet. I saw that there was a different option for it's timeout in the spec, so I'll just take a quick look and see if I can fix it easily.

robimac04 commented 6 years ago

I just figured out that the keepalive does work for the ringtone. The light turns off but it keeps ringing...

porsager commented 6 years ago

Hmm, maybe there's an issue with the default light.. could you try to use bl.light('green') in your example above instead?

robimac04 commented 6 years ago

Yes, but the issue still persists...

porsager commented 6 years ago

I'm not able to replicate this issue with my setup, could you give some more details about your system?

robimac04 commented 6 years ago

My system is:

porsager commented 6 years ago

Hi @robimac04 .. Could you try again with a fresh install and make sure to keep your process running?