Have command line ssmtp working but having trouble testing from zoneminder

Forum for questions and support relating to the 1.34.x releases only.
Post Reply
JimS
Posts: 63
Joined: Sun Feb 18, 2007 3:16 pm

Have command line ssmtp working but having trouble testing from zoneminder

Post by JimS »

I read the wiki for sending email and also SMS. Got through command line testing and that works. But the zoneminder testing directions are VERY brief. Searched for a youtube figuring it would help to see the steps but couldn't find one. Can someone expand the steps for this? I am also unclear on setting up the filter, both for the initial test and for normal notifications. What are some starting settings for conditions as a good starting point that I can then tweak? Surprised I haven't found more detailed examples (with screen shots?) but maybe I am just using the wrong search terms. I don't want every event as the system has quite a few false triggers (which I should try to tune for but that's a somewhat different issue - I have found some detailed pages on tuning detection) so probably need to set a minimum trigger frame count and maybe some others.
User avatar
burger
Posts: 442
Joined: Mon May 11, 2020 4:32 pm

Re: Have command line ssmtp working but having trouble testing from zoneminder

Post by burger »

fastest way to test streams:
ffmpeg -i rtsp://<user>:<pass>@<ipaddress>:554/path ./output.mp4 (if terminal only)
ffplay rtsp://<user>:<pass>@<ipaddress>:554/path (gui)
find paths on ispydb or in zm hcl

If you are new to security software, read:
https://wiki.zoneminder.com/Dummies_Guide
JimS
Posts: 63
Joined: Sun Feb 18, 2007 3:16 pm

Re: Have command line ssmtp working but having trouble testing from zoneminder

Post by JimS »

Thanks! I got basic operation working. Now to improve it - incremental improvement. Baby steps... Texts would show up faster I think and would like to include an image. And limit it to low res streams for dual stream cams.
JimS
Posts: 63
Joined: Sun Feb 18, 2007 3:16 pm

Re: Have command line ssmtp working but having trouble testing from zoneminder

Post by JimS »

I set up ssmtp but see msmtp is recommended now. Running on Ubuntu 20.04. Any real need to switch? What are the advantages of changing?
JimS
Posts: 63
Joined: Sun Feb 18, 2007 3:16 pm

Re: Have command line ssmtp working but having trouble testing from zoneminder

Post by JimS »

I set limit to first 3 results only for testing and it seems to have stopped sending. How should that be set for normal operation or is it only used for listing matches? When I have saved it do I need to also click the execute button? I have email details of all matches and run filter in background checked. IMHO the filters page could have a bit more detail and be really helpful to those getting started.
JimS
Posts: 63
Joined: Sun Feb 18, 2007 3:16 pm

Re: Have command line ssmtp working but having trouble testing from zoneminder

Post by JimS »

Not getting alerts now. I see that the limit can be left blank so tried that. Also unchecked run in background which I later read should be checked so rechecked it. Also tried putting back limit to first 1 results. Just fiddling with things I don't really understand. Also read:
https://zoneminder.readthedocs.io/en/st ... vents.html
which has some additional details but still a bit lost.
Have the condition:
End date/time greater than or equal to -1 minute
What does this do and is it correct for getting email alerts of triggers?
What's the proper setting for Limit to first ____ results only? Blank?
What items should be checked at the bottom such as run filter in background?

If all this looks good how to trouble shoot? If I do a list matches and then trigger a zone I don't see anything. Should this screen update in real time or do I need to hit list matches within some time of doing the forced trigger?
User avatar
burger
Posts: 442
Joined: Mon May 11, 2020 4:32 pm

Re: Have command line ssmtp working but having trouble testing from zoneminder

Post by burger »

It sounds like you are just starting to use the filters, and have a lot of questions. Keep using it, and you should figure it out. ZM has a learning curve, and it takes a little while to understand the user interface. If you work on something long enough, it will start to make sense. You can also look at the source code.

Most of your questions are answered in the links posted above. SSMTP is deprecated. Search online if you need more info.
End date/time greater than or equal to -1 minute refers to events in the previous minute. This will come up if you search the forums.
For "What's the proper setting for Limit to first ____ results only? " It depends on the filter, but you'd usually do just 1 event for alarms. Do you expect to get more than one event in a minute?
"What items should be checked at the bottom such as run filter in background?", Most of the time you'd choose run filter in the background, unless you had a use case for one of the other options. I typically have 'send email' and 'run filter in the background' checked off.

You make a good point, that there could be more details for some of the items above, or screenshots/videos. I've always been able to just monkey wrench my way through the filters. A ZM install only needs a few filters anyways. You don't usually make dozens of filters for an install. But I'll see about getting some more screenshots. Picture and video examples are useful for new users.
fastest way to test streams:
ffmpeg -i rtsp://<user>:<pass>@<ipaddress>:554/path ./output.mp4 (if terminal only)
ffplay rtsp://<user>:<pass>@<ipaddress>:554/path (gui)
find paths on ispydb or in zm hcl

If you are new to security software, read:
https://wiki.zoneminder.com/Dummies_Guide
JimS
Posts: 63
Joined: Sun Feb 18, 2007 3:16 pm

Re: Have command line ssmtp working but having trouble testing from zoneminder

Post by JimS »

Yes, just starting to use filters and so many questions... As for ssmtp vs msmtp it works for now so I will just leave it until I get some other things sorted out. When I added some additional monitors I used ID instead of monitor ID and didn't realize it. I have corrected that and things are working again and have added an image to the email. Slowly figuring things out...
Post Reply