Ask Alexa - Voice Reports
Voice Reports is an extension to Ask Alexa, the popular SmartThings Add in. You must be running Ask Alexa to use Voice Reports. More information about Ask Alexa can be found here: Ask Alexa
Voice Reports gives users of Ask Alexa a number of options of how to report on areas of the household. This could include status of lights, devices with batteries, or even the status of water sensors around your house. Coupled with advanced voice filters, you have a powerful mechanism to actively report on the areas of your home, querying and responding in a very conversational manner.
Category: Ask Alexa Extension - Requires Ask Alexa
ST Community handle: https://community.smartthings.com/users/michaels/activity
|Ask Alexa Extensions||Area Used||Version||Location|
|Voice Report Code||SmartThings IDE||1.0.9||https://github.com/MichaelStruck/SmartThingsPublic/blob/master/smartapps/michaelstruck/ask-alexa-voice-report.src/ask-alexa-voice-report.groovy|
Ask Alexa Extension Code Installation
To install the extension use the code located here:
The steps for installation of the extensions are almost exactly the same as Ask_Alexa#Ask_Alexa_Code_Installation:
- Copy the raw code from the GitHub link above
- Go to the SmartThings IDE page and log in
- Click the My SmartApps link
- Click the +New SmartApp link
- Click the From Code tab
- Paste the GitHub code in the open area
- Click Create from the bottom left corner
- Save the code using the button in the upper right-hand corner of the page
- There is no need to do any OAuth settings on extension code.
Please Note: You DO NOT need to publish the extension code; however, there is no harm in doing so. Simply be aware that if you publish it the extension will show up in the SmartThings Marketplace. However, you should NOT install it from there... Ask Alexa will utilize this child code from the main (parent) application.
Creating A New Voice Report
To create a new voice report, find the green button labeled <<Create A New Voice Report...>> within the <<Ask Alexa Extensions>><<Voice Reports>> area.
There are multiple types of voice reports to choose from and they can be combined into one large report if you wish. Many of the reports allow you to consolidate the devices' status into one statement. For example, if you have a large number of switches you are monitoring but are only concerned about the ones that are on you can specify just to give that information, or if they are all off, it will state that without listing each one. In addition, some devices like motion or presence sensors allow you to create a report of the last time the device was active. This is great for remote monitoring of a location to ensure there is activity (Maybe an aging parent or family member).
Start off like any other extension or macro: first, name the report. Please note you can create aliases for your report as well. This is useful to give you a more conversational method of interacting with your Alexa Connected Device. Let's say you have a presence voice report that simply states who is home. An alias for this might be called "Who is home", in which case (depending on your settings) the response could be a list of presence sensors that are reading 'present.'
Once the macro is named, there are multiple options you have for the output of your report:
|Switch/Dimmer Report||This report allows you to define switches or dimmers that will be reported on individually. There is also an option on this page to consolidate the reports, and have it only announce when the monitored switches or dimmers are on.|
|Door/Window/Lock Report||This report will allow you to get a consolidated report of the open windows, unlocked doors, or open sensors. You can also get the status of window shade and set options for speaking the last time a window or door was opened, or when the last time a lock was unlocked. Please note that by default the report will only devices that are open or unlocked. To have a report on the status of every device (not advisable...it can be lengthy) you should run a summary report.|
|Environmental Report||As the name implies, this will report out specific enviromental readings from your SmartThings devices. For example, you can read the temperature and humidity devices in the house (or have the option of giving you just the average of the readings of two or more devices). It will also allow you to check the setpoints of various thermostats (and options to get current attributes like temperature, humidity and device state/mode). In addition, you can get the UV reading from an outdoor weather device.|
|Foobot Air Quality Report||This report should ONLY be used with the Foobot Air Quality Monitor device (Information here : Foobot_Air_Quality_Monitor). This report will give you the air quality from the device, along with options to give other pollution and environmental readings.|
|Speaker Report||Just like the other reports, you can have Ask Alexa include a speaker report with the other reports within this macro. Please note that there is a refresh time if you manually turn on the speaker before SmartThings registers it. This could be up to 5 minutes, in which case, the report may be inaccurate. When it does refresh, the speaker will tell you what it is playing and the volume level.|
|Presence Report||This area will allow you to set up granular reporting of individual presence sensors, including listing all device statuses, sensors that are present only, or ones that are away. You can also get a reading of when the last arrival or departure was from a presence sensor (be it physical or virtual presence sensor)|
|Other Sensors Report||This is an area for other sensors you may have within your SmartThings account. Currently, acceleration, water, motion sensors, room occupancy and power meters are supported. For motion sensors, you can also get a report of the last time a motion sensor registered movement.|
|Device Health Report||This will report the device status according to SmartThings. There are options to give a summary (if all are online) or simply report ONLY offline devices. Please note that devices may be marked as "offline" for a variety of reasons; this report will simply allow you to report on them and investigate.|
|Mode and Smart Home Monitor Report||This area gives you the option of speaking the current mode and Smart Home Monitor (SHM) status.|
|Battery Report||This report will allow you to call out when a device (with a battery) is below a certain threshold.|
|Include Other Reports||This area will allow you to include weather, other voice reports or even message queue contents in the output of the current report.|
In addition to these reports, you also have the option of entering customized text that will be spoken before and after the main report. In the example above, this report was created to be played back at night, ensuring all doors and windows were closed and locked, wishing the user a good night's sleep. In this free text area you can add certain variables to give day, date and time the report is spoken. Examples of these variables are outlined in the Ask_Alexa#Global_Variables section.
Finally, at the bottom of the voice reporting page that will allow you do a couple things to filter the voice report. First, you will have the option to filter out words or phrases from your voice report. For example, let's say you prefix all of your switches with a text code for multiple locations (Like "BB"). While this is great for visual organization, you don't want to constantly hear "BB". Another example would be to remove all but a piece of the voice report. Let's say you can the voice report output of the last event. You could remove all of the standard text except the time stamp. To do this, simply put the text your want filtered, separated by commas. In these examples, you filter would look like this: BB, The last event. "BB" will be removed as well as any instance of "The last event".
Also part of the filtering options is the ability to only speak the time and date if you choose to speak an event status. Consider this use case: A user has a motion sensor on a dog door. In your pre-message you would put "The last time Fido was outside was " and then choose the motion sensor (making sure you configure it to only read when active and to give the last motion event). Naming the report something like "When was Fido outside last", you could then say <"Alexa, ask SmartThings when was Fido outside last">. If you set up the macro correctly, you will get a response appearing to answer your question.
Voice Reports, along with weather reports or message queues, can be activated with a voice command, or with the Alexa Flash Briefing function (See: Ask_Alexa#Flash_Briefing)
Just like macros, you have the option to restrict when the voice report activates. These include restrictions based on the day of the week, time of day, which mode you are in, whose presence sensors are 'present', which Alexa you are commanding or which switches are on or off. These restrictions, by themselves, may not be very useful on their own; however, when used with extension groups, the responses can be more 'dynamic', possibly playing different reports based on the the day of the week.
Reminder About Amazon Developer Slots
Please remember ANY changes or additions you make to your Ask Alexa environment should immediately be followed up with running <<Settings>> <<Setup Variables>> in the main Ask Alexa SmartApp. This will allow newly created voice reports to be reflected in the Amazon developer site. See Ask_Alexa#Setup_Variables for more information.