Android based Rule Machine

I've set up some handy gentle wake up 4.0 rules which are working nicely. Thanks to the community for great ideas on that thread.

My days are typical, but when they are not (like if I have to catch an early flight) I find myself going into the RM and pausing the rule or missing the gentle wake-up that I"ve become accustom to.

What if RM noticed my Android alarm settings and applied a parameter like alarm time from the clock and based the RM off that time?
It would look like this:

If {android alarm time} between [time range] then insert {android alarm time} into [RM Parent Name] - [RM Child Name [Gentle Wake-Up]] as {Start Time}

Where between [time range] is intended to capture the morning wake-up time block.

Then the RM 4.0 begins:
Select Trigger Events:
On Mon, Tue, Wed, Thu, Fri at {start time} MDT...
image

Tasker should be able to do that on your Android easily if you have it installed. Profile ==> Event ==> Alarm Ringing (or Alarm Done) then it performs an HTTP request to trigger a Hubitat Rule. If you don't already have Tasker, it's AWESOME!!! but it will cost you around $4 I think. It's no harder to setup Profiles in Tasker that it is to setup a Rule in HE.

2 Likes

@stephen_nutt I finally have a bit of spare time to tackle this. So I bought Tasker, setup a profile for Alarm:
Profile -> Event -> Alarm Clock -> HTTP Request (POST) [enter Hubitat URL from Cloud End Point]
Modify Gentle Wake-up trigger event to remove Day/Time, add Cloud End Point.

What am I doing wrong? And thank you.

Do you know where its failing? Is the HTTP Request not firing when the alarm hits or is Hubitat failing to act on request?

I use tasker. I have not done what you've done, rather, I've gone a different route.

Read this: Bedroom lighting: how to?

Interesting... Yours wouldn't work for me because I don't have qi charging.
But I could learn from you on how you connect Tasker to HE. In Tasker what does your profile look like? Specifically are you using the HTTP Request or something else? If HTTP Request, Get, Post or what? Then are you putting the local End Point url?

I dont use QI charging either. I use powered charging with the phone face down as the trigger.

This is the profile: (like a trigger in HE).
image

This is the task that is called (like rule actions in HE).

image

The HTTP Request is Maker API, which inside the app has a link to a device (a virtual switch, that is turned on when I go to bed, and off when I get up - by another rule in takser/HE).

The format of the HTTP req is as follows: (which is called by tasker).

http://HubIP/apps/api/makerAPI#/devices/VirtualDevice#/on?access token.......
http://HubIP/apps/api/makerAPI#/devices/VirtualDevice#/off?access token.......

2 Likes