zmNinja notifications coming from two separate Zoneminder servers.

Discussion topics related to mobile applications for ZoneMinder
Post Reply
turt1e
Posts: 2
Joined: Wed Dec 27, 2017 5:36 pm

zmNinja notifications coming from two separate Zoneminder servers.

Post by turt1e » Sat Mar 14, 2020 9:11 pm

I guess this will be more a question for Asker, but was zmNinja ever intended to support object recognition notifications coming from two different Zoneminder servers?

I've setup two Zoneminder servers, one for my house with 4 cameras and one at my parents with 7 cameras. I successfully have object recognition working on both and sending notification with pictures to each of our respective android phones. While I do have both of our servers setup on my zmNinja app, I only ever setup mine to use event notifications which are working great. If I ever needed to check on my parents cameras I could quickly switch over by tapping the little two person icon at the top left of the menu view. I decided to turn on event notifications for my parents house while they were out of town and that also works just fine and my phone is getting both their server's events and mine. The issue arises when I tap one of the events that come in.

If the event is for my house and I was last looking at my cameras in zmNinja then no problem, the event comes up. However, if I happened to be last checking on my parents house cameras and I receive an event notification for my house it doesn't automatically switch over and gets confused. No big deal, I just swipe the app out go back in and switch servers to the correct one and all is good. Except a few times now it has gotten stuck and tries to display my parents 7 cameras after I select my server which has only 4 camera monitor view. So instead I get 7 blank monitors. I also noticed that when I went into the the notification server setup for my server in zmNinja it showed my server info correctly, but listed my parents 7 monitors instead of my 4 monitors. I'm not positive but think this may have messed up the tokens.txt file on my server and I stopped getting notifications from my server until I restarted the server. If this happens again I'll try to get more detailed info, I just wasn't really sure what was going on at first.

I hope that all made sense! I really appreciate all the work you've done to get the object detection and event notifications working in Zoneminder as well as it is.

Thanks,

Paul

User avatar
asker
Posts: 1305
Joined: Sun Mar 01, 2015 12:12 pm

Re: zmNinja notifications coming from two separate Zoneminder servers.

Post by asker » Sun Mar 15, 2020 2:42 pm

but was zmNinja ever intended to support object recognition notifications coming from two different Zoneminder servers?
Not really - zmNinja started off as a single server solution and the server switching was a massive patch. That fact that it mostly works continues to surprise me.
The issue arises when I tap one of the events that come in.
Good catch. zmNinja can't handle this situation. That entire code is messy and not sure when I'll have a clean fix, but if you can put in a GitHub issue in zmNinja I'll remember to work on it.
--
My collection of ZoneMinder learnings:
https://wiki.zoneminder.com/Various_ZM_thoughts

turt1e
Posts: 2
Joined: Wed Dec 27, 2017 5:36 pm

Re: zmNinja notifications coming from two separate Zoneminder servers.

Post by turt1e » Mon Mar 16, 2020 11:43 pm

asker wrote:
Sun Mar 15, 2020 2:42 pm
Not really - zmNinja started off as a single server solution and the server switching was a massive patch. That fact that it mostly works continues to surprise me.
I kinda figured that was probably the case.
Good catch. zmNinja can't handle this situation. That entire code is messy and not sure when I'll have a clean fix, but if you can put in a GitHub issue in zmNinja I'll remember to work on it.
I'll see if I can get it to recreate and save some log files and get that issue posted. Thanks again.

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests