Hello, I am having a hard time trying to connect my ESP32 board with a firebase: Realtime database. Reading and writing from/to database using Arduino IDE is fairly easy, But here I am confused. I would be grateful If anyone can tell me where should I start looking in the Guide.
Thanks.
Realtime Firebase
Re: Realtime Firebase
Hello,
Also trying to do this and not having any luck finding information. Any progress on your end?
Also trying to do this and not having any luck finding information. Any progress on your end?
Re: Realtime Firebase
Firebase uses HTTP posts of JSON data. The ESP-IDF system does have both JSON and HTTP.
Have you hooked up the HTTP server and gone through the examples? Same with JSON? Then followed the guides regarding how to format your JSON and HTTP URI for Firebase?
Arduino always has more users so will have better guides, but so far, everything I've found in ESP-IDF is there, one just has to do more work to wire things together --- but then you get to write the guide?
Have you hooked up the HTTP server and gone through the examples? Same with JSON? Then followed the guides regarding how to format your JSON and HTTP URI for Firebase?
Arduino always has more users so will have better guides, but so far, everything I've found in ESP-IDF is there, one just has to do more work to wire things together --- but then you get to write the guide?
Re: Realtime Firebase
Hello all,
I have been able to now get data from my firebase database. Use this function:
and use the HTTP call: https://firestore.googleapis.com/v1/pro ... /cities/LA
You can use the Postman application to do test HTTP get calls.
Let me know if you have any questions.
I have been able to now get data from my firebase database. Use this function:
Code: Select all
void fetch(char *url, struct FetchParms *fetchParms)
{
esp_http_client_config_t clientConfig = {
.url = url,
.event_handler = clientEventHandler,
.user_data = fetchParms};
esp_http_client_handle_t client = esp_http_client_init(&clientConfig);
esp_err_t err = esp_http_client_perform(client);
if (err == ESP_OK)
{
ESP_LOGI(TAG, "HTTP GET status = %d",
esp_http_client_get_status_code(client));
}
else
{
ESP_LOGE(TAG, "HTTP GET request failed: %s", esp_err_to_name(err));
}
esp_http_client_cleanup(client);
}
You can use the Postman application to do test HTTP get calls.
Let me know if you have any questions.
-
- Posts: 13
- Joined: Tue Oct 08, 2019 9:03 am
Re: Realtime Firebase
Hi jonking, I am interested in working about firebase realtime database & ESP-IDF, But I stuck. can you publish an example about it ?jonking wrote: ↑Thu Jan 16, 2020 9:27 pmHello all,
I have been able to now get data from my firebase database. Use this function:
and use the HTTP call: https://firestore.googleapis.com/v1/pro ... /cities/LACode: Select all
void fetch(char *url, struct FetchParms *fetchParms) { esp_http_client_config_t clientConfig = { .url = url, .event_handler = clientEventHandler, .user_data = fetchParms}; esp_http_client_handle_t client = esp_http_client_init(&clientConfig); esp_err_t err = esp_http_client_perform(client); if (err == ESP_OK) { ESP_LOGI(TAG, "HTTP GET status = %d", esp_http_client_get_status_code(client)); } else { ESP_LOGE(TAG, "HTTP GET request failed: %s", esp_err_to_name(err)); } esp_http_client_cleanup(client); }
You can use the Postman application to do test HTTP get calls.
Let me know if you have any questions.
Thank you
-
- Posts: 1
- Joined: Wed Jul 12, 2023 9:40 am
Re: Realtime Firebase
how to sent the data to firestore using espidf
Who is online
Users browsing this forum: Baidu [Spider], Bing [Bot], Google [Bot] and 335 guests