Syncing a Fitbit

Hello everyone

I’m a lightly experienced Linux user running OpenSUSE 13.1. I received a Fitbit from a friend for Christmas. You can sync your Fitbit with their website via a bluetooth dongle but unfortunately Fitbit only provides syncing support for Windows/MAC. I read some blogs saying some Fedora and Ubuntu users had synced it using a Python based terminal application called Galileo.

I was wondering if any OpenSUSE users had managed to sync their Fitbit and could advise me on how to do it? Or if not if anyone would be interested in working on establishing Fitbit support for OpenSUSE?

Thanks,
Cijam

Have you had any luck with this ?

I’m thinking of purchasing a Fitbit Charge HR. As you noted, research suggests an app called galileo does appear to be the way to achieve sync (although I note it is a python app for which I have not yet observed an openSUSE build). Here is a GNU Linux article entitled How to sync your fitbit under Linux.

Hi
Here you go…
https://build.opensuse.org/package/show/home:malcolmlewis:TESTING/galileo

Needs testing, I have not added the udev rule or the systemd unit to run as a daemon, please test and advise issues :wink:

On Sat 05 Mar 2016 09:16:01 PM CST, malcolmlewis wrote:

Hi
Here you go…
Welcome - openSUSE Build Service

Needs testing, I have not added the udev rule or the systemd unit to run
as a daemon, please test and advise issues :wink:

Hi
OK, udev rule added and systemd service file, at present it runs but
errors out since I have no (fitbit/bluetooth?) dongle?


Cheers Malcolm °¿° LFCS, SUSE Knowledge Partner (Linux Counter #276890)
SUSE Linux Enterprise Desktop 12 SP1|GNOME 3.10.4|3.12.53-60.30-default
If you find this post helpful and are logged into the web interface,
please show your appreciation and click on the star below… Thanks!

Thanks for the packaging. I plan to order the Fitbit Charge HR (over Internet) today. According to the galileo development site, the Charge HR is supported. It may take a couple of weeks before it arrives and I will be able to test it then.

I’m still waiting for my Fitbit to arrive via postal mail (as I ordered it over the Internet). Looking at that link and I note you have only enabled a build for Leap-42.1 and Tumbleweed.

I do have one PC running Leap and I’ll give that a try (with USB connectivity) after the Fitbit arrives.

Out of curiousity, is it difficult to also enable a build for openSUSE-13.2 ?

Hi
A minor spec tweak for the python egg-info and it’s building for 13.2 :wink:

Thanks!

I installed galileo on my openSUSE-13.2


linux:/home/oldcpu # zypper ar http://download.opensuse.org/repositories/home:/malcolmlewis:/TESTING/openSUSE_13.2/ malcolm-test
Adding repository 'malcolm-test' ..............................................................................................................[done]
Repository 'malcolm-test' successfully added
Enabled     : Yes                                                                                 
Autorefresh : No                                                                                  
GPG Check   : Yes                                                                                 
URI         : http://download.opensuse.org/repositories/home:/malcolmlewis:/TESTING/openSUSE_13.2/


linux:/home/oldcpu # zypper in galileo
Building repository 'malcolm-test' cache ......................................................................................................[done]
Loading repository data...
Reading installed packages...
Resolving package dependencies...


The following 4 NEW packages are going to be installed:
  galileo python-py python-requests python-usb


4 new packages to install.
Overall download size: 626.3 KiB. Already cached: 0 B  After the operation, additional 2.8 MiB will be used.
Continue? [y/n/? shows all options] (y): y
Retrieving package python-py-1.4.25-1.2.noarch                                                                     (1/4), 145.8 KiB (551.0 KiB unpacked)
Retrieving: python-py-1.4.25-1.2.noarch.rpm ......................................................................................................[done]
Retrieving package python-usb-1.0.0-15.1.4.noarch                                                                  (2/4),  69.3 KiB (349.9 KiB unpacked)
Retrieving: python-usb-1.0.0-15.1.4.noarch.rpm ...................................................................................................[done]
Retrieving package python-requests-2.4.1-1.3.noarch                                                                (3/4), 342.6 KiB (  1.7 MiB unpacked)
Retrieving: python-requests-2.4.1-1.3.noarch.rpm .................................................................................................[done]
Retrieving package galileo-0.5+dev20160305-5.1.noarch                                                              (4/4),  68.7 KiB (208.8 KiB unpacked)
Retrieving: galileo-0.5+dev20160305-5.1.noarch.rpm ...............................................................................................[done]
Checking for file conflicts: .....................................................................................................................[done]
(1/4) Installing: python-py-1.4.25-1.2 ...........................................................................................................[done]
(2/4) Installing: python-usb-1.0.0-15.1.4 ........................................................................................................[done]
(3/4) Installing: python-requests-2.4.1-1.3 ......................................................................................................[done]
(4/4) Installing: galileo-0.5+dev20160305-5.1 ....................................................................................................[done]
linux:/home/oldcpu # 

I tried running galileo without dongle plugged in and I get:


oldcpu@linux:~> galileo
2016-03-19 10:18:45,770:ERROR: No dongle connected, aborting

After a reboot and with dongle plugged in I note:


oldcpu@linux:~> galileo
2016-03-19 10:21:14,911:ERROR: Insufficient permissions to access the Fitbit dongle


To be able to run the fitbit utility as a non-privileged user, you first
should install a 'udev rule' that lower the permissions needed to access the
fitbit dongle. In order to do so, as root, create the file
/etc/udev/rules.d/99-fitbit.rules with the following content (in one line):


SUBSYSTEM=="usb", ATTR{idVendor}=="2687", ATTR{idProduct}=="fb01", SYMLINK+="fitbit", MODE="0666"


The dongle must then be removed and reinserted to receive the new permissions.

The dongle is detected as dmesg yields:


   81.676903] usb 3-12: USB disconnect, device number 4
   88.222817] usb 3-12: new full-speed USB device number 8 using xhci_hcd
   88.392233] usb 3-12: New USB device found, idVendor=2687, idProduct=fb01
   88.392235] usb 3-12: New USB device strings: Mfr=1, Product=2, SerialNumber=3
   88.392237] usb 3-12: Product: Fitbit Base Station
   88.392238] usb 3-12: Manufacturer: Fitbit Inc.
   88.392239] usb 3-12: SerialNumber:
