ZoneMinder Client Mobile Application for Android

If you've made a patch to quick fix a bug or to add a new feature not yet in the main tree then post it here so others can try it out.
axelm
Posts: 46
Joined: Wed Feb 06, 2013 1:50 pm

Re: ZoneMinder Client Mobile Application for Android

Post by axelm »

Panning limit works fine. I think panning should be with one finger instead of two. That's how Android Gallery, Facebook and most apps work.

It probably bothers you that I mention IP Cam Viewer so much, but it is the leading Android app in this niche. I would just copy the way they show the cameras. They've been doing it for years now. My brother in law has been using that app for two years and it's only gotten better and better. The tiny previews of the rest of the cameras on the bottom of the screen seem fantastic to me. Also check out how sensitive IP Cam Viewer is during zoom/pan. I don't know if it is Air-related but yours seems much slower.
thoweiss
Posts: 15
Joined: Mon Mar 06, 2006 3:00 pm

Re: ZoneMinder Client Mobile Application for Android

Post by thoweiss »

Hello axelm,
thanks for the app

Unfortunately it won't work on my Phone...
i get a red message "no monitors found"

I have installed the latest version of the .apk on my Galaxy S2 plus

I'm using ZM v1.25.0.

My android version is 4.1.2

Here is the xml-output of my zoneminder installation:
http://192.168.178.5:85/zm/index.php?skin=zmc_xml

Code: Select all

<console>
<skinVersion>2</skinVersion>
<running>1</running>
<username>admin</username>
<maxBandwidth>high</maxBandwidth>
<viewStream>1</viewStream>
<viewMonitors>1</viewMonitors>
<editMonitors>1</editMonitors>
<viewEvents>1</viewEvents>
<editEvents>1</editEvents>
<monitor>
<monitorID>2</monitorID>
<monitorName>Haustuer_remote</monitorName>
<monitorWidth>480</monitorWidth>
<monitorHeight>320</monitorHeight>
<monitorSequence>1</monitorSequence>
<monitorFunction>Modect</monitorFunction>
<monitorEnabled>1</monitorEnabled>
<monitorEvents>64</monitorEvents>
</monitor>
</console>
Maybe its a timing problem?

ZM runs on an raspberry pi - the response time is sometimes really slow...


regards,
Thorsten Weiss
kevin186
Posts: 55
Joined: Mon May 10, 2010 4:11 am
Location: Worth, IL

Re: ZoneMinder Client Mobile Application for Android

Post by kevin186 »

@thoweiss

Thanks for the bug report. I had not tried my app with only 1 monitor before. I set up a test account and gave it access to only 1 monitor and received the same results: "No monitors available" . I must have messed up some math somewhere. I will fix this in my newer version which I was trying to release today, which will include the ability to save a single snapshot or a burst of snapshots while in the "watch" view.

update: I fixed it and will package and post it online in a couple of hours.
update: new file can be downloaded @ http://dvr-security.net/air/zmc/ZoneMin ... e_beta.apk

New permissions are required because of the snapshot feature. Now you can save a single snapshot or up to a burst of 16 snapshots by clicking the camera button in the actionbar. The burst snapshots are taken from consecutively received frames and saved directly to the gallery using the CameraRoll api, which is the fastest method of saving images. You will see a progressbar and can abort the burst of snapshots from continuing by pressing the abort button. The number of burst shapshots can be set in the settings of the "watch" view. You can pre-select which snapshot mode to be in (single or burst), or you can select "ask" which will prompt you to choose when you press the camera button.

I also changed the style of the actionbar buttons back to an android look versus an ios look.
thoweiss
Posts: 15
Joined: Mon Mar 06, 2006 3:00 pm

Re: ZoneMinder Client Mobile Application for Android

Post by thoweiss »

Thanks for the new version,
it's going to work now :D

But one strange behavior is on the Images:

I have here only very slow internet on my Phone (only gprs), maybe ist better with wifi connection.

I will try it at home


Regards,
Thorsten
Attachments
1364211325533[1].jpg
1364211325533[1].jpg (6.33 KiB) Viewed 8467 times
1364211317871[1].jpg
1364211317871[1].jpg (8.61 KiB) Viewed 8467 times
1364211339990[1].jpg
1364211339990[1].jpg (16.55 KiB) Viewed 8467 times
kevin186
Posts: 55
Joined: Mon May 10, 2010 4:11 am
Location: Worth, IL

Re: ZoneMinder Client Mobile Application for Android

Post by kevin186 »

