Comments on: Firebase: Control ESP32 GPIOs from Anywhere https://randomnerdtutorials.com/firebase-control-esp32-gpios/ Learn ESP8266, ESP32, Arduino, and Raspberry Pi Mon, 07 Jul 2025 09:22:23 +0000 hourly 1 https://wordpress.org/?v=6.8.2 By: Sara Santos https://randomnerdtutorials.com/firebase-control-esp32-gpios/#comment-1065860 Mon, 07 Jul 2025 09:22:23 +0000 https://randomnerdtutorials.com/?p=110464#comment-1065860 In reply to pri.

Hi.
It is a file provided in the FirebaseClient library that contains several useful functions you can use in your exmaples: https://github.com/mobizt/FirebaseClient/blob/main/src/ExampleFunctions.h
Instead of having the write and define the functions in the main code, you can simply include that file and then make a call to the library.

Regards,
Sara

]]>
By: pri https://randomnerdtutorials.com/firebase-control-esp32-gpios/#comment-1065560 Sun, 06 Jul 2025 13:15:08 +0000 https://randomnerdtutorials.com/?p=110464#comment-1065560 can you explain
what is ExampleFunctions.h

]]>
By: Sara Santos https://randomnerdtutorials.com/firebase-control-esp32-gpios/#comment-1063521 Wed, 02 Jul 2025 09:46:45 +0000 https://randomnerdtutorials.com/?p=110464#comment-1063521 In reply to steve knell.

Hi Steve.
This was a recent library update.
The code was previously working a couple of weeks ago.

Now, all codes should be working.

Regards,
Sara

]]>
By: steve knell https://randomnerdtutorials.com/firebase-control-esp32-gpios/#comment-1063121 Tue, 01 Jul 2025 13:51:29 +0000 https://randomnerdtutorials.com/?p=110464#comment-1063121 In reply to Sara Santos.

Thank you so much for taking time to reply and put the additional define statements into the code (I would never have resolved that myself!). It now works fine – I’ve never been so excited and pleased to see an LED light up!!

It’s curious to me that this issue had not cropped up before: perhaps others who encountered the same problem had the knowledge to work out what was wrong and fixed it without telling anyone!

Thanks again….

]]>
By: Sara Santos https://randomnerdtutorials.com/firebase-control-esp32-gpios/#comment-1062287 Sun, 29 Jun 2025 10:40:49 +0000 https://randomnerdtutorials.com/?p=110464#comment-1062287 In reply to Steve Knell.

Hi.
I updated the code.
Now you need to include this right at the start of your code, before including the libraries

#define ENABLE_USER_AUTH
#define ENABLE_DATABASE

Regards,
Sara

]]>
By: Steve Knell https://randomnerdtutorials.com/firebase-control-esp32-gpios/#comment-1061528 Fri, 27 Jun 2025 16:23:09 +0000 https://randomnerdtutorials.com/?p=110464#comment-1061528 authTask"); | ^~~~~~~~~ /private/var/folders/bx/s85xr1zd67s0zzw84mf64jtw0000gn/T/.arduinoIDE-unsaved2025527-3900-1v2v84e.pxd5/sketch_jun27a/sketch_jun27a.ino:96:14: error: 'RealtimeDatabase' was not declared in this scope 96 | app.getApp(Database); | ^~~~~~~~~~~~~~~~ /private/var/folders/bx/s85xr1zd67s0zzw84mf64jtw0000gn/T/.arduinoIDE-unsaved2025527-3900-1v2v84e.pxd5/sketch_jun27a/sketch_jun27a.ino:96:32: error: 'Database' was not declared in this scope 96 | app.getApp(Database); | ^~~~~~~~ /private/var/folders/bx/s85xr1zd67s0zzw84mf64jtw0000gn/T/.arduinoIDE-unsaved2025527-3900-1v2v84e.pxd5/sketch_jun27a/sketch_jun27a.ino: In function 'void processData(AsyncResult&)': /private/var/folders/bx/s85xr1zd67s0zzw84mf64jtw0000gn/T/.arduinoIDE-unsaved2025527-3900-1v2v84e.pxd5/sketch_jun27a/sketch_jun27a.ino:139:5: error: 'RealtimeDatabaseResult' was not declared in this scope 139 | RealtimeDatabaseResult &RTDB = aResult.to(); | ^~~~~~~~~~~~~~~~~~~~~~ /private/var/folders/bx/s85xr1zd67s0zzw84mf64jtw0000gn/T/.arduinoIDE-unsaved2025527-3900-1v2v84e.pxd5/sketch_jun27a/sketch_jun27a.ino:139:29: error: 'RTDB' was not declared in this scope 139 | RealtimeDatabaseResult &RTDB = aResult.to(); | ^~~~ /private/var/folders/bx/s85xr1zd67s0zzw84mf64jtw0000gn/T/.arduinoIDE-unsaved2025527-3900-1v2v84e.pxd5/sketch_jun27a/sketch_jun27a.ino:139:70: error: no matching function for call to 'AsyncResult::to()' 139 | RealtimeDatabaseResult &RTDB = aResult.to(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~ In file included from /Users/steveknell/Documents/Arduino/libraries/FirebaseClient/src/./core/Auth/AuthConfig.h:13, from /Users/steveknell/Documents/Arduino/libraries/FirebaseClient/src/./core/FirebaseApp.h:11, from /Users/steveknell/Documents/Arduino/libraries/FirebaseClient/src/FirebaseClient.h:27, from /private/var/folders/bx/s85xr1zd67s0zzw84mf64jtw0000gn/T/.arduinoIDE-unsaved2025527-3900-1v2v84e.pxd5/sketch_jun27a/sketch_jun27a.ino:19: /Users/steveknell/Documents/Arduino/libraries/FirebaseClient/src/./core/AsyncResult/AsyncResult.h:291:8: note: candidate: 'template T& AsyncResult::to()' 291 | T &to() | ^~ /Users/steveknell/Documents/Arduino/libraries/FirebaseClient/src/./core/AsyncResult/AsyncResult.h:291:8: note: template argument deduction/substitution failed: /private/var/folders/bx/s85xr1zd67s0zzw84mf64jtw0000gn/T/.arduinoIDE-unsaved2025527-3900-1v2v84e.pxd5/sketch_jun27a/sketch_jun27a.ino:147:45: error: expected primary-expression before 'const' 147 | Firebase.printf("data: %s\n", RTDB.to()); | ^~~~~ /private/var/folders/bx/s85xr1zd67s0zzw84mf64jtw0000gn/T/.arduinoIDE-unsaved2025527-3900-1v2v84e.pxd5/sketch_jun27a/sketch_jun27a.ino:153:38: error: expected primary-expression before '>' token 153 | Serial.println(RTDB.to()); | ^ /private/var/folders/bx/s85xr1zd67s0zzw84mf64jtw0000gn/T/.arduinoIDE-unsaved2025527-3900-1v2v84e.pxd5/sketch_jun27a/sketch_jun27a.ino:153:40: error: expected primary-expression before ')' token 153 | Serial.println(RTDB.to()); | ^ /private/var/folders/bx/s85xr1zd67s0zzw84mf64jtw0000gn/T/.arduinoIDE-unsaved2025527-3900-1v2v84e.pxd5/sketch_jun27a/sketch_jun27a.ino:156:73: error: expected primary-expression before '>' token 156 | DeserializationError error = deserializeJson(doc, RTDB.to()); | ^ /private/var/folders/bx/s85xr1zd67s0zzw84mf64jtw0000gn/T/.arduinoIDE-unsaved2025527-3900-1v2v84e.pxd5/sketch_jun27a/sketch_jun27a.ino:156:75: error: expected primary-expression before ')' token 156 | DeserializationError error = deserializeJson(doc, RTDB.to()); | ^ /private/var/folders/bx/s85xr1zd67s0zzw84mf64jtw0000gn/T/.arduinoIDE-unsaved2025527-3900-1v2v84e.pxd5/sketch_jun27a/sketch_jun27a.ino:176:30: error: expected primary-expression before 'bool' 176 | bool state = RTDB.to(); | ^~~~ /private/var/folders/bx/s85xr1zd67s0zzw84mf64jtw0000gn/T/.arduinoIDE-unsaved2025527-3900-1v2v84e.pxd5/sketch_jun27a/sketch_jun27a.ino:192:4: error: expected '}' at end of input 192 | } | ^ /private/var/folders/bx/s85xr1zd67s0zzw84mf64jtw0000gn/T/.arduinoIDE-unsaved2025527-3900-1v2v84e.pxd5/sketch_jun27a/sketch_jun27a.ino:120:40: note: to match this '{' 120 | void processData(AsyncResult &aResult) { | ^ exit status 1 Compilation error: 'UserAuth' does not name a type]]> Hi Sara,

Thanks for this tutorial – I tried to compile the code but get this error:
Compilation error: ‘UserAuth’ does not name a type
There are numerous other errors listed in the compiler output, but I’m wondering if solving the single error will deal with the others?!
FYI – I copied the raw code, and I’m not proficient enough in programming to deal with this error; can you help me get over this!?

Thanks again for the work you do – I’ve used several of your tutorials, they have helped enormously…

Thanks, Steve

