RM Example: Get a notification when Hot Tub is hot

**edit - turns out the usage of the private boolean as I describe below is not necessary. See post 8.

What it does:
Sends a notification (using pushover) when the hot tub initially exceeds 99 degrees, using a private Boolean to prevent subsequent notifications.

This automation uses 2 rules: one to send the notifications, and a second to reset the first rule's private Boolean.

Rule 1: Send Notification
(This rule sends a notification when the temp exceeds 99 degrees, then disables itself to prevent additional notifications)

  • Conditions
    -- Temperature of Hut Tub Sensor > 99
    -- Hot Tub switch on
  • Rule
    -- Temperature of Hut Tub Sensor > 99
    -- AND
    -- Hot Tub switch on
  • Actions when True
    -- Notify Pushover Device: 'The hot tub is hot!
    -- Rule Boolean False: ** This Rule **
  • Restrictions
    -- Enable/Disable with private Boolean

Rule 2: Enable Rule 1
(This rule re-enables Rule 1 after the hot tub switch is turned off and the temperature drops below 99 degrees)

  • Conditions
    -- Hot Tub switch off
    -- Temperature of Hot Tub Sensor < 99
  • Rule
    -- Hot Tub switch off
    -- AND
    -- Temperature of Hot Tub Sensor < 99
  • Actions when True
    -- Rule Boolean True: Rule 1
1 Like

Nice! What are you using for tub sensors?

J

I am still trying to understand uses for the private boolean. Why wouldn't turning off the heat and 'stopping this rule' in rule1 work...with no need for rule2? I have a rule for my washer in below screenshot. It sends me a pushover and then STOPS itself when the rule is true (power on Zooz is below 1.6). I only get the one Pushover. When the washer is turned on again, the rule is considered False and is ready to do it's things again. Would a private boolean add to it's reliability or similar? It hasn't failed...yet.

You don't need the Stop at all, in fact it doesn't do anything in this rule, as there is nothing to stop!

RM will only do something when rule truth changes. So, power drops below 1.6, rule becomes true. Any future power report below 1.6 will not change the rule truth, so nothing will happen. Next time power exceeds 1.6, as you point out, it will become false again, which will mean that the next subsequent power report below 1.6 would cause it to send another notification.

This is all you need, and you are correct that you don't need two rules to do this.

1 Like

Okkkk....I am going to remove the 'Stop' from the rule....but if my phone blows up with Pushover "WASH IS DONE...WASH IS DONE" every 2 seconds I'm going to 'Un-Heart' your post! Haaaaa!!

2 Likes

I'm not sure about the washer example, but in my use case I was getting repeat notifications every time the hot tub sensor "checked in" with a new temperature. This was causing the rule to be re-evaluated as true each time and sending another notification. Adding the PB = False action stopped this. Then of course another rule needs to be created to re-enable the notification rule at some point.

I tried using temp as a trigger as well with the same result.

For temp I'm using a Fibaro FGK-101 door/window sensor. It has external inputs that accept a DS18B20 temperature probe. I stuffed all of this into a waterproof project box from Amazon (with a hole drilled and sealed for the temp probe to stick out) and just let it float inside the skimmer.

It's been in there for a year and a half and still going strong.

4 Likes

Gotta LOVE those DS18B20's! I have a bunch being used for this and that, can't kill 'em! Cool idea with the 'floaty' project box.

1 Like

It sounds like your rule wasn't set up correctly. If the temperature goes over 99 and stays there, the rule is going to be true upon each temperature report, and without its rule truth changing, it won't do anything. Only if it goes false, and then true again, would it do its actions.

If you see some behavior other than this, that would be a concern.

I'll try to duplicate it and get some logs. It was a very simple rule, not much room to mess it up. If Hot Tub temp > 99, send notification. Resulted in about 15 notifications over the course of an hour or so.

Has to be a rule, not a trigger.

I tried both rule and trigger with the same result. Could have been a mistake I suppose, but I'll try both again this evening when I get home and post back with results.

Well I tested a rule and it's working as you describe. I must have had something wrong with my original rule, or maybe the water temp was bouncing right around my 99 degree condition and causing the rule to alternate between True and False.

What size hole did you drill and what did you do to prevent water from intruding through the hole created for the temperature probe?

I can't remember the hole size, it was the same size as the probe. Actually had a hard time pushing the probe through, but that's a good thing to help keep water out.

I ran a bead of automotive gasket maker sealant around the outside where the probe comes out.

FWIW I had a second one of these where the hole was a size bigger, I think the probe had enough room to wiggle slightly and weaken the sealant seal, eventually let water in and killed the sensor. So a tight fit is critical.

I'd love to have a threaded probe where I could sandwich a rubber seal between a washer and the outside of the box, but I haven't seen anything like that.

Delayed action with cancel on truth change would solve that problem (thank you @bravenel).

(And i assume you know this @destructure00, just posting in here for those that are finding this example later).

1 Like

I'm trying to get this exact setup to work.. It was working on my Vera, but can't get the device registering temperature on my HE. Just looking to see if the OP can tell me what device type was used in Hubitat?
TIA!