You've have to make free account at https://www.eulerstream.com for not being limited at scrapping and paste your api to .env file spesial thanks to isaackogan for making the libs
This project connects TikTok Live gift events to an ESP32 microcontroller, allowing you to trigger relays in real-time whenever someone sends a gift during your livestream — all over local Wi-Fi, with no cloud server needed.
🔗 Ideal for creators who want to link TikTok donations to real-world effects like lights, fans, or other relay-controlled devices.
-
🌐 Local HTTP Communication Only
All communication happens on your local Wi-Fi network — no port forwarding or external server required. -
🎁 TikTok Gift Listener
Detects gift events on TikTok Live using theTikTokLivePython library. -
🛠️ Relay-Based Physical Feedback
Each TikTok gift can trigger a relay, which can be connected to lights, horns, or other devices. -
⚙️ Flexible Gift Mapping
You can assign different gift types or point values to different relay actions.
| Component | Function |
|---|---|
| ESP32 (WROOM-32) | Main controller |
| 3-Channel Relay Module | Activate real-world devices |
| Jumper Wires | Standard male-female connectors |
| ESP32 GPIO | Relay Channel | Description |
|---|---|---|
| GPIO 4 | Relay 1 | For gift under 100 points |
| GPIO 5 | Relay 2 | For gift 100–499 points |
| GPIO 2 | Relay 3 | For gift 500+ points |
| GND | Relay GND | Common ground |
| 5V | Relay VCC | Power source (external if needed) |
⚠️ Make sure your relay module is compatible with 3.3V logic or use external transistor/driver if needed.
| File | Description |
|---|---|
TiktokIntegration.ino |
Arduino sketch for ESP32 to handle gift events |
donasi.py |
Python script to listen to TikTok gifts |
wifi_scanner.py |
Python script to scan esp32 at your wifi |
donasi.py |
Python script to listen to TikTok gifts |
gift_tiktok.json |
for storing gift bvalue and information |
Upload TiktokIntegration.ino using Arduino IDE. Ensure:
- Your Wi-Fi SSID and password are correct.
Install dependencies:
pip install -r requirements.txtLaunch the script via:
python donasi.py your_tiktok_username your_esp32_ipOr double-click donasi.bat.
- When someone sends a gift on your TikTok live:
donasi.pylogs the event- It sends an HTTP POST request to your ESP32
- ESP32 activates the corresponding relay
You can customize which relay is triggered based on gift name or value inside the donasi.py script.
In donasi.py, you can set logic like:
if points < 100:
activate_relay(1) # GPIO 4
elif points < 500:
activate_relay(2) # GPIO 5
else:
activate_relay(3) # GPIO 2- ESP32 and PC must be on the same Wi-Fi network.
- This is a local-only solution. No internet or server hosting required.
- Make sure to use a power supply that can handle the relays’ load.