Using eventp to notify if house use drops below threshold

Hi,

I have a sewage treatment plant and the blower stopped working. Looking at the house use graphs on Emoncms, I was able to see when the base house usage dropped by about 40W and that it had been off for just over a month!

It occured to me that it would be handy to have Emoncms notify me should this happen again in the future. Googling around the subject, it seems I should be able to use the eventp module’s ‘send email’ process on the inputs page. I can’t find any documentation on how to set this up other than:

This sends an email every hour if the feed value goes above 20 but I don’t understand what the GOTO 8 means.

Thanks for any insights and thoughts on how to set up this alert.

It means exactly that: jump directly to Step 8. If there isn’t a Sep 8, it falls off the end.
You look at it in conjunction with the step before, if >=, skip next.
If the value at step 2 is 20 or greater, processing jumps to step 4. Otherwise, it falls through to step 3 and then jumps to step 8.
The same happens with steps 4 & 5.

Ah okay, so is it that there is no step 8 and it is designed to end processing with a non existent step unless the value is over 20 or it’s been an hour since the last email was sent?

Hi Mark,
I have exactly the same problem. When the blower diaphrams fail, the blower trips and often I don’t notice until the system starts to smell. My blower draws about 75W when operating. The minimum total load during the quiet hours is about 190W.
I run a NodeRed script once a day that looks for the minimum load during the quiet hours and generates a report when it drops below 150W. I use a servce app called Pushover to push any reports from my system to my mobile phone.
Cheers
Simon

I’ve never tested it, but that looks about right. Falling off the end of the processing steps means nothing more happens to whatever value was being processed and it is lost forever.

Hi Simon,

I had read that some folks use nodered to set up alerts but as I have never used it and would have to learn it, it seems easier if it can be done all within Emoncms.
I will continue and see if I come up against any more issues…
Cheers,
Mark

Thanks for the help. I will try and implement the steps and get this alert working…

In case any one else comes along, I thought I would detail how I got this to work:

You first need to install Swiftmailer so open a terminal and type:

git -C /opt/emoncms/modules clone -b 'v5.4.8' --single-branch https://github.com/swiftmailer/swiftmailer.git

Then you need to edit var/www/emoncms/settings.ini to add the following (I’m using Yahoo but yours may vary):

[smtp]
; Email address to email proccessed input values
default_emailto = ‘[email protected]’

host = “smtp.mail.yahoo.com”
; 25, 465, 587
port = “465”
from_email = ‘[email protected]’
from_name = ‘youremail’
; sendmail, when enabled we use local email server instead smtp relay
sendmail = false
; Comment lines below that dont apply
; ssl, tls
encryption = “ssl”
username = “[email protected]”
password = “abcd efgh ivkl mnop”

To increase security, email providers don’t want you using your email account login with 3rd party apps so you have to generate a unique code for emoncms. Googling ‘Yahoo app passwords’ takes you to their help page explaining how to do this. You can use any name for the app - it’s used mainly to help you remember what it’s for. The generated password doesn’t replace the normal password you use to login - it is just for emoncms to use so it can send out emails.

Now you need to configure the input processing. Mine is set up like this:

This sends me an email when the house use drops below 130W, then again after at least an hour (3600 seconds) rather than every 10 seconds that the input process is worked through. I set a minimum value of 100W to weed out false alarms (as various inverters and diverters juggle with balancing supply and demand - I get the house use below 130W momentarily really frequently) and use the rate process for the same reason. I still get the odd email once every 3 or so weeks - I just delete that. If the treatment plant is off then I get several emails in a day so I know then to investigate.

At one point I was worried that I wanted to do this processing on the ‘log to feed’ value but also needed to use the ‘Power to kWh’ process. Note that the ‘Power to kWh’ doesn’t modify the value that’s passed along to the next step in the chain so these steps are actually working on the ‘log to feed’ value not the ‘Power to kWh’ value!

2 Likes