# Connecting Thunkable App to ESP8266 with Firebase for Relay Control

**URL:** https://community.thunkable.com/t/connecting-thunkable-app-to-esp8266-with-firebase-for-relay-control/3207127
**Category:** Questions about Thunkable X
**Tags:** firebase, beginner, help, blocks
**Created:** [September 17, 2024, 3:37am UTC](https://community.thunkable.com/t/connecting-thunkable-app-to-esp8266-with-firebase-for-relay-control/3207127 "2024-09-17T03:37:10Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![sarazizzettai9csc8](https://avatars.discourse-cdn.com/v4/letter/s/9f8e36/32.png) [@sarazizzettai9csc8](https://community.thunkable.com/u/sarazizzettai9csc8)
#### Post date: [September 17, 2024, 3:37am UTC](https://community.thunkable.com/t/connecting-thunkable-app-to-esp8266-with-firebase-for-relay-control/3207127/1 "2024-09-17T03:37:10Z")

</div>

Hello! I need help connecting my Thunkable app to my ESP8266 WiFi module. I’m storing data in Firebase (for user authentication and a real-time database that includes the WiFi SSID and password). In theory, I ask for the WiFi and password in the app, get those values, and store them in Firebase. The ESP8266 retrieves the data from the database, generates its IP address, stores it in the same database, and then creates a couple of HTML pages that can control 3 relays.

The relays are controlled via URLs with the following structure: `http://[IP_OF_ESP8266]/relay1/on` (in the Thunkable app, there is a button for each relay). When I click the button to turn the relay on, it should generate a link that ends with `/on` or `/off` (depending on whether I want to turn it on or off).

What blocks do I need, and in what order, to make this work?

---

<div class="post-metadata">

### Author: ![matt\_conroy](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/matt_conroy/32/150843_2.png) [@matt\_conroy](https://community.thunkable.com/u/matt_conroy)
#### Post date: [September 17, 2024, 8:29pm UTC](https://community.thunkable.com/t/connecting-thunkable-app-to-esp8266-with-firebase-for-relay-control/3207127/2 "2024-09-17T20:29:17Z")

</div>

Hi sarazizzettai9csc8, welcome to Thunkable! 🎉

Be sure to check out [How to ask Great Questions v2.0](https://community.thunkable.com/t/how-to-ask-great-questions-v2-0/2689983/1), the [Community Guidelines](https://community.thunkable.com/t/community-guidelines/78/8), and our [Getting Started Guide](https://docs.thunkable.com/getting-started/get-started) to make the best of your Thunkable Community experience!

Apologies if I am misunderstanding, is your query about whether you can use Thunkable to connect and transmit data to the ESP8266 via WiFi?

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/0/f/0f59f292712368bce16ff80133ae10de8a6f27e8.png) [@system](https://community.thunkable.com/u/system)
#### Post date: [December 16, 2024, 8:30pm UTC](https://community.thunkable.com/t/connecting-thunkable-app-to-esp8266-with-firebase-for-relay-control/3207127/3 "2024-12-16T20:30:03Z")

</div>

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