@thoweiss

Is this the live streaming "watch" view, or are these snapshots saved by the app? If this is the "watch" view, then please try going to the settings and changing to a lower bandwidth setting in the app(possibly "phone"). And then go to the "Phone B/W" settings on your zoneminder server and change the WEB_P_VIDEO_MAXFPS to 1. Possibly your gprs connection is a limiting factor. If these are snapshots saved by the app, then were they taken 1 at a time, or was it in burst mode(how many)?

I did some testing with my phone and set my phone to use 2g only and could not duplicate any problems. Perhaps your server(raspberry pi) is pushing out corrupt frames that you normally do not notice because they are streaming, but when taking a burst of snapshots your are able to capture the usually unseen problem.

But of course, I still do not know if this is a live streaming problem or a burst of snapshots problem. Please let me know. If it is a snapshots problem, I could possible take the snapshot a different way by saving a screenshot instead of directly saving the loaded bitmapData. Let me know.
Last edited by kevin186 on Mon Mar 25, 2013 2:19 pm, edited 1 time in total.
axelm
Posts: 46
Joined: Wed Feb 06, 2013 1:50 pm

Re: ZoneMinder Client Mobile Application for Android

Post by axelm »

Can you add a checkbox so this app works via Wifi only? Realtime streaming via 3G could cost a fortune if I forgot to shut off the application and leave it running overnight. My plan only covers 300MB/month since I recently downgraded from an unlimited data plan.
kevin186
Posts: 55
Joined: Mon May 10, 2010 4:11 am
Location: Worth, IL

Re: ZoneMinder Client Mobile Application for Android

Post by kevin186 »

axelm wrote: Can you add a checkbox so this app works via Wifi only? Realtime streaming via 3G could cost a fortune if I forgot to shut off the application and leave it running overnight. My plan only covers 300MB/month since I recently downgraded from an unlimited data plan.
When you lock your phone or minimize the application, the stream automatically shuts off. If you want your phone to still automatically lock itself, which will turn off the streams, then in the app settings uncheck the "keep system awake" checkbox. I suggest that to minimize bandwidth usage, go to the options on your zoneminder server under the "phone b/w" tab and change WEB_P_VIDEO_MAXFPS to 1. Then on the app, go to the settings and change the bandwidth to be "phone." And remember, the montage and watch and cycle settings are independent of each other, so change the bandwidth setting for eachl of them.

If the "phone" bandwidth setting does not work for you, let me know. It looks like I would be able to detect if you are using a wifi or mobile connection. How would you need this implemented? Prevent you from logging in? Pop up a warning to remind you that you are on a mobile network when logging in and ask you to proceed? Prevent the live streams from restarting after detecting a network change, such as you leaving the house wifi and going on the mobile network? Let me know.
axelm
Posts: 46
Joined: Wed Feb 06, 2013 1:50 pm

Re: ZoneMinder Client Mobile Application for Android

Post by axelm »

kevin186 wrote:
axelm wrote: Can you add a checkbox so this app works via Wifi only? Realtime streaming via 3G could cost a fortune if I forgot to shut off the application and leave it running overnight. My plan only covers 300MB/month since I recently downgraded from an unlimited data plan.
When you lock your phone or minimize the application, the stream automatically shuts off. If you want your phone to still automatically lock itself, which will turn off the streams, then in the app settings uncheck the "keep system awake" checkbox. I suggest that to minimize bandwidth usage, go to the options on your zoneminder server under the "phone b/w" tab and change WEB_P_VIDEO_MAXFPS to 1. Then on the app, go to the settings and change the bandwidth to be "phone." And remember, the montage and watch and cycle settings are independent of each other, so change the bandwidth setting for eachl of them.

If the "phone" bandwidth setting does not work for you, let me know. It looks like I would be able to detect if you are using a wifi or mobile connection. How would you need this implemented? Prevent you from logging in? Pop up a warning to remind you that you are on a mobile network when logging in and ask you to proceed? Prevent the live streams from restarting after detecting a network change, such as you leaving the house wifi and going on the mobile network? Let me know.
What about adding a checkbox that says "Enable live feed over 3G/4G" default disabled. If this is disabled, the user could still press a refresh button and get updated snapshots? IS that too cumbersome?
kevin186
Posts: 55
Joined: Mon May 10, 2010 4:11 am
Location: Worth, IL

Re: ZoneMinder Client Mobile Application for Android

Post by kevin186 »

@axelm

I checked and I was able to pull up all of my network devices on my phone and check if they are active or not:

