What tasks do you automate with Tasker?

Play Store says 2.10.8-beta, but the app says 2.6.21-beta.

I will uninstall and reinstall completely.

EDIT:

And here we go.
Works like a charme. Seems that the play store update didn’t work.

I dont see a ‘next alarm set’ event. Am i missing something?

I use the smart period action for getting an event before the actual alarm goes off.

See:

Ah yes, I was afraid so. I dont always have a stable connection between my phone and OpenHab so I prefer setting the alarm upfront instead of being dependent on an event while I’m sleeping;) Then I will keep using the Alarm option in Openhab Android app, but that mostly requires Openhab app to be opened before my alarm is set for it to work (maybe Huawei battery restriction or something)

… i know that feeling. This will be the first and last Huawei for me.
I am tired of removing battery optimization settings in ten places to keep my phone running like i want to.

myopenhab is no (at least temporary) option?

This might help you: https://dontkillmyapp.com/huawei
The openHAB app will be waken up by an Android broadcast, at least if Huawei didn’t change something.

1 Like

I have a self hosted myopenhab instance but that won’t solve my issue right? If my phone deep sleeps and misses the event or my connection is flaky at that moment, i won’t be able to update the item in Openhab.

I love my Huawei, it lasts twice as long on the battery as my precious S10 but I agree with you regarding the ten places you have to disable battery saving settings :frowning:

I will check that out, but I am a bit afraid to just deinstall it without being able to restore it again :wink:

Version 2.10.11-beta supports error reporting. You need to re-select the item/state to enable this.
The tasker jobs now wait for the item update to succeed before proceeding with the next action.

3 Likes

That is an awesome improvement! Thanks!

Version 2.10.14-beta supports Item commands or Item updates.

3 Likes

Hey everyone!

Sorry for digging up this quite old topic :confused:
I was wondering, how you connected Sleep As Android to openHAB.
What I am trying to do:
When setting an alarm in Sleep As Android, that time should be send over to my openHAB and 30 minutes before the alarm goes off, I want to turn on the heating in my bathroom.

What would I actually need?

Tasker? If yes, what exactly? Does anyone have a profile for me (screenshots) that I could copy?

OpenHAB App on my phone?

Very kind regards!!!

Dustin

This is what I’m doing. I have a second project that handles the authentication and REST calls to openhab. You’ll have to add your username and password.

You’ll notice that I have an HTTP call to set item states but the openhab app action disabled. I did this because going through the openhab app was significantly slower.

There appear to be duplicate actions to send the next alarm, but one is used to store the next alarm in a variable and the other to send it to openhab. I have other things that need the next alarm time for triggers, if you don’t need that you can remove Get Next Alarm and all calls to it.

You will need to add 2 variables in the OH project:

%OHHOST = "openhab host or address"
%TEXTPLAIN = "Content-Type: text/plain"

SAA.prj.xml (41.6 KB)
OH.prj.xml (4.0 KB)

1 Like

The Android openHAB app will send the next alarm to an openHAB Item. I believe this works with Sleep as Android too since Sleep as Android sets the alarm. What I don’t know is when Sleep as Android sends the next alarm when it’s basing it off of when you go to sleep. I would hope that it sends it early enough.

Anyway, assuming that Sleep as Android’s alarm time gets set at least 30 minutes before it’s to go off, than all you need is a Rule to trigger when the Alarm Item changes and set a timer to go off 30 minutes before that time to start heating the bathroom.

Right, I forgot to mention that that feature was added after I made this setup and I haven’t had time to test it yet. Also a DateTime item now accepts epoch millis.

I assume that you’re using Sleep as Android’s Smart Wake Up feature to sound the alarm when your phone detects that you’re in a light sleep phase. If so, there’s no way to have your heating start exactly 30 minutes before the alarm sounds, because Sleep as Android doesn’t know exactly when it’s going to wake you up every day.

Unfortunately, there’s no Sleep as Android event for “I think you’re going to wake up soon”. So, you really have two options: “Alarm started” or “Smart period”.

If you tend to hit the snooze button a few times (as I do), “Alarm started” would work well. I use this to run my wakeup routine on weekday mornings, which casts a radio station to my bedroom TV and turns on my bedside light if it’s dark.

If you don’t snooze very much, you can use the “Smart period”, which starts 45 minutes before the earliest time that your alarm will go off. If 45 minutes is too long, use a timer in your rule to delay the heating command as long as you want.

Keep in mind that if you act only on the Sleep as Android event, Tasker and openHAB will turn your bathroom heat on whenever the event triggers…no matter where you are. I have Tasker set up so that it will only trigger my wakeup routine if my phone is connected to my WiFi, ensuring that I’m waking up at home.

1 Like

Good point. I’m handling this with rudimentary presence detection using Owntracks. My openhab rules do nothing if the SAA event fires and I’m not home.

I’m doing some things not involving the OH Android app, but still tasker and OH related. In my case, these actions are for some cheap wall-mounted tablets:

Action A - Show video overlay on tablet when activity detected
This one is handy since you can get a hands-free view for who’s at the door.

On motion detection for each zone, I have OH send an MQTT message out. Tasker picks up the activity and triggers the Overlays app to show a live camera feed on top of whatever screen is on at the time.

Quick sample:

Action B - Turn on tablet when motion detected
To save power and display, I have the tablets sleep after inactivity.

Similar to above, this one uses MQTT for each room. From there, tasker picks up the MQTT trigger (with the help of the awesome tasker MQTT plugin), wakes the display, and automatically sets it to the default view.

2 Likes

Tasker pops up a snapshot of my entrance surveillance camera on my phone and triggers a notification sound when the zigbee doorbell button is pushed.

1.I set my presence depending on the location.
2. I let Tasker transmit the caller ID to OH and have it announced to me as TTS from my Google Home devices.
“Max Mustermann is calling on the cell phone” sounds in all rooms.

2 Likes