IntroductionThis article demonstrates how to store sensor data on the Firebase real-time database through Raspberry Pi. Real-Time Database
Prerequisite
Step 1 Create a new project and fill in the necessary details. Step 2
Step 3 Next, go to rules >> change rules. Just replace that with the following code. Default Rules
Change to these rules This is for the first test. Anyone can read and write your database without authentication.
"https://raspberrypi-3d41f.firebase.com" This link is used to access our RT database. Click add icon then you can create your own data. This link is used to communicate between Python and Firebase RT. Step 4 We use the DHT 11 sensor. Send the temperature and humidity data to firebase. Python code uses a putty tool to access the Raspberry Pi remote connection. Refer to my articles
Wiring Diagram Step 5 Open the python IDE, File >> New. Save the name as dht-firebase.py.py, then follow the given code.
Next, we need to update the Raspberry Pi. So, install the latest packages.
Run the program.
Console Output Firebase Output SummaryIn this article, you learned how to send IOT data to Firebase. If you have any questions/ feedback/ issues, please write in the comment box. |