Preview • Features • Requirements • Installation • License
- Drink reminder
- Raspberry Pi
- Fast as fuck internet connection
- HCSR04
- HCSR501
- Android Studio 4.1.2+
- Android 6.0+
- Firebase Firestore
- Firebase Cloud Message
-
Create a firebase project
-
Get your Admin SDK credentials,
looks likeYOUR_PROJECT-firebase-adminsdk-RANDOM_STRING.json
-
In Firestore, Create a
collection
calledbottleStatus
, than create adocument
with random id. -
Copy that random id.
-
Get your
google-services.json
from Firebase when adding app, put it in to./DrinkInClient/app
-
Modify
FirestoreManager.py
line 12, replace with your random document id.
return db.collection("bottleStatus").document("RANDOM_ID")
-
Click
RUN
. -
Get your
device token
by pressing the float action button, which will looks like this:
fWo6-TFJSVCDAV8h8DPRaQ:APA91bELNaBgKduEAWACJN-tIB8CkpDSkbloGIluxaCeMFLDjmpiz26UZqU4L-cW5VeYGK1GiMFywdcaalav8zNWCHurKu10ZnPUlH_w9YYm1WwftXrDv7X58YJNUwtdk60n6ebQWX1r
- Modify
firestore.py
line 6, replace with your Admin SDK credentials path.
cred = credentials.Certificate(
"YOUR_PROJECT-firebase-adminsdk-RANDOM_STRING.json")
- Modify
fcm.py
line 5, replace with yourCloud Mesaage API Key
.
api_key = "API_KEY_HERE"
- Modify
firestore.py
line 10, replace with your random document id.
doc_ref = db.collection(u'bottleStatus').document(u'RANDOM_ID')
- Modify
fcm.py
line 8, replace with yourandroid device token
.
device_token = "DEVICE_TOKEN_HERE"
- Install dependences than start the server.
pip3 install -r requirements.txt
python3 index.txt
I know. DrinkItClient become DrinkInClient.
No idea.