Custom automations not triggering based upon Period of Time

Devices:

  • Hub
  • Multipurpose Sensor
  • Outlet

All of these devices are brand new off Amazon, most recent version / gen.

My requirement is rather simple:
During the day, keep the temp at 75 degrees F
During the night, keep the temp at 70 degrees F

I have 4 automations:

First automation:
IF
time period Between 9:00am and 6:00pm, every day
multipurpose sensor actual temp >= 75
THEN
turn outlet off

Second automation:
IF
time period Between 9:00am and 6:00pm, every day
multipurpose sensor actual temp <= 74
THEN
turn outlet on

Third automation:
IF
time period between 6:01pm and 8:59am, every day
multipurpose sensor actual temp >= 70
THEN
turn outlet off

Fourth automation:
IF
time period between 6:01pm and 8:59am, every day
multipurpose sensor actual temp <= 69
THEN
turn outlet on

Simple, right?

Automations sometimes run, and sometimes they don’t.
I cannot find any rhyme or reason as to when they decide to run and when they decide to not run.
I’ve deleted the automations several times and recreated them.
I’ve powered off the hub and let it sit for a couple minutes and powered it back on.
To no avail, can I get this thing to function correct.

Support has rendered itself useless.
I contact them, and they ask for specific examples of what failed to trigger and when.
So I immediately provide them with examples.
Then, they wait 3 or more days to respond, asking for new examples because too much time has lapsed since I sent the last example.

Now, I can’t even seem to get a response from support.

I rated the app 1 star on Google Play wtih an explanation. They responded and apologized for my difficulties and told me I should reach out to support. WELL DUH- I’ve DONE that!

Anyone have any ideas as to what I can do to meet my requirements with the room temps during day and night?

Did you set up your geolocation in the app? Click the three dots in the upper right of your screen and choose Manage Home.

Wow, best question ever after so many times of contacting support!!
Yes- it is set!
And location mode is set to “Home”.

Wait just a darn minute… does this mean my automations will only run if I’m home??

No, they will run

Dang. Any other ideas? :slight_smile: :slight_smile:

I also had consistency problems with using period of time when I started with smartthings.

I ended up using specific time, like every 2 hours I’ll check the temperature. If it exceeds a specific threshold, I turn the device on and set it in the automation to auto turn off after 1 hour.

I didn’t bother to check on period of time again since I only need to cool the house when I’m away and the solution above is adequate enough to meet my needs.

Yikes… this is unfortunate. I’m trying to keep my temps pretty consistent. Not sure I can handle a temp swing every two hours. And I don’t think I’d want to set up automations to run every 15 minutes, that would be a lot of automations to create. LOL!

Use webcore.

2 Likes

If you remove the time period restriction and just trigger off the temperature change, do the automations work?

If you create an automation with the time restriction and an alternative trigger such as turning a light on, does that work reliably?

Yes, if the time period condition is removed it seems to work just fine.

Alternative trigger?
I don’t have any other devices, just the multi-purpose sensor and outlet. I bought them for this specific control.

Yes, I was just wondering if it was the combination that was causing the problem or if the time period screwed up other things. Has to said that I was messing around with time periods this morning and didn’t have any issues, so it isn’t fundamentally broken.

Nah you gotta give it a full cycle to test, 30 to 36 hours. Initially it works.

It’s almost like the change of time doesn’t fire the event. So of the temp doesn’t change and it moved into the next automations time, it doesn’t trigger because there was no change of state on the multipurpose device.

It seems like I’m having the same issue in webcore, the piston is only firing on change of status of the device(s). It’s not firing with the change of hour.

Thanks, I checked it out. Very easy for me to follow!! So awesome!! However there it is also only firing upon status change of the devices and is not firing when the time changes. I may have something wrong but I’m pretty sure there’s another forum I found that I’ll post this issue in for help.

I’ll accept as the solution.
But … I just really wish smart things would work! Kinda stubborn.

I’m pretty sure that it is just a restriction in Custom Automations, just as it is in Smart Lighting. So you don’t get it firing at the start and end times.

In webCoRE it depends …

If you write the piston with a trigger for the temperature such as ‘rises above’ and a condition such as ‘time is between’ then, by default, the piston only fires on temperature changes. As ‘rises above’ can only be true when the piston is processing a temperature event it doesn’t help to fire at the start and end times. You can do it (my first edit of this post said how) but it doesn’t help.

On the other hand if you write the piston without a trigger, e.g. ‘greater than’, then it will subscribe to the times as well as the temperature changes and if required there is a setting you can add (the Task Execution Policy) so that it only does stuff when the condition changes. It is actually a classic example of why those who can’t see a piston without screaming ‘you need a trigger’ are horribly wrong.

1 Like

Got it!!! I was using $hour24 variable at the start of my script to test if it was between 9a&5p. This did not have a lightning bolt.

I switched to using the Virtual Device ‘Time’ and this now has lightning bolts, so with the change of time, it seems to be firing my piston now!

WOOO HOO! This is amazing!!

SmartThings just needs to buy webCoRe!!!

Thank you!!