The full compiler error output is as below:
/private/var/folders/bx/s85xr1zd67s0zzw84mf64jtw0000gn/T/.arduinoIDE-unsaved2025527-3900-1v2v84e.pxd5/sketch_jun27a/sketch_jun27a.ino:36:1: error: ‘UserAuth’ does not name a type
36 | UserAuth user_auth(Web_API_KEY, USER_EMAIL, USER_PASS);
| ^~~~~~~~
/private/var/folders/bx/s85xr1zd67s0zzw84mf64jtw0000gn/T/.arduinoIDE-unsaved2025527-3900-1v2v84e.pxd5/sketch_jun27a/sketch_jun27a.ino:43:1: error: ‘RealtimeDatabase’ does not name a type
43 | RealtimeDatabase Database;
| ^~~~~~~~~~~~~~~~
/private/var/folders/bx/s85xr1zd67s0zzw84mf64jtw0000gn/T/.arduinoIDE-unsaved2025527-3900-1v2v84e.pxd5/sketch_jun27a/sketch_jun27a.ino: In function ‘void setup()’:
/private/var/folders/bx/s85xr1zd67s0zzw84mf64jtw0000gn/T/.arduinoIDE-unsaved2025527-3900-1v2v84e.pxd5/sketch_jun27a/sketch_jun27a.ino:95:39: error: ‘user_auth’ was not declared in this scope
95 | initializeApp(aClient, app, getAuth(user_auth), processData, “🔐 authTask”);
| ^~~~~~~~~
/private/var/folders/bx/s85xr1zd67s0zzw84mf64jtw0000gn/T/.arduinoIDE-unsaved2025527-3900-1v2v84e.pxd5/sketch_jun27a/sketch_jun27a.ino:96:14: error: ‘RealtimeDatabase’ was not declared in this scope
96 | app.getApp(Database);
| ^~~~~~~~~~~~~~~~
/private/var/folders/bx/s85xr1zd67s0zzw84mf64jtw0000gn/T/.arduinoIDE-unsaved2025527-3900-1v2v84e.pxd5/sketch_jun27a/sketch_jun27a.ino:96:32: error: ‘Database’ was not declared in this scope
96 | app.getApp(Database);
| ^~~~~~~~
/private/var/folders/bx/s85xr1zd67s0zzw84mf64jtw0000gn/T/.arduinoIDE-unsaved2025527-3900-1v2v84e.pxd5/sketch_jun27a/sketch_jun27a.ino: In function ‘void processData(AsyncResult&)’:
/private/var/folders/bx/s85xr1zd67s0zzw84mf64jtw0000gn/T/.arduinoIDE-unsaved2025527-3900-1v2v84e.pxd5/sketch_jun27a/sketch_jun27a.ino:139:5: error: ‘RealtimeDatabaseResult’ was not declared in this scope
139 | RealtimeDatabaseResult &RTDB = aResult.to();
| ^~~~~~~~~~~~~~~~~~~~~~
/private/var/folders/bx/s85xr1zd67s0zzw84mf64jtw0000gn/T/.arduinoIDE-unsaved2025527-3900-1v2v84e.pxd5/sketch_jun27a/sketch_jun27a.ino:139:29: error: ‘RTDB’ was not declared in this scope
139 | RealtimeDatabaseResult &RTDB = aResult.to();
| ^~~~
/private/var/folders/bx/s85xr1zd67s0zzw84mf64jtw0000gn/T/.arduinoIDE-unsaved2025527-3900-1v2v84e.pxd5/sketch_jun27a/sketch_jun27a.ino:139:70: error: no matching function for call to ‘AsyncResult::to()’
139 | RealtimeDatabaseResult &RTDB = aResult.to();
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~
In file included from /Users/steveknell/Documents/Arduino/libraries/FirebaseClient/src/./core/Auth/AuthConfig.h:13,
from /Users/steveknell/Documents/Arduino/libraries/FirebaseClient/src/./core/FirebaseApp.h:11,
from /Users/steveknell/Documents/Arduino/libraries/FirebaseClient/src/FirebaseClient.h:27,
from /private/var/folders/bx/s85xr1zd67s0zzw84mf64jtw0000gn/T/.arduinoIDE-unsaved2025527-3900-1v2v84e.pxd5/sketch_jun27a/sketch_jun27a.ino:19:
/Users/steveknell/Documents/Arduino/libraries/FirebaseClient/src/./core/AsyncResult/AsyncResult.h:291:8: note: candidate: ‘template T& AsyncResult::to()’
291 | T &to()
| ^~
/Users/steveknell/Documents/Arduino/libraries/FirebaseClient/src/./core/AsyncResult/AsyncResult.h:291:8: note: template argument deduction/substitution failed:
/private/var/folders/bx/s85xr1zd67s0zzw84mf64jtw0000gn/T/.arduinoIDE-unsaved2025527-3900-1v2v84e.pxd5/sketch_jun27a/sketch_jun27a.ino:147:45: error: expected primary-expression before ‘const’
147 | Firebase.printf(“data: %s\n”, RTDB.to());
| ^~~~~
/private/var/folders/bx/s85xr1zd67s0zzw84mf64jtw0000gn/T/.arduinoIDE-unsaved2025527-3900-1v2v84e.pxd5/sketch_jun27a/sketch_jun27a.ino:153:38: error: expected primary-expression before ‘>’ token
153 | Serial.println(RTDB.to());
| ^
/private/var/folders/bx/s85xr1zd67s0zzw84mf64jtw0000gn/T/.arduinoIDE-unsaved2025527-3900-1v2v84e.pxd5/sketch_jun27a/sketch_jun27a.ino:153:40: error: expected primary-expression before ‘)’ token
153 | Serial.println(RTDB.to());
| ^
/private/var/folders/bx/s85xr1zd67s0zzw84mf64jtw0000gn/T/.arduinoIDE-unsaved2025527-3900-1v2v84e.pxd5/sketch_jun27a/sketch_jun27a.ino:156:73: error: expected primary-expression before ‘>’ token
156 | DeserializationError error = deserializeJson(doc, RTDB.to());
| ^
/private/var/folders/bx/s85xr1zd67s0zzw84mf64jtw0000gn/T/.arduinoIDE-unsaved2025527-3900-1v2v84e.pxd5/sketch_jun27a/sketch_jun27a.ino:156:75: error: expected primary-expression before ‘)’ token
156 | DeserializationError error = deserializeJson(doc, RTDB.to());
| ^
/private/var/folders/bx/s85xr1zd67s0zzw84mf64jtw0000gn/T/.arduinoIDE-unsaved2025527-3900-1v2v84e.pxd5/sketch_jun27a/sketch_jun27a.ino:176:30: error: expected primary-expression before ‘bool’
176 | bool state = RTDB.to();
| ^~~~
/private/var/folders/bx/s85xr1zd67s0zzw84mf64jtw0000gn/T/.arduinoIDE-unsaved2025527-3900-1v2v84e.pxd5/sketch_jun27a/sketch_jun27a.ino:192:4: error: expected ‘}’ at end of input
192 | }
| ^
/private/var/folders/bx/s85xr1zd67s0zzw84mf64jtw0000gn/T/.arduinoIDE-unsaved2025527-3900-1v2v84e.pxd5/sketch_jun27a/sketch_jun27a.ino:120:40: note: to match this ‘{‘
120 | void processData(AsyncResult &aResult) {
| ^

exit status 1

Compilation error: ‘UserAuth’ does not name a type

]]>
By: Mato https://randomnerdtutorials.com/firebase-control-esp32-gpios/#comment-1011599 Thu, 27 Feb 2025 15:59:00 +0000 https://randomnerdtutorials.com/?p=110464#comment-1011599 In reply to Roger.

