Skip to content

Latest commit

 

History

History
37 lines (21 loc) · 842 Bytes

README.md

File metadata and controls

37 lines (21 loc) · 842 Bytes

Firebase-IOT-Raspberry-pi

config = {
"apiKey": "Paste your secret key", "authDomain": "ProjectID.firebaseapp.com", "databaseURL": "Database complete link", "storageBucket": "ProjectID.appspot.com" }

Secret key

you will find secret key at, In Project Overview --> Project settings --> Service accounts -->Database Secrets (Click on show)

Project ID

You will find Project ID at, In Project Overview --> General (Your project)

Domain URL

You will find domain url at , In RealTime Database --> Data (Complete link you need to copy)

To get values from cloud

firebase = pyrebase.initialize_app(config)

database = firebase.database()

val = database.child("Prod1").get().val()

To set values to cloud

firebase = pyrebase.initialize_app(config)

database = firebase.database()

database.child("Prod1").set("Sample")