GitXplorerGitXplorer
e

FitBitSleepCharts

public
12 stars
2 forks
0 issues

Commits

List of commits on branch master.
Unverified
7cfd189989af387764cd5b61891919ebf59b5b40

Fixed the NAN issue on the updater page.

eelicwhite committed 12 years ago
Unverified
c003b76b791d01fbf35ad75c6e096f54afe08f0b

Updating Readme

eelicwhite committed 12 years ago
Unverified
67d9c03d0a93b46e7b71f485cc33e5c52af22c5b

Using packagist for the Fitbit api

eelicwhite committed 12 years ago
Unverified
1c9948d5adb2f397e1a1f8e02dec8f5af5393d62

Adding drop datasource

eelicwhite committed 12 years ago
Unverified
c59062125b350a5e20c03b079d7c2307b57bd647

Updating lock file

eelicwhite committed 12 years ago
Unverified
4f3dd9fd09080401463da056c5e94620d2d412da

Adding a clear action to the Setup controller

eelicwhite committed 12 years ago

README

The README file for this repository.

FitBit SleepCharts

A free open source solution to Fitbit's outrageous premium subscription model. Why pay $50+ a year for something so simple? Either find an installation of this, or simply deploy it yourself to heroku. Quick, easy, painless.

A Live version is here: http://gentle-river-5868.herokuapp.com

Sign up for a new fitbit api key.

https://dev.fitbit.com/apps/new Callback URL doesn't matter. And you only need Read-only access.

Set Environment Variables in a .htaccess file

SetEnv ROOT http://localhost/FitBitSleepCharts/www/
SetEnv DB_DSN mysql://root@localhost/fitbit
SetEnv FITBIT_CLIENT **CLIENT STRING**
SetEnv FITBIT_SECRET **CLIENT SECRET**
SetEnv PRODUCTION 0  # Set this to 1 when you are on a production server

Deploying to Heroku

>heroku create --buildpack https://github.com/TheSavior/heroku-buildpack-php
Creating gentle-river-5868... done, stack is cedar
BUILDPACK_URL=https://github.com/TheSavior/heroku-buildpack-php
http://gentle-river-5868.herokuapp.com/ | git@heroku.com:gentle-river-5868.git

>heroku addons:add cleardb:ignite
Adding cleardb:ignite on gentle-river-5868... done, v5 (free)

>heroku config
=== gentle-river-5868 Config Vars
BUILDPACK_URL:        https://github.com/TheSavior/heroku-buildpack-php
CLEARDB_DATABASE_URL: mysql://...:...@....cleardb.com/...?reconnect=true

>heroku config:add DB_DSN=mysql://...:...@....cleardb.com/...?reconnect=true
Setting config vars and restarting gentle-river-5868... done, v6
DB_DSN: mysql://...:...@....cleardb.com/...?reconnect=true

>heroku config:add ROOT=http://gentle-river-5868.herokuapp.com/
Setting config vars and restarting gentle-river-5868... done, v7
ROOT: http://stark-headland-5971.herokuapp.com/

>heroku config:add FITBIT_CLIENT=**CLIENT STRING**
Setting config vars and restarting gentle-river-5868... done, v8
FITBIT_CLIENT: d309d935df0b415e84721ef9c40c2379

>heroku config:add FITBIT_SECRET=**CLIENT SECRET**
Setting config vars and restarting gentle-river-5868... done, v9
FITBIT_SECRET: 64cff6931e0547a8b403dad81c5ba664

Then, to configure your database hit the url:

http://blah-blah-num.herokuapp.com/Setup/install (with your own herokuapp)

Now we need to turn production mode on so that other people can't hit that url later

>heroku config:add PRODUCTION=1
Setting config vars and restarting gentle-river-5868... done, v10
PRODUCTION: 1