What tasks do you automate with Tasker?

Tags: #<Tag:0x00007f3879db38b0>

Hey,
Before I want to start with a tasker plugin, I want to know what kind of tasks you automate with tasker or similar apps.

I am using it for my radio to start, before my alarm clock goes off.
Alltough i wanted to have a look at the send alarm clock function in the android app in the future.
But i am not sure if this will fit my needs.
My alarm app has events that happen some time before the alarm starts and this is very comfortable combined with tasker.

1 Like

I used exactly the same one before, to dim the lights in the morning before the alarm. But then I got a child and I do not need the alarm at all now :slight_smile:
But in the winter it is very useful as it gets very dark and difficult for me to wake up.

1 Like

I use it to send a mqtt message (using mqtt client for tasker plugin) to OpenHAB when my phone rings or I get a text message. It makes the lights blink, Alexa tells me the phone is ringing, depending on the time of day. I leave the ringer off during the week and now I never miss calls.
My phone is kind of old and not much storage, so I don’t load a lot of apps on it. I was reluctant to (buy) try tasker but I was blown away by what it can do! It is the coolest phone app ever.
Also, this setup works flawlessly, it is the most reliable part of my home automation system

I guess I’d like to add that I have a tablet that I use as an interface for OpenHAB using HabPanel Viewer (excellent!) I am planning to also install tasker on the tablet. I can send text messages to the tablet and I envision using text messages to the tablet when I’m not home and the mqtt to OpenHAB to trigger events.
The tablet is also an Alexa, I see many opportunities to combine tasker, OpenHAB and Alexa to do fun stuff.

2 Likes

I use it to mute my stereo when the phone rings and unmute it when the call ends if music is playing. I also use it to do the same when movies are playing or my doorbell ring

1 Like

Hi, a tasker-plugin would be so great!
I’m using a lot of openhab-tasker-functions - but most with quirky workarounds…
I created a tasker-autoremote-persistence - so I can persist Item-states to my phone and react with tasker. (But it’s a very primitive approach - because I can’t develop in java…)
A few little functions, I’m using:

  • Switch the Smartphone-light with a knx-switch near my bed
  • Set nightmode/flightmode when pressing the night-button near my bed, that switches off all lights
  • showing an “open-door” notification on my phone for some seconds when it rings at the door
  • using the notification-tiles for toggling OpenHAB-Items
  • notification-widget with home status

The perfect binding for me would be:

  • bidirectional persistence between tasker varianbles / OH items
  • easy way to call tasker-functions by OpenHAB
  • easy way to change OH items with Tasker in a secure way

AutoWeb (Tasker-Extension) works quite well with OpenHAB and in combination with autoremote and autonotification it’s OK. But if I change my phone it’s a lot of work to transfer…

To persist variable values I’m separate between the important values that must be shared instantly (if it rings at the door) and the ones that will be added to each message from OH to Tasker as kind of payload (for example temperature data).
And each notification needs an expirydate - or the smartphone is flooded with old messages, if it has no connection for some time…

2 Likes

Unlike many here, the vast majority of my automations with Tasker are not home automation related. I actually got started with Tasker way before I got into home automation. I’ve been using it since it was beta. I also use a bunch of the Auto plugins, like AutoLocation and AutoInput. I used to use AutoVoice a lot but Google Assistant has caught up to where I don’t need it any longer.

Time of Day: I have something akin to the Time of Day DP implemented in Tasker which is used by other tasks to make the proper decisions on what to do based on what time it is.

Day of Week: I also keep track of whether it’s a work day or not.

Location: I similarly have a small set of locations where my phone may need to do something when I arrive, like home, work, etc. This is also implemented similarly to the time of day so I can use them in other profiles and tasks.

Device Boot: I make sure to start up AutoLocation’s Geofence Monitor and Location Monitor.

Networking: I have Tasker turn on my OpenVPN connection whenever I’m not on my home wifi.

At Work: When I get to work I change the Tasker Notification Icon and silent my phone.

Work Network: My work has a guest wifi network but they change their password every week. So I used AutoInput to bring up the employee app, copy the week’s password, navigate to the wifi settings, paste in the new password, and connect. I’ve put an icon to do this in the notification-tiles.

Silence: I’ve a set of locations where I want the phone to go silent like at work or the movie theater. I record the current volume, then set the phone to vibrate in these locations.

Driving: This is my most complicated automation.

  • First I start Android Auto.
  • If I’m home, I bring up a dialog to ask if I want to open the garage door.
  • Then I record the current phone brightness and change the brightness to 100%, turn off auto brightness, and change the display timeout to 4 hours.
  • Next I bring up a dialog asking which audio app I want to listen to. Based on the choice it will start that app and automatically start playback. Apps like Audible and LibreVox require AutoInput for this. PocketCasts is nice and implements intents. Google Music just starts playing which is also nice.
  • If I’m home and it is a work day and it’s the morning I bring up Waze and automatically set it to navigate to work (Yes I know the way, I use it for traffic.) If I’m at work and it’s the afternoon on a work day I bring up Waze and navigate to home. I then use AutoInput to scrape the ETA from Waze and send a text to my wife. In all other cases I just launch Waze.
  • Then I bring up the garage door opener dialog again if I’m home as I will have backed out of the garage by now and it’s time to close it.
  • When I stop driving, everything is closed down and the volume and screen is returned to it’s former settings. Many playback apps will automatically back up 30 seconds when disconnected from the BT but for those that will not I use AutoInput to back them up 30 seconds before closing the app.

