RM %device% issue

@bravenel

How do I get my pushover message to work correctly? Thought I had this working but apparently not.

I believe that with Triggers the %device and %value are based on the triggers (that how it seems to work with mine). I was going to suggest creating a rule with the doors and using a time restriction but I haven't used them yet and don't know if it will do an evaluation when the time window starts. If not it won't work.

1 Like

Looking for guidance on how to populate an array of evaluated devices which then populates the message string.

The event that triggers that is time. There are no events for the rule conditions in a triggered rule.

Any suggestions to capture devices that meet an evaluation set and then list those out in a message?

So scenario:

Time: 11:00pm
Devices: Front Door, Garage Door, Garage Door 1, Garage Door 2
Condition: Doors unlocked OR Garage Doors Open
Devices meeting condition: Front Door, Garage Door 1
Notification: %devices% were %value%. Taking action now.
Action: Lock Front Door, Close Garage Door 1

So I have all the conditions and actions working like a charm. Just need the array of devices that meet the condition so a message can be created.

If this isn't possible currently can I politely ask for a feature request to accomplish this with condition state?

1 Like

I think you can do this by separating the trigger from the rule, and using Private Boolean, like this:

Trigger
Trigger event: At 11:00 pm
Actions: set Private Boolean of rule to true, evaluate rule.

Rule
What you had before but add as a condition, Private Boolean true, that as and AND to the rule part, and to both true and false action parts: set Private Boolean of This Rule to false.

What happens is that the rule runs whenever either the doors are unlocked or garage doors open, but it's always false until it is run by the trigger at 11:00 pm. If it's true then, it will have recorded the last event device from the most recent unlocked or open event, and report that.

Great idea btw! So I would need to have a Private Boolean control for each door in order for the message to send off correct?

So lets assume the following:

Trigger Event:

  • Starts at 11pm
  • True - sets Garage Doors and Exterior Doors Private Boolean to true
    -False - sets Garage Doors and Exterior Doors Private Boolean to false

Rule - Garage Doors

  • Condition: if Garage Door 1 OR Garage Door 2 are open
  • True: Close Garage Door 1 AND Garage Door 2
  • True: Send Pushover message: %device% was %value%. Closing %device% now.

But this wouldn't work because of your statement that the last event device is only captured. So in essence I would need (4) rules for each door/garage door to accomplish my goal?

The Private Boolean is for the rule, not the doors. A rule only remembers the last device that caused an evaluation, so if you wanted notification of separate devices you'd need separate rules for each. The trigger at 11:00 only sets the PB to true, so that the rule can be evaluated. Come to think of it, setting it to true all by itself should cause the evaluation (no need to explicitly tell it to evaluate). So, it evaluates once at 11:00, reports if needed, and then sets its PB to false again. A one shot at 11:00.

Ok just checking my logic here:

No, that isn't what you want. Do not use PB as a restriction, that prevents the rule from seeing the events. Use it as a condition, and in the rule with AND.

Conditions: PB True, Door open
Rule: PB True AND Door open
Actions: as you have them set.

So eliminate the trigger and just add the time condition correct?

NO. Keep the trigger as is. Change the rules to what I said.

So this correct?

2 Likes