The complete tutorial in English can be found here:
https://www.instructables.com/id/Alex...
or in Portuguese:
https://mjrobot.org/2017/08/22/alexa-...
This is a new version using FauxmoESP library
Home Automation with Alexa and NodeMCU: Discovering Devices phase
WeMos smart devices emulation using FAUXMOESP Library
Code based on the great open source lib & example code at http://tinkerman.cat/emulate-wemo-dev...
which is based on the Python example code by https://github.com/makermusings/fauxmo
Also, thanks to Sid for Sid's E Classroom: / sidseclassroom
fauxmoESP is a library for ESP8266-based devices that emulates a Belkin WeMo device and thus allows you to control them using this protocol, in particular from Alexa-powered devices like the Amazon Echo or the Dot.
7 devices to be discovered:
4 Simple WeMo devices
Light1 == Relay 1 == NodeMCU D5
Light2 == Relay 3 == NodeMCU D7
Outlet1 == Relay 2 == NodeMCU D6
Outlet2 == Relay 4 == NodeMCU D8
3 Groups of devices
All Devices
Living Room (Light1 and Outlet1)
Bed Room (Light2 and Outlet2)
To discovery devices for the first time, use voice command:
"Computer (or Alexa), discovery devices"
To activate a device or a group of devices, you should use voice commands, like:
"Computer (or Alexa), turn on Light1" or "..., turn off Light1"
"Computer (or Alexa), turn on Living Room" or "..., turn off Living Room"
"Computer (or Alexa), turn on All Devices" or "..., turn off All Devices"
Developed by Marcelo Rovai on 19Aug17
Code at my GitHub: https://github.com/Mjrovai/Home-Autom...
Visit my blog: https://MJRoBot.org