ESP32 IFTTT Application
IFTT Get Started
IFTT Login with Google
IFTT Login with Google
IFTTT Logged In
IFTTT Create Applet
IFTTT Create Applet
IFTTT Create Applet
輸入
選取
IFTTT Create Applet
輸入
選取
IFTTT Create Applet
輸入
IFTTT Create Applet
IFTTT Create Applet
IFTTT Create Applet
IFTTT Create Applet
IFTTT Create Applet
IFTTT Create Applet
IFTTT Create Applet
IFTTT Create Applet
IFTTT Create Applet
IFTTT Create Applet
IFTTT Create Applet
IFTTT Webhhoks
IFTTT Webhhoks
IFTTT Webhhoks
Copy
IFTTT Webhhoks
https://maker.ifttt.com/trigger/ESP32_message/with/key/e2L........asdf
?value1=10&value2=20&value3=30
IFTTT Webhhoks Colab
IFTTT Webhhoks Colab
IFTTT Webhhoks Colab
IFTTT Webhhoks ESP32
import network
import time
import urequests as requests
print("Connecting to WiFi", end="")
sta_if = network.WLAN(network.STA_IF)
sta_if.active(True)
sta_if.connect('Wokwi-GUEST', '')
while not sta_if.isconnected():
print(".", end="")
time.sleep(0.1)
print(" Connected!")
# Define the API key and URL for the GET request
api_key = ".................your_key................"
ifttt_url = "https://maker.ifttt.com/trigger/ESP32_message/with/key/" + api_key\
+"?value1=10&value2=20&value3=30"
res = requests.get(url=ifttt_url)
print(res.text)
IFTTT Webhhoks ESP32
import network, time
wlan = network.WLAN(network.STA_IF) # Initializes the station interface
wlan.active(True) # Activates the WLAN interface
ssid = 'CSIE_C306'
passwd = '@ndhuc306'
connected = wlan.isconnected() # Check if the connection was successful
if not connected: # if it is not connected
print(f'Trying to connect to {ssid}') # Display a message indicating an attempt to connect
wlan.connect(ssid, passwd) # Attempt to connect to the Wi-Fi network again
for _ in range(100): # Try to connect 100 times, waiting 0.1 seconds each time
connected = wlan.isconnected() # Check if the connection was successful
if connected:
break # Break out of the loop if connected
time.sleep(0.1) # Wait for 0.1 seconds before checking again
print('.', end='') # Print progress dots to indicate ongoing connection attempts
if connected: # If connected successfully
# Display successful connection and network configuration
print(f'\nConnected to ssid {ssid}. Network config: {wlan.ifconfig()}')
else: # If the connection failed
print(f'\nFailed. Not Connected to: {ssid}') # Display a failure message
import urequests
# Define the API key and URL for the GET request
api_key = "....................your_key....................."
ifttt_url = "https://maker.ifttt.com/trigger/ESP32_message/with/key/" + api_key\
+"?value1=10&value2=20&value3=30"
res = urequests.get(url=ifttt_url)
print(res.text)
ESP32 IFTT Appplication
By wschen
ESP32 IFTT Appplication
This presentation introduces the ESP32 IFTTT application and provides a step-by-step guide on how to get started and create applets using IFTTT. It also covers the process of logging in with Google and using webhooks.
- 81