Designing the Ambience Manager Skill

Our Ambience Manager Skill will have at least five moving parts, including a User that interacts with Amazon Echo, which in turns communicates with the AWS Lambda, which in turn fetches the temperature information from the Firebase cloud. The temperature information will be pushed to the Firebase cloud via the Mobile Device, which reads it from the Ambient Sensor. The flow of information is shown in the following diagram:

Figure 6.2: Data flow in Ambience Manager Skill

The ambient sensor will communicate the ambient parameters, that is, temperature and humidity, to a mobile app over BLE.

This will eventually upload the ambient parameters to the Firebase backend.

Firebase is a real-time database by Google. To learn more about Firebase, visit https://firebase.google.com/.

Once the data is available on the Firebase backend, the user will be communicating with the skill as follows:

Figure 6.3: One-Shot Launch for Ambience Manager Skill

Do you notice something different?

If you have not already noticed, we did not launch the skill (as we did for all the previous Alexa skills that we created), and yet went ahead to ask about the room temperature directly. This is what is known as One-Shot Launch, which is when a user launches a skill and requests some information from it. We will be covering the One-Shot Launch/Invocation in detail once we design/code the actual skill.

If the One-Shot Launch was successful, the Ambience Manager should reply with the correct temperature:

Figure 6.4: Dialog flow For Ambience Manager Skill

So much for the user interaction. The overall information flow of a typical session can be mapped out as shown in the following diagram:

Figure 6.5: Skill operation for Ambience Manager Skill

With our data flow in place, we now take the next step: creating an Android app that will read data from the ambient sensor via BLE and then push that data to the Firebase backend.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.133.140.79