I want to send a mail, with OH3 when my Shelly HT is over or under a defined value. e.g. under 33 degrees or upper 35 degress.
In principal it works. As trigger i use the wake up (~every time when changes 1 degree) from the HT sensor.
Now I have the problem, that the mail comes ever time ever 10 min when the sensor wake up and has the given value.
You have to qualify that a bit. Only once in eternity? Only once until rebooted? Once a day?
Maybe … only when temp first goes above threshold, then not again until after it has gone below threshold.
The usual approach is to have a dummy Item, maybe a Switch “Message sent”. Check that it is not-ON before you send a message, set it ON when you do send a message, set it OFF when your “next” condition is satisfied - below temp, or time passing, or whatever.
rossko57, I’ll try to explain my problem and the needed seznario.
I have a wintergarden and a more than 20 year old AC cooler in it. The cooler has only an IR remote control
to set values like on, off, speed,etc. There is NO possibility to switch on/off by a given temperature.
Additonal to that I have an Broadlink RM4 IR Receiver, which emulate the IR control.
Addtional I’m using a shelly HT with the native app and have here a scenario via alexa to switch on and off the AC cooler in my wintergarden via the broadlink.
Somthing like that:
Shelly HT is over 36 degree (wake up when 1 degree more or less), → triggers a scene in the native shelly app → the scene say via Alexa (cloud), that the broadlink RM4 should send a command to the AC to switch on.
Shelly HT–> scene natibe shelly app → Alexa → Broadlinnk RM4 → AC Cooler
The same happend, when the HT wakes up and is less theen 33 degrees.
Addtional to those working smarthome, I want now to send me a mail, exactly only one, when to HT was wakeuped and has more the 35 degrees.
And a other rule should send me exactly one time a mail, when the temperature is less than the 33 degrees.
So two rules, one when the HT has begume the first time 35 degrees, and a other rule when it has less that 33 degree.
I made this this way to send notification when temp in my garage drops below set value.
I am pretty sure it can be done better and efficiently with the script. Awaiting improvements and suggestions from others.
As @rossko57 suggested I created a Switch Item as variable and I am controlling this one to send an e-mail message.The good part is you do not have toggling effect and only one notification at specified temp. range.
meanwhile I have two rule which fully automaticly switch my clima-unit in my wintergarden on and off, depending on the temperature reported by my shelly H&T. On with 35 degrees, off by 33 degrees.
What is the special here? Only two rules, in combination, then I also can use a shelly Button1 to switch it on and off, when ever someone wants, but also it goes automaticly on, or off.
But it seems you are interesting to do more here.
I have a problem and maybe you have the solution for it.
I have also a rain sensor, which send my via a OH rule a mail, when rain starts, and also when rain stops.
So in practical I get a lots of emails, because rain outside starts, and stops within a couple of minutes so every time a mail… Not nice to get up 70 mail per night when it was raining.
How can I only get a mail, when rain starts, and only get a mail, when it real was ending with the rain, and not after 10min it starts again…