I have same error with UniversalTelegramBot [ssl_client.cpp:37] _handle_error(): [data_to_read():361]: (-76) UNKNOWN ERROR CODE (004C)

]]>
By: Sara Santos https://randomnerdtutorials.com/firebase-control-esp32-gpios/#comment-993007 Fri, 20 Dec 2024 11:11:26 +0000 https://randomnerdtutorials.com/?p=110464#comment-993007 In reply to Luis.

Thanks for your feedback.
We need to update our guides to be compatible with the latest version.
Regards,
Sara

]]>
By: Luis https://randomnerdtutorials.com/firebase-control-esp32-gpios/#comment-992920 Fri, 20 Dec 2024 03:58:03 +0000 https://randomnerdtutorials.com/?p=110464#comment-992920 I appreciate all the work that you do, and have a few of your books, and thought to share the experience i had with this project.

to make a long story short i could not get it to compile with the latest ESP32 Cores or the latest Firebase ESP Client.

Only esp32 core version 2.07 worked and i left it at that: And that could be a plus\minus version.
Firebase ESP Client version 4.2.7 worked . The latest version to date 4.4.15 did not compile it_

I have great respect for your work, thank you and glad to share.

Ciao

]]>
By: Kevin https://randomnerdtutorials.com/firebase-control-esp32-gpios/#comment-924904 Thu, 13 Jun 2024 09:31:27 +0000 https://randomnerdtutorials.com/?p=110464#comment-924904 Hi, thanks for this project. This was the project that got me interested in Firebase and the huge potential it has, and I’ve used Firebase a lot over the last year or two. The ‘Firebase-ESP-Client’ library has been deprecated though. Although it is still available, the author, mobizt, reports the library as having ‘unfixable issues’ and has created a new, very different library, ‘FirebaseClient’. Perhaps a similar tutorial using the new library would be something that would be something you would like to do. I and many others would benefit greatly from such a project.

]]>