Mail trigger


#1

Hi everyone, I created a trigger that sends an email when the temperature drops below minus 4. Why do I get so many emails and not just one that warns me that the temperature has dropped below minus 4?
Thank you very much


#2

have a look at this Sending MQTT messages within notification limit


#3

Many thanks!


#4

Hello, I looked a bit at the sketch of the links, I have to integrate that code in the sketch that reads the ds18b20?
thanks


#5

yes.


#6

All right, I’ll try.

Many thanks


#7

Hi, for now I have not been able to combine the two codes, I tried to install an rpi with ds18b20 but also under rpi remains the problem of many mails.
What do you have to change on rpi to limit the emails?
Thank you very much


#8

You cannot add the changes on the pi agent. The only option is to make the changes in the code.
Can you share the code you have done till now so I can do the change needed.


#9

Thanks for the kind availability, but I have not written any code (I would not be able …) I only followed the automatic procedure “Add new …”


#10

The code change you give: where is that code located on my RPI? I can not find the path.

Any updates on a “send once” email/text alert in triggers? I like your interface but i can do what I need in Python quite easy and am about to give up on Cayenne. If a temperature crosses threshold I need only one email alert, not hundreds.

Here is what I did in python2:

latch_state=1

room_temp=int((read_temp())
if ((room_temp < 20)&(latch_state==0)): #is it cold enough to rearm?
latch_state=1
if ((room_temp > 25)&(latch_state==1)):
latch_state=0
send6() #send alert email defined earlier in code.

There’s got to be a simple “one shot” alert slide switch with a deadband or hysteresis that could be added in. It would be so much nicer to use this interface with nice GUI and trending.


#11

@ilario.quinson can you at least share the code for DS18b20 you are using. i will try to make the changes needed.
@kb9tms the link I shared above also contains the python code link also.


#12

Thanks for the availability, but as I had already written before, I have not written any code (I am not capable) I only used the automatic procedure to add the RPI.
Thank you


#13

what does this means then?


#14

The python code link; where in the RPI directory do I find that file/where do I put it? Is it a file add or a file replace?


#15

@kb9tms have you previously added a your pi using pi agent or python library?


#16

Simply because I couldn’t bring together the two sketches of Arduino and then I tried to connect the Raspberry.
But for me there is no problem I am aware of my limitations, if I can solve with the help of the forum well, otherwise nothing serious, nothing vital connected you have my ds18b20 and dht22, what they do is fine so.
In fact, I would like to be able to pay a fee to use the dashboard as I believe that your work should be paid.


#17

thanks and nice to hear that you are loving the platform.
now, do you want me to give you the code for arduino or are you okay with the current setup?


#18

Of course I would like to be able to run the triggers under Arduino, (especially because they are already installed in the seedbed) so I very much accept your code and thank you for your kindness.
Do you need me to send you the sketches I’m using?


#19

yup, will help me a bit if you send them.


#20

Okay, today I can’t (I go to work) tomorrow I’ll look for them and send them.
Thank you very much.