name : mobile - active : true
name : WIFI - active : false
name : mobile_mms - active : false
name : mobile_supl - active : false
name : mobile_dun - active : false
name : mobile_hipri - active : false
name : BLUETOOTH_TETHER - active : false
name : mobile_fota - active : false
name : mobile_ims - active : false
name : mobile_cbs - active : false
name : WIFI - active : false

So, a possibility would be to switch to a still image that refreshes at a set interval(or when tapped) if the app detects that your are on a mobile network vs wifi. But the skin I created does not have a still image implemented, only mjpeg streaming. The skin would need to be updated. I will try to implement this when I update the skin for event viewing in the hopefully near future.
axelm
Posts: 46
Joined: Wed Feb 06, 2013 1:50 pm

Re: ZoneMinder Client Mobile Application for Android

Post by axelm »

kevin186 wrote:@axelm

I checked and I was able to pull up all of my network devices on my phone and check if they are active or not:

name : mobile - active : true
name : WIFI - active : false
name : mobile_mms - active : false
name : mobile_supl - active : false
name : mobile_dun - active : false
name : mobile_hipri - active : false
name : BLUETOOTH_TETHER - active : false
name : mobile_fota - active : false
name : mobile_ims - active : false
name : mobile_cbs - active : false
name : WIFI - active : false

So, a possibility would be to switch to a still image that refreshes at a set interval(or when tapped) if the app detects that your are on a mobile network vs wifi. But the skin I created does not have a still image implemented, only mjpeg streaming. The skin would need to be updated. I will try to implement this when I update the skin for event viewing in the hopefully near future.
Sounds good!
TheKorn
Posts: 142
Joined: Fri Aug 02, 2013 12:39 pm

Re: ZoneMinder Client Mobile Application for Android

Post by TheKorn »

kevin186 wrote:@axelm

I added the zooming feature as requested. Download the app at the same location: STUPID FORUM SOFTWARE MADE ME REMOVE LINK WHEN QUOTING.

When in "Watch" mode viewing a single monitor and video is currently turned on:
- Double click the video to activate panning and zooming.
- Use 2 fingers for zooming in a pinching motion.
- Use 2 fingers for panning in a dragging motion.
- Double click the video again or press the back button to deactivate panning and zooming.
Can you check the version that's on your server? While I was able to download and install the app according to your directions, none of those features are on the version I downloaded. Pinching and zooming simply displays "socket closed". There is also no function view that I can find. Put it all together and it seems as though I somehow downloaded a very old (though mostly working!) version of your app.

Despite the missing stuff, it's quite nice, so good show nonetheless! :D

Oh yeah, and Cycle mode is entirely broken, just shows a black screen. Doesn't cycle to... anything. Hitting back gets me to the main screen (choose montage, cycle, or a single cam) so it's not crashing, it's just not... doing anything.

Thanks!

(Oh, and android reports the version is ... well, scratch that, android doesn't report *any* version for your app. Might want to add one, just for situations like these. ;)
TheKorn
Posts: 142
Joined: Fri Aug 02, 2013 12:39 pm

Re: ZoneMinder Client Mobile Application for Android

Post by TheKorn »

Figured out my problem -- I had downloaded the apk from your first post, which was (apparently) an earlier build.

Cycle still doesn't do... anything, though. ;)
danko
Posts: 5
Joined: Fri Aug 09, 2013 11:28 am

Re: ZoneMinder Client Mobile Application for Android

Post by danko »

Hi

problem:
I press log in
Zoneminderclient
No monitors aviable

device Acer V370 android 4.2.2
The system has a single monitor : Monitor-1
kevin186
Posts: 55
Joined: Mon May 10, 2010 4:11 am
Location: Worth, IL

Re: ZoneMinder Client Mobile Application for Android

Post by kevin186 »

danko wrote:Hi

problem:
I press log in
Zoneminderclient
No monitors aviable

device Acer V370 android 4.2.2
The system has a single monitor : Monitor-1
I thought that i had fixed that bug and posted about it @ http://www.zoneminder.com/forums/viewto ... 492#p79492

Perhaps you have downloaded an older file.
kevin186
Posts: 55
Joined: Mon May 10, 2010 4:11 am
Location: Worth, IL

Re: ZoneMinder Client Mobile Application for Android

Post by kevin186 »

Hi everybody. I am sorry that I have not released a newer version lately as I have been busy with work and family. I will try to find time to clean up my current version that I use so that I can let everyone else try it.
Post Reply