Data log when alarm is armed

Evening

Is it possible to setup a way that Vera emails or stores log of the status of all devices once the alarm system is armed?

Rich

Sent from my iPad using Tapatalk

Not without writing code to keep track of those devices and saving it somewhere.

  • Garrett

You could have it send you an alert when it is armed. You will record that in your email in basket. If you use smart filters on your email, you can file them in a separate email basket. It’s a convenient way to store and retrieve.

@Rich1983

Have a look at the EventWatcher plugin - that might be of use/interest.

http://forum.micasaverde.com/index.php/topic,16984.msg131132.html#msg131132

I use this function (you could add it to startup lua).

-- Log, warning and alert messaging function
SndMsg = function(title, type)
  --Define variables
  local smtp = require("socket.smtp")
  local from = "youremail@provider.com"
  local rcpt = "recipient@provider.com"
  local SMS = "+mobilenr@gin.nl"
  local subject_out = type .. " " .. title
  local message_out = "Message from VeraLite, date time stamp " .. os.date()
  --Always log
  luup.log(subject_out)
  --Send Email when it is warning or alert
  if type == "WARNING" or type == "ALERT" then
    local mesgt = { headers = { to   = rcpt, from = from, subject = subject_out }, body = message_out }
    local r, e = smtp.send{ from = from, rcpt = rcpt, source = smtp.message(mesgt), server = "smtp.provider.com", port = "25" }
  end
  --Send SMS when there is an alert
  if type == "ALERT" then
    local mesgt = { headers = { to   = SMS, from = from, subject = subject_out }, body = message_out }
    local r, e = smtp.send{ from = from, rcpt = SMS, source = smtp.message(mesgt), server = "smtp.provider.com", port = "25" }
  end
end

Then you can easily log things (LOG), log/email (WARNING) or log/email/send text (ALERT) using the following lines in your Luup. Following is an example of each. I tend to be pretty verbose in my logging messages which makes debugging a lot easier.

SndMsg("BATTERYLEVEL DEVICE " .. ThmLiv .. " (ThmLiv) = " .. ThmLivBat, "LOG")
SndMsg("ALARM ON", "WARNING")
SndMsg("SOMEONE IN HALL", "ALERT")

Hope this helps

Hi

I will give it a try but looks like what am needing

Thanks

Sent from my iPad using Tapatalk