Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Control ESP8266 over Facebook chatbot

Overview

This project made to control ESP8266 by message on Messsenger. You can develop it to control home lights...
Sample:
Sample

Folder structure

  • web-callback : Chatbot and MQTT communication.
  • esp8266 : Code for ESP8266.

Prerequirement

  • MQTT broker: I suggest Eclipse Mosquitto on Ubuntu.
  • Python packages: flask, requests, paho-mqtt.
    cd web-callback; pip install -r requirements.txt
    
  • Arduino IDE.
  • Pubsubclient library.

Installation

Create a facebook page and register webhook

  1. Create a page for your chatbot. create-page
  2. Go to facebook for developer and create an app.
  3. Create webhook for your page. It will be the URL of your chatbot. docs1, docs2 create-webhook

Config and start chatbot

  1. Start mosquitto broker.
    sudo service start mosquitto 
    
    You can use ngrok to tunnel your broker.
  2. Change configuration in web-callback.py to match your webhook setting and topic you use to communicate with ESP8266.
  3. Start chat bot
    python3 web-callback.py
    
    Or run it in development mode
    export FLASK_ENV=development
    python3 web_callback.py
    

Flash ESP8266

  1. Change configurations in esp8266.ino
  2. Upload the sketch.

About

Control LED by messaging to Facebook chatbot.

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages