Integrate ESP32 with Sinric Pro and Alexa
Sinric Pro is a IOT platform for home Automation.The device like Raspberry,ESP8266,ESP32,Arduino can be intgrated very easily and can be controlled through Google Home,Smart Things,Alexa,IFFT.
It is a very easy use platform. It can be setup within very short period time by using following steps.
1. Create the account and do login
2. Add new device
3. Download example from github or install Synric Pro library with dependencies like Arduino Jeson and web socket.
4. Link your Sinric Pro account with apps like Google Home,Alexa,SmartThings(You can download these apps from Google Play store) and IFTTT.
Now the device can be easily controlled through these app.
Code for Arduino IDE for using ESP32 with SinricPro
1. Open Arduino IDE, go to Tools-> Manage Library and search Sinric Pro and install the SincricPro with the dependencies like Arduino Jeson and websocket.
2. Now goto File-> Examples->SinricPro->Relay. Open the code and enter wifi SSID,Passwod,Api credentials for the SinricPro account.
#include "SinricPro.h"
#include "SinricProSwitch.h"
#define WIFI_SSID "YOUR-WIFI-SSID"
#define WIFI_PASS "YOUR-WIFI-PASS"
#define APP_KEY "YOUR-APP-KEY" // Should look like "de0bxxxx-1x3x-4x3x-ax2x-5dabxxxxxxxx"
#define APP_SECRET "YOUR-APP-SECRET" // Should look like "5f36xxxx-x3x7-4x3x-xexe-e86724a9xxxx-4c4axxxx-3x3x-x5xe-x9x3-333d65xxxxxx"
#define SWITCH_ID "YOUR-DEVICE-ID" // Should look like "5dc1564130xxxxxxxxxxxxxx"
#define BAUD_RATE 9600 // Change baudrate to your need
#define RELAY_PIN 2
The Credentials page for the SinricPro looks like this.
Copy the API-KEY and API_SECRET Key from this page and copy SWITCH-ID from Device from Device page. Set the Relay pin appropriate ESP board used.
3. Compile the code and connect ESP board to the USB port of PC.Select the appropriate Board and com port in Tools and Upload the Code in ESP Board.
The Device Relay can be operated through the SinricPro Dashboard.
The device can also be controlled through Google Home,Alexa ,Smart things,IFTTT.
To see details on how to integrate ESP32 with SinricPro and operate it,watch the following YouTube Video.