Run State filter test?

Forum for questions and support relating to the 1.30.x releases only.
Post Reply
SkippyDo
Posts: 196
Joined: Mon Nov 20, 2017 6:49 pm

Run State filter test?

Post by SkippyDo » Fri May 04, 2018 7:38 pm

I've run across having a similar needs as I, but it's been approached in a different (what I believe is more complicated) manner.

I'm thinking that having a filter test for "Run State" (string comparison) would allow me to create a run state of say "NoEmail" and I could toggle the server's run state to "NoEmail" which would then cause the filter test to turn off sending e-mail (for those filters conditioned to do so). I utilize zmNinja a lot; it readily allows for the changing of run states (but no access to modify filters).

My need arises out of the fact that I would like to reduce the amount of e-mail alerts that I am generating (mail host/provider starts blocking me as spam when I start generating a lot of e-mails). I have conditions that do not allow me to more finely tune down the number of alerts; I'm about as optimized as I can be using zones.

I don't want to add external scripts and stuff because I wish to minimize the calls outside of Zoneminder's code.

SkippyDo
Posts: 196
Joined: Mon Nov 20, 2017 6:49 pm

Re: Run State filter test?

Post by SkippyDo » Fri May 04, 2018 7:47 pm

I see that there's something in 1.31?

https://github.com/ZoneMinder/zoneminder/pull/1752

But I cannot find much else discussing it.

User avatar
snake
Posts: 337
Joined: Sat May 21, 2016 2:20 am

Re: Run State filter test?

Post by snake » Sat May 05, 2018 12:38 pm

SkippyDo wrote:
Fri May 04, 2018 7:47 pm
I see that there's something in 1.31?

https://github.com/ZoneMinder/zoneminder/pull/1752

But I cannot find much else discussing it.
See: https://github.com/zoneminder/zoneminder/issues/1750
viewtopic.php?f=30&amp=&t=21459
viewtopic.php?f=29&amp=&t=21702
https://wiki.zoneminder.com/SMS_Notifications#Notes

Read the pull request/code. I have hacked this into 1.30.4 and it works great.

SkippyDo
Posts: 196
Joined: Mon Nov 20, 2017 6:49 pm

Re: Run State filter test?

Post by SkippyDo » Sat May 05, 2018 6:06 pm

You "hacked it into 1.30.4?" Not part of 1.30.4?

Everything you link to points to that github 1752 thread and that thread only states that there is a code change (supposedly for this), there is no mention of how it was implemented (I cannot find any documentation).

The SMS_Notification Notes points to: https://wiki.zoneminder.com/Filter_on_run_states, which comes up as:

There is currently no text in this page. You can search for this page title in other pages, or [?title=Special:Log&page=Filter_on_run_states search the related logs], but you do not have permission to create this page.


And of course, when I do a search as suggested I get nothing of use (comes back to the SMS notifications page, again).

User avatar
snake
Posts: 337
Joined: Sat May 21, 2016 2:20 am

Re: Run State filter test?

Post by snake » Sat May 05, 2018 6:16 pm

No, it is not part of 1.30.4, I don't think.

Right now, your options are to upgrade to 1.31 which is unstable, wait for 1.31 to have a stable release, or hack it into 1.30.4. Hacking it into 1.30.4, means downloading the source, and compiling from scratch. Per: https://wiki.zoneminder.com/SMS_Notifications#Notes
SkippyDo wrote:
Sat May 05, 2018 6:06 pm
The SMS_Notification Notes points to: https://wiki.zoneminder.com/Filter_on_run_states, which comes up as:

There is currently no text in this page. You can search for this page title in other pages, or [?title=Special:Log&page=Filter_on_run_states search the related logs], but you do not have permission to create this page.
I do need to fix this link.

SkippyDo
Posts: 196
Joined: Mon Nov 20, 2017 6:49 pm

Re: Run State filter test?

Post by SkippyDo » Sat May 05, 2018 6:35 pm

OK, thanks for the clarification.

Knowing that it'll be in the next release I'll just hold off and wait: I'd compiled 1.30.4 previously when I was testing an implementation (new to ZM) and found it to be a bit of a headache (I did, however, manage to get it to compile and work); I'm basically in production now and don't want to mess things up.

Post Reply

Who is online

Users browsing this forum: No registered users and 9 guests