Trigger based on Temperature failing

Hi all

I am trying to simply turn on a fan if the temperature is above 70F and run for 5mins. I set up a trigger of "Temperature of ST Motion(75.0) reports > 70.0" and an action to turn on a switch of motion is detected. It's 75F in here so that should trigger..and when I have motion on the sensor it is not turning the fan on.

I feel like the issue is the trigger... How often does that poll? Is it 24/7 and should always be 'triggered' as long as temperature is above 70F?

I did find that Cobra seems to have written an app specifically for this, but his apps seem to not be available any longer so any suggestions are welcome.

Thanks

Not true. Andy's old & new apps are definitely available. He has a new website that can be accessed here: Cobra Apps.

You will need to register for access - and then you're all set.

Tagging @Cobra in case I've misstated something.

Hi and thanks for your reply aaiyar. Yes I agree the site is there... But you cannot register to get access to any apps. If you try to register you are met with a message saying "New User registration is currently closed". :frowning:

Maybe what I should be doing is asking Cobra if I can get access. @Cobra, could I get access to the website with your apps? I'll look for your reply.. Thanks.

I just looked, and while I can log in, it definitely says "not open for registration" if you try to create a new account.

Not sure if that is an error or what?

So that is pretty specific per device. I don't know what device you are using, but most temp sensors don't poll on a regular basis. Most of the ones I have used send reports upon a certain degree change of temperature, or percentage thereof. This may be configurable in the device page for this particular sensor.

If I understand the sensor logic, (and sometimes I get it wrong) If the room was already 75 degrees, and you want the fan to turn on at greater than 70 degrees, you are out of luck. The room would have to change from (something less than 75) TO 75 to trigger.

So I think you are lacking the change part here, at least until it cools off enough to create enough difference to trigger the rule.

1 Like

You could create a rule to refresh the device every few minutes in order to see the temperature change.

I was just about to add that, thanks for mentioning it. Just to clarify what I said in my previous post, polling usually isn't done automatically in the driver, but Rule Machine can do it for you.

1 Like

Shouldn't the trigger be the motion and then a condition if temp>70 turn on switch?

Actually I did already create a new rule doing just that and I have it working. I am still curious though if the temperature can be used as a trigger in the way I was trying. It sounds like it cannot and the 'trigger' will only be changes in temperature as @neonturbo was suggesting.

Just to flip things in the rule around a bit, why not poll temperature every 10-15 minutes. (Periodic Schedule) That would become your trigger.

Then you could compare temperature and activate the fan as needed. Example below.

I couldn't find any specific information about the ST motion, however its not clear why a trigger like:
motionsensortemp > 70

wouldn't work. Now my Iris reports temp every 5 minutes. Some devices report temp if there is a change of xxx. In either case you will not be getting fast updates from a battery device.

What do you plan after the 5 minute on time? Should the fan be retriggered the next report that is > 70?

Ah, interesting idea @neonturbo. I need it to be based on motion as well though because I don't want the fan turning on and off if we aren't even the in room, lol. I've never made a trigger based on time like that though so thank you for the example.

Hi John. Yea that was just my name for it. It's a "Smart Things" brand Motion Sensor.

After the 5 min time, if there is no motion, then the fan will turn off and the rule will end. If there is motion, then the fan will turn on again and stay on for 5 more minutes.

Interesting note though... I added a "Delay" for 5mins after it is turned on. I would think that during this 5mins if there is motion(i.e. We are moving around the room), I do not believe the timer will reset since it's just in a delay state. Resetting during the 5mins would be preferred but I don't know how to do that just yet. Maybe delay for events? I saw that as an option.

That is where "Cancel" comes in.

  • Select "cancelable" in the delay section.
  • Add a new item "Insert Action Before" before your first item in that section.
  • Once in that menu, add "cancel delayed actions".

Done your way out of the rule.

Triggers need to be events not conditions which is where you went wrong.

Hopefully this kind of explains the way to think about what the difference is when you are creating a rule.
An event is something that happens (e.g. motion & change in temperature) and a condition is a state you evaluate (e.g. temperature level, time of day)
I think the easiest way to think about it is if you are wanting something to limit when the rule runs that is a condition.

Also another option instead of the 5 minute delay to turn off is to use a wait for motion inactive which will keep the fan on as long as there is someone in the room.

So it sounds like your triggers would be.

Triggers:
A temperature reading > 70 °F
OR
Motion detected.

Conditions.
If temperature > 70 fan on for 5 minutes
If motion and the temp is > 70 then fan on for 5 minutes.

Then for each temperature report the fan will go on for 5 minutes.

Sound about right?

This is the rule as I'm using it now. Although I like the 'cancel delayed actions' suggestion from @neonturbo. I want to add that

image

Strange... I do not see an option to EDIT the Action for this rule. When I click on the Actions to run right arrow I just get this:
image

... Where is the EDIT?

Guys
I’m sorry, I was doing some work on the membership database which meant I could not allow new registrations.
The registration page will be back up today.

Andy

3 Likes