openyou/libfitbit

Syncing multiple fitbits with 1 station

RuudBurger opened this issue · 5 comments

I'm wondering if this is possible. The sync is working for me, but it randomly picks 1 of the 2 fitbits (one for me, one for my girlfriend).
I have 2 'docks' so starting the client with some parameter is fine for me too, just need it to work with 2 fitbits.

Thanks, for the help!

qdot commented

This shouldn't actually be a problem, assuming we slept the fitbits after syncing which I still need to merge the pull request on. Basically, the issue is that the trackers never sleep, so any time libfitbit polls, it'll talk to whichever tracker replies first, meaning it's a race between your two trackers. I'll try to merge the sleep stuff ASAP, which means that once one tracker talks to libfitbit, it'll sleep for 15 minutes and give the other tracker a chance to sync. will leave this open until that's done.

Cool, thanks for the quick reply.
I had it running for a few hours now, and indeed it does sync them both. But not like expected and kinda random ;)

Is it ok to use 2 docks btw? Or is it possible that both are used and the data is synced twice to the server or something.

qdot commented

2 docks won't actually help the problem. Like I said, libfitbit just communicates with whoever it can talk to first. So it's a race to whichever beacon talks back, hence the randomness. The sleep solution I mentioned should help.

Yeah I understand, but they are both connected to the server (so both fitbits can charge at the same time).
Just wondering that it wouldn't hurt. libfitbit only uses 1 of the dock, not both, to synch 2 fitbits (randomly).

qdot commented

Oh, yeah, we just connect to the first base we find. Shouldn't hurt anything to have multiples connected.