Playback - For a time I used AutoRemote and an old phone to play music on a not-smart speaker. I had a Google AIY Voice that I’d issue commands to which would use AutoRemote on the old phone to bring up Pandora or Google Music or whatever and AutoInput to start it playing.


With all of the above, you will notice that the only home automation integration I use is to open the garage. However, that may be as much to do with laziness than anything. If I could send intents or interact with openHAB as a plug-in directly from Tasker and vice versa I can think of several things I’d like to do.

  • Right now I issue the commands to open/close my garage through the REST API. I’d much rather have direct access to the Items through integration and let the OH App manage the remote or local connection logic which has to be implemented by hand right now.
  • I’d rather use my time of day from OH than to reimplement it on my phone. The same for day of week and the rest.
  • Rather than sending an SMS, it would be cool if I could send my ETA to OH which can announce it on the Google Homes. I can do this the same way I do the garage door opener now but so far it’s been more trouble to do it that way so I haven’t.
  • Presence detection using Tasker to set an Item when a wifi is near, not just when the device is connected using the Network binding.
  • Because OH has a relatively poor time alarm/calendar support, it would be nice to set an alarm using native Android and have when the alarm is set (I’m not certain Tasker supports this, though I suppose Gentile Alarm might work).
  • For me the GPS/AutoLocation is not reliable or fast enough to really use in my home automation, but others may find it to be a potential replacement for OwnTracks integration.
  • With AutoNotification I can think of other integrations that are currently not possible that might be interesting such as getting an alert into OH when my doorbell is run with my Nest Hello.

The tl;dr is I’d like to be able to use the States of Items within Tasker and I’d like to be able to command or update Items from Tasker. If I can do those two things I’ll be golden.

1 Like

I have just left out the not smarthome related part to be honest^^
I am not doing as much as you with tasker, but have some other tasks set up as well.

  • Classic stuff like turning on spotify when my phone is connected to the car.
  • Watching some folders on my phone for automatic uploads with the foldersync app
  • Reconnecting the pebble watch after the display was turned on 10 times, since pebble and huawei energy management do not work well together

I would definetely be interested in bridging time of day and day of week too.
That sounds useful.

Short off topic part:
Do you have some docs about your set up profiles?
Would be nice to dive a bit into this advanced profiling.

Ditto. I use a combination of Tasker and IFTTT to integrate Sleep as Android into my sleep/wake routine.

I haven’t tested Tasker’s geofencing in a long time, but if it has improved then it would be very helpful for presence detection. I know I could do this by sending intents to IFTTT, but direct control via the openHAB app would be great.

Can you maybe share your settings via pn? :smile:
Maybe i can optimize my rudimentary sleep as android setup a bit.

I don’t mind sharing here in case someone else is interested. It’s nothing too fancy.

Going to sleep

  • I say, “Hey Google, good night” to my bedside Google Mini
  • IFTTT triggers my “Good night routine”, which sends a notification to the IFTTT app on my phone
  • Tasker sees the notification, deletes it, turns on sleep tracking via the Sleep As Android plugin, and enables my “Weekday Wake-up” Tasker profile.

If Tasker could detect state changes via the openHAB app/plugin, then I could remove IFTTT from this workflow.

Waking up

  • Sleep as Android alarm goes off, triggering the “Sleep Alarm started” intent in my “Weekday Wake-up” profile. It also checks that it’s a weekday and my phone is connected to my home wifi (translation: I’m not away and I probably have to go to work).
  • The “Weekday Wake-up” profile is disabled (to prevent it from triggering again after I snooze the alarm).
  • Tasker plays a wave file I recorded on my phone, which announces “Hey Google, good morning”. That triggers Google Assistant to start casting a TuneIn radio station to my Chromecasts and turn on the bedside light.

The last bit seemed like the easiest way to get Tasker to send a command to Google Home, though it remains a bit weird waking up to my own voice. There are AutoApps to do it, but this method is simple and reliable.

I would love if Sleep as Android could trigger openHAB, and openHAB could start casting TuneIn to my Chromecast group. But from everything I’ve read, we’re not there yet.

I did this in a pretty “quick and dirty” way. I have a variable named %RLK_TOD (I put RLK in front of all my variables to make them easier to find in the list). I have a separate Profile for each time of day. So for example Morning State is from 6:01 am - 11:00 am. I only have an entrance Task for the profile and all it does is set %RLK_TOD to MORNING.

Repeat for the other times of day you care about.

(Yep, working from home today :smiley: )

If Tasker would let you have a Profile without a task I wouldn’t even need the variable and could just check to see if the Morning State Profile is active.