... snipped ... 
   88.395416] hid-generic 0003:2687:FB01.0005: hiddev0,hidraw0: USB HID v1.11 Device [Fitbit Inc. Fitbit Base Station] on usb-0000:00:14.0-12/input0
   88.397760] hid-generic 0003:2687:FB01.0006: hiddev0,hidraw1: USB HID v1.11 Device [Fitbit Inc. Fitbit Base Station] on usb-0000:00:14.0-12/input1

and if I run ‘galileo’ with root permissions I get:


linux:/home/oldcpu # galileo

Tracker: 86E67FC637C9: Skipped because recently synchronised

I previous had setup an account on fitbit, and going to that page, it did not recognize my fitbit.

After the above, I then, using my Chinese smartphone (xiaomi Mi4c) installed the Android (GNU/Linux) fitbit app, and used that to sync to the fitbit (via bluetooth). Now when I go to the fitbit site with my openSUSE-13.2 (and chrome browser) it recognizes my fitbit. But I assume that is because my Android phone is syncing and sending data over the internet < not sure >

I need to try this again with my phone switched off and see if I can sync only via my openSUSE-13.2. My suspicion is I can not - and as to whether that is due to the fitbit website not yet configured (for my openSUSE-13.2 syncing) or the galileo app itself - I can not yet say.

Clearly I need to (1) try some more tests and (2) expand my knowledge on this a bit more before I can say anything useful.

The galileo packaging is MOST appreciated and I will investigate this some more.

Once I sort this a bit better I will write a blog about some of my experiences on this.

.

@malcolmlewis,
will the Galileo for Fitbit still work in Leap15.3?
it was doing well in 15.2, but I did a fresh install of 15.3 on her laptop, and that is one of the apps missing.

Hi
It builds fine…

https://download.opensuse.org/repositories/home:/malcolmlewis:/TESTING/15.3/noarch/

Is there a repo that can be put in YaST? or just zypper it in?

Hi
Just use zypper in…

Repo: https://download.opensuse.org/repositories/home:/malcolmlewis:/TESTING/15.3/

My wife insists that galileo in leap 15.2 opened the Fitbit web page after it synced.
true? Or NO?
If true, how and where do I make it do so?

if NO then this post is a waste of time.

Hi
That would be a pass, is the galileo service running?

Yes, I’ve set the service to start on boot.
In 15.2 She used to just click an icon, something in the taskbar would circle. Then she could check on Fitbit site for what synced.
Now she has to right click, and open in a terminal to get the status. That to me is good feedback.