Rule manager variables do not work in Audio Detection

I have been using motion detection with email notifications. The default rule in rule manager is set like so:

Name: Email on Motion
Event Type: MotionStart
Action Type: SendEmail
Inside the rule, the email settings contain the following:
Title: “%serverName - Motion Detected on %sourceId”
Body: " Motion Detected on %sourceId. - %sourceName.
A new item has been recorded at %timestamp."

This all works. However if I create a new rule identical in every way except for EventType as AudioStart, these variables don’t populate and simply show up in the emails as “%variablename”.

It seems even if I change the originally configured rule from MotionStart to AudioStart that I don’t get these variables populated.

This seems like a major bug on notifications.

Please advise.

Hi,
It works very well for me. This is the received email.
image

This is the rule
image

-Henrik

Except you did not recreate my issue as I described it.
Indeed, if you set it to AudioFinished it appears to work.

However, the default rule for Motion is MotionStart, not MotionFinished.

If you make the rule AudioStart it fails.

It isn’t really acceptable to use AudioFinished, because if someone is making sound for an extended period of time then the notification will be delayed however long the recording is.

Please try with AudioStart and tell me if you have success.

As I mention, I can literally just change the default “Email on Motion Rule” from MotionStart to AudioStart and the issue presents itself.

thanks.

Interesting result in the email. The variable do not have the value in the beginning of the mail, but at the end it is correct. Must be a timing problem when the email is sent. Yes, it is something that need to be fixed. However, it can still be used since the information about which camera is in the email.
Thanks for info.
-Henrik

image

Thanks for confirming my results.

I’m not sure it is a timing issue since, as you note, the data is available in the bottom text of the email.
That data is not part of the configured message, but something tacked on by NCS.
So the data is available to NCS already. it just isn’t using it to populate the variable.
Also, when you report this, you may want to make note about the fact that the %variable name is shown instead of say just a blank/null space. It seems strange to me (programmatically) that if the variable isn’t defined we see the variable name. This indicates to the end user that it isn’t a valid variable, instead of a variable that simply has no value - which is what should be true in this case.
Your developer may wish to rethink how these variables are defined when they are refactoring the code to fix this issue. Just a thought…but you may want to include it when you file this.

Unfortunately, the email title can’t be populated directly which means that any incoming alerts have to be open and read in detail which is time consuming.

I haven’t filed a “bug” before on NCS. Is there a tracking system or a way to know when something like this might be fixed? Doesn’t seem like there is a frequent release version for newer versions.

Thank you.

1 Like