My Christmas Tree low water alert setup

Very cool!!!

This community the best!

1 Like

@sjones0812 Will you be making that bracket to sell to the members here? hehe Nice work.

1 Like

I just made it to keep the wires apart and have something to make it easy to zip tie to the tree.

I could have just zip tied the wire to the tree… but I had the printer :smile:

If someone really wants it I will send you one…just pay for the postage

What’s the “No water app” you referred to?

I’m only seeing apps to notify you when there is water.

Browse the Smartapps, under convenience there is “No Water Alarm” Author Alex

I must be blind or crazy. I clicked on the “+” in the Dashboard, selected the “More” section, then “Convenience”, but it’s not in there. Am I looking in the wrong place?

I also looked in the IDE here https://graph.api.smartthings.com/ide/app/create

It’s in IDE, when I created the No water app, I then browsed for it.

Here is the code.

/**

  • No Water
  • Author: Alex
    */
    preferences {
    section(“When there’s no water detected…”) {
    input “alarm”, “capability.waterSensor”, title: “Where?”
    }
    section( “Notifications” ) {
    input “sendPushMessage”, “enum”, title: “Send a push notification?”, metadata:[values:[“Yes”,“No”]], required:false
    input “phone”, “phone”, title: “Send a Text Message?”, required: false
    }
    }

def installed() {
subscribe(alarm, “water.dry”, waterWetHandler)
}

def updated() {
unsubscribe()
subscribe(alarm, “water.dry”, waterWetHandler)
}

def waterWetHandler(evt) {
def deltaSeconds = 30

def timeAgo = new Date(now() - (1000 * deltaSeconds))
def recentEvents = alarm.eventsSince(timeAgo)
log.debug "Found ${recentEvents?.size() ?: 0} events in the last $deltaSeconds seconds"

def alreadySentSms = recentEvents.count { it.value && it.value == "wet" } > 1

if (alreadySentSms) {
	log.debug "SMS already sent to $phone within the last $deltaSeconds seconds"
} else {
	def msg = "${alarm.displayName} has no water!"
	log.debug "$alarm is dry, texting $phone"
	sendPush(msg)
	if (phone) {
		sendSms(phone, msg)
	}
}

}

When I copy/paste the code directly from above into “Create SmartApp,” / “from code” I’m receiving the error “metadata definition not found” Any thoughts on what would cause that? I’ve also searched for the code under “convenience” but was not able to find it, either. Anyone else successful?

not sure why the error or why you cannot find it…

So I got this working but the battery on the sensor died within a couple days, presumably because a little red light turns on when water is detected (which is obviously the normal state when using to monitor Christmas tree water levels…)

@sjones0812 have you run into this? Any workaround?

This post suggests the Aeon Water Sensor would work better.

1 Like

yup, battery went after a week I think.

Tempted to clip one of the leads to the LED :smile:

I think a Aeon water sensor if the way to go, it is designed to be used either way detect water or lack of water… I would assume the batter should not drain like we are seeing.

I’m running this setup with a Utilitech Water Sensor and lost the wife approval after it going of at 3am on night and on and off for 30 minutes til I got up to pull the sensor. Did it again a few days later at 5am. Have push notifications turned of on app but it still blew up both our phones. UGH I wish the app had a time frame option for alerts.

How did you get the Utilitech to not beep and red light when wet?

I set my smart app to only alert in modes Away and Home… not during Night mode.

[quote=“sjones0812, post:15, topic:7865, full:true”]
How did you get the Utilitech to not beep and red light when wet?

IDK it just doesn’t.

I set my smart app to only alert in modes Away and Home… not during Night mode.

Haven’t played with modes yet. Need to look into them but they need to be seamless and automatic for wife acceptance.

I have added the required metadata section, see: https://gist.github.com/e372dd95c24cec97eb79.git

Jealous…and now a reason to get a 3D printer. :slight_smile: I could make brackets for the PEQ/SmartThings motion sensors to angle them down to the floor, since I dislike how they can’t easily be mounted up near the ceiling for good coverage.

1 Like

If you have a cad file I will print it for you

ogg,

It sounds like it might be possible to tweak that a little further to suppress the alarm if the “dry” signal clears back to “wet” within a couple of minutes (x minutes). True?

That would make it useful for knowing if a tank gets too empty despite mechanical automatic refilling which is supposed to maintain at least a certain amount of water. The delayed alarm would ensure the mechanical refill had enough time so the person wouldn’t be alarmed unnecessarily.

Best regards,
Craig

Sure, if i had automatic filling, but so far it hasn’t been an issue, but great idea…

Anyone have the latest code? Also, I assume this is a SmartApp and not a device type?