I have setup two different types of reports that can be requested by the Echo and announced by the Echo. The set up is little different for each in the way the code is setup. My thermostat or temperature report uses Sharptools to collect the information. As Sharptools assigns the same “name” to the information gathered, I assign a new variable name for the information for each device. Then at the end I have one report with the variables plugged in. Please note that attributes vary between devices and device types used. Your thermostat and temperature sensors will likely have different attributes reported than mine. When subscribing to these attributes in Sharptools it will show you a list of what’s available.
The second report I setup checks the status of doors and locks. While I don’t use variables here, it is slightly more complicated because I link two tasks. The first task checks doors and locks, and transfers to the second task if it finds anything open. If nothing is open, the first task continues and will announce that everything is secure. The second task will announce each door that is open and end with the statement “End of report.”
The steps below are written for someone with limited Tasker experience. I am no Tasker expert and there maybe better ways to achieve the same result. This is what worked for me.
Before starting the steps below you need to have installed and setup Sharptools. Additionally, you need to have created a Momentary button tile for the Echo to activate. My activation phrase is “Alexa, turn on Thermostat Report.” Finally, the Echo needs to be paired to your device.
The first step is to setup a new task. In Tasker, select the Tasks tab at the top. Then select the plus sign at the bottom and name your Task. Below is what me completed Task looks like. The steps below match the Task numbers.
- In your new Task, press the plus sign on the bottom. Next select the box labeled Plugins. Now select Sharptools. This will open up a Sharptools dialog box. Select “Things: Get Attribute.” This will open an Action Edit screen in Tasker. Press the large pencil icon on the Configuration line. This opens the Sharptools selection screen seen below.
Select the device and attribute you want to monitor and hit Apply. This will take you back to the Action Edit screen. Tap on “Action Edit” at the top to go back to the Task screen. You should now see line 1 of your Task.
- Select the plus at the bottom. Select the box labeled Variables. Next select Variable Convert.
In the name field enter %st_attr_value. This is the value retrieved by Sharptools. On the Function line select the triangle at the end of the line. Scroll down and select “To Lower Case”. Next, on the Store Result line enter %”whatever text you want”. The Label line is optional and only provides a label in the Task screen. Click on Action Edit to return to Task Screen.
3 & 4. Repeat steps 1 and 2 for as many thermostats and temperature sensors you want in the report. Just make sure the names in the Store Result line is different each time.
5 & 7. These steps just set the volume on Echo for the report and after. Select the plus at the bottom. Select the Audio box. Next select Media Volume. Enter your choice of volume. Click on Action Edit to return to Task Screen.
- Select the plus on the bottom. Now select the Alert box. Next select Say. My setup is below.
For text enter what you want the Echo to say. Make sure you include the variable names you setup. Next select the Engine Voice. I used Ivona with the British accent. Then make sure to choose Media under Stream. The voice pitch and speed can be set to your taste. I don’t check any of the other boxes.
Now hit the play button at the bottom left to test your Task. Then hit the Task Edit at the top to save your Task.
Now you need to create the profile to trigger the Task. Click Profiles on the top tab. Next click the plus on the bottom right. Now click on Events. Select the Plugin box. Then select Sharptools. Select Thing State. Select the pencil on the Configuration line. Now write in the name of the Momentary Button Tile you created for this report. Leave the Attribute line empty. Hit Apply. Now hit Event Edit at the top. Now you will need to pick the Task you just created.
That should be it. Good luck.
If anybody would like a walk through for the other type of report I created please let me know.