-
Notifications
You must be signed in to change notification settings - Fork 1
/
config.py
56 lines (48 loc) · 3.43 KB
/
config.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
# =============================================== FitBit Synchronization ===============================================
# Change to True to enable weight synchronization with FitBit. Go to http://localhost:8080/ for more info.
# WARNING! You should not expose the default http port (80) of the device you're running this on to the outside of your
# network. FitBit OAuth2 tokens are stored in plain text therefore the security of the tokens directly correlate to the
# security of this project folder.
FITBIT_SYNC_ENABLED = False
# Set up a new app for yourself at https://dev.fitbit.com/apps and fill the values bellow. For redirect URL you can
# set the local IP of the device you'll be running this on (http://192.168.XXX.XXX:8080/fitbit_auth_redirect)
# To set up your application go to https://dev.fitbit.com/apps
# Application Website URL: Use your GitHub account or something else
# Organization: Can enter 'N/A'
# Organization Website URL: Use your GitHub account or something else
# Terms of Service URL: Link to FitBit ToS
# Privacy Policy URL: Link to FitBit Privacy Policy URL
# OAuth 2.0 Application Type: Personal
# Redirect URL: http://127.0.0.1:8080/fitbit_auth_redirect (recommended)
# Default Access Type: Read and Write
FITBIT_CLIENT_ID = None
FITBIT_CLIENT_SECRET = None
# How often to attempt weight logging on FitBit
WEIGHT_SYNC_LOOP_TIME_SECS = 30
# ======================================================================================================================
# ================================================= Weight Fluctuation =================================================
# The following value is used to determine which weight belongs to which user. If the difference between the closest
# weight logged to the current weight logged (when data exists) exceeds this amount, the weight will be assigned to a
# new user. Lower values might cause issues when measuring weight inbetween long periods of time. This system might not
# work for multiple users that weight a very similar amount.
#
# For example:
# - User 1 weights 100 kg and is logged in the data file.
# - User 2 weights 60 kg and is logged in the data file.
#
# - A new weight value is registered of 98.9 kg. Since the smallest difference between weights is 1.1kg (which is
# within the default allowed weight fluctuation), the new weight is assigned to User 1.
# - A new weight value is registered of 81 kg. Since the difference between last registered user weights
# (60kg [diff 21 kg] and 98.9 kg [diff 17.9 kg.]) exceeds the default allowed weight fluctuation of 10kg - a new user
# is created
#
ALLOWED_WEIGHT_FLUCTUATION_KG = 10.0
# ======================================================================================================================
# ======================================================= Other ========================================================
# Various other settings, there should be no reason to change these
UNITS = 'METRIC' # Set 'METRIC' for kg, 'IMPERIAL' for pounds.
DATETIME_FORMAT = "%Y-%m-%d %H:%M:%S" # Sets the date format in which to store the weight
WEIGHT_LOG_LOCATION = "data/weight.csv" # Sets the weight file location
LOG_LOCATION = 'log.txt' # Sets the log file location for general system info and error output
BALANCE_BOARD_MAC = None # (optional) Can set your wii balance board MAC address if you already know it
# ======================================================================================================================