I'm kind of busy at the moment with some other projects in my life but it's been a while since I promised to make a video with the integration of Amazon Alexa and Particle.io devices. I still don't have all the time to explain details by detail, but I'll try to simplify my explanation about the setup to control and read some sensors using Alexa command voice and photon devices from Particle.
"Alexa, I need this..."
Right, It all started when I decided to watch some videos on youtube about integration of Alexa code inside an raspberry pi, it's was cool to see that I could using a simple SBC as rpi to control all things inside my house. But seeing the mods that would be need to do something like Alexa, I would need to spend a lot of time to transform this into a smart assistant easy to use or deploy, then I decided to buy an original Alexa device as echo dot 2.
It's no cheap in Brazil to buy a hardware like this but if you'll use for something useful or cool (It's cool for me :D) can be worth and reading some comments in the Internet I found that the integration with the IFTTT works very nice, soon one more reason to spend my money on this.
Indeed, amazon has a lot of useful tools to create apps for Alexa, even using his own platforms as AWS Lambda and other tools. It would be cool to create a custom skill (skill is the next word after 'Alexa', to wake up the voice assistant) but as I explained before, my time limitations are short. With IFTTT.com I could just integrate my device and after say 'Alexa, trigger ......' and then write my own phrases for ifttt parse for me, thus by this way that I decided to use ifttt to integrate smart home applications in my room.
Hardware for the "smart room"
Ok, I had Alexa but I still would need a hardware to integrate with IFTTT platform, then scrolling in the website I found that Particle.io Devices were compatible with IFTTT too (God bless IFTTT!). As I had bought some Photons a long time ago, I think that'll would be the best time to use them in a project and take take from my locker. If you still don't know Photon, this device it's a powerful Microcontroller Wi-Fi that can be programmed with Arduino-like code style directly from the web and then flashed with OTA.
With my photons in the table, I decide to create two devices to control and read under Alexa command voice. One would be a central with a tft display, just to act as a logger of events and gateway for other sensors and lights (RGB Strip of LEDs / Electric door lock / Reed Switch State Door) and a LED Light Lamp for my room controlled by a MOSFET to dimmer in any range comfortable to my eyes. So, the images below are the both hardware devices that I developed:
Controlling the devices with Alexa
Once everything was ready I decided to create a lot of triggers and events in IFTTT, but the basic commands that I would like to have were:
- Dimmer my LED light 0-100% with voice commands;
- Open my door by voice commands;
- Change RGB LED Strip colors with voice commands;
As I had a central with two sensors input for reed switch, I decided to put one sensor for the ring and the other for door status both that would inform status in the Internet for me (using Particle console, a cloud event console for Particle devices). After done, the flux of the information and commands were something like this image:
It's complicated to explain all detailed steps of what I've done, but if you get interested in the project, comment below and I'll explain and show the source files. In the end, I recorded some amateur videos to show all the things working:
Controlling a LED Light
Playing with RGB Strip LEDs
Testing LED Light
Controlling an electric Door Lock
If you enjoyed, just share and/or subscribe!
Subscribe to @aignacio's
Get the latest posts delivered right to your inbox