Not really but I’ll be happy to answer any questions you have or provide any details explaining how I did anything. I think most of my tasks are shareable too. I’ve only account name and passwords in a couple of places and variables don’t get shared when using the built in sharing function. If you think it’s too off topic for here I’ll happily reply via PM.

I use AutoLocation which works a little better than the Tasker built in geofencing, though to be honest it has been years since I’ve tried the built in stuff. When I last used any geofencing or location based attempts at presence detection (OwnTracks, Tasker, IFTTT) they were all too slow to do arrival detection. And I had to make the geofence larger than I would like to use for actual presence detection (if I’m two or three houses down, should OH really think I’m home?). So I don’t use them and instead rely on WiFi. But with Tasker, you can detect if a SSID is nearby (or AP MAC address if you want that added bit of specificity) and get a much faster and much tighter detection which is fast enough to be used for arrival detection.

Once you’ve detected arrival you’ve basically solved presence so I don’t see the use of GPS based presence. Maybe the GPS apps are better now.

That is my intention too.
I am currently turning on the radio with the “smart mode intent” which gets executed a while before the alarm goes off.
With this trigger i am turning on the radio and increase the volume in smooth steps every 5 minutes.

At least this is the plan, but it doesn’t seem to work stable sometimes.
I am still investigating whats wrong.
(The problem is that i am sleeping most of the time i could debug that in a live environment.:smiley: )

I would love to get the smart alarm event into openHAB and do radio/wakeUpLights all within rules afterwards.
That would be really neat.

I don’t know about you, but there are a few times when I’ve woken up confused because the wake-up routine hasn’t triggered for some reason. I know something’s not right, but I’m too dopey to go beyond that thought.

I live in a condo building, so before I set up OH I tried using Tasker to detect my GPS location when I turned off my car, which would then turn on my house lights in the evening. It was too slow, so I switched to using SSID detection in Tasker and that was marginally better (but still unreliable). Now that I have OH, I’m just triggering the lights when I unlock my door.

So, if you don’t want to wait for the updates to the app, you can do this using OH’s REST API from tasker. That is how I control my garage door opener. Here is an experimental task I shared awhile back showing how to do this.

https://taskernet.com/shares/?user=AS35m8kUuK3OLwOeerzwoTliAX%2B%2FTPWRXm474S3LSRumiYN32eEodwHjMBursvN2IFK1&id=Task%3ASend+Command+to+openHAB

The description tells you what variables you need to set up to use it.

NOTE: The URL will only work if opened from an Android device. If you want it to work when your phone is not on your LAN, use myopenhab.org for the URL.

There is more discussion and ideas in

It will be a lot better to have real integration but we don’t have to wait. Just note that there can be a noticeable delay, particularly when going through myopenhab.org.

That’s nothing the openHAB app and a server side rule could do now :slight_smile: https://www.openhab.org/docs/apps/android.html#alarm-clock

rule "Alarm Trigger"
when
    Time cron "*/10 * * * * ?" // Every 10 seconds
then
    if (AlarmClock.state as Number == 0) {
        // Alarm is turned off
        return;
    }
    val diff = AlarmClock.state as Number - now().millis
    if (diff <= 300000) {
        // Turn on stuff 5 min before alarm goes off
        Radio.sendCommand(ON)
    }
    if (diff <= 15000) {
        // Turn on stuff, e.g. radio or light
        logInfo('AlarmLogger', 'Turn on light')
        Light.sendCommand(ON)
    }

end

The alarm time is sent when the alarm changes. So you could set up the alarm and turn off the phone. openHAB still wakes you up the next morning.

1 Like

I don’t think (but I’m not certain) that Sleep As Android alarm times are synchronized with the Android alarm clock, in which case the OH app wouldn’t be able to pass them to the server.

Also, I’m guessing that by “smart mode intent”, @Confectrician meant Sleep as Android’s “Smart Period”. It’s a 45-minute period before your alarm during which the app will attempt to detect the best time to wake you. If you’re sound asleep, it won’t wake you until the alarm time. Otherwise, it’ll go off sometime in that 45 minutes when Sleep As Android thinks you’re almost awake. An OH plugin for Tasker would be perfect for this scenario.

1 Like

I also use sleep as android, and had it integrated with tasker, and had it send the alarm time to domoticz (before I switched to OpenHab) every night.
And then I had lights come up in that 30min period before the alarm, which helps me a lot with waking up. It was important to me to skip this waking up routine when the alarm is off.

Then if I have the alarm set at 8:00 with 30min “smart period”, lights would come on gradually at 7:30, increase every few minutes and then Sleep as Android would wake me in the perfect minute when I am most awake.
And it was so precise I was almost intimidated by it, as I would be half dreaming about waking up, and in that very second the app would wake me up. I cannot recommend the app enough to friends and family (you need to sleep with your phone for it to work, but its fine with me).

Also would like a way to send some commands to the app from the tasker, either a plugin or some other “simple” way, maybe better documented intents or whatever.

I use MQTT Client plugin for tasker to send mqtt message to OpenHAB. I was a total mqtt noob when I set this up, never did mqtt in OpenHAB before, stumbled thru the set up, got it working and then set tasker up to send mqtt messages.

I’m pretty sure you can send message in both directions