I will check that out, but I am a bit afraid to just deinstall it without being able to restore it again
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.
That is an awesome improvement! Thanks!
Hey everyone!
Sorry for digging up this quite old topic
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)
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.
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:
https://i.imgur.com/UbGjPli.mp4
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.
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.