Rule machine rule, doesn't seem to be running


#1

Posting from my phone, so apologies for poor formatting.

I have the following rule set up. However it almost never seems to run on its own. I know the rule works because I have a trigger set up that evaluates the rule when a routine runs. Whenever I run the routine and it kicks off the evaluation, then it works instantly. I think it running on its own has only worked a handful of times.

Point of the rule is I have two time slots everyday when I would like to turn those house lights on. This accomplishes that.


(Jason "The Enabler" as deemed so by @Smart) #2

@chadbaldwin

I’ve always found the rule truth option to be really unreliable. I’ve never been able to get it to work consistently.

This is how I have most of my lighting rules set up and they are rock solid.
I recommend the following changes:

Front house lights rule -

  1. remove the rule truth completely from conditions and define rule

  2. now add this, just like this…
    Conditions - private Boolean: this rule: false
    Rule - private Boolean: this rule: false

  3. for both of the other rules, do this -
    Actions for true - set private Boolean: front house lights rule: false
    Actions for false - set private Boolean: front house lights rule: true

On the second two rules, in the private Boolean sections for actions for true and actions for false, make them both look like this picture ( but choose your rule “front house lights”.


#3

I’ll give it a shot, however, another of my rules rarely ever works and it doesn’t rely on rule truth…

This basic rule almost never works…


(Jason "The Enabler" as deemed so by @Smart) #4

@chadbaldwin

When you created this rule… did you do this?

Define rule - tap on that and choose the condition listed.

When you create a rule with only one condition it will auto populate the define the rule field. You MUST tap on that and choose the condition.

If not, you get a flaky running rule.


(Jason "The Enabler" as deemed so by @Smart) #5

@chadbaldwin

Do me a favor and let me know if these two rule start working for you. I try to keep track of this stuff for future reference.


(Dale C) #6

Interesting… so if I have a flaky running rule and want to correct it I am wondering if I go back and just do edits that would be enough but maybe I need to delete them and start over? I have a couple rules that I keep blaming the ST platform issues for not executing.


#7

Will do. I just went to all of my rules and went into the rule section and added the condition. Let’s see if that fixes it.


(Jason "The Enabler" as deemed so by @Smart) #8

I’m willing to bet you are going to see Huge difference…


#9

Well…I figured I would wait a week or so before I came back on here with a response, I’m not seeing much of a difference.

I have not changed my rule set up, and they still seem to be fairly unreliable. It’s 1PM right now, and I just had to turn off my porch, balcony, driveway lights from work, when they were supposed to turn off at sunrise this morning. And last night I had to turn my lights off manually as well, when they were supposed to turn off at 10:00PM

I’m going to add text message alerts to all of the timed rules to make sure I know when they are properly running. That way it’s not in my head, I will actually have a log. (I know I can check the built in logs, but I like using texts as a way of separating and filtering).


(Jon) #10

I have a time based rule to switch on socket between 8pm and 11pm. Been running reasonably reliably for weeks yet tonight didnt fire until I went into RM rule and refreshed.

Where in IDE can I check logs? Is it under the events section of the device? Nothing showed at 8pm but only at 8:46pm when I refreshed rule or is there anywhere else to look?

Under the scheduled jobs of the rule it shows next scheduled stop and start runtime but nothing under previous run time and status states ‘pending’.

Any ideas??


#11

In the app (I know you said IDE), you can look in the “Recently” tab for any device and you will see the rule name being executed, and then all the events to that device.

In the IDE, go to Locations > “List SmartApps” > Click on the name of the rule you’re looking at, and WAIT for the larger pop-up, at the bottom is a job history.

There may be a better way, that was my first search to find it in the IDE just now.


(Jon) #12

ok so it shows below in job history

startHandler 2016-04-25 8:00:00 PM BST 2016-04-25 8:00:00.739 PM BST 739 976

so that part worked so why didn’t switch turn on??


#13

Beats me! haha. I’m still trying to figure all this out too. lol


(Jon) #14

its starting to wear me down! I want to love ST, but at the moment its hard when things randomly stop working for no apparent reason.

How people who have little tech knowledge or no inclination to delve into IDE and smartapps cope I dread to think

Not sure submitting a ticket will do any good as they’ll just say stop using RM!


#15

Well, that’s the thing…Is it ST? Rule Machine? Our devices? Our device handlers? who knows.

I’m using ST outlets, a GE in-wall smart light switch, and 3 OSRAM lightify smart bulbs, all on the same rule. So it can’t be the device or the handlers, because none of them are working. So it must be ST or Rule Machine. But all of my other rules that don’t rely on time of day work fine. So maybe it’s a problem with Rule Machine specifically with time of day rules.


#16

I just changed the rule to be based on Private booleans instead, as @bamarayne had suggested. We’ll see if that helps.


(Jason "The Enabler" as deemed so by @Smart) #17

I set my lights up like this and they are extremely reliable. You can give it a shot if you want.

Rule one - lights on/off
Condition - private boolean: true
Rule - private boolean: true
Actions for true - turn on lights
Actions for false - turn off lights

Rule two - morning lights
Conditions - between two times: 5am - sunrise
Rule - between two times: 5am - sunrise
Actions for true - set private boolean: rule one: true
Actions for false - set private boolean: rule one:false

Rule three - evening lights
Conditions - between two times: Sunset +30 and 10pm
Rule - between two times: sunset +30 and 10pm
Actions for true - set private boolean: rule one: true
Actions for false - set private boolean: rule one:false

I have all of my lighting set up like this and it is very reliable. It’s also very easy to set up an override or to add new times, conditions, whatever.


#18

That’s exactly what I just did. So we’ll see how they do tonight.

What drives me crazy, is when I first set all of these rules up, they worked perfectly for a couple weeks.


(Jason "The Enabler" as deemed so by @Smart) #19

Also, with it set up like this, it’s easy to tell where it failed. If the pb isn’t right you know it was that part. If the pb is right, and the rule says true, and the light is off, then is either the device, message not sent, or timed out.


#20

Well the weird part with the Rule truth method. I would sit there wondering why the lights aren’t on yet. I would go into the sub-rules, and see one was marked as True, I would go into the main-rule, and show it was true, yet the lights were not on.

So that’s when I set up a trigger that I could manually run which would update and evaluate all of my rules, and then the lights would turn on.