Idiot questions. Feel free to ignore.
-
Starting to (very slowly) migrate and improve some of my automation from Reactor to the fabulous MSR. Couple of questions which are probably really obvious but, well, you know me
Is it possible to repeat an action from a set rule? i.e. if the rule remains triggered for an hour, re-run the set reaction. And to continue re-running that every hour until the rule is reset?
Sorry if it's really stupid.
C
-
Starting to (very slowly) migrate and improve some of my automation from Reactor to the fabulous MSR. Couple of questions which are probably really obvious but, well, you know me
Is it possible to repeat an action from a set rule? i.e. if the rule remains triggered for an hour, re-run the set reaction. And to continue re-running that every hour until the rule is reset?
Sorry if it's really stupid.
C
Hi, if I understand correctly, you can do this using Pulse, determine how long the rule can stay active, and then it resets, and repeats again.
In the example below, it is active for 15 seconds, then it is false and deactivated for 30 seconds, then it is valid again, and so on repeatably.
-
That would be perfect, except I have no pulse. Only follow and latch....
Am I out of date already?
c
-
Thanks. That almost works but it fires the 'Reset' action when the pulse ends.
I mean I can work around that by making two rules that set as opposed to one that sets and resets with an action.
I was just trying to minimise the number of objects
C
-
@CatmanV2 Check this thread. It goes thru my trials with PULSE to much success.
-
@gwp1 thanks, not sure it's directly applicable but I think it's prompted me to a possible restructure of the logic which may do it in fewer components.
Nope still can't make it work.
Cheers
C
@catmanv2 Read thru the post - my goal was to have
pulse
implemented to retry setting my t-stats if they did not accept the first attempt and to continue for a set amount of time until they did.I also use it for my washing machine "done" alert - if I don't open the lid, signaling I'm emptying the washer upon completion, it continues up to ten more times announcing for the world to hear (the whole house via Alexa Echo devices) that it needs emptied.
-
@catmanv2 Read thru the post - my goal was to have
pulse
implemented to retry setting my t-stats if they did not accept the first attempt and to continue for a set amount of time until they did.I also use it for my washing machine "done" alert - if I don't open the lid, signaling I'm emptying the washer upon completion, it continues up to ten more times announcing for the world to hear (the whole house via Alexa Echo devices) that it needs emptied.
@gwp1 Oh yes, I understand that. The challenge I have is that when the pulse ends the reset reaction is triggered, which is specifically what I was looking to avoid.
I currently have a use case where the Server room temperature goes too high (set) and fires a warning reaction. I want it to repeat that warning (pulse does that just fine) but when the temperature drops (reset) it runs another notification. (To say everything is fine)
If I pulse the output of the set to get the warning to repeat (which it does) then when the pulse ends, the rule is reset and the 'Everything is fine' notification is sent. Which I want to avoid as everything is not fine.
I can absolutely have two rules both of which 'set' and get around it that way, but I was trying to do it with one.
C
-
@gwp1 Oh yes, I understand that. The challenge I have is that when the pulse ends the reset reaction is triggered, which is specifically what I was looking to avoid.
I currently have a use case where the Server room temperature goes too high (set) and fires a warning reaction. I want it to repeat that warning (pulse does that just fine) but when the temperature drops (reset) it runs another notification. (To say everything is fine)
If I pulse the output of the set to get the warning to repeat (which it does) then when the pulse ends, the rule is reset and the 'Everything is fine' notification is sent. Which I want to avoid as everything is not fine.
I can absolutely have two rules both of which 'set' and get around it that way, but I was trying to do it with one.
C
-
@catmanv2 If you use pulse you could create a local expression that is true when temperature is below threshold, otherwise false and in the reset reaction you only send the notification if the expression is true.
-
And it was. Didn't want to start coding but hey
<exit>
And I assume I can use this for the other idiot question I was going to ask: Can I change the reactions as an ELSE type thing.
So I'm assuming I can have two groups in the set and reset reactions with mutually exclusive conditions
Thanks!
C
-
Yes, you can have multiple groups in both set reaction and reset reaction, if conditions is not met in a group but in another group those actions will fire instead.
-
Also don't forget that there's a "repeat...while" group available in reactions, which seems on reading the original problem statement to be a likely candidate for repeating a command or set commands until they are honored.
-
Also don't forget that there's a "repeat...while" group available in reactions, which seems on reading the original problem statement to be a likely candidate for repeating a command or set commands until they are honored.
@toggledbits thanks, I tried that but couldn't work out how to define the repeat cadence.
C
-
Use a delay action in the repeat group.
-
Use a delay action in the repeat group.
@toggledbits said in Idiot questions. Feel free to ignore.:
Use a delay action in the repeat group.
DOH
Thanks
C
-
Also don't forget that there's a "repeat...while" group available in reactions, which seems on reading the original problem statement to be a likely candidate for repeating a command or set commands until they are honored.
@toggledbits said in Idiot questions. Feel free to ignore.:
there's a "repeat...while" group
I didn't mention that because I had some issues/questions about it that I have not found time to test futher, so this is a heads up. I will try to find time to test more and create a new topic soon.