Rule state?

Is there a way to know what the state of a rule or rules currently is? Is it active/running, inactive, waiting, pending, etc...

Not programmatically. You can look at its App Status page to see its event subscriptions and its scheduled events. Rules only 'run' when triggered by one of those, and then exit. If you turn on logging for a rule you can see these things happen in the logs. Also, on the App Status page you can see the Application State, which includes a lot of information about the current internal state of the rule, including its local variables, Private Boolean, etc.

1 Like

Is the app status page in the case of RM 4, the specific rule status? I'm not sure where to look in that case but I do see what you mean about the scheduled events.

I have a specific rule that has a 1 hour cancelable DELAY that sometimes completes and continues and sometimes I have no idea what happened but it doesn't execute anything after the DELAY and I can't figure out why. Nothing in the log for the rule or anything else that I have been able to find.

Any idea how that could happen and how I can figure out why? I know if I edit the rule while the delay is active, it can do this but it happens for no other reason that I can determine.

If you haven't turned on logging for that specific rule, I would recommend doing so. You might also consider posting a screenshot of the rule in question.

i do have logging on for the rule.

Here's the rule... (don't judge the logic...I'm a techie but new to Hubitat!!)...

Select Actions for Button-Timer1 (Bathroom Button 2 or Button A)
IF (Last Event Device doubleTapped = 2.0(F) [FALSE]) THEN
Append to Timer1-Log.txt: Timer cancelled @ %now%.

Set Timer-Set to false
Cancel Timed Actions: **This Rule**
Exit Rule --> delayed: 0:00:03

IF (Variable Start-Time(03:57 AM) = 12:00 AM(F) [FALSE]) THEN
Off: Bathroom Lights, Tower Lamp
Set Start-Time to current time
IF (Variable Timer-Set(true) = false(F) [FALSE]) THEN
Set Timer-Set to true
Set Start-Time to current time
IF (Variable SayIt(true) = true(T) [TRUE]) THEN
Speak on Echo - Master Echo Spot: 'starting a new timer at %Start-Time%!'
Log: 'Timer started %date% at %Start-Time% %event%'
Append to Timer1-Log.txt: VVVVVVVVVV Started %date% @ %Start-Time% VVVVVVVVVV

	Flash: Bathroom Lights
	Delay 0:00:05
	Off: Bathroom Lights
	***Delay 1:00:00 (cancelable)***
	Log: 'Timer finished %date% @ %now%'
	Append to Timer1-Log.txt: Finished %date% @ %now%, waiting for reset...

	IF (Variable SayIt(true) = true(T) [TRUE]) THEN
		Speak on Echo - Master Echo Spot: 'timer started at %Start-Time%, has just finished at %now%!'
	Set Start-Time to 12:00 AM
	Flash: Bathroom Lights, Tower Lamp
	Wait for event: Button A button 1 pushed
	Append to Timer1-Log.txt: ^^^^^^^^^^  Reset received @ %now%  ^^^^^^^^^^

	Set Timer-Set to false
	Set Time-Now to current time
	set Time-Remaining to minutes of difference between Start-Time(03:57 AM) and Time-Now(02:53 AM)
	IF (Variable SayIt(true) = true(T) [TRUE]) THEN
		Speak on Echo - Master Echo Spot: 'I already have a timer running that I started at %Start-Time%, %Time-Remaining% minutes ago.'
	Append to Timer1-Log.txt: Checked @ %now%, started @ %Start-Time% (now %now%), %Time-Remaining% minutes elapsed...