At the end of this tutorial you'll be able to do something like this:
- When an alert occurs your google home will start saying it out loud every 5 minutes
- If you say "ok google ask autovoice to dismiss the alert" it will stop repeating it until another alert appears
- You can set alerts locally or remotely using an AutoApps command. This means that you can set it from everywhere. For example, you can set it from IFTTT (with Join), from a notification (with AutoNotification), from your smart watch (with AutoWear), etc.
STEP 1 - SET ALERT WITH AUTOAPPS COMMAND
This will set the global %AlertText variable to whatever is on the right of the =:= whenever AutoApps receives a command that contains alerthome=:= in it. Check here to learn more about the AutoApps command system.
- Create a new profile in Tasker with the AutoApps Command event condition
- Set the command filter to alerthome=:=
- Set the command variables to alert text
- In the task use a Variable Set action to set %AlertText to %alerttext
- Optionally enable the Append option in the Variable Set action if you want your alerts to accumulate and not overwrite each other
STEP 2 - CREATE PROFILE TO CAST ALERT
Be sure to add your Cast devices first in the main AutoCast App -> Manage Cast Devices
- Add a new profile with the Variable Value condition
- Make the condition %AlertText Is Set
- In the task add an AutoCast Speak action
- Set the device to your Google Home device
By setting it to repeat every 5 minutes you'll make sure you don't miss the alert until you dismiss it with a voice command
- Set the text to %AlertText
- Go back and a Time condition to the profile
- Set it to be active at whatever times you want to receive alerts. In this example I set it to receive alerts between 8:30 AM and 8:30 PM
- Set it to repeat every 5 minutes, or whatever interval is right for you
STEP 3 - STOP AUTOCAST AFTER ALERT IS DONE
This will make AutoCast stop casting after 30 seconds so if you feel your alerts will take longer than that make sure to wait a bit more time.
- In the task you just created add a Wait action that waits for 30 seconds
- Add an AutoCast App action and accept it.
STEP 4 - CREATE PROFILE TO DISMISS ALERT
This will make Tasker clear the %AlertText variable whenever you say something like Ok Google, ask autovoice to dismiss the alert
- Add a new profile with the AutoVoice Natural Language condition
- Create a new command with commands like dismiss alert,cancel alert,I've heard the alert
- Set responses to something like ok alert dismissed,ok I'll stop bugging you now
- Accept the default command name and action and accept the condition
- In the task use the Variable Clear action to clear the %AlertText variable
- Optionally rename the 3 profiles so they are easier to figure out when looking at them quickly
STEP 5 - TEST
Notice how this command matches the command filter used above in the AutoApps condition on Step 1
- Create a new Task called Test Alert Google Home
- Add an AutoApps Command action
- Set the command to alerthome=:=testing an alert
- Run the Task. You'll now notice that the variable has been set in the VARS tab in Tasker and that the Cast Alert Text profile is partially enabled. Now every 5 minutes that profile will become active and cast to your google home whatever is in the %AlertText variable
You can now send the alerthome=:=whatever text you want command from anywhere you like!
Any situation imaginable can now be the source of your alerts!
- You can set an alert text from any Tasker action like in the example you saw on step 4. Remember that you can use a variable, so for example you could use the alerthome=:=%alert if the %alert variable contained some text in your task. This allows you to set alerts from calendar events for example, if you use the Calendar Entry condition in Tasker and then the AutoApps Command action in the task
- You can use the Join API to set an alert remotely from anywhere on the web including IFTTT. For example you could create an applet on IFTTT with a Weather condition and in the action send the command to your device with Join. This would allow you to receive rain alers on your Google Home for example.Use a URL like https://joinjoaomgcd.appspot.com/_ah/api/messaging/v1/sendPush?deviceId=YOUR_DEVICE_ID&text=alerthome=:=an alert from join
- You can set a notification action in AutoNotification to alerthome=:=an alert from autonotification for example
STEP Extra - EXAMPLE BATTERY LOW
Create profile with the Battery Level condition and in the task send the alerthome=:=Attention your battery is low command with AutoApps
STEP Extra - ALERT WHEN IT RAINS TOMORROW
On IFTTT create an Applet with the Weather Tomorrow Forecast Calls for rain condition and in the action call your Join URL with the command alerthome=:=Attention!! Tomorrow is going to rain!
STEP Extra - ALERT BASED ON TRAFFIC
Create profile that checks every day at a given time (in this example at 8:25 AM) for the traffic. In the action use the AutoWeb action with the Google Travel Directions API.
AutoWeb is currently in beta, get it here.