วันศุกร์ที่ 15 ธันวาคม พ.ศ. 2560

Raspberry Pi IoT with Firebase Realtime Database




Raspberry Pi IoT with Firebase 


What is Firebase?

Firebase is Backend as a Service ( BaaS ) by Google.
Firebase gives you many tools to develop high-quality apps, grow your user base, and earn more money. We cover the essentials so you can monetize your business and focus on your users.

In This Project. We are focus on Realtime Database first.



Real Time Database

The Firebase Realtime Database is a cloud-hosted NoSQL database that lets you store and sync data between your users in realtime.

Updated data syncs across connected devices in milliseconds, and data remains available if your app goes offline, providing a great user experience regardless of network connectivity.


Firebase Console

Go to Console



Add New Project




Add Project Name



Menu Database




Change Rules 

// These rules require authentication
{
  "rules": {
    ".read": "auth != null",
    ".write": "auth != null"
  }
}

Change to this
Warning !!!  This is for test first. Anyone can read and write your database without authentication.

// These rules are not require authentication
{
  "rules": {
    ".read": true ,
    ".write": true
  }
}



Your Realtime Database is ready to use.
and show URL Link for your firebase realtime database. ( https://raspberrypi-3d41f.firebaseio.com/ )



Now Make Raspberry Pi sent data to Firebase Realtime Database



Wiring Diagram

Hardware


  • Raspberry Pi Board ( we use Raspberry Pi3 board ) + Accessories
  • DHT11 Temperature and Humidity Sensor with Resistor 4.7 K Ohm ( or DHTxx )

Install DHT Python Library

$  git clone https://github.com/adafruit/Adafruit_Python_DHT.git
$  cd Adafruit_Python_DHT
$  sudo apt-get install build-essential python-dev python-openssl
$  sudo python setup.py install
Install Firebase Python Library

  
$  sudo pip install requests==1.1.0
$  sudo pip install python-firebase
  

Python Source Code on Github

https://github.com/amphancm/Raspberrypi_Firebase
Code
dht-firebase.py ( without OLED Display)
dht-firebase-oled.py ( need OLED display )
and Minecraftia.ttf is font for OLED.



Reference

https://pypi.python.org/pypi/python-firebase/1.2



My Website
email : info@softpowergroup.net  ,amphancm@gmail.com  Tel .+6681-6452400

Android and Arduino IoT



LINE : adunfong
FaceBook : https://www.facebook.com/adun.nantakaew
email: amphancm@gmail.com

28 ความคิดเห็น:

  1. hi i am facing the issue :
    root@raspberrypi:/home/pi/20112018/cloud/Google/D01/DHT11/RDHT11/Raspberrypi_Firebase# python dht-firebase.py
    Traceback (most recent call last):
    File "dht-firebase.py", line 5, in
    from firebase import firebase
    File "/home/pi/20112018/cloud/Google/D01/DHT11/RDHT11/Raspberrypi_Firebase/firebase.py", line 5, in
    from firebase import firebase
    ImportError: cannot import name firebase

    ตอบลบ
  2. can u please provide the python code for the GPS NEO 6M
    connecting to the raspberry pi and data upload into the firebase
    please

    ตอบลบ
  3. Thanks for sharing, this is a fantastic article. Here is a blog - Background remove service . This may help you

    ตอบลบ
  4. How important is data quality to businesses that rely on heavy direct mail campaigns? Very important-in fact, American businesses count losses up to 600 billion dollars per year, due to poor data quality. Clipping Path service

    ตอบลบ
  5. If you want to read more about the data analytics and iot solutions, then you can check out this article.

    ตอบลบ
  6. That's really a good one. The images of hardware parts could be more appealing if you would use the clipping path services.

    ตอบลบ
  7. What is Fiirebase? Firebase is backend........What is Backend?

    ตอบลบ
  8. Banani is one of the most desired locations to live in Dhaka. There are many reasons for which people look for an apartment rent in Banani. To make your renting easy and profitable, Rentsbd is here to help you! Rentsbd will bring the best deal for you.

    ตอบลบ
  9. Would you like to have a fully verified Neteller account? We offer fully verified ready to use Neteller accounts with complete security. So buy Verified Neteller Account to get the best out of your account now!

    ตอบลบ
  10. ความคิดเห็นนี้ถูกผู้เขียนลบ

    ตอบลบ
  11. Great post on Raspberry Pi IoT with Firebase Realtime Database with good quality videos attached!

    You may be facing an unpleasant experience of 'sending failed' while sending an important message to a friend or emergency information to your team. One of the reasons behind this is the active message blocking option.

    When message blocking is active on your Android phone, you can't send or receive any messages. You will not receive an instant message and MMS also.

    Now you are thinking that what are the reasons causing the message blocking? How do I turn off message blocking on Android?

    There are more than one reasons to cause message blocking on your phone, such as the upkeep of mobile carriers, blocking by your recipient, or disabling message service settings etc.

    As text messaging is a vital way of communication, you can't carry the issue too long. But what to do?

    We are here at FixWill to share the ways with you to turn off the blocking now. You can follow our suggestions and methods to turn off message blocking on Android.

    ตอบลบ
  12. Android app telephonyUI is synonymous with InCallUI for Samsung units. Now you could possibly request about what InCallUI is. com.samsung.android.app.telephonyui is often a feature of Android gadgets that can help to Exhibit the dialler, route the phone calls, and switch audio in between the calls. It works among the Android running procedure and Com.Samsung.Android.InCallUI. This service is liable for building the phone calls from SIM playing cards and VOIP connections.

    ตอบลบ
  13. Great article.
    Although I am a photo editor, this post will be of great help to me.

    ตอบลบ
  14. very knowledgeable and useful site
    thanks for sharing
    https://www.35mmc.com/09/06/2020/architectural-photography-with-a-50mm-lens-and-some-thoughts-on-minimalism-by-daniel-sigg/#comment-366497

    ตอบลบ
  15. Yet the old time fairy tale, having served for generations, may now be classed as “historical” in the children’s library; for the time has come for a series of newer “wonder tales” in which the stereotyped genie, dwarf and fairy are eliminated, together with all the horrible and blood-curdling incidents devised by their authors to point a fearsome moral to each tale. Modern education includes morality; therefore the modern child seeks only entertainment in its wonder tales and gladly dispenses with all disagreeable incident.

    L. Frank Baum, "The Wonderful Wizard of Oz", 2

    ตอบลบ
  16. You've made clear concept on Raspberry Pi IoT by presenting tutorial and images. Thanks for outering such technological term.

    ตอบลบ
  17. Your style is so unique compared to other folks I have read stuff from.
    Many thanks for posting when you’ve got the opportunity, Guess I’ll just bookmark this page. buy hyip site

    ตอบลบ
  18. Awesome and informative article, I really enjoyed this post! Thanks for sharing this post with us.
    You may visit on US:
    A complete Guide on How to make Transparent Activity in Android

    ตอบลบ
  19. This is so useful article for me, I am looking forward for many such wonderful article from you.
    https://cutoutimg.com/clipping-path-service/

    ตอบลบ
  20. Etikway é uma loja conceito sustentável de Moda e Beleza e marketplace dos melhores designers éticos: pronto-a-vestir.

    Learn More: sustainable fashion brands

    ตอบลบ
  21. Good information, great here. FixPaths is one of the most easy and effective photo Background Removal Service provider.

    ตอบลบ
  22. I read your blog and find it very interesting. IoT SIM cards, or Subscriber Identity Module cards, are specialized SIM cards designed for Internet of Things (IoT) devices. They facilitate connectivity by providing network access to IoT devices, enabling communication and data transfer over cellular networks. IoT SIM cards typically offer features like low power consumption, secure authentication, and remote management capabilities. They play a crucial role in enabling the widespread deployment and functionality of IoT devices across various industries and applications. If you're interested in learning more about iot sim cards, we invite you to visit this page where you'll find a wealth of resources, including articles, guides, and case studies.

    ตอบลบ
  23. This is an awesome guide for anyone looking to get started with IoT using Raspberry Pi and Firebase! The step-by-step instructions, including the wiring diagram and Python code, make it accessible even for beginners. The warning about Firebase rules is crucial for security. Great work, and super informative!
    image clipping path services

    ตอบลบ