open source ZM client: ZmNinja (uses ZoneMinder APIs)

Discussion topics related to mobile applications for ZoneMinder
McFuzz
Posts: 175
Joined: Tue Aug 28, 2012 7:03 am

Re: open source ZM client: ZmNinja (uses ZoneMinder APIs)

Post by McFuzz » Tue Jan 05, 2016 4:56 am

Hey Asker - happy new year!

Hit another odd problems on the iOS app (can't seem to occur on the Mac app though). I added another server for a total of 3 on my iOS app and even though the same parameters log in just fine on the Mac app, on the iOS app it keeps telling me that authentication has failed.

Checking the logs indicates an odd error "zmAutoLogin Error Null" - I also sent you the logs via email. In any event - I tried using the URL, the IP address instead of the URL (it a remote box), erasing the server, restarting the app... no luck. On the desktop app, though, works like a charm.

Any ideas?

asker
Posts: 829
Joined: Sun Mar 01, 2015 12:12 pm

Re: open source ZM client: ZmNinja (uses ZoneMinder APIs)

Post by asker » Wed Jan 06, 2016 10:52 pm

Hi McFuzz, happy new year to you too.
So I assume this is the same SSL conversation we had and its resolved?
McFuzz wrote:Hey Asker - happy new year!

Hit another odd problems on the iOS app (can't seem to occur on the Mac app though). I added another server for a total of 3 on my iOS app and even though the same parameters log in just fine on the Mac app, on the iOS app it keeps telling me that authentication has failed.

Checking the logs indicates an odd error "zmAutoLogin Error Null" - I also sent you the logs via email. In any event - I tried using the URL, the IP address instead of the URL (it a remote box), erasing the server, restarting the app... no luck. On the desktop app, though, works like a charm.

Any ideas?
--
My collection of ZoneMinder learnings:
https://wiki.zoneminder.com/Various_ZM_thoughts

McFuzz
Posts: 175
Joined: Tue Aug 28, 2012 7:03 am

Re: open source ZM client: ZmNinja (uses ZoneMinder APIs)

Post by McFuzz » Fri Jan 08, 2016 8:28 am

asker wrote:Hi McFuzz, happy new year to you too.
So I assume this is the same SSL conversation we had and its resolved?
McFuzz wrote:Hey Asker - happy new year!

Hit another odd problems on the iOS app (can't seem to occur on the Mac app though). I added another server for a total of 3 on my iOS app and even though the same parameters log in just fine on the Mac app, on the iOS app it keeps telling me that authentication has failed.

Checking the logs indicates an odd error "zmAutoLogin Error Null" - I also sent you the logs via email. In any event - I tried using the URL, the IP address instead of the URL (it a remote box), erasing the server, restarting the app... no luck. On the desktop app, though, works like a charm.

Any ideas?
Yup - all good!

McFuzz
Posts: 175
Joined: Tue Aug 28, 2012 7:03 am

Re: open source ZM client: ZmNinja (uses ZoneMinder APIs)

Post by McFuzz » Fri Jan 08, 2016 7:36 pm

zmNinja update is now available on the iOS AppStore.

yamy125
Posts: 2
Joined: Tue Jan 12, 2016 11:09 pm

Re: open source ZM client: ZmNinja (uses ZoneMinder APIs)

Post by yamy125 » Tue Jan 12, 2016 11:23 pm

Hi McFuzz,

I'm noting some odd activity playback issues on Android. I think it might be due to frame refresh and bandwidth, but seems hit and miss in testing. Just wondering if there is anything else you can suggest I try. I'll attempt to explain below. These are via 4G and decent bandwidth, but not local wireless for reference:

- Playback event will either be blank, or will flash up the odd screen here and there during playback.
- Adjusting Event image scale % in Dev. Settings down from default 50 to say 10 results in slightly better playback, but obviously incredibly 'blocky'.
- When using local wireless, setting anything under 100% for Event image scale % results in 'flickering' (i.e. dropping frames back to blank). Setting to 100 on local wireless and playback seems to be OK.
- With scale set to 100 off wireless it is blank.
- Switching off H264 Video support does work to some extent, but playback is about 1 frame per few seconds by default. You can then go and click on 'normal speed', but it also results in lost/blank screens in playback.

Are there any settings in ZM itself, for example under Phone B/W, that can be adjusted to assist?

The other thing worth mentioning is that the native resolution of this particular camera (only have 1 to test with at this stage) is high at 1280x1024.

Cheers

asker
Posts: 829
Joined: Sun Mar 01, 2015 12:12 pm

Re: open source ZM client: ZmNinja (uses ZoneMinder APIs)

Post by asker » Sat Jan 16, 2016 8:39 am

- Playback event will either be blank, or will flash up the odd screen here and there during playback.
This generally means either you network is slow, or your ZM instance is not fast enough to serve the images for the rate required to playback. Slowing down the frame rate during playback will help here, reducing the event image quality will help here, bumping up your ZM specs may help here - take a look at ZM load when its serving images in playback.
- Adjusting Event image scale % in Dev. Settings down from default 50 to say 10 results in slightly better playback, but obviously incredibly 'blocky'.

Right, 10% would be very blocky

- When using local wireless, setting anything under 100% for Event image scale % results in 'flickering' (i.e. dropping frames back to blank). Setting to 100 on local wireless and playback seems to be OK.
Okay, I am somehow getting a feeling your ZM system is underpowered. Is it? Can you take a look at your load when serving event playback to zmN?
When you set scale to 100%, the image is not re-scaled at the server. When you set scale to any other value, the server re-scales the image before sending it to zmN.

- With scale set to 100 off wireless it is blank.
What do you mean off wireless? You mean scale = 100 & on 4G?

- Switching off H264 Video support does work to some extent, but playback is about 1 frame per few seconds by default. You can then go and click on 'normal speed', but it also results in lost/blank screens in playback.
Switching 264 or off should not make a difference. I am surprised to are seeing improvements


The other thing worth mentioning is that the native resolution of this particular camera (only have 1 to test with at this stage) is high at 1280x1024.
That should be fine - I use 6 such cameras an am regularly on LTE/3G and Wifi on my iPhone 5S
--
My collection of ZoneMinder learnings:
https://wiki.zoneminder.com/Various_ZM_thoughts

yamy125
Posts: 2
Joined: Tue Jan 12, 2016 11:09 pm

Re: open source ZM client: ZmNinja (uses ZoneMinder APIs)

Post by yamy125 » Sat Jan 16, 2016 8:04 pm

Thanks a lot for the suggestions - it definitely gave me some focus.

I did some experimenting. ZM sits on a VM, so initial thoughts were it was under-spec'd. Upped the vCPUs to 2 and doubled the RAM to 4GB - fairly sure this is overkill, but good for a test. Played back events via ZMN and also via web login on PC. No noticeable hits to CPU stats at OS-level or hypervisor-level. The 2 x vCPUs at OS-level sit fairly consistently at ~50% and it isn't an obvious change during playback. I therefore ruled that out. Memory the same - doesn't budge from ~25% usage. So the upgrades here weren't source of issue.

Based on my earlier testing, I was confident it was bandwidth, but just didn't understand why the web playback is pretty good, vs. ZMN, which is next to unusable. I got the system monitor up and did some bandwidth testing. Event playback via web interface on local PC and I get ~1MB/s leaving the ZM server. ZMN via WIFI and I get ~500KB/s with developer setting set to 50%, so that adds up and makes sense. Setting the developer setting to 100% and I get ~1MB/s, so all aligns there.

Switching to 4G, my local ADSL2+ connection will definitely be my bottleneck. I only have around a 2Mb/s upload, so explains things. I can see when attempting to playback an event it just peaks out at under 200KB/s send on the ZM server and back in ZMN no frames or very few frames are displayed.

So my underlying issue is getting the images down to a decent size for playback on a limited connection I guess. Are there any frame rate settings I can play with in ZMN to assist, as the scale setting at 10%-20% (peaks out upload rate on connection) gets way too blocky at a scale suitable for playback? I'm guessing the only other option is to reduce the camera resolution back in ZM or on the camera itself? Issue there is it impacts things everywhere. I guess the only other thing of interest is why playback via web browser is fairly decent when offsite vs. ZMN? Guessing it is the bitrate setting for various High/Med/Low that don't appear to be an option in ZMN?

Cheers

asker
Posts: 829
Joined: Sun Mar 01, 2015 12:12 pm

Re: open source ZM client: ZmNinja (uses ZoneMinder APIs)

Post by asker » Sun Jan 17, 2016 2:21 pm

I think I need to re-look at the code and optimize.

A brief answer: ZM web console plays back events via zms, zmNinja directly accesses images skipping zms. I used to use zms before, but I found the direct image access to be better, especially in the scrubbing section. In your case, it seems to be worse. I could possibly offer both options.

I'm currently working on another background data issue on Android - which is my top priority to fix. Once I do that, I'll look into this.
--
My collection of ZoneMinder learnings:
https://wiki.zoneminder.com/Various_ZM_thoughts

BiloxiGeek
Posts: 220
Joined: Tue Feb 11, 2014 2:04 pm

Re: open source ZM client: ZmNinja (uses ZoneMinder APIs)

Post by BiloxiGeek » Sat Feb 06, 2016 3:24 am

Just some kudos for ZmNinja...

M wife is not particularly tech savvy. She never used the bookmark for zoneminder that I set up on her iPad. But I just learned that she uses ZmNinja quite often to keep an eye on our puppy out in the backyard. :D

asker
Posts: 829
Joined: Sun Mar 01, 2015 12:12 pm

Re: open source ZM client: ZmNinja (uses ZoneMinder APIs)

Post by asker » Sat Feb 06, 2016 12:29 pm

Hey thanks Biloxi! Always good to hear nice things :D
--
My collection of ZoneMinder learnings:
https://wiki.zoneminder.com/Various_ZM_thoughts

BiloxiGeek
Posts: 220
Joined: Tue Feb 11, 2014 2:04 pm

Re: open source ZM client: ZmNinja (uses ZoneMinder APIs)

Post by BiloxiGeek » Tue Mar 22, 2016 11:26 pm

Really like the way the montage view can be shuffled around and resized. But so far it resets back to really small images in a default order. I change the size, re-order them to my liking and it's ok. Till I start the app next time and it's back to default.

Am I missing a "Save layout" option or something similar?

P.S. Just noticed it's a little worse than I originally thought. Started the app, pulled up Montage, sized the images, shuffled them around to my liking. Then went to Event View and back to Montage, the changes I just made to montage view were gone.

asker
Posts: 829
Joined: Sun Mar 01, 2015 12:12 pm

Re: open source ZM client: ZmNinja (uses ZoneMinder APIs)

Post by asker » Wed Mar 23, 2016 11:54 am

BiloxiGeek wrote:Really like the way the montage view can be shuffled around and resized. But so far it resets back to really small images in a default order. I change the size, re-order them to my liking and it's ok. Till I start the app next time and it's back to default.

Am I missing a "Save layout" option or something similar?

P.S. Just noticed it's a little worse than I originally thought. Started the app, pulled up Montage, sized the images, shuffled them around to my liking. Then went to Event View and back to Montage, the changes I just made to montage view were gone.
No, unfortunately that is a bug - if you have a disabled monitor. If you enable that monitor it will work. This bug is fixed in the next version of iOS that is hanging around for review.
--
My collection of ZoneMinder learnings:
https://wiki.zoneminder.com/Various_ZM_thoughts

BiloxiGeek
Posts: 220
Joined: Tue Feb 11, 2014 2:04 pm

Re: open source ZM client: ZmNinja (uses ZoneMinder APIs)

Post by BiloxiGeek » Thu Mar 24, 2016 10:07 pm

asker wrote:No, unfortunately that is a bug - if you have a disabled monitor. If you enable that monitor it will work. This bug is fixed in the next version of iOS that is hanging around for review.
Double checked and all my monitors are enabled but I'm still seeing this issue. Updated the app today to 1.1.2, Mar 23.

BiloxiGeek
Posts: 220
Joined: Tue Feb 11, 2014 2:04 pm

Re: open source ZM client: ZmNinja (uses ZoneMinder APIs)

Post by BiloxiGeek » Fri Mar 25, 2016 9:45 pm

Just realized I hadn't tested for this glitch on my iPhone 6Plus. It's behaving just like the iPad Air2.

Bring up the montage, resize and rearrange the montage to my liking. But after I click on any other view in the app and then back to the montage all the monitors reset to the smallest size and a default layout.

When you said it's a known issue if there's a disabled monitor I'm not clear on what that means. All the monitors in ZM are enabled. I've got 10 cameras, which make up 20 monitors. One lowdef and one hidef stream from each camera. The montage view I see just has the hidef monitors. I'm guessing at some point I told ZMNinja to only show the hidef streams in montage view but I can't find that setting anywhere. Wanted to try and get to show all 20 monitors and see if that has an effect on the behavior.

asker
Posts: 829
Joined: Sun Mar 01, 2015 12:12 pm

Re: open source ZM client: ZmNinja (uses ZoneMinder APIs)

Post by asker » Sat Mar 26, 2016 11:06 am

BiloxiGeek wrote:Just realized I hadn't tested for this glitch on my iPhone 6Plus. It's behaving just like the iPad Air2.

Bring up the montage, resize and rearrange the montage to my liking. But after I click on any other view in the app and then back to the montage all the monitors reset to the smallest size and a default layout.

When you said it's a known issue if there's a disabled monitor I'm not clear on what that means. All the monitors in ZM are enabled. I've got 10 cameras, which make up 20 monitors. One lowdef and one hidef stream from each camera. The montage view I see just has the hidef monitors. I'm guessing at some point I told ZMNinja to only show the hidef streams in montage view but I can't find that setting anywhere. Wanted to try and get to show all 20 monitors and see if that has an effect on the behavior.
Can you please enable debug logs (dev settings) and email a copy?
--
My collection of ZoneMinder learnings:
https://wiki.zoneminder.com/Various_ZM_thoughts

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest