Google Firebase helps developers build real-time applications for the Internet of Things but is not without limitations. IOT developers share a lot of common implementation requirements across a wide range of IoT applications. Collecting data, delivering low latency content, and securing communications between devices and back-end services are just three of those common needs. While meeting common needs can be challenging at times. IoT development platforms such as Google Firebase provide services that allow developers to meet many of these requirements.
Let’s Get Started With Tutorial :
Here I will begin my large IOT with Firebase Tutorial using Arduino NodeMCU that many people have been asking for. I decided to teach IOT with Firebase through problem solving. This first video covers basic setup guide for connecting Arduino NodeMCU with Google Firebase. It also includes step by step configuration of Firebase Console & Arduino IDE, and much more.
This tutorial is light on problems, I hope you enjoy it.
If you like videos like this consider donating $1, or simply turn off AdBlocker. Either helps me to continue making tutorials
Transcript / Cheat Sheet :
Software setup
- Firstly, Install Arduino 1.6.9
- Secondly, Install Arduino ESP8266 core
- Thirdly, Download FirebaseArduino library
- Fourthly, Start Arduino
- Fifthly, Click
Sketch > Include Library > Add .ZIP Library...
- And lastly, Choose
firebase-arduino-master.zip
downloaded in step3.
Here i will suggest to only use arduino ide 1.6.9 version on Linux machine. Then only this tutorial will work like charm otherwise you will get error.
Now Include firebase library to arduino ide navigate to : Sketch>Include Library > Add .zip Library > {Library _location}
For checking whether the library is installed or not just navigate to Sketch>Include Library >Manage Library & search for firebase library now we are ready to rock. Let’s run our first example on arduino just navigate to : File>Examples>Firebase Arduino>Firebase_Demo_ESP8266.
Code :
Configuration of IOT with Firebase
- Start Arduino
- Open
File > Examples > FirebaseArduino > FirebaseRoom_ESP8266
- In
above FirebaseRoom_ESP8266
: ReplaceWIFI_SSID
andWIFI_PASSWORD
with WiFi credentials - Go to https://firebase.google.com/console/ and create a new Firebase Project
- Go to
Database
- Copy the
Database hostname
(Database URL withouthttps://
and trailing/
) - In
Above code FirebaseRoom_ESP8266
: replaceFIREBASE_HOST
with theDatabase Hostname
- Go to
⚙ > Project Settings > Database > Database secrets
- Click
Firebase Secrets > Show
- Copy the
Database Secret
- In
FirebaseRoom_ESP8266
: ReplaceFIREBASE_AUTH
withDatabase Secret
- Select the board
Board > ESP8266 Modules > NodeMCU 1.0
- Then Select the serial port
Port > /dev/tty...
- Select the upload speed
Upload Speed > 115200
- Click
Sketch > Upload
After Uploading the sketch, Open you Serial monitor and select baud rate of 9600. If everything goes well you should able to see output screen below .
That’s end up with great tutorial on getting started IOT with Firebase using Arduino NodeMCU. And if you guys are facing any issues let me know in comment section below 🙂
Error compiling for board NodeMCU 1.0 (ESP-12E Module).
generally we get this error when there is some connection with arduino. Navigate to tools-> port you should be able to detect Arduino in Usb. If it doesn't work try uploading some basic code in nodemcu like led blink
In the above example I am getting error as "setting / number failed" can you please help me to remove it.
same problem getting this error setting / number failed.. what should we do??
Hi, im also getting an error. setting/number failed
this error arises when, we are using a wrong Arduino ide , i vll suggest to download Arduino ide 1.6.9
what if, internet got disconnected will all the appliances will shut down ?
Sir you are connecting node mcu to firebase realtime datebase in this video. I want to ask whether it is possible to connect node mcu to firebase storage so that we can save images through node mcu.
I'm using the same setup as you, Ubuntu with Arduino IDE 1.6.9 – I'm starting to think that is a problem with Firebase… right?
I'm using the same setup as you, Ubuntu with Arduino IDE 1.6.9 – I'm starting to think that is a problem with Firebase… right?
no
same whit me
Hey..I'm too facing this same,Kindly Help me
I am also facing that problem, I think problem with firebase. anyone has solved?
here is a problem.. nodemcu esp8226 not work when wifi disconnect and not reconnect till i re power
it have anyone solution for this?
I am getting Setting/number failed,
I included all libraries, host and authtoken is also correct, and it got connected to my hot-spot.
C:UsersuserAppDataLocalTempbuild8b84799429a172a39e2d158330851881.tmplibrariesfirebase-arduino-masterFirebaseArduino.cpp.o: In function `String::substring(unsigned int) const':
c:usersuserdownloadsarduino1.6.8-espduino-2.1portablepackagesesp8266toolsxtensa-lx106-elf-gcc1.20.0-26-gb404fb9-2xtensa-lx106-elfincludec++4.8.2bits/basic_string.tcc:732: undefined reference to `__cxa_guard_acquire'
C:UsersuserAppDataLocalTempbuild8b84799429a172a39e2d158330851881.tmplibrariesfirebase-arduino-masterFirebaseArduino.cpp.o: In function `FirebaseArduino::readEvent()':
c:usersuserdownloadsarduino1.6.8-espduino-2.1portablepackagesesp8266toolsxtensa-lx106-elf-gcc1.20.0-26-gb404fb9-2xtensa-lx106-elfincludec++4.8.2bits/basic_string.tcc:732: undefined reference to `__cxa_guard_release'
C:UsersuserAppDataLocalTempbuild8b84799429a172a39e2d158330851881.tmplibrariesfirebase-arduino-masterFirebase.cpp.o: In function `operator+, std::allocator >':
C:UsersuserDownloadsarduino1.6.8-ESPDuino-2.1portablesketchbooklibrariesfirebase-arduino-mastersrc/Firebase.cpp:39: undefined reference to `__cxa_guard_acquire'
C:UsersuserDownloadsarduino1.6.8-ESPDuino-2.1portablesketchbooklibrariesfirebase-arduino-mastersrc/Firebase.cpp:39: undefined reference to `__cxa_guard_release'
C:UsersuserAppDataLocalTempbuild8b84799429a172a39e2d158330851881.tmplibrariesfirebase-arduino-masterFirebase.cpp.o: In function `ArduinoJson::JsonArray::invalid()':
C:UsersuserDownloadsarduino1.6.8-ESPDuino-2.1portablesketchbooklibrariesfirebase-arduino-mastersrc/Firebase.cpp:39: undefined reference to `__cxa_guard_acquire'
C:UsersuserDownloadsarduino1.6.8-ESPDuino-2.1portablesketchbooklibrariesfirebase-arduino-mastersrc/Firebase.cpp:39: undefined reference to `__cxa_guard_release'
C:UsersuserAppDataLocalTempbuild8b84799429a172a39e2d158330851881.tmplibrariesfirebase-arduino-masterFirebase.cpp.o: In function `ArduinoJson::JsonObject::invalid()':
C:UsersuserDownloadsarduino1.6.8-ESPDuino-2.1portablesketchbooklibrariesfirebase-arduino-mastersrc/Firebase.cpp:39: undefined reference to `__cxa_guard_acquire'
C:UsersuserDownloadsarduino1.6.8-ESPDuino-2.1portablesketchbooklibrariesfirebase-arduino-mastersrc/Firebase.cpp:39: undefined reference to `__cxa_guard_release'
collect2.exe: error: ld returned 1 exit status
this is the error. How I can fix this, sir? Please help me thank you.
kavin sharma…i still error.
Arduino: 1.6.8 (Windows 10), Board: "NodeMCU 1.0 (ESP-12E Module), 80 MHz, Flash, Disabled, 4M (no SPIFFS), v2 Lower Memory, Disabled, None, Only Sketch, 115200"
In file included from C:UsersTusharSinghPatelAppDataLocalArduino15packagesesp8266hardwareesp82662.5.0-beta3/tools/sdk/lwip2/include/lwip/opt.h:51:0,
from C:UsersTusharSinghPatelAppDataLocalArduino15packagesesp8266hardwareesp82662.5.0-beta3/tools/sdk/lwip2/include/lwip/init.h:40,
from C:UsersTusharSinghPatelAppDataLocalArduino15packagesesp8266hardwareesp82662.5.0-beta3coresesp8266/IPAddress.h:27,
from C:UsersTusharSinghPatelAppDataLocalArduino15packagesesp8266hardwareesp82662.5.0-beta3librariesESP8266WiFisrc/ESP8266WiFi.h:31,
from C:UsersTUSHAR~1AppDataLocalTemparduino_modified_sketch_340892FirebaseDemo_ESP8266.ino:20:
C:UsersTusharSinghPatelAppDataLocalArduino15packagesesp8266hardwareesp82662.5.0-beta3/tools/sdk/lwip2/include/lwipopts.h:1301:2: error: #error TCP_MSS must be defined
#error TCP_MSS must be defined
^
C:UsersTusharSinghPatelAppDataLocalArduino15packagesesp8266hardwareesp82662.5.0-beta3/tools/sdk/lwip2/include/lwipopts.h:2381:2: error: #error LWIP_IPV6 must be defined
#error LWIP_IPV6 must be defined
^
C:UsersTusharSinghPatelAppDataLocalArduino15packagesesp8266hardwareesp82662.5.0-beta3/tools/sdk/lwip2/include/lwipopts.h:3534:2: error: #error LWIP_FEATURES must be defined
#error LWIP_FEATURES must be defined
^
In file included from C:UsersTusharSinghPatelAppDataLocalArduino15packagesesp8266hardwareesp82662.5.0-beta3librariesESP8266WiFisrc/ESP8266WiFiSTA.h:29:0,
from C:UsersTusharSinghPatelAppDataLocalArduino15packagesesp8266hardwareesp82662.5.0-beta3librariesESP8266WiFisrc/ESP8266WiFi.h:34,
from C:UsersTUSHAR~1AppDataLocalTemparduino_modified_sketch_340892FirebaseDemo_ESP8266.ino:20:
C:UsersTusharSinghPatelAppDataLocalArduino15packagesesp8266hardwareesp82662.5.0-beta3/tools/sdk/include/user_interface.h:34:2: error: #error LWIP_OPEN_SRC must be defined
#error LWIP_OPEN_SRC must be defined
^
exit status 1
Error compiling for board NodeMCU 1.0 (ESP-12E Module).
This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.
help ?????
Whoever are getting error after compiling, don't use newer versions(beta) of "ArduinoJson" by "Benoit Blanchon" library, rather install lower versions like 5.13.5 . It will work fine.
Hi bro thanks for this great article i really like this post and i love your blog you;—————> JAZZ MOBLINK 2019 NEW TRICK 10000% WORKING <—————
—-Zong FREE INTERNET 2019 WORKING TRICK—-
—UFONE FREE INTERNET 2019 100% WORKING TRICKS–
<———————————————————————————————————–
–Earn money easy daily 20$
————————————————————————————–
GET FREE RECHARGE ON ALL SIMS NETWORKS
————————————————————————————————————————–
–EARN FREE 100$ WITHOUT INVESTMENT
——————————————————————————————————
How to Protect your articls on blogger
——————————————————————————————————–
FREE LIVE TV ON ALL SIMS 100WORKING NEW METHOD
=============================================================================================================
Free do follow backlinks 110+ genrate YOUR WEBSITE
=============================================================================================================
Top 15BEST Google Adsense Alternatives
===============================================================
BEST TRICK INCRESS GOOGLE ADSENSE
—————————————————————————————–
Top 15 Highest Paying Affiliate Programs Plaforms List
—————-
FREE WEBHOSTING LIFE TIME BEST HOSTING NO AD UNLIMITED FREE
Hi DEAR thanks for this great article i really like this post and i love your blog you;—————> Latest Free Download Good Morning Images, Beautiful Good Morning Pictures, Good Morning <—————
—Love Couple Romantic Good morning images Free Downlaod For Husband wishes–
<:>
-Good Morning Nature Photos Full Hd Free Download 2019
<:
Beautiful Happy Birthday Wishes Pictures, Photos, Images, and Pics Free Download With Name
Bes 5G Mobile Phone List upcoming smartphones 2019
How To Get FREE Mobile Balance of Rs. 500 With Bank Alfalah App
.
Apple iPhone11 Pro Max specification and price Full Details
>
Apple iPhone 11 specification and price Full Details
,.
Apple iPhone11 pro specification and price Full Details
earn free 1000$ without any investment Earn free 100$
same,anyone know the solution?
Yes I have faced same problem
Arduino: 1.8.12 (Windows 10), Board: "NodeMCU 1.0 (ESP-12E Module), 80 MHz, Flash, Legacy (new can return nullptr), All SSL ciphers (most compatible), 4MB (FS:2MB OTA:~1019KB), 2, v2 Lower Memory, Disabled, None, Only Sketch, 115200"
In file included from C:UsersuserDocumentsArduinolibrariesFirebaseArduinosrc/Firebase.h:30:0,
from C:UsersuserDocumentsArduinolibrariesFirebaseArduinosrc/FirebaseArduino.h:22,
from C:UsersuserAppDataLocalTemparduino_modified_sketch_333960FirebaseRoom_ESP8266.ino:21:
C:UsersuserDocumentsArduinolibrariesFirebaseArduinosrc/FirebaseObject.h:109:11: error: StaticJsonBuffer is a class from ArduinoJson 5. Please see arduinojson.org/upgrade to learn how to upgrade your program to ArduinoJson version 6
std::shared_ptr> buffer_;
^
In file included from C:UsersuserDocumentsArduinolibrariesFirebaseArduinosrc/FirebaseArduino.h:22:0,
from C:UsersuserAppDataLocalTemparduino_modified_sketch_333960FirebaseRoom_ESP8266.ino:21:
C:UsersuserDocumentsArduinolibrariesFirebaseArduinosrc/Firebase.h:86:11: error: StaticJsonBuffer is a class from ArduinoJson 5. Please see arduinojson.org/upgrade to learn how to upgrade your program to ArduinoJson version 6
std::shared_ptr> buffer_;
^
exit status 1
Error compiling for board NodeMCU 1.0 (ESP-12E Module).
This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.