I've built a home automation system that is currently being used by many customers. The home automation system consists of a central hub which always connected to a cloud server and also it controls various node devices.I've also developed a mobile app to control home devices remotely.
Now I want to add a voice control functionality to my system.I think Amazon Alexa is the perfect choice for my need because most of my customers own an Alexa. I will give an overview of what I want to implement.
Let's say a customer is giving a voice command to Alexa like Alexa, turn on living room's floor light
. After receiving such a command Alexa should do a POST request to my cloud server with the parameters: Turn On, Living Room, Floor Light
via an API. The server gives an API response to Alexa as a string like Turned on floor light of living room
, which should be played back on Alexa.
So here are my questions. How can I configure Alexa to call an API and playback API responses? and how can I provide this functionality to every user who owns an echo and my home automation system?