From b87f575ca55220a6d7066d6c96e6895ea4721e04 Mon Sep 17 00:00:00 2001 From: Pliable Pixels Date: Fri, 15 Mar 2019 09:27:24 -0400 Subject: moved dirs --- docs/_build/doctrees/FAQ.doctree | Bin 140564 -> 0 bytes docs/_build/doctrees/contributing-language.doctree | Bin 12029 -> 0 bytes docs/_build/doctrees/desktop.doctree | Bin 12489 -> 0 bytes docs/_build/doctrees/environment.pickle | Bin 39294 -> 38919 bytes docs/_build/doctrees/guides/FAQ.doctree | Bin 0 -> 140571 bytes .../doctrees/guides/contributing-language.doctree | Bin 0 -> 12036 bytes docs/_build/doctrees/guides/desktop.doctree | Bin 0 -> 12496 bytes docs/_build/doctrees/guides/source.doctree | Bin 0 -> 33487 bytes docs/_build/doctrees/guides/validating-api.doctree | Bin 0 -> 23974 bytes docs/_build/doctrees/index.doctree | Bin 7600 -> 7775 bytes docs/_build/doctrees/source.doctree | Bin 34114 -> 0 bytes docs/_build/doctrees/validating-api.doctree | Bin 23967 -> 0 bytes docs/_build/html/FAQ.html | 987 --------------------- docs/_build/html/_sources/FAQ.rst.txt | 754 ---------------- .../html/_sources/contributing-language.rst.txt | 59 -- docs/_build/html/_sources/desktop.rst.txt | 113 --- docs/_build/html/_sources/guides/FAQ.rst.txt | 754 ++++++++++++++++ .../_sources/guides/contributing-language.rst.txt | 59 ++ docs/_build/html/_sources/guides/desktop.rst.txt | 113 +++ docs/_build/html/_sources/guides/source.rst.txt | 256 ++++++ .../html/_sources/guides/validating-api.rst.txt | 95 ++ docs/_build/html/_sources/index.rst.txt | 20 +- docs/_build/html/_sources/source.rst.txt | 260 ------ docs/_build/html/_sources/validating-api.rst.txt | 95 -- docs/_build/html/contributing-language.html | 289 ------ docs/_build/html/desktop.html | 333 ------- docs/_build/html/genindex.html | 10 +- docs/_build/html/guides/FAQ.html | 987 +++++++++++++++++++++ docs/_build/html/guides/contributing-language.html | 289 ++++++ docs/_build/html/guides/desktop.html | 333 +++++++ docs/_build/html/guides/source.html | 468 ++++++++++ docs/_build/html/guides/validating-api.html | 331 +++++++ docs/_build/html/index.html | 24 +- docs/_build/html/objects.inv | Bin 355 -> 366 bytes docs/_build/html/search.html | 10 +- docs/_build/html/searchindex.js | 2 +- docs/_build/html/source.html | 473 ---------- docs/_build/html/validating-api.html | 331 ------- 38 files changed, 3718 insertions(+), 3727 deletions(-) delete mode 100644 docs/_build/doctrees/FAQ.doctree delete mode 100644 docs/_build/doctrees/contributing-language.doctree delete mode 100644 docs/_build/doctrees/desktop.doctree create mode 100644 docs/_build/doctrees/guides/FAQ.doctree create mode 100644 docs/_build/doctrees/guides/contributing-language.doctree create mode 100644 docs/_build/doctrees/guides/desktop.doctree create mode 100644 docs/_build/doctrees/guides/source.doctree create mode 100644 docs/_build/doctrees/guides/validating-api.doctree delete mode 100644 docs/_build/doctrees/source.doctree delete mode 100644 docs/_build/doctrees/validating-api.doctree delete mode 100644 docs/_build/html/FAQ.html delete mode 100644 docs/_build/html/_sources/FAQ.rst.txt delete mode 100644 docs/_build/html/_sources/contributing-language.rst.txt delete mode 100644 docs/_build/html/_sources/desktop.rst.txt create mode 100644 docs/_build/html/_sources/guides/FAQ.rst.txt create mode 100644 docs/_build/html/_sources/guides/contributing-language.rst.txt create mode 100644 docs/_build/html/_sources/guides/desktop.rst.txt create mode 100644 docs/_build/html/_sources/guides/source.rst.txt create mode 100644 docs/_build/html/_sources/guides/validating-api.rst.txt delete mode 100644 docs/_build/html/_sources/source.rst.txt delete mode 100644 docs/_build/html/_sources/validating-api.rst.txt delete mode 100644 docs/_build/html/contributing-language.html delete mode 100644 docs/_build/html/desktop.html create mode 100644 docs/_build/html/guides/FAQ.html create mode 100644 docs/_build/html/guides/contributing-language.html create mode 100644 docs/_build/html/guides/desktop.html create mode 100644 docs/_build/html/guides/source.html create mode 100644 docs/_build/html/guides/validating-api.html delete mode 100644 docs/_build/html/source.html delete mode 100644 docs/_build/html/validating-api.html (limited to 'docs/_build') diff --git a/docs/_build/doctrees/FAQ.doctree b/docs/_build/doctrees/FAQ.doctree deleted file mode 100644 index 827be4da..00000000 Binary files a/docs/_build/doctrees/FAQ.doctree and /dev/null differ diff --git a/docs/_build/doctrees/contributing-language.doctree b/docs/_build/doctrees/contributing-language.doctree deleted file mode 100644 index da2cc943..00000000 Binary files a/docs/_build/doctrees/contributing-language.doctree and /dev/null differ diff --git a/docs/_build/doctrees/desktop.doctree b/docs/_build/doctrees/desktop.doctree deleted file mode 100644 index 44cda942..00000000 Binary files a/docs/_build/doctrees/desktop.doctree and /dev/null differ diff --git a/docs/_build/doctrees/environment.pickle b/docs/_build/doctrees/environment.pickle index 2a50d134..5b887343 100644 Binary files a/docs/_build/doctrees/environment.pickle and b/docs/_build/doctrees/environment.pickle differ diff --git a/docs/_build/doctrees/guides/FAQ.doctree b/docs/_build/doctrees/guides/FAQ.doctree new file mode 100644 index 00000000..387c1453 Binary files /dev/null and b/docs/_build/doctrees/guides/FAQ.doctree differ diff --git a/docs/_build/doctrees/guides/contributing-language.doctree b/docs/_build/doctrees/guides/contributing-language.doctree new file mode 100644 index 00000000..c4dba34a Binary files /dev/null and b/docs/_build/doctrees/guides/contributing-language.doctree differ diff --git a/docs/_build/doctrees/guides/desktop.doctree b/docs/_build/doctrees/guides/desktop.doctree new file mode 100644 index 00000000..ecef6821 Binary files /dev/null and b/docs/_build/doctrees/guides/desktop.doctree differ diff --git a/docs/_build/doctrees/guides/source.doctree b/docs/_build/doctrees/guides/source.doctree new file mode 100644 index 00000000..ef8f2668 Binary files /dev/null and b/docs/_build/doctrees/guides/source.doctree differ diff --git a/docs/_build/doctrees/guides/validating-api.doctree b/docs/_build/doctrees/guides/validating-api.doctree new file mode 100644 index 00000000..572b1f00 Binary files /dev/null and b/docs/_build/doctrees/guides/validating-api.doctree differ diff --git a/docs/_build/doctrees/index.doctree b/docs/_build/doctrees/index.doctree index 4187000c..22877fa7 100644 Binary files a/docs/_build/doctrees/index.doctree and b/docs/_build/doctrees/index.doctree differ diff --git a/docs/_build/doctrees/source.doctree b/docs/_build/doctrees/source.doctree deleted file mode 100644 index 829a1b56..00000000 Binary files a/docs/_build/doctrees/source.doctree and /dev/null differ diff --git a/docs/_build/doctrees/validating-api.doctree b/docs/_build/doctrees/validating-api.doctree deleted file mode 100644 index eef1f13c..00000000 Binary files a/docs/_build/doctrees/validating-api.doctree and /dev/null differ diff --git a/docs/_build/html/FAQ.html b/docs/_build/html/FAQ.html deleted file mode 100644 index cb201765..00000000 --- a/docs/_build/html/FAQ.html +++ /dev/null @@ -1,987 +0,0 @@ - - - - - - - - - - - zmNinja FAQ — zmNinja documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - -
- - - - - - -
-
- - - - - - - - - - - - - - - - -
- - - - -
-
-
-
- -
-

zmNinja FAQ

-
-

What is the minimum supported version of ZoneMinder, Android and iOS?

-

You need a minimum of ZM 1.30.4 with APIs working. You may get it to run -in previous versions, but I don’t support them, so you are on your own.

-

Starting version 1.3.26 of zmNinja, only IOS 10+ and Android 5.0+ -devices are supported.

-
-
-

zmNinja Help

-

I’ve just started uploading instructional videos for zmNinja. I’ll add -more over time. See them -here

-
-
-

Asking for refunds

-

If you have bought the iOS version of the app, it doesn’t look like I -can process a refund anymore. If any developer knows how, please let me -know. Apple wants you to contact them directly using -this link.

-

For Android: If you’re not happy with zmNinja and have bought the app, -please send me an email with your -order id.

-

Note that depending on how long ago you made the order, I may not be -able to refund. Its not my policy - The app/play stores disable the -refund option. For example, I could not refund an app a user purchased 2 -years ago.

-

Also, please read Things you should own up -to

-
-
-

Things you should own up to

-
-

Read the app description

-

Both the Apple and Android stores have a clearly visible note on the app -description that it requires a working API for ZoneMinder. If you are -not willing to ensure the API works, please save yourself and me time. -I’m sorry this is the first post, but I get emails from too many -entitled/rude folks about APIs not working. Not my problem. Read below. -Breathe.

-
-
-

Try before buy

-

Some users legitimately look around for an option to try before they buy -and they are not savvy enough to download the -code and -compile -themselves. Fair enough. In that case, download the Desktop -version of -zmNinja. It’s free and is the same code as mobile. Make sure the desktop -version works before you buy the mobile version.

-

The reason I don’t have a “trial mobile version” is that I find the -process too complex using in-app-purchases and chose not to do it to -make life simpler for me. As a substitute, I do make the full code -available for free and offer a desktop binary version free too.

-
-
-

zmNinja doesn’t work. Actually, even ZoneMinder web console doesn’t work. You should fix this!

-

Yeah, look - I understand zmNinja won’t work if ZoneMinder web console -doesn’t work. That being said, I really don’t have time to help you -debug ZoneMinder issues. I only develop the app (zmNinja). If you can’t -set up ZoneMinder properly, please post your questions in the ZM -forum. You’ll find more qualified -people to help you. I don’t develop nor control ZoneMinder. It’s a -different set of folks. Now, I’ll help you, but only after you have -spent sufficient time trying your best and provide sufficient logs of -what you have done. Also remember, if you buy zmNinja, I’m happy to -refund it anytime - just send me an email.

-

In short, I don’t have the time to support ZoneMinder install issues - -sorry about that

-
-
-

zmNinja doesn’t work. Zoneminder works, but I have no idea why APIs don’t work. You should fix this!

-

Sigh. I don’t maintain ZoneMinder. I only develop the app. You need -to make sure ZoneMinder APIs work. ZoneMinder web console doesn’t use -APIs. Neither does zmView. zmNinja does. It says so in the description -of the app in the store. So feel free to fix your APIs, or ask me for a -refund. Just don’t whine to me, please, if your APIs are broken. I’m -not going to fix them for you, especially if you act like its not your -problem. I’m perfectly fine if you choose not to use my -app, which -is why I refund, anytime.

-
-
-

I can’t compile zmNinja, help me!

-

I put out the source code, so people who know how to compile are able to -do it themselves. I also hope this will encourage folks to PR changes -(though this has rarely happened). The problem however, is that -dependencies/libraries keep changing. I just don’t have the time to help -debug. If it happens to me, I’ll fix it. If it doesn’t I have very -limited time to remotely debug your setup issues. I’d much appreciate if -you figured it out on your own. Feel free to create an issue after -you’ve tried enough, but I can’t guarantee I’ll spend a lot of time on -source code compile issues.

-
-
-

How to report errors

-
    -
  • I don’t know why something is not working if you don’t provide -sufficient inputs. Start by creating a GitHub -issue and please -fill in the template correctly. If you don’t want to post debug logs -in the issue, email them -to me and mention in the issue you’ve emailed them (you can email by -going to logs screen and tapping on the envelope button (mobile) or -you can download logs (cloud icon, desktop version)
  • -
  • If zmNinja was working, but it stopped after you upgraded ZoneMinder -be sure to mention which version was working and which was not. In -this case, please make sure you have validated the APIs work
  • -
  • Before you create an issue, please make sure you have read the -sections on connection -issues -and -streaming -issues and Step 6 of -validating -APIs.
  • -
  • Its often hard to infer a problem especially when its due to some -unique apache/nginx mungling you might have done but haven’t told me -about it. In such cases, try and give me remote access to your ZM for -a day. Configure a limited user with just one monitor. It will save -hours of frustration (mostly on my side). Thanks
  • -
  • I have released the desktop version free - download it -here. Its -always easier to debug on the desktop version - give it a try. If you -hit Shift+Cmd/Ctrl+D it brings up a debug window - it helps debugging
  • -
  • Always tell me what your ZoneMinder & zmNinja versions are
  • -
  • If your app suddenly stopped working:
      -
    • Send me DEBUG logs of the app
    • -
    • tell me what changed (got to be something. You updated the app, -you upgraded ZM)
    • -
    • What exactly is not working?
    • -
    -
  • -
-
-
- -
-

Connection/Authentication issues

-
-

General tips

-
    -
  • Disable server redirects like 302 and then try if using the mobile -app
  • -
  • To make sure there are no connection issues, launch your phone -browser and try to reach ZoneMinder. If that doesn’t work, neither -with zmNinja. Many users try to access ZoneMinder from a desktop -browser and/or on the same server it is running and forget the phone -is a different device!
  • -
  • Some phones need the SSL certificate installed in the device
  • -
  • Specific SSL settings can cause issues with Android or iOS
  • -
  • Don’t use funky/special characters in passwords - try changing it to -a complex password without funky characters and try
  • -
  • Use the wizard - I’ve seen many examples of typos when the user -thinks they don’t have a typo
  • -
  • If you are using basic authentication, make sure your credentials are -correct. A good way to test is to first disable basic auth and enable -it after you are sure things work without basic auth.
  • -
  • Please note zmNinja does NOT support Digest authentication. So please -don’t put in digest auth info when zmNinja asks for basic -authentication
  • -
  • Look at your ZM logs and zmNinja logs - they help isolate the problem
  • -
-
-
-

Server Redirects

-

If the Wizard fails to connect in the mobile app but works in the -desktop app, it may be that your server is sending redirects. -Unfortunately, the current mobile HTTP stack doesn’t handle cookies with -redirects well. Till this bug is fixed by the plugin author Wizard won’t -work. Note that if you are running ZM 1.32 or above, you can directly -enter your settings without using the wizard and it will work because it -will try and use the new ZM 1.32 login.json API first.

-
-
-

Self signed certs

-

A lot of people use self-signed certs. I’d strongly recommend you use -LetsEncrypt if you can. It’s free. That -being said zmNinja does support self signed certs. Make sure “Enable -Strict SSL” is off in Developer settings. You will need to restart the -app.

-
-
-

SSL settings

-

If you are getting SSL protocol/handshake errors in your logs, you -very likely have specific ssl settings enabled server side that your -device network stack does not support. Note that just because it works -with the device browser does not mean it will work with zmNinja as -zmNinja does not use the browser HTTP implementation in mobile devices.

-

One use reported that a setting of ssl_ecdh_curve secp384r1 in his -nginx config was resulting in zmNinja Android not being able to connect -to the server. Changing it to -ssl_ecdh_curve secp521r1:secp384r1:prime256v1; worked for him.

-

I’d strongly recommend you remove all special ssl settings except the -certificate and key file locations, make it work and then add the -settings back one by one and see what works/does not work.

-
-
-

Everything works when I use LAN IP, but I get “not authenticated” when I use WAN IP

-

This is likely happening if you use self signed SSL certs. If you are -using self signed certificated, you should make sure the “common name” -matches the hostname (or public IP) of the server you are installing ZM -in. If not, zmNinja’s SSL handshake will fail.

-

If you have used ‘make-ssl-cert’ or a similar tool that automatically -generates the cert for you, its very likely you have certificate that -uses the ‘unix hostname’ of your server. That will not work.

-

Assuming you are usin apache and have SSL enabled, here is how to -regenerate the certs (ubuntu specific, may need to tweak it for your -distro)

-

This will create a self-signed certificate/key pair and store it in -/etc/apache2/ssl (you may have to create that directory, or store it -elsewhere)

-
sudo openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout /etc/apache2/ssl/zoneminder.key -out /etc/apache2/ssl/zoneminder.crt
-
-
-

Next up, edit your apache ssl config (example -/etc/apache2/sites-available/default-ssl.conf) And add/modify the -following lines:

-
SSLCertificateFile /etc/apache2/ssl/zoneminder.crt
-SSLCertificateKeyFile /etc/apache2/ssl/zoneminder.key
-
-
-

restart apache

-
sudo service apache2 restart
-
-
-
-
-
-

Live streaming issues

-
-

Summary of Everything works, but I can’t see live feed

-

Please be diligent in reviewing this list. You’d be surprised how many -times I’ve had users tell me ‘they have checked this list’ only to find -out later they skimmed details.

-
    -
  • Please enable AUTH_HASH_LOGINS as well as set AUTH_RELAY to -“hashed”
  • -
  • You think your APIs are working, but they are really not. If you open -a browser and type in https://yourserver/zm/api/monitors.json and -you see some text on top followed by monitor data, your APIs are -not working. You need to search the forums and figure out how to -get rid of that text.
  • -
  • Your ZoneMinder live view from the web console doesn’t work either. -If this is the case, fix ZoneMinder first. Before you say “web -console works fine”, make sure you are running it from a different -computer from where ZM is running.
  • -
  • The phone/computer running zmNinja does not have access to your ZM -server. For example, many people test the web console on their LAN -but test zmninja on a WAN connection
  • -
  • Always try with the free desktop -version first. -Enable debug view by hitting Ctrl/Cmd+Alt+D and you can see debug -logs in the console view. I can’t emphasize enough how useful this -is.
  • -
  • Your cgi-bin setting in zmNinja is incorrect. Please run the -wizard. There are times when the wizard can fail. In those cases, -open up ZM web console, go to view the monitor and do an “Inspect -Source” in the browser. That will show you the cgi-bin link that you -can use in zmNinja.
  • -
-

For example:

-

In the above case my zmNinja cgi-bin setting is -https://myserver:myport/zm/cgi-bin

-
    -
  • You are using Basic Authentication. See -here
  • -
  • You have ‘multi-server’ configuration enabled and you have done it -wrong. Go to ZM Web Console->Options->Servers - if you see any -entries there and you don’t know what multi-server is, or you don’t -use it, please disable multi-server
  • -
  • When trying to view live images, look at your webserver error logs -- example Apache’s error.log - see any image/jpg errors? That -means you are missing libraries
  • -
  • You have set up a multi-server install of ZM without knowing you did -See here
  • -
  • Look at zmNinja, ZoneMinder and web server error logs at the time of -error - one of them should give more clues. Please send me all the -logs if you ask for help
  • -
  • Read the set of notes below
  • -
-
-
-

General note

-

To debug streaming notes, always try with the free desktop version -first. When trying to stream simultaneously look at the debug logs of -zmNinja (Ctrl/Cmd+Alt+D in desktop build, console and/or network -tab) and your webserver error logs.

-
-
-

I can’t see stream: And I can’t see streams in ZoneMinder webconsole either

-

Check if streaming works in the web interface. If it does not work, -zmNinja won’t work either. Fix ZM first

-
-
-

I can’t see streams: I use basic auth

-

Starting Chrome v59, the browser changed basic credential behavior. The -issue report is -here. -Here is the core issue: zmNinja constructs URLs as -http://user:password@server when you have basic auth (and starting -v1.3 uses the Authorization header). However, since images are -rendered using <img src> there is no option but to put in a -user:password in the URL. Chrome allows this format for direct -requests (such as API calls) but will strip out the user:password -part for embedded requests (like <img src=""> tags inside a page). -So what happens is your APIs work, but you won’t see images. There is a -reason why Chrome does this - its bad to pass on a user :password in a -URL as its clear text (even if you are on HTTPS, as its in the URL). As -I said earlier, The right way to do this is to replace the -user:pass with an Authorization header but there is no way to do -that with images that are rendered with <img src> (There are several -plugins that attempt to do this, but don’t work with streaming MJPEG -images). Bottom line, this is a problem for apps like zmNinja and it -affects you.

-

How this affects you: * If you are using HTTP Basic Authentication

-

Then your images won’t show.

-

Possible Workarounds: * Configure your web server to skip basic -authentication for nph-zms URLs * If you are using a ReverseProxy, -you can insert the authorization header inside the apache proxy * -Disable HTTP Basic auth for now * Downgrade Chrome

-
-

Skipping auth for nph-zms URLs

-

Here is what I’ve used that works with basic-auth. This requires a basic -auth portal login and once logged in allows skipping of image URLs (the -idea comes from Adam Outler - he -uses a different approach using reverse proxies, which I link to later)

-
  # this configuration assumes your server portal is server:port/zm
-  # and cgi-path is /zm/cgi-bin. Please change it to your specific environment
-  # Also requires Apache 2.4 or above
-
-<Location />
-      SetEnvIf Request_URI ^/zm/cgi-bin/ noauth=1
-      SetEnvIf Request_URI ^/zm/index.php noauth=1
-      AuthType Basic
-      AuthName "Auth Required"
-      AuthUserFile "/etc/apache2/.htpasswd"
-      <RequireAny>
-          Require valid-user
-          Require env noauth
-      </RequireAny>
-</Location>
-
-
-
-
-

Authorization with a ReverseProxy

-
-
Simple starter
-

STEP 1: Enable “Append basic auth tokens in images” option in -zmNinja->Developer Settings and save. What this does is that image URLs -will append a “basicauth” token parameter with your basic authentication -credentials. This token can then be parsed by Apache and inserted as a -valid Authorization header. Don’t enable this option if you are not -using HTTPS because the request-URI will be transmitted without -encryption and it will contain your basic auth credentials, encoded in -base64, which is trivial to decode.

-

STEP 2 (Apache): Use mod_rewrite and mod_header to convert the -token into an authorization in your Apache config. Add this to the -relevant section (VirtualHost or others)

-
RewriteEngine on
-RewriteCond %{QUERY_STRING} (?:^|&)basicauth=([^&]+)
-RewriteRule (.*) - [E=QS_TOKEN:%1]
-RequestHeader set Authorization "Basic %{QS_TOKEN}e" env=QS_TOKEN
-
-
-

STEP 2 (Nginx): Thanks to user [@ysammy](https://github.com/ysammy)

-
location /zm/cgi-bin/nph-zms {
-   proxy_pass http://<IP>:<PORT>/zm/cgi-bin/nph-zms;
-   proxy_set_header Authorization "Basic $arg_basicauth";
- }
-
-
-
-
-
A more complete and more secure option
-

User Adam Outler has contributed the -following process: see -HERE. -Adam also has this to say about why proxies should be recommended for -HTTPS enabled ZoneMinder instances:

-
-
A proxy server should be on the list of recommendations for -Zoneminder. HTTPS requires processing to encrypt and decrypt. This -takes processor cycles away from Zoneminder’s recording. Since HTTPS -is now basically a requirement, there should be a page dedicated to -proxy, https, auth, and their nuances. I just picked up 2-4K cameras -and processing suddenly became an issue :).
-
-
-
-
-

I can’t see streams: Multi-server is enabled

-

The chances are very high that you have enabled ZoneMinder’s -Multi-Server -option and you entered something like localhost in server settings. -DON’T. You can’t enter localhost. If you are not using multi-server, -remove any server settings. If you are using multi-server, you need to -put in a valid server IP or hostname, not localhost. BTW, if you did -put in localhost you will note that your ZM web console also won’t -work if you try to launch your browser on a different machine from where -ZM is running.

-
-
-

I can’t see streams: you have cgi-bin issues

-
    -
  • Try to use the wizard. If it fails,
  • -
  • Go to zmNinja settings and fix your cgi-bin path. the automatic path -that is filled in won’t work. Here is a hint, go to -zoneminder->options->paths and check the value of the cgi-bin path - -your zmNinja path will be “base path of your server” + cgi-bin path.
  • -
-
-
-

zmNinja montage does not seem smooth - feeds seem a little delayed compared to ZM console

-

zmNinja does not use nph-zms to display live feeds in montage. This -is because Chrome only allows a maximum of 6 connections per (sub)domain -which means you can’t have more than 6 active TCP connections to a -single domain at the same time. This also means that you can’t display -more than 6 monitors together. To avoid this, I use the zoneminder -“snapshot” feature that displays a still from the monitor and then -refresh it every X seconds (by default X=2 unless you switch to low -bandwidth mode. You can change X in developer settings)

-

That being said, starting v1.3.0 of zmNinja onwards, I now support -multi-port (available in ZM 1.32 onwards) that lets you stream as many -monitors as you need. Read -this -post for more details.

-
-
- -
-

Other misc. issues

-
-

I suddently see an error message saying I need to enable ZM_AUTH_HASH_LOGINS. This wasn’t there before

-

Yes. Starting 1.3.027 onwards, due to a new UI web rendering engine that -enforces CORS, I’ve had to change my strategy on how network calls are -made. Briefly, on mobile devices, I now use a native HTTP stack and not -the browser HTTP stack. However, images are rendered using the browser -HTTP stack which causes this message. In short, you need to enable it, -and restart ZM.

-
-
-

zmNinja 1.2.515 and beyond says “Need API Upgrade” for the 24hr review feature. What does that mean?

-

You need to update an API file in Zoneminder server. ZoneMinder folks -haven’t yet (as of Apr 2018) made a release with that API change. To do -it manually,simply replace your EventsController.php (typically in -/usr/share/zoneminder/www/api/app/Controller) with this -one.

-
-
-

I upgraded ZoneMinder to 1.30.2 or above and zmNinja stopped working!

-

ZoneMinder changed API packaging with ZM 1.30.2 and above. You will have -to read your distro notes on how to properly update. Read -this -thread. Before you think zmNinja is the problem, make sure your APIs -are -working. -Summary of reasons why zmNinja might have stopped working: - You did not -check if your APIs are working after the upgrade - You did not upgrade -properly (just updating the ZM package without following distro -instructions with ZM is not sufficient) - You are missing some key -CakePHP modules, likely php5-apc which would have been installed if -you read all the package instructions. You can install it manually - You -might need to restart your system after upgrading (properly)

-
-
-

I am running ZM on a custom port. zmNinja is unable to reach my ZoneMinder server but I tried on a regular browser (Firefox/Opera/IE) and it I can reach it

-

zmNinja on Android and Desktops uses an embedded chrome browser. Chrome -marks certain ports as “unsafe” and won’t allow connections to go out. -The list of ports to avoid are -here

-
-
-

The Montage screen is causing issues with my ZM server - I get connection timeout issues or MySQL connection problems

-
    -
  • zmNinja uses a different approach to display montage than ZoneMinder. -In zmNinja montage screen, I display a snapshot of each monitor and -refresh it every few seconds. This results in many short TCP -connections constantly being opened and closed. The reason I have to -do this is Chrome only allows 6 connections to a domain, which means -if I don’t keep terminating TCP connections, I won’t be able to show -more than 6 monitors. Each time I open a new TCP connection for a -snapshot, the ZM backend invokes mySQL to authenticate the request. -You will need to increase mySQL max_connections in my.cnf if -you are facing time_wait/timeout issues.
  • -
-
-
-

The app works great - except it doesn’t work on ONE Android phone - works in others!

-

zmNinja uses an embedded chrome browser in its app. If you have safe -browsing enabled, it may affect zmNinja. However, if you are facing this -problem, its likely you can’t access ZM from a mobile web browser -either. The problem that might be occurring is that zmNinja is trying to -reach your ZM server and your settings prohibit it from reaching ZM, so -it fails. See -this -discussion

-
-
-

APIs are not working ! ZM console works fine.

-

Read -this

-
-
-

I’m using mocord/record and I don’t see events without alarms

-

Tap on the “…” menu option and toggle “Show all events”. By default, -it shows events with at least one alarm frame

-
-
-

Taking snapshots or downloading videos don’t work in Android

-

If you are unable to download/save, look at your logs. If you see -something like -"exception":"java.security.cert.CertPathValidatorException: Trust anchor for certification path not found." -, chances are you are using self-signed certs. You need to install the -certificate on your phone. Installing is as easy as emailing yourself -the “.crt” file and tapping on it from your device to install it. In -general, both Apple and Google have been incrementally tightening rules -for self signed certificates - they generally discourage usage of such -certs and over time both Chrome (Android) and WkWebView (iOS) have added -new restrictions/checks which affects usage.

-
-
-

Pan/Tilt/Zoom doesn’t work

-

Tilt/Zoom/Presets support has not been added. But for this to work, PTZ -needs to work in ZM first. Once it works in ZM, try it in ZMNinja. Also -note that you may need to disable CSRF in your Options in ZoneMinder - -it seems to cause all sorts of issues.

-
-
-
-

What is this Event Server?

-

The Event Server is a contribution I made to ZoneMinder that adds a -daemon to the existing list. It listens for new events using shared -memory (aka very efficient) and then sends notifications of events to -listeners (you can write your own app that listen as well as use -zmNinja). This is a chapter on its own, and I have a dedicated -page/project for this -here. I’d encourage -you to install and use it - its very nice.

-
-

It looks like you allow me to modify the frequency of push notifications. Very cool - will it send me all events that I missed if I make the frequency of a monitor event push to say, 600 seconds?

-

Nope. It only sends the latest events. What it does is before sending -push notifications, it checks if the last time a push was sent for this -monitor is < the time you specified. If it is, it does not send. That’s -all.

-
-
-
-

Is zmNinja free?

-

The source code is free, grab it, compile it, use it. The desktop ports -are free as of today. I may charge for it some day. The mobile ports are -in Appstore/Playstore for a fee.

-
-
-

Who are the developers behind this?

-

Me.

-
-
-

The code needs improvement

-

You are being nice. I know the code is terrible. I’m not a coder by -profession. This was my first project to learn how to write a mobile -app. So the app evolved from no knowledge to some knowledge. It -comprises of terrible to passable to reasonable code. There is a reason -why my profile says what it says. -But hey, if you can improve it, please PR!

-
-
-

Is zmNinja an official ZoneMinder product?

-

No. But the ZM developers are amazing people who have been very helpful.

-
-
-

I want to donate money

-

You could either donate to to -Zoneminder or donate -to zmNinja. Donations -to ZoneMinder don’t contribute to zmNinja, but the ZoneMinder devs will -benefit from it, which is fine too.

-
-
-

How does zmNinja use my personal data?

-

Please read -this

-
-
-

I want to donate time/expertise/code

-

Great. Make sure you read the -license -, read the contributing -guidelines -and if it works for you, happy to see what you’d like to do.

-
-
- - -
-
- -
-
- - -
-
- -
- -
- - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/docs/_build/html/_sources/FAQ.rst.txt b/docs/_build/html/_sources/FAQ.rst.txt deleted file mode 100644 index c5ecc3c6..00000000 --- a/docs/_build/html/_sources/FAQ.rst.txt +++ /dev/null @@ -1,754 +0,0 @@ -zmNinja FAQ -``````````` - -What is the minimum supported version of ZoneMinder, Android and iOS? ---------------------------------------------------------------------- - -You need a minimum of ZM 1.30.4 with APIs working. You may get it to run -in previous versions, but I don't support them, so you are on your own. - -Starting version 1.3.26 of zmNinja, only IOS 10+ and Android 5.0+ -devices are supported. - -zmNinja Help ------------- - -I've just started uploading instructional videos for zmNinja. I'll add -more over time. See them -`here `__ - -Asking for refunds ------------------- - -If you have bought the iOS version of the app, it doesn't look like I -can process a refund anymore. If any developer knows how, please let me -know. Apple wants you to contact them directly using -`this `__ link. - -For Android: If you're not happy with zmNinja and have bought the app, -please `send me an email `__ **with your -order id**. - -Note that depending on how long ago you made the order, I may not be -able to refund. Its not my policy - The app/play stores disable the -refund option. For example, I could not refund an app a user purchased 2 -years ago. - -Also, please read `Things you should own up -to <#things-you-should-own-up-to>`__ - -Things you should own up to ---------------------------- - -Read the app description -~~~~~~~~~~~~~~~~~~~~~~~~ - -Both the Apple and Android stores have a clearly visible note on the app -description that it requires a working API for ZoneMinder. If you are -not willing to ensure the API works, please save yourself and me time. -I'm sorry this is the first post, but I get emails from too many -entitled/rude folks about APIs not working. Not my problem. Read below. -Breathe. - -Try before buy -~~~~~~~~~~~~~~ - -Some users legitimately look around for an option to try before they buy -and they are not savvy enough to `download the -code `__ and -`compile `__ -themselves. Fair enough. In that case, `download the Desktop -version `__ of -zmNinja. It's free and is the same code as mobile. Make sure the desktop -version works before you buy the mobile version. - -The reason I don't have a "trial mobile version" is that I find the -process too complex using in-app-purchases and chose not to do it to -make life simpler for me. As a substitute, I do make the full code -available for free and offer a desktop binary version free too. - -zmNinja doesn't work. Actually, even ZoneMinder web console doesn't work. You should fix this! -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Yeah, look - I understand zmNinja won't work if ZoneMinder web console -doesn't work. That being said, I really don't have time to help you -debug ZoneMinder issues. I only develop the app (zmNinja). If you can't -set up ZoneMinder properly, please post your questions in the `ZM -forum `__. You'll find more qualified -people to help you. I don't develop nor control ZoneMinder. It's a -different set of folks. Now, I'll help you, but only after you have -spent sufficient time trying your best and provide sufficient logs of -what you have done. Also remember, if you buy zmNinja, **I'm happy to -refund it anytime - just send me an email.** - -In short, I don't have the time to support ZoneMinder install issues - -sorry about that - -zmNinja doesn't work. Zoneminder works, but I have no idea why APIs don't work. You should fix this! -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -*Sigh*. I don't maintain ZoneMinder. I only develop the app. *You* need -to make sure ZoneMinder APIs work. ZoneMinder web console doesn't use -APIs. Neither does zmView. zmNinja does. It says so in the description -of the app in the store. So feel free to fix your APIs, or ask me for a -refund. Just don't whine to me, please, if your APIs are broken. I'm -*not* going to fix them for you, especially if you act like its not your -problem. `I'm perfectly fine if you choose not to use my -app `__, which -is why I refund, anytime. - -I can't compile zmNinja, help me! -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -I put out the source code, so people who know how to compile are able to -do it themselves. I also hope this will encourage folks to PR changes -(though this has rarely happened). The problem however, is that -dependencies/libraries keep changing. I just don't have the time to help -debug. If it happens to me, I'll fix it. If it doesn't I have very -limited time to remotely debug your setup issues. I'd much appreciate if -you figured it out on your own. Feel free to create an issue after -you've tried enough, but I can't guarantee I'll spend a lot of time on -source code compile issues. - -How to report errors -~~~~~~~~~~~~~~~~~~~~ - -- I don't know why something is not working if you don't provide - sufficient inputs. Start by creating a `GitHub - issue `__ and please - fill in the template correctly. If you don't want to post debug logs - in the issue, `email `__ them - to me and mention in the issue you've emailed them (you can email by - going to logs screen and tapping on the envelope button (mobile) or - you can download logs (cloud icon, desktop version) - -- If zmNinja was working, but it stopped after you upgraded ZoneMinder - be sure to mention which version was working and which was not. In - this case, please make sure you have validated the APIs work - -- Before you create an issue, please make sure you have read the - sections on `connection - issues `__ - and - `streaming `__ - issues and `Step 6 of - validating `__ - APIs. - -- Its often hard to infer a problem especially when its due to some - unique apache/nginx mungling you might have done but haven't told me - about it. In such cases, try and give me remote access to your ZM for - a day. Configure a limited user with just one monitor. It will save - hours of frustration (mostly on my side). Thanks - -- I have released the desktop version free - download it - `here `__. Its - always easier to debug on the desktop version - give it a try. If you - hit Shift+Cmd/Ctrl+D it brings up a debug window - it helps debugging - -- Always tell me what your ZoneMinder & zmNinja versions are - -- If your app suddenly stopped working: - - - Send me DEBUG logs of the app - - tell me what changed (got to be something. You updated the app, - you upgraded ZM) - - What exactly is not working? - -Profile information storage related ------------------------------------ - -zmNinja is not saving my information. It keeps asking me to re-enter all my data -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -I've seen this happen in two cases: \* You are running out of space. -Clean up some space and try again \* On specific Android devices, -typically running Android OS less than 6.0, some (2-3) users have -reported this issue. I still don't have a good answer. Please update to -the latest app version and send me debug logs, please - -I updated my zmNinja app and all my server settings were cleared. Why? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Sorry. I've made several releases where due to programming errors, -settings got wiped out. However, starting v1.3.021 for Android and -v1.3.025 for Android, I've introduced the facility to sync with the -cloud (Google Drive/iCloud). This is the settings option. It is enabled -by default. This means if you uninstall the app and install again, the -settings should get restored. Note that both in iOS and Android, backup -schedule is managed by the OS. You can force a backup going to settings -and forcing a backup, or wait till the OS backups (typically a few -hours/phone plugged in/not being used) - -Do also note that 1.3.027 and beyond use a new WebView called WKWebView -(because iOS deprecated the old webview). If you disabled iCloud you -will have to re-enter your settings again (only once). This may not -affect Android, but I don't know for sure. - -Connection/Authentication issues --------------------------------- - -General tips -~~~~~~~~~~~~ - -- Disable server redirects like 302 and then try if using the mobile - app -- To make sure there are no connection issues, launch your **phone - browser** and try to reach ZoneMinder. If that doesn't work, neither - with zmNinja. Many users try to access ZoneMinder from a desktop - browser and/or on the same server it is running and forget the phone - is a different device! -- Some phones need the SSL certificate installed in the device -- Specific SSL settings can cause issues with Android or iOS -- Don't use funky/special characters in passwords - try changing it to - a complex password without funky characters and try -- Use the wizard - I've seen many examples of typos when the user - thinks they don't have a typo -- If you are using basic authentication, make sure your credentials are - correct. A good way to test is to first disable basic auth and enable - it after you are sure things work without basic auth. -- Please note zmNinja does NOT support Digest authentication. So please - don't put in digest auth info when zmNinja asks for basic - authentication -- Look at your ZM logs and zmNinja logs - they help isolate the problem - -Server Redirects -~~~~~~~~~~~~~~~~ - -If the Wizard fails to connect in the mobile app but works in the -desktop app, it may be that your server is sending redirects. -Unfortunately, the current mobile HTTP stack doesn't handle cookies with -redirects well. Till this bug is fixed by the plugin author Wizard won't -work. Note that if you are running ZM 1.32 or above, you can directly -enter your settings without using the wizard and it will work because it -will try and use the new ZM 1.32 ``login.json`` API first. - -Self signed certs -~~~~~~~~~~~~~~~~~ - -A lot of people use self-signed certs. I'd strongly recommend you use -`LetsEncrypt `__ if you can. It's free. That -being said zmNinja does support self signed certs. Make sure "Enable -Strict SSL" is off in Developer settings. You will need to restart the -app. - -SSL settings -~~~~~~~~~~~~ - -If you are getting ``SSL protocol/handshake errors`` in your logs, you -very likely have specific ssl settings enabled server side that your -device network stack does not support. Note that just because it works -with the device browser does not mean it will work with zmNinja as -zmNinja does not use the browser HTTP implementation in mobile devices. - -One use reported that a setting of ``ssl_ecdh_curve secp384r1`` in his -nginx config was resulting in zmNinja Android not being able to connect -to the server. Changing it to -``ssl_ecdh_curve secp521r1:secp384r1:prime256v1;`` worked for him. - -I'd strongly recommend you remove all special ssl settings except the -certificate and key file locations, make it work and then add the -settings back one by one and see what works/does not work. - -Everything works when I use LAN IP, but I get "not authenticated" when I use WAN IP -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -This is likely happening if you use self signed SSL certs. If you are -using self signed certificated, you should make sure the "common name" -matches the hostname (or public IP) of the server you are installing ZM -in. If not, zmNinja's SSL handshake will fail. - -If you have used 'make-ssl-cert' or a similar tool that automatically -generates the cert for you, its very likely you have certificate that -uses the 'unix hostname' of your server. That will not work. - -Assuming you are usin apache and have SSL enabled, here is how to -regenerate the certs (ubuntu specific, may need to tweak it for your -distro) - -This will create a self-signed certificate/key pair and store it in -/etc/apache2/ssl (you may have to create that directory, or store it -elsewhere) - -:: - - sudo openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout /etc/apache2/ssl/zoneminder.key -out /etc/apache2/ssl/zoneminder.crt - -Next up, edit your apache ssl config (example -/etc/apache2/sites-available/default-ssl.conf) And add/modify the -following lines: - -:: - - SSLCertificateFile /etc/apache2/ssl/zoneminder.crt - SSLCertificateKeyFile /etc/apache2/ssl/zoneminder.key - -restart apache - -:: - - sudo service apache2 restart - -Live streaming issues ---------------------- - -Summary of Everything works, but I can't see live feed -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -*Please* be diligent in reviewing this list. You'd be surprised how many -times I've had users tell me 'they have checked this list' only to find -out later they skimmed details. - -- Please enable ``AUTH_HASH_LOGINS`` as well as set ``AUTH_RELAY`` to - "hashed" - -- You think your APIs are working, but they are really not. If you open - a browser and type in ``https://yourserver/zm/api/monitors.json`` and - you see some text on top followed by monitor data, your APIs are - *not* working. You need to search the forums and figure out how to - get rid of that text. - -- Your ZoneMinder live view from the web console doesn't work either. - If this is the case, fix ZoneMinder first. Before you say "web - console works fine", make sure you are running it from a different - computer from where ZM is running. -- The phone/computer running zmNinja does not have access to your ZM - server. For example, many people test the web console on their LAN - but test zmninja on a WAN connection -- Always try with the `free desktop - version `__ first. - Enable debug view by hitting Ctrl/Cmd+Alt+D and you can see debug - logs in the console view. I can't emphasize enough how useful this - is. -- Your ``cgi-bin`` setting in zmNinja is incorrect. Please run the - wizard. There are times when the wizard can fail. In those cases, - open up ZM web console, go to view the monitor and do an "Inspect - Source" in the browser. That will show you the cgi-bin link that you - can use in zmNinja. - -For example: - -In the above case my zmNinja cgi-bin setting is -``https://myserver:myport/zm/cgi-bin`` - -- You are using Basic Authentication. See - `here <#i-cant-see-streams-i-use-basic-auth>`__ -- You have 'multi-server' configuration enabled and you have done it - wrong. Go to ZM Web Console->Options->Servers - if you see any - entries there and you don't know what multi-server is, or you don't - use it, please disable multi-server -- When trying to view live images, look at your *webserver* error logs - - example Apache's ``error.log`` - see any image/jpg errors? That - means you are missing libraries -- You have set up a multi-server install of ZM without knowing you did - See `here <#i-cant-see-streams--multi-server-is-enabled>`__ -- Look at zmNinja, ZoneMinder and web server error logs at the time of - error - one of them should give more clues. Please send me *all* the - logs if you ask for help -- Read the set of notes below - -General note -~~~~~~~~~~~~ - -To debug streaming notes, always try with the free desktop version -first. When trying to stream simultaneously look at the debug logs of -zmNinja (``Ctrl/Cmd+Alt+D`` in desktop build, console and/or network -tab) and your webserver error logs. - -I can't see stream: And I can't see streams in ZoneMinder webconsole either -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Check if streaming works in the web interface. If it does not work, -zmNinja won't work either. Fix ZM first - -I can't see streams: I use basic auth -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Starting Chrome v59, the browser changed basic credential behavior. The -issue report is -`here `__. -Here is the core issue: zmNinja constructs URLs as -``http://user:password@server`` when you have basic auth (and starting -v1.3 uses the ``Authorization`` header). However, since images are -rendered using ```` there is no option but to put in a -``user:password`` in the URL. Chrome allows this format for direct -requests (such as API calls) but will strip out the ``user:password`` -part for *embedded* requests (like ```` tags inside a page). -So what happens is your APIs work, but you won't see images. There is a -reason why Chrome does this - its bad to pass on a user :password in a -URL as its clear text (even if you are on HTTPS, as its in the URL). As -I said earlier, The *right* way to do this is to replace the -``user:pass`` with an ``Authorization`` header but there is no way to do -that with images that are rendered with ```` (There are several -plugins that attempt to do this, but don't work with streaming MJPEG -images). Bottom line, this is a problem for apps like zmNinja and it -affects you. - -How this affects you: \* If you are using HTTP Basic Authentication - -Then your images won't show. - -Possible Workarounds: \* Configure your web server to skip basic -authentication for ``nph-zms`` URLs \* If you are using a ReverseProxy, -you can insert the authorization header inside the apache proxy \* -Disable HTTP Basic auth for now \* Downgrade Chrome - -Skipping auth for ``nph-zms`` URLs -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -Here is what I've used that works with basic-auth. This requires a basic -auth portal login and once logged in allows skipping of image URLs (the -idea comes from `Adam Outler `__ - he -uses a different approach using reverse proxies, which I link to later) - -.. code:: apache - - # this configuration assumes your server portal is server:port/zm - # and cgi-path is /zm/cgi-bin. Please change it to your specific environment - # Also requires Apache 2.4 or above - - - SetEnvIf Request_URI ^/zm/cgi-bin/ noauth=1 - SetEnvIf Request_URI ^/zm/index.php noauth=1 - AuthType Basic - AuthName "Auth Required" - AuthUserFile "/etc/apache2/.htpasswd" - - Require valid-user - Require env noauth - - - -Authorization with a ReverseProxy -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -Simple starter -'''''''''''''' - -**STEP 1**: Enable "Append basic auth tokens in images" option in -zmNinja->Developer Settings and save. What this does is that image URLs -will append a "basicauth" token parameter with your basic authentication -credentials. This token can then be parsed by Apache and inserted as a -valid Authorization header. Don't enable this option if you are not -using HTTPS because the request-URI will be transmitted without -encryption and it will contain your basic auth credentials, encoded in -base64, which is trivial to decode. - -**STEP 2 (Apache)**: Use mod\_rewrite and mod\_header to convert the -token into an authorization in your Apache config. Add this to the -relevant section (``VirtualHost`` or others) - -.. code:: apache - - RewriteEngine on - RewriteCond %{QUERY_STRING} (?:^|&)basicauth=([^&]+) - RewriteRule (.*) - [E=QS_TOKEN:%1] - RequestHeader set Authorization "Basic %{QS_TOKEN}e" env=QS_TOKEN - -**STEP 2 (Nginx)**: Thanks to user [@ysammy](https://github.com/ysammy) - -.. code:: nginx - - location /zm/cgi-bin/nph-zms { - proxy_pass http://:/zm/cgi-bin/nph-zms; - proxy_set_header Authorization "Basic $arg_basicauth"; - } - -A more complete and more secure option -'''''''''''''''''''''''''''''''''''''' - -User `Adam Outler `__ has contributed the -following process: see -`HERE `__. -Adam also has this to say about why proxies should be recommended for -HTTPS enabled ZoneMinder instances: - - A proxy server should be on the list of recommendations for - Zoneminder. HTTPS requires processing to encrypt and decrypt. This - takes processor cycles away from Zoneminder's recording. Since HTTPS - is now basically a requirement, there should be a page dedicated to - proxy, https, auth, and their nuances. I just picked up 2-4K cameras - and processing suddenly became an issue :). - -I can't see streams: Multi-server is enabled -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -The chances are very high that you have enabled ZoneMinder's -`Multi-Server `__ -option and you entered something like ``localhost`` in server settings. -**DON'T. You can't enter localhost**. If you are not using multi-server, -remove any server settings. If you are using multi-server, you need to -put in a valid server IP or hostname, not ``localhost``. BTW, if you did -put in ``localhost`` you will note that your ZM web console also won't -work if you try to launch your browser on a different machine from where -ZM is running. - -I can't see streams: you have cgi-bin issues -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -- Try to use the wizard. If it fails, -- Go to zmNinja settings and fix your cgi-bin path. the automatic path - that is filled in won't work. Here is a hint, go to - zoneminder->options->paths and check the value of the cgi-bin path - - your zmNinja path will be "base path of your server" + cgi-bin path. - -zmNinja montage does not seem smooth - feeds seem a little delayed compared to ZM console -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -zmNinja does not use ``nph-zms`` to display live feeds in montage. This -is because Chrome only allows a maximum of 6 connections per (sub)domain -which means you can't have more than 6 active TCP connections to a -single domain at the same time. This also means that you can't display -more than 6 monitors together. To avoid this, I use the zoneminder -"snapshot" feature that displays a still from the monitor and then -refresh it every X seconds (by default X=2 unless you switch to low -bandwidth mode. You can change X in developer settings) - -That being said, starting v1.3.0 of zmNinja onwards, I now support -multi-port (available in ZM 1.32 onwards) that lets you stream as many -monitors as you need. Read -`this `__ -post for more details. - -Event images/streaming related ------------------------------- - -General note -~~~~~~~~~~~~ - -To debug streaming notes, always try with the free desktop version -first. When trying to stream simultaneously look at the debug logs of -zmNinja (``Ctrl/Cmd+Alt+D`` in desktop build, console and/or network -tab) and your webserver error logs. - -Also, Starting ZM 1.32 and beyond, please enable ``AUTH_HASH_LOGINS`` as -well as set ``AUTH_RELAY`` to "hashed" - -Event stream viewing does not work -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -- Look at apache error logs - it often gives you hints - -Video Not Playable -~~~~~~~~~~~~~~~~~~ - -- Mobile devices have more restrictions to video playback than - destkops. Make sure you first check if the video is playable in - Chrome using the same phone you are using zmNinja on -- There could be other reasons due to which the video is not playable: -- There is an encoding issue in the video generated -- The video resolution is too big (see `this - thread `__) -- In general, to get to the root of what is going on, you'll need - device logs using ADB (see - `this `__) - -Event thumbnails/images don't show -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Starting zmNinja 1.3.26 and beyond, if you are using OPT\_AUTH you need -to enable AUTH\_HASH\_LOGINS or you won't be able to see image snapshots -and thumbnails. Only applicable for mobiles. - -When viewing individual frames, some event frames show, but some don't -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -This can happen if you are using Video Storage (Passthru or X264 Encode) -and have disabled frame (JPEG) storage completely. What happens is -ZoneMinder uses ``ffmpeg`` to extract frames from timestamps and -sometimes it is unable to extract a frame for a specific timestamp, -resulting in this issue. If you see HTTP 404 messages for some frames, -but the video plays fine, then this is why. - -zmNinja montage screen shows all my monitors, but in Event Montage, I only see 5? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -You are likely using Chrome (Android or desktop version). Chrome allows -a total of 6 simultaneous connections to a domain/sub-domain. ZoneMinder -uses a long running TCP stream for each monitor display (keeps sending -jpeg images). This means you can only display 6 streams at a time in -Chrome. I work around this problem by *not* asking for live streams in -montages - I ask for 'snapshots' and keep refreshing snapshots every 2 -seconds. This makes montage display non-realtime, but scales to as many -monitors you have. In Event Montage however, I am using zms to display -long running streams - trying to do snapshots in event montage is a lot -of work and I need to keep track of when the event ends, move to next -image etc. I limit this to 5 because I need 1 for control messages. - -Other misc. issues ------------------- - -I suddently see an error message saying I need to enable ZM\_AUTH\_HASH\_LOGINS. This wasn't there before -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Yes. Starting 1.3.027 onwards, due to a new UI web rendering engine that -enforces CORS, I've had to change my strategy on how network calls are -made. Briefly, on mobile devices, I now use a native HTTP stack and not -the browser HTTP stack. However, images are rendered using the browser -HTTP stack which causes this message. In short, you need to enable it, -and restart ZM. - -zmNinja 1.2.515 and beyond says "Need API Upgrade" for the 24hr review feature. What does that mean? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -You need to update an API file in Zoneminder server. ZoneMinder folks -haven't yet (as of Apr 2018) made a release with that API change. To do -it manually,simply replace your ``EventsController.php`` (typically in -``/usr/share/zoneminder/www/api/app/Controller``) with `this -one `__. - -I upgraded ZoneMinder to 1.30.2 or above and zmNinja stopped working! -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -ZoneMinder changed API packaging with ZM 1.30.2 and above. You will have -to read your distro notes on how to **properly** update. Read -`this `__ -thread. Before you think zmNinja is the problem, make sure your `APIs -are -working `__. -Summary of reasons why zmNinja might have stopped working: - You did not -check if your APIs are working after the upgrade - You did not upgrade -properly (just updating the ZM package without following distro -instructions with ZM is not sufficient) - You are missing some key -CakePHP modules, likely ``php5-apc`` which would have been installed if -you read all the package instructions. You can install it manually - You -might need to restart your system after upgrading (properly) - -I am running ZM on a custom port. zmNinja is unable to reach my ZoneMinder server but I tried on a regular browser (Firefox/Opera/IE) and it I can reach it -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -zmNinja on Android and Desktops uses an embedded chrome browser. Chrome -marks certain ports as "unsafe" and won't allow connections to go out. -The list of ports to avoid are -`here `__ - -The Montage screen is causing issues with my ZM server - I get connection timeout issues or MySQL connection problems -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -- zmNinja uses a different approach to display montage than ZoneMinder. - In zmNinja montage screen, I display a snapshot of each monitor and - refresh it every few seconds. This results in many short TCP - connections constantly being opened and closed. The reason I have to - do this is Chrome only allows 6 connections to a domain, which means - if I don't keep terminating TCP connections, I won't be able to show - more than 6 monitors. Each time I open a new TCP connection for a - snapshot, the ZM backend invokes mySQL to authenticate the request. - You will need to increase mySQL ``max_connections`` in ``my.cnf`` if - you are facing time\_wait/timeout issues. - -The app works great - except it doesn't work on ONE Android phone - works in others! -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -zmNinja uses an embedded chrome browser in its app. If you have safe -browsing enabled, it may affect zmNinja. However, if you are facing this -problem, its likely you can't access ZM from a mobile web browser -either. The problem that might be occurring is that zmNinja is trying to -reach your ZM server and your settings prohibit it from reaching ZM, so -it fails. See -`this `__ -discussion - -APIs are not working ! ZM console works fine. -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Read -`this `__ - -I'm using mocord/record and I don't see events without alarms -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Tap on the "..." menu option and toggle "Show all events". By default, -it shows events with at least one alarm frame - -Taking snapshots or downloading videos don't work in Android -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -If you are unable to download/save, look at your logs. If you see -something like -``"exception":"java.security.cert.CertPathValidatorException: Trust anchor for certification path not found."`` -, chances are you are using self-signed certs. You need to install the -certificate on your phone. Installing is as easy as emailing yourself -the ".crt" file and tapping on it from your device to install it. In -general, both Apple and Google have been incrementally tightening rules -for self signed certificates - they generally discourage usage of such -certs and over time both Chrome (Android) and WkWebView (iOS) have added -new restrictions/checks which affects usage. - -Pan/Tilt/Zoom doesn't work -~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Tilt/Zoom/Presets support has not been added. But for this to work, PTZ -needs to work in ZM first. Once it works in ZM, try it in ZMNinja. Also -note that you may need to disable CSRF in your Options in ZoneMinder - -it seems to cause all sorts of issues. - -What is this Event Server? --------------------------- - -The Event Server is a contribution I made to ZoneMinder that adds a -daemon to the existing list. It listens for new events using shared -memory (aka very efficient) and then sends notifications of events to -listeners (you can write your own app that listen as well as use -zmNinja). This is a chapter on its own, and I have a dedicated -page/project for this -`here `__. I'd encourage -you to install and use it - its very nice. - -It looks like you allow me to modify the frequency of push notifications. Very cool - will it send me all events that I missed if I make the frequency of a monitor event push to say, 600 seconds? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Nope. It only sends the latest events. What it does is before sending -push notifications, it checks if the last time a push was sent for this -monitor is < the time you specified. If it is, it does not send. That's -all. - -Is zmNinja free? ----------------- - -The source code is free, grab it, compile it, use it. The desktop ports -are free as of today. I may charge for it some day. The mobile ports are -in Appstore/Playstore for a fee. - -Who are the developers behind this? ------------------------------------ - -Me. - -The code needs improvement --------------------------- - -You are being nice. I know the code is terrible. I'm not a coder by -profession. This was my first project to learn how to write a mobile -app. So the app evolved from no knowledge to some knowledge. It -comprises of terrible to passable to reasonable code. There is a reason -why my `profile `__ says what it says. -But hey, if you can improve it, please PR! - -Is zmNinja an official ZoneMinder product? ------------------------------------------- - -No. But the ZM developers are amazing people who have been very helpful. - -I want to donate money ----------------------- - -You could either `donate to to -Zoneminder `__ or `donate -to zmNinja `__. Donations -to ZoneMinder don't contribute to zmNinja, but the ZoneMinder devs will -benefit from it, which is fine too. - -How does zmNinja use my personal data? --------------------------------------- - -Please read -`this `__ - -I want to donate time/expertise/code ------------------------------------- - -Great. Make sure you read the -`license `__ -, read the `contributing -guidelines `__ -and if it works for you, happy to see what you'd like to do. diff --git a/docs/_build/html/_sources/contributing-language.rst.txt b/docs/_build/html/_sources/contributing-language.rst.txt deleted file mode 100644 index e93d227f..00000000 --- a/docs/_build/html/_sources/contributing-language.rst.txt +++ /dev/null @@ -1,59 +0,0 @@ -Contributing a new language ---------------------------- - -If you are familiar with using git, I'd prefer if you follow the Pull -Request process -`here `__. - -Adding a new language -^^^^^^^^^^^^^^^^^^^^^ - -- Languages translations are available - `here `__ -- To contribute a new language, add a new ``locale-xx.json`` (where - ``xx`` is your language code). -- Ideally, you should also provide a language translation for the - zmNinja help file inside - `lang/help `__ - -The best way is to simply look at an existing language translation and -follow the same model for yours. If any language translation keywords -are missed, it will fallback to English. - -Main Language file -^^^^^^^^^^^^^^^^^^ - -- Make sure there is no comma after the last element -- Comments are not allowed -- Make sure you don't add ellipsis "..." anywhere, they are added to - messages in code when needed -- After you complete the translation file, do the following: - -(replace ``-it`` with the language you are working on) - -``python ./checklang.py -f locale-it.json -b`` - -This validates your JSON file, makes sure all keys are in sync with -en -and if valid, creates pretty-locale-it.json. If you are sure it looks -good, - -``python ./checklang.py -f locale-it.json -b -o`` - -This validates your JSON file,makes sure all keys are in sync with -en -and if valid, OVERWRITES your local file with a pretty formatted -version, which is what you should PR - -Translating Help language file -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -- Located inside lang/help -- Please be careful not to mess up the html tags, please only focus on - text translation - -How to recognize a new language: -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -(This is only for zmNinja developers. Not relevant for language -translators) \* Modify languages array in NVR.js (look for "var -languages") \* register language glob code in app.js - make sure its -added to array list and mapping (look for registerAvailableLanguageKeys) diff --git a/docs/_build/html/_sources/desktop.rst.txt b/docs/_build/html/_sources/desktop.rst.txt deleted file mode 100644 index ed975810..00000000 --- a/docs/_build/html/_sources/desktop.rst.txt +++ /dev/null @@ -1,113 +0,0 @@ -Desktop port tips -================= - -Scope ------ - -This page is dedicated to the Desktop version of zmNinja and tips & -tricks - -Command Line parameters ------------------------ - -The following command line parameters are supported: - -:: - - --path= - starts zmNinja and stores user profile information to that directory. - This allows you to switch between different user settings. - - --fs - starts zmNinja in full screen mode - -Multiple instances ------------------- - -It is actually possible to launch multiple instances of the same desktop -app from command line. This allows you to watch different servers at the -same time as well as use multiple monitors. I strongly recommend you use -unique ``--path`` arguments with each instance because otherwise one -instance will conflict with another. - -So lets say you want to run 2 copies of zmNinja at the same time: - -:: - - mkdir -p /path/to/instance1 - mkdir -p /path/to/instance2 - -And then: - -:: - - # for linux - zmninjapro-1.3.22-x86_64.AppImage --path=/path/to/instance1 - zmninjapro-1.3.22-x86_64.AppImage --path=/path/to/instance2 - - #for OSX. Note the -n is critical to launch a new instance - open -n ./zmninjapro.app --args --path=/path/to/instance1 & - open -n ./zmninjapro.app --args --path=/path/to/instance2 & - -Hotkeys -------- - -The following hotkeys are supported while the app is running: - -:: - - [Cmd/Ctrl] + L -> Lock app (if pin code is being used) - [Cmd/Ctrl] + Shift + F -> toggle between full screen and windowed mode - [Cmd/Ctrl] + Shift + D -> opens the debug window. - Super useful to see what is going on, - especially when things don't work - -Keyboard bindings ------------------ - -**Live Monitor View (single view, not montage):** - -:: - - Arrow Left -> move to previous monitor - Arrow Right -> move to next monitor - Esc -> remove live view - P -> toggle PTZ - -**PTZ Operations to move (PTZ should be toggled to on first):** - -:: - - Q W E -> UpLeft, Up, UpRight - A S D -> Left, Home,Right - Z X C -> DownLeft, Down, DownRight - -**Event Footage View:** - -:: - - Arrow Left -> move to previous event - Arrow Right -> move to next event - Enter -> play the event if in snapshot mode (shows red play button) - Esc -> remove event footage view - -**Timeline:** - -:: - - Arrow Up -> Zoom In - Arrow Down -> Zoom Out - Arrow Left -> Pan Left - Arrow Right -> Pan Right - Esc -> Fit timeline back to view (reset) - A -> Previous Day - D -> Next Day - -Desktop data storage locations ------------------------------- - -User data is typically stored in the following locations: \* -``%APPDATA%/zmNinjaDesktop`` for Windows, \* -``$XDG_CONFIG_HOME/zmNinjaDesktop`` or ``~/.config/zmNinjaDesktop`` for -Linux, and \* ``~/Library/Application Support/zmNinjaDesktop`` for OSX - -To completely remove the app, you may want to delete both the app -bundle/binary and these locations as applicable on your system diff --git a/docs/_build/html/_sources/guides/FAQ.rst.txt b/docs/_build/html/_sources/guides/FAQ.rst.txt new file mode 100644 index 00000000..c5ecc3c6 --- /dev/null +++ b/docs/_build/html/_sources/guides/FAQ.rst.txt @@ -0,0 +1,754 @@ +zmNinja FAQ +``````````` + +What is the minimum supported version of ZoneMinder, Android and iOS? +--------------------------------------------------------------------- + +You need a minimum of ZM 1.30.4 with APIs working. You may get it to run +in previous versions, but I don't support them, so you are on your own. + +Starting version 1.3.26 of zmNinja, only IOS 10+ and Android 5.0+ +devices are supported. + +zmNinja Help +------------ + +I've just started uploading instructional videos for zmNinja. I'll add +more over time. See them +`here `__ + +Asking for refunds +------------------ + +If you have bought the iOS version of the app, it doesn't look like I +can process a refund anymore. If any developer knows how, please let me +know. Apple wants you to contact them directly using +`this `__ link. + +For Android: If you're not happy with zmNinja and have bought the app, +please `send me an email `__ **with your +order id**. + +Note that depending on how long ago you made the order, I may not be +able to refund. Its not my policy - The app/play stores disable the +refund option. For example, I could not refund an app a user purchased 2 +years ago. + +Also, please read `Things you should own up +to <#things-you-should-own-up-to>`__ + +Things you should own up to +--------------------------- + +Read the app description +~~~~~~~~~~~~~~~~~~~~~~~~ + +Both the Apple and Android stores have a clearly visible note on the app +description that it requires a working API for ZoneMinder. If you are +not willing to ensure the API works, please save yourself and me time. +I'm sorry this is the first post, but I get emails from too many +entitled/rude folks about APIs not working. Not my problem. Read below. +Breathe. + +Try before buy +~~~~~~~~~~~~~~ + +Some users legitimately look around for an option to try before they buy +and they are not savvy enough to `download the +code `__ and +`compile `__ +themselves. Fair enough. In that case, `download the Desktop +version `__ of +zmNinja. It's free and is the same code as mobile. Make sure the desktop +version works before you buy the mobile version. + +The reason I don't have a "trial mobile version" is that I find the +process too complex using in-app-purchases and chose not to do it to +make life simpler for me. As a substitute, I do make the full code +available for free and offer a desktop binary version free too. + +zmNinja doesn't work. Actually, even ZoneMinder web console doesn't work. You should fix this! +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Yeah, look - I understand zmNinja won't work if ZoneMinder web console +doesn't work. That being said, I really don't have time to help you +debug ZoneMinder issues. I only develop the app (zmNinja). If you can't +set up ZoneMinder properly, please post your questions in the `ZM +forum `__. You'll find more qualified +people to help you. I don't develop nor control ZoneMinder. It's a +different set of folks. Now, I'll help you, but only after you have +spent sufficient time trying your best and provide sufficient logs of +what you have done. Also remember, if you buy zmNinja, **I'm happy to +refund it anytime - just send me an email.** + +In short, I don't have the time to support ZoneMinder install issues - +sorry about that + +zmNinja doesn't work. Zoneminder works, but I have no idea why APIs don't work. You should fix this! +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +*Sigh*. I don't maintain ZoneMinder. I only develop the app. *You* need +to make sure ZoneMinder APIs work. ZoneMinder web console doesn't use +APIs. Neither does zmView. zmNinja does. It says so in the description +of the app in the store. So feel free to fix your APIs, or ask me for a +refund. Just don't whine to me, please, if your APIs are broken. I'm +*not* going to fix them for you, especially if you act like its not your +problem. `I'm perfectly fine if you choose not to use my +app `__, which +is why I refund, anytime. + +I can't compile zmNinja, help me! +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +I put out the source code, so people who know how to compile are able to +do it themselves. I also hope this will encourage folks to PR changes +(though this has rarely happened). The problem however, is that +dependencies/libraries keep changing. I just don't have the time to help +debug. If it happens to me, I'll fix it. If it doesn't I have very +limited time to remotely debug your setup issues. I'd much appreciate if +you figured it out on your own. Feel free to create an issue after +you've tried enough, but I can't guarantee I'll spend a lot of time on +source code compile issues. + +How to report errors +~~~~~~~~~~~~~~~~~~~~ + +- I don't know why something is not working if you don't provide + sufficient inputs. Start by creating a `GitHub + issue `__ and please + fill in the template correctly. If you don't want to post debug logs + in the issue, `email `__ them + to me and mention in the issue you've emailed them (you can email by + going to logs screen and tapping on the envelope button (mobile) or + you can download logs (cloud icon, desktop version) + +- If zmNinja was working, but it stopped after you upgraded ZoneMinder + be sure to mention which version was working and which was not. In + this case, please make sure you have validated the APIs work + +- Before you create an issue, please make sure you have read the + sections on `connection + issues `__ + and + `streaming `__ + issues and `Step 6 of + validating `__ + APIs. + +- Its often hard to infer a problem especially when its due to some + unique apache/nginx mungling you might have done but haven't told me + about it. In such cases, try and give me remote access to your ZM for + a day. Configure a limited user with just one monitor. It will save + hours of frustration (mostly on my side). Thanks + +- I have released the desktop version free - download it + `here `__. Its + always easier to debug on the desktop version - give it a try. If you + hit Shift+Cmd/Ctrl+D it brings up a debug window - it helps debugging + +- Always tell me what your ZoneMinder & zmNinja versions are + +- If your app suddenly stopped working: + + - Send me DEBUG logs of the app + - tell me what changed (got to be something. You updated the app, + you upgraded ZM) + - What exactly is not working? + +Profile information storage related +----------------------------------- + +zmNinja is not saving my information. It keeps asking me to re-enter all my data +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +I've seen this happen in two cases: \* You are running out of space. +Clean up some space and try again \* On specific Android devices, +typically running Android OS less than 6.0, some (2-3) users have +reported this issue. I still don't have a good answer. Please update to +the latest app version and send me debug logs, please + +I updated my zmNinja app and all my server settings were cleared. Why? +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Sorry. I've made several releases where due to programming errors, +settings got wiped out. However, starting v1.3.021 for Android and +v1.3.025 for Android, I've introduced the facility to sync with the +cloud (Google Drive/iCloud). This is the settings option. It is enabled +by default. This means if you uninstall the app and install again, the +settings should get restored. Note that both in iOS and Android, backup +schedule is managed by the OS. You can force a backup going to settings +and forcing a backup, or wait till the OS backups (typically a few +hours/phone plugged in/not being used) + +Do also note that 1.3.027 and beyond use a new WebView called WKWebView +(because iOS deprecated the old webview). If you disabled iCloud you +will have to re-enter your settings again (only once). This may not +affect Android, but I don't know for sure. + +Connection/Authentication issues +-------------------------------- + +General tips +~~~~~~~~~~~~ + +- Disable server redirects like 302 and then try if using the mobile + app +- To make sure there are no connection issues, launch your **phone + browser** and try to reach ZoneMinder. If that doesn't work, neither + with zmNinja. Many users try to access ZoneMinder from a desktop + browser and/or on the same server it is running and forget the phone + is a different device! +- Some phones need the SSL certificate installed in the device +- Specific SSL settings can cause issues with Android or iOS +- Don't use funky/special characters in passwords - try changing it to + a complex password without funky characters and try +- Use the wizard - I've seen many examples of typos when the user + thinks they don't have a typo +- If you are using basic authentication, make sure your credentials are + correct. A good way to test is to first disable basic auth and enable + it after you are sure things work without basic auth. +- Please note zmNinja does NOT support Digest authentication. So please + don't put in digest auth info when zmNinja asks for basic + authentication +- Look at your ZM logs and zmNinja logs - they help isolate the problem + +Server Redirects +~~~~~~~~~~~~~~~~ + +If the Wizard fails to connect in the mobile app but works in the +desktop app, it may be that your server is sending redirects. +Unfortunately, the current mobile HTTP stack doesn't handle cookies with +redirects well. Till this bug is fixed by the plugin author Wizard won't +work. Note that if you are running ZM 1.32 or above, you can directly +enter your settings without using the wizard and it will work because it +will try and use the new ZM 1.32 ``login.json`` API first. + +Self signed certs +~~~~~~~~~~~~~~~~~ + +A lot of people use self-signed certs. I'd strongly recommend you use +`LetsEncrypt `__ if you can. It's free. That +being said zmNinja does support self signed certs. Make sure "Enable +Strict SSL" is off in Developer settings. You will need to restart the +app. + +SSL settings +~~~~~~~~~~~~ + +If you are getting ``SSL protocol/handshake errors`` in your logs, you +very likely have specific ssl settings enabled server side that your +device network stack does not support. Note that just because it works +with the device browser does not mean it will work with zmNinja as +zmNinja does not use the browser HTTP implementation in mobile devices. + +One use reported that a setting of ``ssl_ecdh_curve secp384r1`` in his +nginx config was resulting in zmNinja Android not being able to connect +to the server. Changing it to +``ssl_ecdh_curve secp521r1:secp384r1:prime256v1;`` worked for him. + +I'd strongly recommend you remove all special ssl settings except the +certificate and key file locations, make it work and then add the +settings back one by one and see what works/does not work. + +Everything works when I use LAN IP, but I get "not authenticated" when I use WAN IP +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +This is likely happening if you use self signed SSL certs. If you are +using self signed certificated, you should make sure the "common name" +matches the hostname (or public IP) of the server you are installing ZM +in. If not, zmNinja's SSL handshake will fail. + +If you have used 'make-ssl-cert' or a similar tool that automatically +generates the cert for you, its very likely you have certificate that +uses the 'unix hostname' of your server. That will not work. + +Assuming you are usin apache and have SSL enabled, here is how to +regenerate the certs (ubuntu specific, may need to tweak it for your +distro) + +This will create a self-signed certificate/key pair and store it in +/etc/apache2/ssl (you may have to create that directory, or store it +elsewhere) + +:: + + sudo openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout /etc/apache2/ssl/zoneminder.key -out /etc/apache2/ssl/zoneminder.crt + +Next up, edit your apache ssl config (example +/etc/apache2/sites-available/default-ssl.conf) And add/modify the +following lines: + +:: + + SSLCertificateFile /etc/apache2/ssl/zoneminder.crt + SSLCertificateKeyFile /etc/apache2/ssl/zoneminder.key + +restart apache + +:: + + sudo service apache2 restart + +Live streaming issues +--------------------- + +Summary of Everything works, but I can't see live feed +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +*Please* be diligent in reviewing this list. You'd be surprised how many +times I've had users tell me 'they have checked this list' only to find +out later they skimmed details. + +- Please enable ``AUTH_HASH_LOGINS`` as well as set ``AUTH_RELAY`` to + "hashed" + +- You think your APIs are working, but they are really not. If you open + a browser and type in ``https://yourserver/zm/api/monitors.json`` and + you see some text on top followed by monitor data, your APIs are + *not* working. You need to search the forums and figure out how to + get rid of that text. + +- Your ZoneMinder live view from the web console doesn't work either. + If this is the case, fix ZoneMinder first. Before you say "web + console works fine", make sure you are running it from a different + computer from where ZM is running. +- The phone/computer running zmNinja does not have access to your ZM + server. For example, many people test the web console on their LAN + but test zmninja on a WAN connection +- Always try with the `free desktop + version `__ first. + Enable debug view by hitting Ctrl/Cmd+Alt+D and you can see debug + logs in the console view. I can't emphasize enough how useful this + is. +- Your ``cgi-bin`` setting in zmNinja is incorrect. Please run the + wizard. There are times when the wizard can fail. In those cases, + open up ZM web console, go to view the monitor and do an "Inspect + Source" in the browser. That will show you the cgi-bin link that you + can use in zmNinja. + +For example: + +In the above case my zmNinja cgi-bin setting is +``https://myserver:myport/zm/cgi-bin`` + +- You are using Basic Authentication. See + `here <#i-cant-see-streams-i-use-basic-auth>`__ +- You have 'multi-server' configuration enabled and you have done it + wrong. Go to ZM Web Console->Options->Servers - if you see any + entries there and you don't know what multi-server is, or you don't + use it, please disable multi-server +- When trying to view live images, look at your *webserver* error logs + - example Apache's ``error.log`` - see any image/jpg errors? That + means you are missing libraries +- You have set up a multi-server install of ZM without knowing you did + See `here <#i-cant-see-streams--multi-server-is-enabled>`__ +- Look at zmNinja, ZoneMinder and web server error logs at the time of + error - one of them should give more clues. Please send me *all* the + logs if you ask for help +- Read the set of notes below + +General note +~~~~~~~~~~~~ + +To debug streaming notes, always try with the free desktop version +first. When trying to stream simultaneously look at the debug logs of +zmNinja (``Ctrl/Cmd+Alt+D`` in desktop build, console and/or network +tab) and your webserver error logs. + +I can't see stream: And I can't see streams in ZoneMinder webconsole either +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Check if streaming works in the web interface. If it does not work, +zmNinja won't work either. Fix ZM first + +I can't see streams: I use basic auth +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Starting Chrome v59, the browser changed basic credential behavior. The +issue report is +`here `__. +Here is the core issue: zmNinja constructs URLs as +``http://user:password@server`` when you have basic auth (and starting +v1.3 uses the ``Authorization`` header). However, since images are +rendered using ```` there is no option but to put in a +``user:password`` in the URL. Chrome allows this format for direct +requests (such as API calls) but will strip out the ``user:password`` +part for *embedded* requests (like ```` tags inside a page). +So what happens is your APIs work, but you won't see images. There is a +reason why Chrome does this - its bad to pass on a user :password in a +URL as its clear text (even if you are on HTTPS, as its in the URL). As +I said earlier, The *right* way to do this is to replace the +``user:pass`` with an ``Authorization`` header but there is no way to do +that with images that are rendered with ```` (There are several +plugins that attempt to do this, but don't work with streaming MJPEG +images). Bottom line, this is a problem for apps like zmNinja and it +affects you. + +How this affects you: \* If you are using HTTP Basic Authentication + +Then your images won't show. + +Possible Workarounds: \* Configure your web server to skip basic +authentication for ``nph-zms`` URLs \* If you are using a ReverseProxy, +you can insert the authorization header inside the apache proxy \* +Disable HTTP Basic auth for now \* Downgrade Chrome + +Skipping auth for ``nph-zms`` URLs +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Here is what I've used that works with basic-auth. This requires a basic +auth portal login and once logged in allows skipping of image URLs (the +idea comes from `Adam Outler `__ - he +uses a different approach using reverse proxies, which I link to later) + +.. code:: apache + + # this configuration assumes your server portal is server:port/zm + # and cgi-path is /zm/cgi-bin. Please change it to your specific environment + # Also requires Apache 2.4 or above + + + SetEnvIf Request_URI ^/zm/cgi-bin/ noauth=1 + SetEnvIf Request_URI ^/zm/index.php noauth=1 + AuthType Basic + AuthName "Auth Required" + AuthUserFile "/etc/apache2/.htpasswd" + + Require valid-user + Require env noauth + + + +Authorization with a ReverseProxy +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Simple starter +'''''''''''''' + +**STEP 1**: Enable "Append basic auth tokens in images" option in +zmNinja->Developer Settings and save. What this does is that image URLs +will append a "basicauth" token parameter with your basic authentication +credentials. This token can then be parsed by Apache and inserted as a +valid Authorization header. Don't enable this option if you are not +using HTTPS because the request-URI will be transmitted without +encryption and it will contain your basic auth credentials, encoded in +base64, which is trivial to decode. + +**STEP 2 (Apache)**: Use mod\_rewrite and mod\_header to convert the +token into an authorization in your Apache config. Add this to the +relevant section (``VirtualHost`` or others) + +.. code:: apache + + RewriteEngine on + RewriteCond %{QUERY_STRING} (?:^|&)basicauth=([^&]+) + RewriteRule (.*) - [E=QS_TOKEN:%1] + RequestHeader set Authorization "Basic %{QS_TOKEN}e" env=QS_TOKEN + +**STEP 2 (Nginx)**: Thanks to user [@ysammy](https://github.com/ysammy) + +.. code:: nginx + + location /zm/cgi-bin/nph-zms { + proxy_pass http://:/zm/cgi-bin/nph-zms; + proxy_set_header Authorization "Basic $arg_basicauth"; + } + +A more complete and more secure option +'''''''''''''''''''''''''''''''''''''' + +User `Adam Outler `__ has contributed the +following process: see +`HERE `__. +Adam also has this to say about why proxies should be recommended for +HTTPS enabled ZoneMinder instances: + + A proxy server should be on the list of recommendations for + Zoneminder. HTTPS requires processing to encrypt and decrypt. This + takes processor cycles away from Zoneminder's recording. Since HTTPS + is now basically a requirement, there should be a page dedicated to + proxy, https, auth, and their nuances. I just picked up 2-4K cameras + and processing suddenly became an issue :). + +I can't see streams: Multi-server is enabled +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +The chances are very high that you have enabled ZoneMinder's +`Multi-Server `__ +option and you entered something like ``localhost`` in server settings. +**DON'T. You can't enter localhost**. If you are not using multi-server, +remove any server settings. If you are using multi-server, you need to +put in a valid server IP or hostname, not ``localhost``. BTW, if you did +put in ``localhost`` you will note that your ZM web console also won't +work if you try to launch your browser on a different machine from where +ZM is running. + +I can't see streams: you have cgi-bin issues +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +- Try to use the wizard. If it fails, +- Go to zmNinja settings and fix your cgi-bin path. the automatic path + that is filled in won't work. Here is a hint, go to + zoneminder->options->paths and check the value of the cgi-bin path - + your zmNinja path will be "base path of your server" + cgi-bin path. + +zmNinja montage does not seem smooth - feeds seem a little delayed compared to ZM console +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +zmNinja does not use ``nph-zms`` to display live feeds in montage. This +is because Chrome only allows a maximum of 6 connections per (sub)domain +which means you can't have more than 6 active TCP connections to a +single domain at the same time. This also means that you can't display +more than 6 monitors together. To avoid this, I use the zoneminder +"snapshot" feature that displays a still from the monitor and then +refresh it every X seconds (by default X=2 unless you switch to low +bandwidth mode. You can change X in developer settings) + +That being said, starting v1.3.0 of zmNinja onwards, I now support +multi-port (available in ZM 1.32 onwards) that lets you stream as many +monitors as you need. Read +`this `__ +post for more details. + +Event images/streaming related +------------------------------ + +General note +~~~~~~~~~~~~ + +To debug streaming notes, always try with the free desktop version +first. When trying to stream simultaneously look at the debug logs of +zmNinja (``Ctrl/Cmd+Alt+D`` in desktop build, console and/or network +tab) and your webserver error logs. + +Also, Starting ZM 1.32 and beyond, please enable ``AUTH_HASH_LOGINS`` as +well as set ``AUTH_RELAY`` to "hashed" + +Event stream viewing does not work +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +- Look at apache error logs - it often gives you hints + +Video Not Playable +~~~~~~~~~~~~~~~~~~ + +- Mobile devices have more restrictions to video playback than + destkops. Make sure you first check if the video is playable in + Chrome using the same phone you are using zmNinja on +- There could be other reasons due to which the video is not playable: +- There is an encoding issue in the video generated +- The video resolution is too big (see `this + thread `__) +- In general, to get to the root of what is going on, you'll need + device logs using ADB (see + `this `__) + +Event thumbnails/images don't show +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Starting zmNinja 1.3.26 and beyond, if you are using OPT\_AUTH you need +to enable AUTH\_HASH\_LOGINS or you won't be able to see image snapshots +and thumbnails. Only applicable for mobiles. + +When viewing individual frames, some event frames show, but some don't +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +This can happen if you are using Video Storage (Passthru or X264 Encode) +and have disabled frame (JPEG) storage completely. What happens is +ZoneMinder uses ``ffmpeg`` to extract frames from timestamps and +sometimes it is unable to extract a frame for a specific timestamp, +resulting in this issue. If you see HTTP 404 messages for some frames, +but the video plays fine, then this is why. + +zmNinja montage screen shows all my monitors, but in Event Montage, I only see 5? +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +You are likely using Chrome (Android or desktop version). Chrome allows +a total of 6 simultaneous connections to a domain/sub-domain. ZoneMinder +uses a long running TCP stream for each monitor display (keeps sending +jpeg images). This means you can only display 6 streams at a time in +Chrome. I work around this problem by *not* asking for live streams in +montages - I ask for 'snapshots' and keep refreshing snapshots every 2 +seconds. This makes montage display non-realtime, but scales to as many +monitors you have. In Event Montage however, I am using zms to display +long running streams - trying to do snapshots in event montage is a lot +of work and I need to keep track of when the event ends, move to next +image etc. I limit this to 5 because I need 1 for control messages. + +Other misc. issues +------------------ + +I suddently see an error message saying I need to enable ZM\_AUTH\_HASH\_LOGINS. This wasn't there before +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Yes. Starting 1.3.027 onwards, due to a new UI web rendering engine that +enforces CORS, I've had to change my strategy on how network calls are +made. Briefly, on mobile devices, I now use a native HTTP stack and not +the browser HTTP stack. However, images are rendered using the browser +HTTP stack which causes this message. In short, you need to enable it, +and restart ZM. + +zmNinja 1.2.515 and beyond says "Need API Upgrade" for the 24hr review feature. What does that mean? +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +You need to update an API file in Zoneminder server. ZoneMinder folks +haven't yet (as of Apr 2018) made a release with that API change. To do +it manually,simply replace your ``EventsController.php`` (typically in +``/usr/share/zoneminder/www/api/app/Controller``) with `this +one `__. + +I upgraded ZoneMinder to 1.30.2 or above and zmNinja stopped working! +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +ZoneMinder changed API packaging with ZM 1.30.2 and above. You will have +to read your distro notes on how to **properly** update. Read +`this `__ +thread. Before you think zmNinja is the problem, make sure your `APIs +are +working `__. +Summary of reasons why zmNinja might have stopped working: - You did not +check if your APIs are working after the upgrade - You did not upgrade +properly (just updating the ZM package without following distro +instructions with ZM is not sufficient) - You are missing some key +CakePHP modules, likely ``php5-apc`` which would have been installed if +you read all the package instructions. You can install it manually - You +might need to restart your system after upgrading (properly) + +I am running ZM on a custom port. zmNinja is unable to reach my ZoneMinder server but I tried on a regular browser (Firefox/Opera/IE) and it I can reach it +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +zmNinja on Android and Desktops uses an embedded chrome browser. Chrome +marks certain ports as "unsafe" and won't allow connections to go out. +The list of ports to avoid are +`here `__ + +The Montage screen is causing issues with my ZM server - I get connection timeout issues or MySQL connection problems +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +- zmNinja uses a different approach to display montage than ZoneMinder. + In zmNinja montage screen, I display a snapshot of each monitor and + refresh it every few seconds. This results in many short TCP + connections constantly being opened and closed. The reason I have to + do this is Chrome only allows 6 connections to a domain, which means + if I don't keep terminating TCP connections, I won't be able to show + more than 6 monitors. Each time I open a new TCP connection for a + snapshot, the ZM backend invokes mySQL to authenticate the request. + You will need to increase mySQL ``max_connections`` in ``my.cnf`` if + you are facing time\_wait/timeout issues. + +The app works great - except it doesn't work on ONE Android phone - works in others! +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +zmNinja uses an embedded chrome browser in its app. If you have safe +browsing enabled, it may affect zmNinja. However, if you are facing this +problem, its likely you can't access ZM from a mobile web browser +either. The problem that might be occurring is that zmNinja is trying to +reach your ZM server and your settings prohibit it from reaching ZM, so +it fails. See +`this `__ +discussion + +APIs are not working ! ZM console works fine. +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Read +`this `__ + +I'm using mocord/record and I don't see events without alarms +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Tap on the "..." menu option and toggle "Show all events". By default, +it shows events with at least one alarm frame + +Taking snapshots or downloading videos don't work in Android +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +If you are unable to download/save, look at your logs. If you see +something like +``"exception":"java.security.cert.CertPathValidatorException: Trust anchor for certification path not found."`` +, chances are you are using self-signed certs. You need to install the +certificate on your phone. Installing is as easy as emailing yourself +the ".crt" file and tapping on it from your device to install it. In +general, both Apple and Google have been incrementally tightening rules +for self signed certificates - they generally discourage usage of such +certs and over time both Chrome (Android) and WkWebView (iOS) have added +new restrictions/checks which affects usage. + +Pan/Tilt/Zoom doesn't work +~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Tilt/Zoom/Presets support has not been added. But for this to work, PTZ +needs to work in ZM first. Once it works in ZM, try it in ZMNinja. Also +note that you may need to disable CSRF in your Options in ZoneMinder - +it seems to cause all sorts of issues. + +What is this Event Server? +-------------------------- + +The Event Server is a contribution I made to ZoneMinder that adds a +daemon to the existing list. It listens for new events using shared +memory (aka very efficient) and then sends notifications of events to +listeners (you can write your own app that listen as well as use +zmNinja). This is a chapter on its own, and I have a dedicated +page/project for this +`here `__. I'd encourage +you to install and use it - its very nice. + +It looks like you allow me to modify the frequency of push notifications. Very cool - will it send me all events that I missed if I make the frequency of a monitor event push to say, 600 seconds? +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Nope. It only sends the latest events. What it does is before sending +push notifications, it checks if the last time a push was sent for this +monitor is < the time you specified. If it is, it does not send. That's +all. + +Is zmNinja free? +---------------- + +The source code is free, grab it, compile it, use it. The desktop ports +are free as of today. I may charge for it some day. The mobile ports are +in Appstore/Playstore for a fee. + +Who are the developers behind this? +----------------------------------- + +Me. + +The code needs improvement +-------------------------- + +You are being nice. I know the code is terrible. I'm not a coder by +profession. This was my first project to learn how to write a mobile +app. So the app evolved from no knowledge to some knowledge. It +comprises of terrible to passable to reasonable code. There is a reason +why my `profile `__ says what it says. +But hey, if you can improve it, please PR! + +Is zmNinja an official ZoneMinder product? +------------------------------------------ + +No. But the ZM developers are amazing people who have been very helpful. + +I want to donate money +---------------------- + +You could either `donate to to +Zoneminder `__ or `donate +to zmNinja `__. Donations +to ZoneMinder don't contribute to zmNinja, but the ZoneMinder devs will +benefit from it, which is fine too. + +How does zmNinja use my personal data? +-------------------------------------- + +Please read +`this `__ + +I want to donate time/expertise/code +------------------------------------ + +Great. Make sure you read the +`license `__ +, read the `contributing +guidelines `__ +and if it works for you, happy to see what you'd like to do. diff --git a/docs/_build/html/_sources/guides/contributing-language.rst.txt b/docs/_build/html/_sources/guides/contributing-language.rst.txt new file mode 100644 index 00000000..e93d227f --- /dev/null +++ b/docs/_build/html/_sources/guides/contributing-language.rst.txt @@ -0,0 +1,59 @@ +Contributing a new language +--------------------------- + +If you are familiar with using git, I'd prefer if you follow the Pull +Request process +`here `__. + +Adding a new language +^^^^^^^^^^^^^^^^^^^^^ + +- Languages translations are available + `here `__ +- To contribute a new language, add a new ``locale-xx.json`` (where + ``xx`` is your language code). +- Ideally, you should also provide a language translation for the + zmNinja help file inside + `lang/help `__ + +The best way is to simply look at an existing language translation and +follow the same model for yours. If any language translation keywords +are missed, it will fallback to English. + +Main Language file +^^^^^^^^^^^^^^^^^^ + +- Make sure there is no comma after the last element +- Comments are not allowed +- Make sure you don't add ellipsis "..." anywhere, they are added to + messages in code when needed +- After you complete the translation file, do the following: + +(replace ``-it`` with the language you are working on) + +``python ./checklang.py -f locale-it.json -b`` + +This validates your JSON file, makes sure all keys are in sync with -en +and if valid, creates pretty-locale-it.json. If you are sure it looks +good, + +``python ./checklang.py -f locale-it.json -b -o`` + +This validates your JSON file,makes sure all keys are in sync with -en +and if valid, OVERWRITES your local file with a pretty formatted +version, which is what you should PR + +Translating Help language file +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +- Located inside lang/help +- Please be careful not to mess up the html tags, please only focus on + text translation + +How to recognize a new language: +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +(This is only for zmNinja developers. Not relevant for language +translators) \* Modify languages array in NVR.js (look for "var +languages") \* register language glob code in app.js - make sure its +added to array list and mapping (look for registerAvailableLanguageKeys) diff --git a/docs/_build/html/_sources/guides/desktop.rst.txt b/docs/_build/html/_sources/guides/desktop.rst.txt new file mode 100644 index 00000000..ed975810 --- /dev/null +++ b/docs/_build/html/_sources/guides/desktop.rst.txt @@ -0,0 +1,113 @@ +Desktop port tips +================= + +Scope +----- + +This page is dedicated to the Desktop version of zmNinja and tips & +tricks + +Command Line parameters +----------------------- + +The following command line parameters are supported: + +:: + + --path= - starts zmNinja and stores user profile information to that directory. + This allows you to switch between different user settings. + + --fs - starts zmNinja in full screen mode + +Multiple instances +------------------ + +It is actually possible to launch multiple instances of the same desktop +app from command line. This allows you to watch different servers at the +same time as well as use multiple monitors. I strongly recommend you use +unique ``--path`` arguments with each instance because otherwise one +instance will conflict with another. + +So lets say you want to run 2 copies of zmNinja at the same time: + +:: + + mkdir -p /path/to/instance1 + mkdir -p /path/to/instance2 + +And then: + +:: + + # for linux + zmninjapro-1.3.22-x86_64.AppImage --path=/path/to/instance1 + zmninjapro-1.3.22-x86_64.AppImage --path=/path/to/instance2 + + #for OSX. Note the -n is critical to launch a new instance + open -n ./zmninjapro.app --args --path=/path/to/instance1 & + open -n ./zmninjapro.app --args --path=/path/to/instance2 & + +Hotkeys +------- + +The following hotkeys are supported while the app is running: + +:: + + [Cmd/Ctrl] + L -> Lock app (if pin code is being used) + [Cmd/Ctrl] + Shift + F -> toggle between full screen and windowed mode + [Cmd/Ctrl] + Shift + D -> opens the debug window. + Super useful to see what is going on, + especially when things don't work + +Keyboard bindings +----------------- + +**Live Monitor View (single view, not montage):** + +:: + + Arrow Left -> move to previous monitor + Arrow Right -> move to next monitor + Esc -> remove live view + P -> toggle PTZ + +**PTZ Operations to move (PTZ should be toggled to on first):** + +:: + + Q W E -> UpLeft, Up, UpRight + A S D -> Left, Home,Right + Z X C -> DownLeft, Down, DownRight + +**Event Footage View:** + +:: + + Arrow Left -> move to previous event + Arrow Right -> move to next event + Enter -> play the event if in snapshot mode (shows red play button) + Esc -> remove event footage view + +**Timeline:** + +:: + + Arrow Up -> Zoom In + Arrow Down -> Zoom Out + Arrow Left -> Pan Left + Arrow Right -> Pan Right + Esc -> Fit timeline back to view (reset) + A -> Previous Day + D -> Next Day + +Desktop data storage locations +------------------------------ + +User data is typically stored in the following locations: \* +``%APPDATA%/zmNinjaDesktop`` for Windows, \* +``$XDG_CONFIG_HOME/zmNinjaDesktop`` or ``~/.config/zmNinjaDesktop`` for +Linux, and \* ``~/Library/Application Support/zmNinjaDesktop`` for OSX + +To completely remove the app, you may want to delete both the app +bundle/binary and these locations as applicable on your system diff --git a/docs/_build/html/_sources/guides/source.rst.txt b/docs/_build/html/_sources/guides/source.rst.txt new file mode 100644 index 00000000..75785de7 --- /dev/null +++ b/docs/_build/html/_sources/guides/source.rst.txt @@ -0,0 +1,256 @@ +Building from Source +````````````````````` + +**NOTE** If you want to run it on your desktop, you can directly +download desktop binaries +`here `__ +and if you want it for Android/iOS you can get from the play/appstore. +This is only for those who *want* to run from source. + + Note: If you are building from source, you are mostly on your own. I + have very limited time to debug environment differences/package + differences between what I have and what you may have. I'm not a + nodejs/grunt etc expert and stuff seems to change all the time. + +Version note: The code is compiled using the following versions of +tools. **If you are using newer versions of ionic the code may not +compile - I don't have the time to upgrade yet. Finally, if you choose +to go the source route, I expect you to spend a lot of time yourself +debugging first before you create an issue. Even if you do create an +issue, I have very limited bandwidth to debug source compilation issues +for you.** Thanks. + +Output of ``ionic info`` + +:: + + Ionic: + + ionic (Ionic CLI) : 4.5.0 (/usr/local/lib/node_modules/ionic) + Ionic Framework : ionic1 1.3.5 + @ionic/v1-toolkit : 1.0.19 + + Cordova: + + cordova (Cordova CLI) : 8.1.2 (cordova-lib@8.1.1) + Cordova Platforms : android 7.1.4, ios 5.0.0 + Cordova Plugins : cordova-plugin-ionic-keyboard 2.1.3, cordova-plugin-ionic-webview 2.2.0, + (and 30 other plugins) + + System: + + Android SDK Tools : 26.1.1 (/Users/pp/Library/Android/sdk/) + ios-deploy : 2.0.0 + ios-sim : 7.0.0 + NodeJS : v8.11.2 (/usr/local/bin/node) + npm : 5.6.0 + OS : macOS Mojave + Xcode : Xcode 10.1 Build version 10B61 + +Install Dependencies - needed for all platforms +----------------------------------------------- + +Install NodeJS +~~~~~~~~~~~~~~ + +Install NodeJS from `here `__. As of +Dec 2018, I'm using Node ``v8.11.2``. I use +`n `__ to manage node versions and switch +between them. + +Install cordova, ionic, and bower +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. code:: bash + + npm install -g cordova ionic bower + npm install @ionic/v1-toolkit --save-dev + +And some more: + +.. code:: bash + + npm install -g gulp + npm install node-sass + npm install async + npm install jshint + +(Note you may need to do ``sudo`` depending on how your system is set +up. It's `better you +don't `__, +but if you must, well, you must) + +If you get a newer version, you should adjust your cordova version to +the mentioned version above in order to be able to successfully compile +zmNinja. To change the version you can follow these instructions: +`change cordova +version `__ + +Download zmNinja +---------------- + +.. code:: bash + + git clone --depth 1 https://github.com/pliablepixels/zmNinja.git + +Configure build configure zmNinja and get all required plugins +-------------------------------------------------------------- + +.. code:: bash + + + cd zmNinja + npm install + bower install + ionic cordova platform add android (or ios) + cordova prepare + +Making an iOS build +------------------- + +Note: You need to be doing this on a mac, with Xcode and the SDK +installed. You also need to have your developer certificates/etc. (I am +not going to detail this out - there are many internet resources on +this) + +There are a few steps you need to take to get the iOS build working for +the first time. If you don't do this, you may get a compilation error +that says ``ld: library not found for -lGoogleToolboxForMac`` + +:: + + cd platforms/ios + pod install + +This does not produce an iOS ready ipa. What you need to do then is to +open ``platforms/ios/zmNinja.xcworkspace`` in Xcode, and run. + +To compile a debug build for iOS from command line, from zmNinja project +root: First edit ``./build-auto.json`` and change the +``developmentTeam`` id to yours. Then: + +.. code:: bash + + ./build_ios.sh + +To compile using XCode, open ``platforms/ios/zmNinja.xcworkspace`` - You +need to use "Legacy Build" system if you are on XCode 10+. You can +change this in XCode ``File->Workspace Settings`` and then build usual. +Also switch to the Capabilities tab and make sure "Remote Notifications" +is on in Background Modes and in iCloud section, Key-Value storage is +enabled. If you see a "Fix issue" there, clicking on that button +resolves everything. + +Making an Android build +----------------------- + +Note that you need the `Android +SDK `__ installed and +configured properly for this to work. + +From the zmNinja project root: + +.. code:: bash + + ./build_android.sh --debug (or --release) + +If this complains of missing SDKs, you need to install the SDK version +it requests This should produce an APK file. To install it on your phone +over adb, you'd do something like + +.. code:: bash + + adb install -r debug_files/android-debug.apk #if you did --debug + or, + adb install -r release_files/zmNinja.apk #if you did --release + +Making a desktop build +---------------------- + +I use `electron `__ to build the desktop app. + +For versions 1.3.018 and beyond +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +I've migrated to using +`electron-builder `__ +to automate the build process better. + +Make sure you have all the dependencies +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Typically, just running + +:: + + npm install + bower install + +Should have installed everything. Validate by checking you have +``electron`` installed by invoking it on the command line + +You now have the following options: + +:: + + npm run dist-all # builds linux, mac and windows packages + npm run dist-mac # only builds mac packages + npm run dist-lin # only builds linux packages (32bit, 64bit, arm) + npm run dist-win # only builds win packages (32bit, 64bit) + +Your packages will be created in the ``dist`` folder + + +Set up desktop dependencies +~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. code:: bash + + npm install -g electron + npm install -g asar + +Make sure ``electron`` is installed. You should be able to do a +``which electron`` + +Also make sure ``unzip`` and ``wget`` tools are installed in your +system. + +First time setup +~~~~~~~~~~~~~~~~ + +If this is the first time you are building a desktop version, you need +to download electron images for various platforms. There is a helper +script called ``prepare_desktop.sh`` that you can run. This creates a +directory called ``desktop`` inside your zmNinja directory. It currently +downloads all supported platforms. + +.. code:: bash + + ./prepare_desktop.sh + +This will download a bunch of files. If completed successfully, you can +proceed to the next step. + +Make the desktop build +~~~~~~~~~~~~~~~~~~~~~~ + +Once you are done with ``prepare_desktop.sh``, you can do a +``./make_desktop.sh``. This will actually build images for all +platforms. + +Running desktop builds +~~~~~~~~~~~~~~~~~~~~~~ + +``cd`` into the desktop directory and run whichever port you want + +Subsequent builds +~~~~~~~~~~~~~~~~~ + +You need to ``./make_desktop.sh`` each time you make changes. + +Troubleshooting +--------------- + +Lots of things can go wrong. \* Please make sure you don't post issues +about why your own build is not working - please figure it out \* Look +carefully at error messages diff --git a/docs/_build/html/_sources/guides/validating-api.rst.txt b/docs/_build/html/_sources/guides/validating-api.rst.txt new file mode 100644 index 00000000..0b3d478b --- /dev/null +++ b/docs/_build/html/_sources/guides/validating-api.rst.txt @@ -0,0 +1,95 @@ +Validating APIs +```````````````` + +Please make sure you go through this before you wonder why zmNinja is not working. +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + + Assumption: Your ZM server is accessible at ``http://server/zm`` -> + replace this with your actual path + +Make sure ZM APIs are working: +'''''''''''''''''''''''''''''' + +(Note - nginx users, if you are facing API issues, please see if `this +page `__ +helps) + +- Step 1: Open up a browser +- Step 2: Log into ZM +- Step 3: Open another tab in the same browser (**IMPORTANT**: Has to + be from the same browser you logged into ZM) +- Step 4: Type in ``http://server/zm/api/host/getVersion.json`` --> you + should see a response like: + + .. code:: json + + { + "version": "1.30.0", + "apiversion": "1.0" + } + + version/apiversion may be different. If you don't see such a + response, your APIs are **not** working + +- Step 5:make sure you can see monitors and events: + +Type in ``http://server/zm/api/monitors.json`` --> you should see a +response like: + +.. code:: jsonld + + { + "monitors": [ + { + "Monitor": { + /*lots of additional details*/ + }, + /*more monitor objects if you have more than one*/ + }] + } + +- Step 6: (If you find your APIs show ok, but zmNinja has issues) +- Open a browser, log into ZM +- Open a new tab, enter ``http://server/zm/api/host/getVersion.json`` +- Now, right click and do a ``View Source`` in your browser (different + browsers may have different names for it). This brings up a full + source code view of the page. Do you ONLY see the JSON output or do + you see gobs of HTML on top like ``
 you should see a
+response like: (this list may be an empty set if you don't have events
+but you will still see the ``{"events":[]}`` text - if you find the page
+empty, your APIs have a problem. Please post in the ZM forums (please
+**DON'T** contact me first, as its not a zmNinja bug)
+
+.. code:: jsonld
+
+    {"events":[{"Event":{ /* many more details */ }}]}
+
+*Top reasons why monitors and events API returns blank while getVersion
+works:* \* You don't have monitor/event view permissions allocated to
+the user \* You have an invalid camera definition (happens sometimes
+when you remove and re-add cameras) \* If you are using non UTF8
+characters in your monitor names/zone names this can cause issues. Edit
+``/usr/share/zoneminder/www/api/app/Config/database.php`` (assuming ZM
+is in /usr/share) and make sure ``'encoding' => 'utf8'`` is
+*uncommented* (remove ``//``) around line 74. I've submitted a
+`patch `__
+but till its merged, you might have to do it manually.
+
+zmNinja API notes:
+^^^^^^^^^^^^^^^^^^
+
+-  Please make sure the user credentials you use has:
+-  view or edit access to monitors
+-  view or edit access to streams
+-  view or edit access to system
+
+-  If you are accessing zmNinja remotely, make sure you first access ZM
+   remotely from your desktop browser, ensure it works and then use the
+   same DNS/IP for zmNinja
diff --git a/docs/_build/html/_sources/index.rst.txt b/docs/_build/html/_sources/index.rst.txt
index f9daa5f2..ba4deb85 100644
--- a/docs/_build/html/_sources/index.rst.txt
+++ b/docs/_build/html/_sources/index.rst.txt
@@ -9,22 +9,22 @@ Welcome to zmNinja's documentation!
 .. toctree::
         :hidden:
 
-        FAQ
-        validating-api
-        source
-        desktop
-        contributing-language
+        guides/FAQ
+        guides/validating-api
+        guides/source
+        guides/desktop
+        guides/contributing-language
 
 
-:doc:`FAQ`
+:doc:`guides/FAQ`
         A detailed FAQ for zmNinja, including common issues related to installation, streaming and troubleshooting
-:doc:`validating-api`
+:doc:`guides/validating-api`
         How to make sure your ZoneMinder installation has working/usable APIs
-:doc:`desktop`
+:doc:`guides/desktop`
         Various tips/tricks/shortcuts for the desktop port of zmNinja
-:doc:`contributing-language`
+:doc:`guides/contributing-language`
         Would you like to see zmNinja in your own language? It's easy. Here's how to go about contributing a new language for zmNinja
-:doc:`source`
+:doc:`guides/source`
         For the brave souls who want to build from source, your questions answered 
 
 
diff --git a/docs/_build/html/_sources/source.rst.txt b/docs/_build/html/_sources/source.rst.txt
deleted file mode 100644
index bfa16b72..00000000
--- a/docs/_build/html/_sources/source.rst.txt
+++ /dev/null
@@ -1,260 +0,0 @@
-Building from Source
-`````````````````````
-
-**NOTE** If you want to run it on your desktop, you can directly
-download desktop binaries
-`here `__
-and if you want it for Android/iOS you can get from the play/appstore.
-This is only for those who *want* to run from source.
-
-    Note: If you are building from source, you are mostly on your own. I
-    have very limited time to debug environment differences/package
-    differences between what I have and what you may have. I'm not a
-    nodejs/grunt etc expert and stuff seems to change all the time.
-
-Version note: The code is compiled using the following versions of
-tools. **If you are using newer versions of ionic the code may not
-compile - I don't have the time to upgrade yet. Finally, if you choose
-to go the source route, I expect you to spend a lot of time yourself
-debugging first before you create an issue. Even if you do create an
-issue, I have very limited bandwidth to debug source compilation issues
-for you.** Thanks.
-
-Output of ``ionic info``
-
-::
-
-    Ionic:
-
-       ionic (Ionic CLI) : 4.5.0 (/usr/local/lib/node_modules/ionic)
-       Ionic Framework   : ionic1 1.3.5
-       @ionic/v1-toolkit : 1.0.19
-
-    Cordova:
-
-       cordova (Cordova CLI) : 8.1.2 (cordova-lib@8.1.1)
-       Cordova Platforms     : android 7.1.4, ios 5.0.0
-       Cordova Plugins       : cordova-plugin-ionic-keyboard 2.1.3, cordova-plugin-ionic-webview 2.2.0,
-    (and 30 other plugins)
-
-    System:
-
-       Android SDK Tools : 26.1.1 (/Users/pp/Library/Android/sdk/)
-       ios-deploy        : 2.0.0
-       ios-sim           : 7.0.0
-       NodeJS            : v8.11.2 (/usr/local/bin/node)
-       npm               : 5.6.0
-       OS                : macOS Mojave
-       Xcode             : Xcode 10.1 Build version 10B61
-
-Install Dependencies - needed for all platforms
------------------------------------------------
-
-Install NodeJS
-~~~~~~~~~~~~~~
-
-Install NodeJS from `here `__. As of
-Dec 2018, I'm using Node ``v8.11.2``. I use
-`n `__ to manage node versions and switch
-between them.
-
-Install cordova, ionic, and bower
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-.. code:: bash
-
-    npm install -g cordova ionic bower 
-    npm install @ionic/v1-toolkit --save-dev
-
-And some more:
-
-.. code:: bash
-
-    npm install -g gulp
-    npm install node-sass
-    npm install async
-    npm install jshint
-
-(Note you may need to do ``sudo`` depending on how your system is set
-up. It's `better you
-don't `__,
-but if you must, well, you must)
-
-If you get a newer version, you should adjust your cordova version to
-the mentioned version above in order to be able to successfully compile
-zmNinja. To change the version you can follow these instructions:
-`change cordova
-version `__
-
-Download zmNinja
-----------------
-
-.. code:: bash
-
-    git clone --depth 1 https://github.com/pliablepixels/zmNinja.git
-
-Configure build configure zmNinja and get all required plugins
---------------------------------------------------------------
-
-.. code:: bash
-
-
-    cd zmNinja
-    npm install
-    bower install
-    ionic cordova platform add android (or ios)
-    cordova prepare
-
-Making an iOS build
--------------------
-
-Note: You need to be doing this on a mac, with Xcode and the SDK
-installed. You also need to have your developer certificates/etc. (I am
-not going to detail this out - there are many internet resources on
-this)
-
-There are a few steps you need to take to get the iOS build working for
-the first time. If you don't do this, you may get a compilation error
-that says ``ld: library not found for -lGoogleToolboxForMac``
-
-::
-
-    cd platforms/ios
-    pod install
-
-This does not produce an iOS ready ipa. What you need to do then is to
-open ``platforms/ios/zmNinja.xcworkspace`` in Xcode, and run.
-
-To compile a debug build for iOS from command line, from zmNinja project
-root: First edit ``./build-auto.json`` and change the
-``developmentTeam`` id to yours. Then:
-
-.. code:: bash
-
-     ./build_ios.sh
-
-To compile using XCode, open ``platforms/ios/zmNinja.xcworkspace`` - You
-need to use "Legacy Build" system if you are on XCode 10+. You can
-change this in XCode ``File->Workspace Settings`` and then build usual.
-Also switch to the Capabilities tab and make sure "Remote Notifications"
-is on in Background Modes and in iCloud section, Key-Value storage is
-enabled. If you see a "Fix issue" there, clicking on that button
-resolves everything.
-
-Making an Android build
------------------------
-
-Note that you need the `Android
-SDK `__ installed and
-configured properly for this to work.
-
-From the zmNinja project root:
-
-.. code:: bash
-
-     ./build_android.sh --debug (or --release)
-
-If this complains of missing SDKs, you need to install the SDK version
-it requests This should produce an APK file. To install it on your phone
-over adb, you'd do something like
-
-.. code:: bash
-
-    adb install -r debug_files/android-debug.apk #if you did --debug
-    or,
-    adb install -r release_files/zmNinja.apk #if you did --release 
-
-Making a desktop build
-----------------------
-
-I use `electron `__ to build the desktop app.
-
-For versions 1.3.018 and beyond
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-I've migrated to using
-`electron-builder `__
-to automate the build process better.
-
-Make sure you have all the dependencies
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-
-Typically, just running
-
-::
-
-    npm install
-    bower install
-
-Should have installed everything. Validate by checking you have
-``electron`` installed by invoking it on the command line
-
-You now have the following options:
-
-::
-
-    npm run dist-all # builds linux, mac and windows packages
-    npm run dist-mac # only builds mac packages
-    npm run dist-lin # only builds linux packages (32bit, 64bit, arm)
-    npm run dist-win # only builds win packages (32bit, 64bit)
-
-Your packages will be created in the ``dist`` folder
-
-For versions older than 1.3.018 (will not work in 1.3.018 and beyond)
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-Click to see details
-
-Set up desktop dependencies
-~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-.. code:: bash
-
-     npm install -g electron
-     npm install -g asar
-
-Make sure ``electron`` is installed. You should be able to do a
-``which electron``
-
-Also make sure ``unzip`` and ``wget`` tools are installed in your
-system.
-
-First time setup
-~~~~~~~~~~~~~~~~
-
-If this is the first time you are building a desktop version, you need
-to download electron images for various platforms. There is a helper
-script called ``prepare_desktop.sh`` that you can run. This creates a
-directory called ``desktop`` inside your zmNinja directory. It currently
-downloads all supported platforms.
-
-.. code:: bash
-
-    ./prepare_desktop.sh
-
-This will download a bunch of files. If completed successfully, you can
-proceed to the next step.
-
-Make the desktop build
-~~~~~~~~~~~~~~~~~~~~~~
-
-Once you are done with ``prepare_desktop.sh``, you can do a
-``./make_desktop.sh``. This will actually build images for all
-platforms.
-
-Running desktop builds
-~~~~~~~~~~~~~~~~~~~~~~
-
-``cd`` into the desktop directory and run whichever port you want
-
-Subsequent builds
-~~~~~~~~~~~~~~~~~
-
-You need to ``./make_desktop.sh`` each time you make changes.
-
-Troubleshooting
----------------
-
-Lots of things can go wrong. \* Please make sure you don't post issues
-about why your own build is not working - please figure it out \* Look
-carefully at error messages
diff --git a/docs/_build/html/_sources/validating-api.rst.txt b/docs/_build/html/_sources/validating-api.rst.txt
deleted file mode 100644
index 0b3d478b..00000000
--- a/docs/_build/html/_sources/validating-api.rst.txt
+++ /dev/null
@@ -1,95 +0,0 @@
-Validating APIs
-````````````````
-
-Please make sure you go through this before you wonder why zmNinja is not working.
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-
-    Assumption: Your ZM server is accessible at ``http://server/zm`` ->
-    replace this with your actual path
-
-Make sure ZM APIs are working:
-''''''''''''''''''''''''''''''
-
-(Note - nginx users, if you are facing API issues, please see if `this
-page `__
-helps)
-
--  Step 1: Open up a browser
--  Step 2: Log into ZM
--  Step 3: Open another tab in the same browser (**IMPORTANT**: Has to
-   be from the same browser you logged into ZM)
--  Step 4: Type in ``http://server/zm/api/host/getVersion.json`` --> you
-   should see a response like:
-
-   .. code:: json
-
-       {
-       "version": "1.30.0",
-       "apiversion": "1.0"
-       }
-
-   version/apiversion may be different. If you don't see such a
-   response, your APIs are **not** working
-
--  Step 5:make sure you can see monitors and events:
-
-Type in ``http://server/zm/api/monitors.json`` --> you should see a
-response like:
-
-.. code:: jsonld
-
-    {
-        "monitors": [
-            {
-                "Monitor": {
-                    /*lots of additional details*/
-                },
-                /*more monitor objects if you have more than one*/
-            }]
-    }
-
--  Step 6: (If you find your APIs show ok, but zmNinja has issues)
--  Open a browser, log into ZM
--  Open a new tab, enter ``http://server/zm/api/host/getVersion.json``
--  Now, right click and do a ``View Source`` in your browser (different
-   browsers may have different names for it). This brings up a full
-   source code view of the page. Do you ONLY see the JSON output or do
-   you see gobs of HTML on top like ``
 you should see a
-response like: (this list may be an empty set if you don't have events
-but you will still see the ``{"events":[]}`` text - if you find the page
-empty, your APIs have a problem. Please post in the ZM forums (please
-**DON'T** contact me first, as its not a zmNinja bug)
-
-.. code:: jsonld
-
-    {"events":[{"Event":{ /* many more details */ }}]}
-
-*Top reasons why monitors and events API returns blank while getVersion
-works:* \* You don't have monitor/event view permissions allocated to
-the user \* You have an invalid camera definition (happens sometimes
-when you remove and re-add cameras) \* If you are using non UTF8
-characters in your monitor names/zone names this can cause issues. Edit
-``/usr/share/zoneminder/www/api/app/Config/database.php`` (assuming ZM
-is in /usr/share) and make sure ``'encoding' => 'utf8'`` is
-*uncommented* (remove ``//``) around line 74. I've submitted a
-`patch `__
-but till its merged, you might have to do it manually.
-
-zmNinja API notes:
-^^^^^^^^^^^^^^^^^^
-
--  Please make sure the user credentials you use has:
--  view or edit access to monitors
--  view or edit access to streams
--  view or edit access to system
-
--  If you are accessing zmNinja remotely, make sure you first access ZM
-   remotely from your desktop browser, ensure it works and then use the
-   same DNS/IP for zmNinja
diff --git a/docs/_build/html/contributing-language.html b/docs/_build/html/contributing-language.html
deleted file mode 100644
index 93eea34f..00000000
--- a/docs/_build/html/contributing-language.html
+++ /dev/null
@@ -1,289 +0,0 @@
-
-
-
-
-  
-
-  
-  
-  
-  
-  Contributing a new language — zmNinja  documentation
-  
-
-  
-  
-  
-  
-
-  
-
-  
-  
-    
-
-  
-
-  
-  
-    
-  
-
-  
-
-  
-        
-        
-    
-         
-
-  
-  
-
-
-
-
-
-   
-  
- - - - -
- - - - - - -
-
- - - - - - - - - - - - - - - - -
- - - - -
-
-
-
- -
-

Contributing a new language

-

If you are familiar with using git, I’d prefer if you follow the Pull -Request process -here.

-
-

Adding a new language

-
    -
  • Languages translations are available -here
  • -
  • To contribute a new language, add a new locale-xx.json (where -xx is your language code).
  • -
  • Ideally, you should also provide a language translation for the -zmNinja help file inside -lang/help
  • -
-

The best way is to simply look at an existing language translation and -follow the same model for yours. If any language translation keywords -are missed, it will fallback to English.

-
-
-

Main Language file

-
    -
  • Make sure there is no comma after the last element
  • -
  • Comments are not allowed
  • -
  • Make sure you don’t add ellipsis “…” anywhere, they are added to -messages in code when needed
  • -
  • After you complete the translation file, do the following:
  • -
-

(replace -it with the language you are working on)

-

python ./checklang.py -f locale-it.json -b

-

This validates your JSON file, makes sure all keys are in sync with -en -and if valid, creates pretty-locale-it.json. If you are sure it looks -good,

-

python ./checklang.py -f locale-it.json -b -o

-

This validates your JSON file,makes sure all keys are in sync with -en -and if valid, OVERWRITES your local file with a pretty formatted -version, which is what you should PR

-
-
-

Translating Help language file

-
    -
  • Located inside lang/help
  • -
  • Please be careful not to mess up the html tags, please only focus on -text translation
  • -
-
-
-

How to recognize a new language:

-

(This is only for zmNinja developers. Not relevant for language -translators) * Modify languages array in NVR.js (look for “var -languages”) * register language glob code in app.js - make sure its -added to array list and mapping (look for registerAvailableLanguageKeys)

-
-
- - -
-
- -
-
- - -
-
- -
- -
- - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/docs/_build/html/desktop.html b/docs/_build/html/desktop.html deleted file mode 100644 index 50762038..00000000 --- a/docs/_build/html/desktop.html +++ /dev/null @@ -1,333 +0,0 @@ - - - - - - - - - - - Desktop port tips — zmNinja documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - -
- - - - - - -
-
- - - - - - - - - - - - - - - - -
- - - - -
-
-
-
- -
-

Desktop port tips

-
-

Scope

-

This page is dedicated to the Desktop version of zmNinja and tips & -tricks

-
-
-

Command Line parameters

-

The following command line parameters are supported:

-
--path=<dir>  - starts zmNinja and stores user profile information to that directory.
-                This allows you to switch between different user settings.
-
---fs          - starts zmNinja in full screen mode
-
-
-
-
-

Multiple instances

-

It is actually possible to launch multiple instances of the same desktop -app from command line. This allows you to watch different servers at the -same time as well as use multiple monitors. I strongly recommend you use -unique --path arguments with each instance because otherwise one -instance will conflict with another.

-

So lets say you want to run 2 copies of zmNinja at the same time:

-
mkdir -p /path/to/instance1
-mkdir -p /path/to/instance2
-
-
-

And then:

-
# for linux
-zmninjapro-1.3.22-x86_64.AppImage  --path=/path/to/instance1
-zmninjapro-1.3.22-x86_64.AppImage  --path=/path/to/instance2
-
-#for OSX. Note the -n is critical to launch a new instance
-open -n ./zmninjapro.app --args --path=/path/to/instance1 &
-open -n ./zmninjapro.app --args --path=/path/to/instance2 &
-
-
-
-
-

Hotkeys

-

The following hotkeys are supported while the app is running:

-
[Cmd/Ctrl] + L         -> Lock app (if pin code is being used)
-[Cmd/Ctrl] + Shift + F -> toggle between full screen and windowed mode
-[Cmd/Ctrl] + Shift + D -> opens the debug window.
-                        Super useful to see what is going on,
-                        especially when things don't work
-
-
-
-
-

Keyboard bindings

-

Live Monitor View (single view, not montage):

-
Arrow Left  -> move to previous monitor
-Arrow Right -> move to next monitor
-Esc         -> remove live view
-P           -> toggle PTZ
-
-
-

PTZ Operations to move (PTZ should be toggled to on first):

-
Q W E  -> UpLeft, Up, UpRight
-A S D  -> Left, Home,Right
-Z X C  -> DownLeft, Down, DownRight
-
-
-

Event Footage View:

-
Arrow Left  -> move to previous event
-Arrow Right -> move to next event
-Enter       -> play the event if in snapshot mode (shows red play button)
-Esc         -> remove event footage view
-
-
-

Timeline:

-
Arrow Up    -> Zoom In
-Arrow Down  -> Zoom Out
-Arrow Left  -> Pan Left
-Arrow Right -> Pan Right
-Esc         -> Fit timeline back to view (reset)
-A           -> Previous Day
-D           -> Next Day
-
-
-
-
-

Desktop data storage locations

-

User data is typically stored in the following locations: * -%APPDATA%/zmNinjaDesktop for Windows, * -$XDG_CONFIG_HOME/zmNinjaDesktop or ~/.config/zmNinjaDesktop for -Linux, and * ~/Library/Application Support/zmNinjaDesktop for OSX

-

To completely remove the app, you may want to delete both the app -bundle/binary and these locations as applicable on your system

-
-
- - -
-
- -
-
- - -
-
- -
- -
- - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/docs/_build/html/genindex.html b/docs/_build/html/genindex.html index 4c22085f..fac73381 100644 --- a/docs/_build/html/genindex.html +++ b/docs/_build/html/genindex.html @@ -86,11 +86,11 @@ diff --git a/docs/_build/html/guides/FAQ.html b/docs/_build/html/guides/FAQ.html new file mode 100644 index 00000000..fe38493e --- /dev/null +++ b/docs/_build/html/guides/FAQ.html @@ -0,0 +1,987 @@ + + + + + + + + + + + zmNinja FAQ — zmNinja documentation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + +
+ + + + + + +
+
+ + + + + + + + + + + + + + + + +
+ + + + +
+
+
+
+ +
+

zmNinja FAQ

+
+

What is the minimum supported version of ZoneMinder, Android and iOS?

+

You need a minimum of ZM 1.30.4 with APIs working. You may get it to run +in previous versions, but I don’t support them, so you are on your own.

+

Starting version 1.3.26 of zmNinja, only IOS 10+ and Android 5.0+ +devices are supported.

+
+
+

zmNinja Help

+

I’ve just started uploading instructional videos for zmNinja. I’ll add +more over time. See them +here

+
+
+

Asking for refunds

+

If you have bought the iOS version of the app, it doesn’t look like I +can process a refund anymore. If any developer knows how, please let me +know. Apple wants you to contact them directly using +this link.

+

For Android: If you’re not happy with zmNinja and have bought the app, +please send me an email with your +order id.

+

Note that depending on how long ago you made the order, I may not be +able to refund. Its not my policy - The app/play stores disable the +refund option. For example, I could not refund an app a user purchased 2 +years ago.

+

Also, please read Things you should own up +to

+
+
+

Things you should own up to

+
+

Read the app description

+

Both the Apple and Android stores have a clearly visible note on the app +description that it requires a working API for ZoneMinder. If you are +not willing to ensure the API works, please save yourself and me time. +I’m sorry this is the first post, but I get emails from too many +entitled/rude folks about APIs not working. Not my problem. Read below. +Breathe.

+
+
+

Try before buy

+

Some users legitimately look around for an option to try before they buy +and they are not savvy enough to download the +code and +compile +themselves. Fair enough. In that case, download the Desktop +version of +zmNinja. It’s free and is the same code as mobile. Make sure the desktop +version works before you buy the mobile version.

+

The reason I don’t have a “trial mobile version” is that I find the +process too complex using in-app-purchases and chose not to do it to +make life simpler for me. As a substitute, I do make the full code +available for free and offer a desktop binary version free too.

+
+
+

zmNinja doesn’t work. Actually, even ZoneMinder web console doesn’t work. You should fix this!

+

Yeah, look - I understand zmNinja won’t work if ZoneMinder web console +doesn’t work. That being said, I really don’t have time to help you +debug ZoneMinder issues. I only develop the app (zmNinja). If you can’t +set up ZoneMinder properly, please post your questions in the ZM +forum. You’ll find more qualified +people to help you. I don’t develop nor control ZoneMinder. It’s a +different set of folks. Now, I’ll help you, but only after you have +spent sufficient time trying your best and provide sufficient logs of +what you have done. Also remember, if you buy zmNinja, I’m happy to +refund it anytime - just send me an email.

+

In short, I don’t have the time to support ZoneMinder install issues - +sorry about that

+
+
+

zmNinja doesn’t work. Zoneminder works, but I have no idea why APIs don’t work. You should fix this!

+

Sigh. I don’t maintain ZoneMinder. I only develop the app. You need +to make sure ZoneMinder APIs work. ZoneMinder web console doesn’t use +APIs. Neither does zmView. zmNinja does. It says so in the description +of the app in the store. So feel free to fix your APIs, or ask me for a +refund. Just don’t whine to me, please, if your APIs are broken. I’m +not going to fix them for you, especially if you act like its not your +problem. I’m perfectly fine if you choose not to use my +app, which +is why I refund, anytime.

+
+
+

I can’t compile zmNinja, help me!

+

I put out the source code, so people who know how to compile are able to +do it themselves. I also hope this will encourage folks to PR changes +(though this has rarely happened). The problem however, is that +dependencies/libraries keep changing. I just don’t have the time to help +debug. If it happens to me, I’ll fix it. If it doesn’t I have very +limited time to remotely debug your setup issues. I’d much appreciate if +you figured it out on your own. Feel free to create an issue after +you’ve tried enough, but I can’t guarantee I’ll spend a lot of time on +source code compile issues.

+
+
+

How to report errors

+
    +
  • I don’t know why something is not working if you don’t provide +sufficient inputs. Start by creating a GitHub +issue and please +fill in the template correctly. If you don’t want to post debug logs +in the issue, email them +to me and mention in the issue you’ve emailed them (you can email by +going to logs screen and tapping on the envelope button (mobile) or +you can download logs (cloud icon, desktop version)
  • +
  • If zmNinja was working, but it stopped after you upgraded ZoneMinder +be sure to mention which version was working and which was not. In +this case, please make sure you have validated the APIs work
  • +
  • Before you create an issue, please make sure you have read the +sections on connection +issues +and +streaming +issues and Step 6 of +validating +APIs.
  • +
  • Its often hard to infer a problem especially when its due to some +unique apache/nginx mungling you might have done but haven’t told me +about it. In such cases, try and give me remote access to your ZM for +a day. Configure a limited user with just one monitor. It will save +hours of frustration (mostly on my side). Thanks
  • +
  • I have released the desktop version free - download it +here. Its +always easier to debug on the desktop version - give it a try. If you +hit Shift+Cmd/Ctrl+D it brings up a debug window - it helps debugging
  • +
  • Always tell me what your ZoneMinder & zmNinja versions are
  • +
  • If your app suddenly stopped working:
      +
    • Send me DEBUG logs of the app
    • +
    • tell me what changed (got to be something. You updated the app, +you upgraded ZM)
    • +
    • What exactly is not working?
    • +
    +
  • +
+
+
+ +
+

Connection/Authentication issues

+
+

General tips

+
    +
  • Disable server redirects like 302 and then try if using the mobile +app
  • +
  • To make sure there are no connection issues, launch your phone +browser and try to reach ZoneMinder. If that doesn’t work, neither +with zmNinja. Many users try to access ZoneMinder from a desktop +browser and/or on the same server it is running and forget the phone +is a different device!
  • +
  • Some phones need the SSL certificate installed in the device
  • +
  • Specific SSL settings can cause issues with Android or iOS
  • +
  • Don’t use funky/special characters in passwords - try changing it to +a complex password without funky characters and try
  • +
  • Use the wizard - I’ve seen many examples of typos when the user +thinks they don’t have a typo
  • +
  • If you are using basic authentication, make sure your credentials are +correct. A good way to test is to first disable basic auth and enable +it after you are sure things work without basic auth.
  • +
  • Please note zmNinja does NOT support Digest authentication. So please +don’t put in digest auth info when zmNinja asks for basic +authentication
  • +
  • Look at your ZM logs and zmNinja logs - they help isolate the problem
  • +
+
+
+

Server Redirects

+

If the Wizard fails to connect in the mobile app but works in the +desktop app, it may be that your server is sending redirects. +Unfortunately, the current mobile HTTP stack doesn’t handle cookies with +redirects well. Till this bug is fixed by the plugin author Wizard won’t +work. Note that if you are running ZM 1.32 or above, you can directly +enter your settings without using the wizard and it will work because it +will try and use the new ZM 1.32 login.json API first.

+
+
+

Self signed certs

+

A lot of people use self-signed certs. I’d strongly recommend you use +LetsEncrypt if you can. It’s free. That +being said zmNinja does support self signed certs. Make sure “Enable +Strict SSL” is off in Developer settings. You will need to restart the +app.

+
+
+

SSL settings

+

If you are getting SSL protocol/handshake errors in your logs, you +very likely have specific ssl settings enabled server side that your +device network stack does not support. Note that just because it works +with the device browser does not mean it will work with zmNinja as +zmNinja does not use the browser HTTP implementation in mobile devices.

+

One use reported that a setting of ssl_ecdh_curve secp384r1 in his +nginx config was resulting in zmNinja Android not being able to connect +to the server. Changing it to +ssl_ecdh_curve secp521r1:secp384r1:prime256v1; worked for him.

+

I’d strongly recommend you remove all special ssl settings except the +certificate and key file locations, make it work and then add the +settings back one by one and see what works/does not work.

+
+
+

Everything works when I use LAN IP, but I get “not authenticated” when I use WAN IP

+

This is likely happening if you use self signed SSL certs. If you are +using self signed certificated, you should make sure the “common name” +matches the hostname (or public IP) of the server you are installing ZM +in. If not, zmNinja’s SSL handshake will fail.

+

If you have used ‘make-ssl-cert’ or a similar tool that automatically +generates the cert for you, its very likely you have certificate that +uses the ‘unix hostname’ of your server. That will not work.

+

Assuming you are usin apache and have SSL enabled, here is how to +regenerate the certs (ubuntu specific, may need to tweak it for your +distro)

+

This will create a self-signed certificate/key pair and store it in +/etc/apache2/ssl (you may have to create that directory, or store it +elsewhere)

+
sudo openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout /etc/apache2/ssl/zoneminder.key -out /etc/apache2/ssl/zoneminder.crt
+
+
+

Next up, edit your apache ssl config (example +/etc/apache2/sites-available/default-ssl.conf) And add/modify the +following lines:

+
SSLCertificateFile /etc/apache2/ssl/zoneminder.crt
+SSLCertificateKeyFile /etc/apache2/ssl/zoneminder.key
+
+
+

restart apache

+
sudo service apache2 restart
+
+
+
+
+
+

Live streaming issues

+
+

Summary of Everything works, but I can’t see live feed

+

Please be diligent in reviewing this list. You’d be surprised how many +times I’ve had users tell me ‘they have checked this list’ only to find +out later they skimmed details.

+
    +
  • Please enable AUTH_HASH_LOGINS as well as set AUTH_RELAY to +“hashed”
  • +
  • You think your APIs are working, but they are really not. If you open +a browser and type in https://yourserver/zm/api/monitors.json and +you see some text on top followed by monitor data, your APIs are +not working. You need to search the forums and figure out how to +get rid of that text.
  • +
  • Your ZoneMinder live view from the web console doesn’t work either. +If this is the case, fix ZoneMinder first. Before you say “web +console works fine”, make sure you are running it from a different +computer from where ZM is running.
  • +
  • The phone/computer running zmNinja does not have access to your ZM +server. For example, many people test the web console on their LAN +but test zmninja on a WAN connection
  • +
  • Always try with the free desktop +version first. +Enable debug view by hitting Ctrl/Cmd+Alt+D and you can see debug +logs in the console view. I can’t emphasize enough how useful this +is.
  • +
  • Your cgi-bin setting in zmNinja is incorrect. Please run the +wizard. There are times when the wizard can fail. In those cases, +open up ZM web console, go to view the monitor and do an “Inspect +Source” in the browser. That will show you the cgi-bin link that you +can use in zmNinja.
  • +
+

For example:

+

In the above case my zmNinja cgi-bin setting is +https://myserver:myport/zm/cgi-bin

+
    +
  • You are using Basic Authentication. See +here
  • +
  • You have ‘multi-server’ configuration enabled and you have done it +wrong. Go to ZM Web Console->Options->Servers - if you see any +entries there and you don’t know what multi-server is, or you don’t +use it, please disable multi-server
  • +
  • When trying to view live images, look at your webserver error logs +- example Apache’s error.log - see any image/jpg errors? That +means you are missing libraries
  • +
  • You have set up a multi-server install of ZM without knowing you did +See here
  • +
  • Look at zmNinja, ZoneMinder and web server error logs at the time of +error - one of them should give more clues. Please send me all the +logs if you ask for help
  • +
  • Read the set of notes below
  • +
+
+
+

General note

+

To debug streaming notes, always try with the free desktop version +first. When trying to stream simultaneously look at the debug logs of +zmNinja (Ctrl/Cmd+Alt+D in desktop build, console and/or network +tab) and your webserver error logs.

+
+
+

I can’t see stream: And I can’t see streams in ZoneMinder webconsole either

+

Check if streaming works in the web interface. If it does not work, +zmNinja won’t work either. Fix ZM first

+
+
+

I can’t see streams: I use basic auth

+

Starting Chrome v59, the browser changed basic credential behavior. The +issue report is +here. +Here is the core issue: zmNinja constructs URLs as +http://user:password@server when you have basic auth (and starting +v1.3 uses the Authorization header). However, since images are +rendered using <img src> there is no option but to put in a +user:password in the URL. Chrome allows this format for direct +requests (such as API calls) but will strip out the user:password +part for embedded requests (like <img src=""> tags inside a page). +So what happens is your APIs work, but you won’t see images. There is a +reason why Chrome does this - its bad to pass on a user :password in a +URL as its clear text (even if you are on HTTPS, as its in the URL). As +I said earlier, The right way to do this is to replace the +user:pass with an Authorization header but there is no way to do +that with images that are rendered with <img src> (There are several +plugins that attempt to do this, but don’t work with streaming MJPEG +images). Bottom line, this is a problem for apps like zmNinja and it +affects you.

+

How this affects you: * If you are using HTTP Basic Authentication

+

Then your images won’t show.

+

Possible Workarounds: * Configure your web server to skip basic +authentication for nph-zms URLs * If you are using a ReverseProxy, +you can insert the authorization header inside the apache proxy * +Disable HTTP Basic auth for now * Downgrade Chrome

+
+

Skipping auth for nph-zms URLs

+

Here is what I’ve used that works with basic-auth. This requires a basic +auth portal login and once logged in allows skipping of image URLs (the +idea comes from Adam Outler - he +uses a different approach using reverse proxies, which I link to later)

+
  # this configuration assumes your server portal is server:port/zm
+  # and cgi-path is /zm/cgi-bin. Please change it to your specific environment
+  # Also requires Apache 2.4 or above
+
+<Location />
+      SetEnvIf Request_URI ^/zm/cgi-bin/ noauth=1
+      SetEnvIf Request_URI ^/zm/index.php noauth=1
+      AuthType Basic
+      AuthName "Auth Required"
+      AuthUserFile "/etc/apache2/.htpasswd"
+      <RequireAny>
+          Require valid-user
+          Require env noauth
+      </RequireAny>
+</Location>
+
+
+
+
+

Authorization with a ReverseProxy

+
+
Simple starter
+

STEP 1: Enable “Append basic auth tokens in images” option in +zmNinja->Developer Settings and save. What this does is that image URLs +will append a “basicauth” token parameter with your basic authentication +credentials. This token can then be parsed by Apache and inserted as a +valid Authorization header. Don’t enable this option if you are not +using HTTPS because the request-URI will be transmitted without +encryption and it will contain your basic auth credentials, encoded in +base64, which is trivial to decode.

+

STEP 2 (Apache): Use mod_rewrite and mod_header to convert the +token into an authorization in your Apache config. Add this to the +relevant section (VirtualHost or others)

+
RewriteEngine on
+RewriteCond %{QUERY_STRING} (?:^|&)basicauth=([^&]+)
+RewriteRule (.*) - [E=QS_TOKEN:%1]
+RequestHeader set Authorization "Basic %{QS_TOKEN}e" env=QS_TOKEN
+
+
+

STEP 2 (Nginx): Thanks to user [@ysammy](https://github.com/ysammy)

+
location /zm/cgi-bin/nph-zms {
+   proxy_pass http://<IP>:<PORT>/zm/cgi-bin/nph-zms;
+   proxy_set_header Authorization "Basic $arg_basicauth";
+ }
+
+
+
+
+
A more complete and more secure option
+

User Adam Outler has contributed the +following process: see +HERE. +Adam also has this to say about why proxies should be recommended for +HTTPS enabled ZoneMinder instances:

+
+
A proxy server should be on the list of recommendations for +Zoneminder. HTTPS requires processing to encrypt and decrypt. This +takes processor cycles away from Zoneminder’s recording. Since HTTPS +is now basically a requirement, there should be a page dedicated to +proxy, https, auth, and their nuances. I just picked up 2-4K cameras +and processing suddenly became an issue :).
+
+
+
+
+

I can’t see streams: Multi-server is enabled

+

The chances are very high that you have enabled ZoneMinder’s +Multi-Server +option and you entered something like localhost in server settings. +DON’T. You can’t enter localhost. If you are not using multi-server, +remove any server settings. If you are using multi-server, you need to +put in a valid server IP or hostname, not localhost. BTW, if you did +put in localhost you will note that your ZM web console also won’t +work if you try to launch your browser on a different machine from where +ZM is running.

+
+
+

I can’t see streams: you have cgi-bin issues

+
    +
  • Try to use the wizard. If it fails,
  • +
  • Go to zmNinja settings and fix your cgi-bin path. the automatic path +that is filled in won’t work. Here is a hint, go to +zoneminder->options->paths and check the value of the cgi-bin path - +your zmNinja path will be “base path of your server” + cgi-bin path.
  • +
+
+
+

zmNinja montage does not seem smooth - feeds seem a little delayed compared to ZM console

+

zmNinja does not use nph-zms to display live feeds in montage. This +is because Chrome only allows a maximum of 6 connections per (sub)domain +which means you can’t have more than 6 active TCP connections to a +single domain at the same time. This also means that you can’t display +more than 6 monitors together. To avoid this, I use the zoneminder +“snapshot” feature that displays a still from the monitor and then +refresh it every X seconds (by default X=2 unless you switch to low +bandwidth mode. You can change X in developer settings)

+

That being said, starting v1.3.0 of zmNinja onwards, I now support +multi-port (available in ZM 1.32 onwards) that lets you stream as many +monitors as you need. Read +this +post for more details.

+
+
+ +
+

Other misc. issues

+
+

I suddently see an error message saying I need to enable ZM_AUTH_HASH_LOGINS. This wasn’t there before

+

Yes. Starting 1.3.027 onwards, due to a new UI web rendering engine that +enforces CORS, I’ve had to change my strategy on how network calls are +made. Briefly, on mobile devices, I now use a native HTTP stack and not +the browser HTTP stack. However, images are rendered using the browser +HTTP stack which causes this message. In short, you need to enable it, +and restart ZM.

+
+
+

zmNinja 1.2.515 and beyond says “Need API Upgrade” for the 24hr review feature. What does that mean?

+

You need to update an API file in Zoneminder server. ZoneMinder folks +haven’t yet (as of Apr 2018) made a release with that API change. To do +it manually,simply replace your EventsController.php (typically in +/usr/share/zoneminder/www/api/app/Controller) with this +one.

+
+
+

I upgraded ZoneMinder to 1.30.2 or above and zmNinja stopped working!

+

ZoneMinder changed API packaging with ZM 1.30.2 and above. You will have +to read your distro notes on how to properly update. Read +this +thread. Before you think zmNinja is the problem, make sure your APIs +are +working. +Summary of reasons why zmNinja might have stopped working: - You did not +check if your APIs are working after the upgrade - You did not upgrade +properly (just updating the ZM package without following distro +instructions with ZM is not sufficient) - You are missing some key +CakePHP modules, likely php5-apc which would have been installed if +you read all the package instructions. You can install it manually - You +might need to restart your system after upgrading (properly)

+
+
+

I am running ZM on a custom port. zmNinja is unable to reach my ZoneMinder server but I tried on a regular browser (Firefox/Opera/IE) and it I can reach it

+

zmNinja on Android and Desktops uses an embedded chrome browser. Chrome +marks certain ports as “unsafe” and won’t allow connections to go out. +The list of ports to avoid are +here

+
+
+

The Montage screen is causing issues with my ZM server - I get connection timeout issues or MySQL connection problems

+
    +
  • zmNinja uses a different approach to display montage than ZoneMinder. +In zmNinja montage screen, I display a snapshot of each monitor and +refresh it every few seconds. This results in many short TCP +connections constantly being opened and closed. The reason I have to +do this is Chrome only allows 6 connections to a domain, which means +if I don’t keep terminating TCP connections, I won’t be able to show +more than 6 monitors. Each time I open a new TCP connection for a +snapshot, the ZM backend invokes mySQL to authenticate the request. +You will need to increase mySQL max_connections in my.cnf if +you are facing time_wait/timeout issues.
  • +
+
+
+

The app works great - except it doesn’t work on ONE Android phone - works in others!

+

zmNinja uses an embedded chrome browser in its app. If you have safe +browsing enabled, it may affect zmNinja. However, if you are facing this +problem, its likely you can’t access ZM from a mobile web browser +either. The problem that might be occurring is that zmNinja is trying to +reach your ZM server and your settings prohibit it from reaching ZM, so +it fails. See +this +discussion

+
+
+

APIs are not working ! ZM console works fine.

+

Read +this

+
+
+

I’m using mocord/record and I don’t see events without alarms

+

Tap on the “…” menu option and toggle “Show all events”. By default, +it shows events with at least one alarm frame

+
+
+

Taking snapshots or downloading videos don’t work in Android

+

If you are unable to download/save, look at your logs. If you see +something like +"exception":"java.security.cert.CertPathValidatorException: Trust anchor for certification path not found." +, chances are you are using self-signed certs. You need to install the +certificate on your phone. Installing is as easy as emailing yourself +the “.crt” file and tapping on it from your device to install it. In +general, both Apple and Google have been incrementally tightening rules +for self signed certificates - they generally discourage usage of such +certs and over time both Chrome (Android) and WkWebView (iOS) have added +new restrictions/checks which affects usage.

+
+
+

Pan/Tilt/Zoom doesn’t work

+

Tilt/Zoom/Presets support has not been added. But for this to work, PTZ +needs to work in ZM first. Once it works in ZM, try it in ZMNinja. Also +note that you may need to disable CSRF in your Options in ZoneMinder - +it seems to cause all sorts of issues.

+
+
+
+

What is this Event Server?

+

The Event Server is a contribution I made to ZoneMinder that adds a +daemon to the existing list. It listens for new events using shared +memory (aka very efficient) and then sends notifications of events to +listeners (you can write your own app that listen as well as use +zmNinja). This is a chapter on its own, and I have a dedicated +page/project for this +here. I’d encourage +you to install and use it - its very nice.

+
+

It looks like you allow me to modify the frequency of push notifications. Very cool - will it send me all events that I missed if I make the frequency of a monitor event push to say, 600 seconds?

+

Nope. It only sends the latest events. What it does is before sending +push notifications, it checks if the last time a push was sent for this +monitor is < the time you specified. If it is, it does not send. That’s +all.

+
+
+
+

Is zmNinja free?

+

The source code is free, grab it, compile it, use it. The desktop ports +are free as of today. I may charge for it some day. The mobile ports are +in Appstore/Playstore for a fee.

+
+
+

Who are the developers behind this?

+

Me.

+
+
+

The code needs improvement

+

You are being nice. I know the code is terrible. I’m not a coder by +profession. This was my first project to learn how to write a mobile +app. So the app evolved from no knowledge to some knowledge. It +comprises of terrible to passable to reasonable code. There is a reason +why my profile says what it says. +But hey, if you can improve it, please PR!

+
+
+

Is zmNinja an official ZoneMinder product?

+

No. But the ZM developers are amazing people who have been very helpful.

+
+
+

I want to donate money

+

You could either donate to to +Zoneminder or donate +to zmNinja. Donations +to ZoneMinder don’t contribute to zmNinja, but the ZoneMinder devs will +benefit from it, which is fine too.

+
+
+

How does zmNinja use my personal data?

+

Please read +this

+
+
+

I want to donate time/expertise/code

+

Great. Make sure you read the +license +, read the contributing +guidelines +and if it works for you, happy to see what you’d like to do.

+
+
+ + +
+
+ +
+
+ + +
+
+ +
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/docs/_build/html/guides/contributing-language.html b/docs/_build/html/guides/contributing-language.html new file mode 100644 index 00000000..bc8eff91 --- /dev/null +++ b/docs/_build/html/guides/contributing-language.html @@ -0,0 +1,289 @@ + + + + + + + + + + + Contributing a new language — zmNinja documentation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + +
+ + + + + + +
+
+ + + + + + + + + + + + + + + + +
+ + + + +
+
+
+
+ +
+

Contributing a new language

+

If you are familiar with using git, I’d prefer if you follow the Pull +Request process +here.

+
+

Adding a new language

+
    +
  • Languages translations are available +here
  • +
  • To contribute a new language, add a new locale-xx.json (where +xx is your language code).
  • +
  • Ideally, you should also provide a language translation for the +zmNinja help file inside +lang/help
  • +
+

The best way is to simply look at an existing language translation and +follow the same model for yours. If any language translation keywords +are missed, it will fallback to English.

+
+
+

Main Language file

+
    +
  • Make sure there is no comma after the last element
  • +
  • Comments are not allowed
  • +
  • Make sure you don’t add ellipsis “…” anywhere, they are added to +messages in code when needed
  • +
  • After you complete the translation file, do the following:
  • +
+

(replace -it with the language you are working on)

+

python ./checklang.py -f locale-it.json -b

+

This validates your JSON file, makes sure all keys are in sync with -en +and if valid, creates pretty-locale-it.json. If you are sure it looks +good,

+

python ./checklang.py -f locale-it.json -b -o

+

This validates your JSON file,makes sure all keys are in sync with -en +and if valid, OVERWRITES your local file with a pretty formatted +version, which is what you should PR

+
+
+

Translating Help language file

+
    +
  • Located inside lang/help
  • +
  • Please be careful not to mess up the html tags, please only focus on +text translation
  • +
+
+
+

How to recognize a new language:

+

(This is only for zmNinja developers. Not relevant for language +translators) * Modify languages array in NVR.js (look for “var +languages”) * register language glob code in app.js - make sure its +added to array list and mapping (look for registerAvailableLanguageKeys)

+
+
+ + +
+
+ +
+
+ + +
+
+ +
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/docs/_build/html/guides/desktop.html b/docs/_build/html/guides/desktop.html new file mode 100644 index 00000000..7a049bd8 --- /dev/null +++ b/docs/_build/html/guides/desktop.html @@ -0,0 +1,333 @@ + + + + + + + + + + + Desktop port tips — zmNinja documentation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + +
+ + + + + + +
+
+ + + + + + + + + + + + + + + + +
+ + + + +
+
+
+
+ +
+

Desktop port tips

+
+

Scope

+

This page is dedicated to the Desktop version of zmNinja and tips & +tricks

+
+
+

Command Line parameters

+

The following command line parameters are supported:

+
--path=<dir>  - starts zmNinja and stores user profile information to that directory.
+                This allows you to switch between different user settings.
+
+--fs          - starts zmNinja in full screen mode
+
+
+
+
+

Multiple instances

+

It is actually possible to launch multiple instances of the same desktop +app from command line. This allows you to watch different servers at the +same time as well as use multiple monitors. I strongly recommend you use +unique --path arguments with each instance because otherwise one +instance will conflict with another.

+

So lets say you want to run 2 copies of zmNinja at the same time:

+
mkdir -p /path/to/instance1
+mkdir -p /path/to/instance2
+
+
+

And then:

+
# for linux
+zmninjapro-1.3.22-x86_64.AppImage  --path=/path/to/instance1
+zmninjapro-1.3.22-x86_64.AppImage  --path=/path/to/instance2
+
+#for OSX. Note the -n is critical to launch a new instance
+open -n ./zmninjapro.app --args --path=/path/to/instance1 &
+open -n ./zmninjapro.app --args --path=/path/to/instance2 &
+
+
+
+
+

Hotkeys

+

The following hotkeys are supported while the app is running:

+
[Cmd/Ctrl] + L         -> Lock app (if pin code is being used)
+[Cmd/Ctrl] + Shift + F -> toggle between full screen and windowed mode
+[Cmd/Ctrl] + Shift + D -> opens the debug window.
+                        Super useful to see what is going on,
+                        especially when things don't work
+
+
+
+
+

Keyboard bindings

+

Live Monitor View (single view, not montage):

+
Arrow Left  -> move to previous monitor
+Arrow Right -> move to next monitor
+Esc         -> remove live view
+P           -> toggle PTZ
+
+
+

PTZ Operations to move (PTZ should be toggled to on first):

+
Q W E  -> UpLeft, Up, UpRight
+A S D  -> Left, Home,Right
+Z X C  -> DownLeft, Down, DownRight
+
+
+

Event Footage View:

+
Arrow Left  -> move to previous event
+Arrow Right -> move to next event
+Enter       -> play the event if in snapshot mode (shows red play button)
+Esc         -> remove event footage view
+
+
+

Timeline:

+
Arrow Up    -> Zoom In
+Arrow Down  -> Zoom Out
+Arrow Left  -> Pan Left
+Arrow Right -> Pan Right
+Esc         -> Fit timeline back to view (reset)
+A           -> Previous Day
+D           -> Next Day
+
+
+
+
+

Desktop data storage locations

+

User data is typically stored in the following locations: * +%APPDATA%/zmNinjaDesktop for Windows, * +$XDG_CONFIG_HOME/zmNinjaDesktop or ~/.config/zmNinjaDesktop for +Linux, and * ~/Library/Application Support/zmNinjaDesktop for OSX

+

To completely remove the app, you may want to delete both the app +bundle/binary and these locations as applicable on your system

+
+
+ + +
+
+ +
+
+ + +
+
+ +
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/docs/_build/html/guides/source.html b/docs/_build/html/guides/source.html new file mode 100644 index 00000000..ce53f606 --- /dev/null +++ b/docs/_build/html/guides/source.html @@ -0,0 +1,468 @@ + + + + + + + + + + + Building from Source — zmNinja documentation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + +
+ + + + + + +
+
+ + + + + + + + + + + + + + + + +
+ + + + +
+
+
+
+ +
+

Building from Source

+

NOTE If you want to run it on your desktop, you can directly +download desktop binaries +here +and if you want it for Android/iOS you can get from the play/appstore. +This is only for those who want to run from source.

+
+
Note: If you are building from source, you are mostly on your own. I +have very limited time to debug environment differences/package +differences between what I have and what you may have. I’m not a +nodejs/grunt etc expert and stuff seems to change all the time.
+

Version note: The code is compiled using the following versions of +tools. If you are using newer versions of ionic the code may not +compile - I don’t have the time to upgrade yet. Finally, if you choose +to go the source route, I expect you to spend a lot of time yourself +debugging first before you create an issue. Even if you do create an +issue, I have very limited bandwidth to debug source compilation issues +for you. Thanks.

+

Output of ionic info

+
Ionic:
+
+   ionic (Ionic CLI) : 4.5.0 (/usr/local/lib/node_modules/ionic)
+   Ionic Framework   : ionic1 1.3.5
+   @ionic/v1-toolkit : 1.0.19
+
+Cordova:
+
+   cordova (Cordova CLI) : 8.1.2 (cordova-lib@8.1.1)
+   Cordova Platforms     : android 7.1.4, ios 5.0.0
+   Cordova Plugins       : cordova-plugin-ionic-keyboard 2.1.3, cordova-plugin-ionic-webview 2.2.0,
+(and 30 other plugins)
+
+System:
+
+   Android SDK Tools : 26.1.1 (/Users/pp/Library/Android/sdk/)
+   ios-deploy        : 2.0.0
+   ios-sim           : 7.0.0
+   NodeJS            : v8.11.2 (/usr/local/bin/node)
+   npm               : 5.6.0
+   OS                : macOS Mojave
+   Xcode             : Xcode 10.1 Build version 10B61
+
+
+
+

Install Dependencies - needed for all platforms

+
+

Install NodeJS

+

Install NodeJS from here. As of +Dec 2018, I’m using Node v8.11.2. I use +n to manage node versions and switch +between them.

+
+
+

Install cordova, ionic, and bower

+
npm install -g cordova ionic bower
+npm install @ionic/v1-toolkit --save-dev
+
+
+

And some more:

+
npm install -g gulp
+npm install node-sass
+npm install async
+npm install jshint
+
+
+

(Note you may need to do sudo depending on how your system is set +up. It’s better you +don’t, +but if you must, well, you must)

+

If you get a newer version, you should adjust your cordova version to +the mentioned version above in order to be able to successfully compile +zmNinja. To change the version you can follow these instructions: +change cordova +version

+
+
+
+

Download zmNinja

+
git clone --depth 1 https://github.com/pliablepixels/zmNinja.git
+
+
+
+
+

Configure build configure zmNinja and get all required plugins

+
cd zmNinja
+npm install
+bower install
+ionic cordova platform add android (or ios)
+cordova prepare
+
+
+
+
+

Making an iOS build

+

Note: You need to be doing this on a mac, with Xcode and the SDK +installed. You also need to have your developer certificates/etc. (I am +not going to detail this out - there are many internet resources on +this)

+

There are a few steps you need to take to get the iOS build working for +the first time. If you don’t do this, you may get a compilation error +that says ld: library not found for -lGoogleToolboxForMac

+
cd platforms/ios
+pod install
+
+
+

This does not produce an iOS ready ipa. What you need to do then is to +open platforms/ios/zmNinja.xcworkspace in Xcode, and run.

+

To compile a debug build for iOS from command line, from zmNinja project +root: First edit ./build-auto.json and change the +developmentTeam id to yours. Then:

+
./build_ios.sh
+
+
+

To compile using XCode, open platforms/ios/zmNinja.xcworkspace - You +need to use “Legacy Build” system if you are on XCode 10+. You can +change this in XCode File->Workspace Settings and then build usual. +Also switch to the Capabilities tab and make sure “Remote Notifications” +is on in Background Modes and in iCloud section, Key-Value storage is +enabled. If you see a “Fix issue” there, clicking on that button +resolves everything.

+
+
+

Making an Android build

+

Note that you need the Android +SDK installed and +configured properly for this to work.

+

From the zmNinja project root:

+
./build_android.sh --debug (or --release)
+
+
+

If this complains of missing SDKs, you need to install the SDK version +it requests This should produce an APK file. To install it on your phone +over adb, you’d do something like

+
adb install -r debug_files/android-debug.apk #if you did --debug
+or,
+adb install -r release_files/zmNinja.apk #if you did --release
+
+
+
+
+

Making a desktop build

+

I use electron to build the desktop app.

+
+

For versions 1.3.018 and beyond

+

I’ve migrated to using +electron-builder +to automate the build process better.

+
+

Make sure you have all the dependencies

+

Typically, just running

+
npm install
+bower install
+
+
+

Should have installed everything. Validate by checking you have +electron installed by invoking it on the command line

+

You now have the following options:

+
npm run dist-all # builds linux, mac and windows packages
+npm run dist-mac # only builds mac packages
+npm run dist-lin # only builds linux packages (32bit, 64bit, arm)
+npm run dist-win # only builds win packages (32bit, 64bit)
+
+
+

Your packages will be created in the dist folder

+
+
+
+

Set up desktop dependencies

+
npm install -g electron
+npm install -g asar
+
+
+

Make sure electron is installed. You should be able to do a +which electron

+

Also make sure unzip and wget tools are installed in your +system.

+
+
+

First time setup

+

If this is the first time you are building a desktop version, you need +to download electron images for various platforms. There is a helper +script called prepare_desktop.sh that you can run. This creates a +directory called desktop inside your zmNinja directory. It currently +downloads all supported platforms.

+
./prepare_desktop.sh
+
+
+

This will download a bunch of files. If completed successfully, you can +proceed to the next step.

+
+
+

Make the desktop build

+

Once you are done with prepare_desktop.sh, you can do a +./make_desktop.sh. This will actually build images for all +platforms.

+
+
+

Running desktop builds

+

cd into the desktop directory and run whichever port you want

+
+
+

Subsequent builds

+

You need to ./make_desktop.sh each time you make changes.

+
+
+
+

Troubleshooting

+

Lots of things can go wrong. * Please make sure you don’t post issues +about why your own build is not working - please figure it out * Look +carefully at error messages

+
+
+ + +
+
+ +
+
+ + +
+
+ +
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/docs/_build/html/guides/validating-api.html b/docs/_build/html/guides/validating-api.html new file mode 100644 index 00000000..fd0eb148 --- /dev/null +++ b/docs/_build/html/guides/validating-api.html @@ -0,0 +1,331 @@ + + + + + + + + + + + Validating APIs — zmNinja documentation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + +
+ + + + + + +
+
+ + + + + + + + + + + + + + + + +
+ + + + +
+
+
+
+ +
+

Validating APIs

+
+

Please make sure you go through this before you wonder why zmNinja is not working.

+
+
Assumption: Your ZM server is accessible at http://server/zm -> +replace this with your actual path
+
+

Make sure ZM APIs are working:

+

(Note - nginx users, if you are facing API issues, please see if this +page +helps)

+
    +
  • Step 1: Open up a browser

    +
  • +
  • Step 2: Log into ZM

    +
  • +
  • Step 3: Open another tab in the same browser (IMPORTANT: Has to +be from the same browser you logged into ZM)

    +
  • +
  • Step 4: Type in http://server/zm/api/host/getVersion.json –> you +should see a response like:

    +
    {
    +"version": "1.30.0",
    +"apiversion": "1.0"
    +}
    +
    +
    +

    version/apiversion may be different. If you don’t see such a +response, your APIs are not working

    +
  • +
  • Step 5:make sure you can see monitors and events:

    +
  • +
+

Type in http://server/zm/api/monitors.json –> you should see a +response like:

+
{
+    "monitors": [
+        {
+            "Monitor": {
+                /*lots of additional details*/
+            },
+            /*more monitor objects if you have more than one*/
+        }]
+}
+
+
+
    +
  • Step 6: (If you find your APIs show ok, but zmNinja has issues)
  • +
  • Open a browser, log into ZM
  • +
  • Open a new tab, enter http://server/zm/api/host/getVersion.json
  • +
  • Now, right click and do a View Source in your browser (different +browsers may have different names for it). This brings up a full +source code view of the page. Do you ONLY see the JSON output or do +you see gobs of HTML on top like <pre class= and lots of cake +related messages? If you do, you need to fix it.
  • +
+

if you find the page empty, your APIs/permissions have a problem. Please +post in the ZM forums (please DON’T contact me first as its not a +zmNinja bug)

+

Type in http://server/zm/api/events.json –> you should see a +response like: (this list may be an empty set if you don’t have events +but you will still see the {"events":[]} text - if you find the page +empty, your APIs have a problem. Please post in the ZM forums (please +DON’T contact me first, as its not a zmNinja bug)

+
{"events":[{"Event":{ /* many more details */ }}]}
+
+
+

Top reasons why monitors and events API returns blank while getVersion +works: * You don’t have monitor/event view permissions allocated to +the user * You have an invalid camera definition (happens sometimes +when you remove and re-add cameras) * If you are using non UTF8 +characters in your monitor names/zone names this can cause issues. Edit +/usr/share/zoneminder/www/api/app/Config/database.php (assuming ZM +is in /usr/share) and make sure 'encoding' => 'utf8' is +uncommented (remove //) around line 74. I’ve submitted a +patch +but till its merged, you might have to do it manually.

+
+
+
+

zmNinja API notes:

+
    +
  • Please make sure the user credentials you use has:
  • +
  • view or edit access to monitors
  • +
  • view or edit access to streams
  • +
  • view or edit access to system
  • +
  • If you are accessing zmNinja remotely, make sure you first access ZM +remotely from your desktop browser, ensure it works and then use the +same DNS/IP for zmNinja
  • +
+
+
+ + +
+
+ +
+
+ + +
+
+ +
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/docs/_build/html/index.html b/docs/_build/html/index.html index e5eb4c3b..f58fdcbe 100644 --- a/docs/_build/html/index.html +++ b/docs/_build/html/index.html @@ -36,7 +36,7 @@ href="genindex.html"/> - + @@ -86,11 +86,11 @@ @@ -159,15 +159,15 @@
-
zmNinja FAQ
+
zmNinja FAQ
A detailed FAQ for zmNinja, including common issues related to installation, streaming and troubleshooting
-
Validating APIs
+
Validating APIs
How to make sure your ZoneMinder installation has working/usable APIs
-
Desktop port tips
+
Desktop port tips
Various tips/tricks/shortcuts for the desktop port of zmNinja
-
Contributing a new language
+
Contributing a new language
Would you like to see zmNinja in your own language? It’s easy. Here’s how to go about contributing a new language for zmNinja
-
Building from Source
+
Building from Source
For the brave souls who want to build from source, your questions answered
@@ -182,7 +182,7 @@ diff --git a/docs/_build/html/objects.inv b/docs/_build/html/objects.inv index 2792db29..808867fb 100644 Binary files a/docs/_build/html/objects.inv and b/docs/_build/html/objects.inv differ diff --git a/docs/_build/html/search.html b/docs/_build/html/search.html index 9b7cef15..6ee2d46c 100644 --- a/docs/_build/html/search.html +++ b/docs/_build/html/search.html @@ -85,11 +85,11 @@ diff --git a/docs/_build/html/searchindex.js b/docs/_build/html/searchindex.js index fb9e4399..585ec009 100644 --- a/docs/_build/html/searchindex.js +++ b/docs/_build/html/searchindex.js @@ -1 +1 @@ -Search.setIndex({docnames:["FAQ","contributing-language","desktop","index","source","validating-api"],envversion:53,filenames:["FAQ.rst","contributing-language.rst","desktop.rst","index.rst","source.rst","validating-api.rst"],objects:{},objnames:{},objtypes:{},terms:{"10b61":4,"32bit":4,"64bit":4,"case":0,"class":5,"default":0,"final":4,"import":5,"long":0,"new":[0,2,3,5],"public":0,"return":5,"short":0,"super":2,"switch":[0,2,4],"var":1,"while":[2,5],And:[2,4],But:0,DNS:5,For:[0,3],Has:5,IOS:0,Its:0,NOT:0,Not:1,One:0,That:0,The:[1,2,4],Then:[0,4],There:[0,4],Use:0,Yes:0,abl:[0,4],about:[0,3,4],abov:4,access:[0,5],act:0,activ:0,actual:[2,4,5],adam:0,adb:[0,4],add:[0,1,4,5],added:[0,1],addit:5,adjust:4,affect:0,after:[0,1],again:0,ago:0,aka:0,all:1,alloc:5,allow:[1,2],also:[0,1,4],alt:0,alwai:0,amaz:0,anchor:0,ani:[0,1],anoth:[2,5],answer:[0,3],anymor:0,anytim:0,anywher:1,apach:0,apache2:0,apc:0,api:3,apivers:5,apk:4,app:[1,2,4,5],appdata:2,append:0,appimag:2,appl:0,applic:[0,2],appreci:0,approach:0,appstor:[0,4],apr:0,arg:2,arg_basicauth:0,argument:2,arm:4,around:[0,5],arrai:1,arrow:2,asar:4,assum:[0,5],assumpt:5,async:4,attempt:0,auth_hash_login:0,auth_relai:0,authnam:0,authtyp:0,authuserfil:0,auto:4,autom:4,automat:0,avail:[0,1],avoid:0,awai:0,back:[0,2],backend:0,background:4,backup:0,bad:0,bandwidth:[0,4],base64:0,base:0,basicauth:0,becam:0,becaus:[0,2],been:0,befor:4,behavior:0,being:[0,2],below:0,benefit:0,best:[0,1],better:4,between:[2,4],big:0,bin:4,binari:[0,2,4],blank:5,both:[0,2],bottom:0,bought:0,brave:3,breath:0,briefli:0,bring:[0,5],broken:0,brows:0,browser:5,btw:0,bug:[0,5],build:[0,3],build_android:4,build_io:4,builder:4,bunch:4,bundl:2,button:[0,2,4],cake:5,cakephp:0,call:[0,4],camera:[0,5],can:[4,5],capabl:4,care:1,carefulli:4,caus:5,certain:0,certif:[0,4],certpathvalidatorexcept:0,chanc:0,chang:[0,4],chapter:0,charact:[0,5],charg:0,check:[0,4],checklang:1,choos:[0,4],chose:0,chrome:0,clean:0,clearli:0,cli:4,click:[4,5],clone:4,close:0,cloud:0,clue:0,cmd:[0,2],cnf:0,code:[1,2,4,5],coder:0,com:[0,4],come:0,comma:1,command:4,comment:1,common:[0,3],compil:4,complain:4,complet:[1,2,4],complex:0,compris:0,comput:0,conf:0,config:[0,2,5],configur:0,conflict:2,constantli:0,construct:0,contact:[0,5],contain:0,contribut:[0,3],control:0,convert:0,cooki:0,copi:2,cor:0,core:0,correct:0,correctli:0,could:0,creat:[0,1,4],credenti:[0,5],critic:2,crt:0,csrf:0,ctrl:[0,2],current:[0,4],cycl:0,daemon:0,dai:[0,2],databas:5,debug:[0,2,4],debug_fil:4,dec:4,decod:0,decrypt:0,dedic:[0,2],definit:5,delet:2,depend:0,deploi:4,deprec:0,depth:4,desktop:[0,3,5],destkop:0,detail:[0,3,4,5],dev:[0,4],develop:[1,4],developmentteam:4,devic:0,did:[0,4],differ:[0,2,4,5],digest:0,dilig:0,dir:2,direct:0,directli:[0,4],directori:[0,2,4],disabl:0,discourag:0,discuss:0,displai:0,dist:4,distro:0,doe:4,doing:4,domain:0,don:[1,2,4,5],done:[0,4],down:2,downgrad:0,downleft:2,downright:2,drive:0,due:0,each:[0,2,4],earlier:0,easi:[0,3],easier:0,edit:[0,4,5],effici:0,electron:4,element:1,ellipsi:1,elsewher:0,email:0,embed:0,emphas:0,empti:5,enabl:4,encod:[0,5],encourag:0,encrypt:0,end:0,enforc:0,engin:0,english:1,enough:0,ensur:[0,5],enter:[2,5],entitl:0,entri:0,env:0,envelop:0,environ:[0,4],error:4,esc:2,especi:[0,2],etc:[0,4],even:4,event:[2,5],eventscontrol:0,everi:0,everyth:4,evolv:0,exactli:0,exampl:0,exist:[0,1],expect:4,expert:4,extract:0,face:[0,5],facil:0,fail:0,fair:0,fallback:1,familiar:1,faq:3,fee:0,feel:0,few:[0,4],ffmpeg:0,figur:[0,4],file:[0,4],fill:0,find:[0,5],first:[0,2,5],fit:2,fix:[4,5],focu:1,folder:4,folk:0,follow:[0,1,2,4],footag:2,forc:0,forget:0,format:[0,1],forum:[0,5],found:[0,4],framework:4,from:[0,2,3,5],frustrat:0,full:[0,2,5],funki:0,getvers:5,git:[1,4],github:[0,4],give:0,glob:1,gob:5,going:[0,2,4],good:[0,1],googl:0,got:0,grab:0,grunt:4,guarante:0,guidelin:0,gulp:4,had:0,handl:0,handshak:0,happen:[0,5],happi:0,hard:0,has:[0,3,5],hash:0,have:5,haven:0,header:0,hei:0,help:5,helper:4,here:[0,1,3,4],high:0,him:0,hint:0,his:0,hit:0,home:2,hope:0,host:5,hostnam:0,hour:0,how:[3,4],howev:0,html:[1,5],htpasswd:0,http:[0,4,5],icloud:[0,4],icon:0,ideal:1,imag:4,img:0,implement:0,includ:3,incorrect:0,increas:0,increment:0,index:0,infer:0,info:[0,4],inform:2,input:0,insert:0,insid:[0,1,4],inspect:0,instal:[0,3],instanc:0,instance1:2,instance2:2,instruct:[0,4],interfac:0,internet:4,introduc:0,invalid:5,invok:[0,4],ionic1:4,ios:4,ipa:4,isol:0,issu:[3,4,5],its:[0,1,5],java:0,jpeg:0,jpg:0,jshint:4,json:[0,1,4,5],just:[0,4],kei:[0,1,4],keyboard:4,keyout:0,keyword:1,know:0,knowledg:0,lang:1,languag:3,last:[0,1],later:0,latest:0,launch:[0,2],learn:0,least:0,left:2,legaci:4,legitim:0,less:0,let:[0,2],letsencrypt:0,lgoogletoolboxformac:4,lib:4,librari:[0,2,4],licens:0,life:0,like:[3,4,5],limit:[0,4],lin:4,line:[0,4,5],link:0,linux:[2,4],list:[0,1,5],listen:0,live:2,local:[1,4],localhost:0,locat:[0,1],lock:2,log:[0,5],login:0,look:[1,4],lot:[0,4,5],low:0,mac:4,machin:0,maco:4,made:0,mai:[0,2,4,5],maintain:0,make:[1,3],make_desktop:4,manag:[0,4],mani:[0,4,5],manual:[0,5],map:1,mark:0,match:0,max_connect:0,maximum:0,memori:0,mention:[0,4],menu:0,merg:5,mess:1,messag:[1,4,5],might:[0,5],migrat:4,miss:[1,4],mjpeg:0,mkdir:2,mobil:0,mod_head:0,mod_rewrit:0,mode:[0,2,4],model:1,modifi:1,modul:0,mojav:4,monitor:[2,5],montag:2,more:[4,5],mostli:[0,4],move:[0,2],much:0,mungl:0,must:4,myport:0,myserv:0,name:[0,5],nativ:0,need:[1,5],neither:0,network:0,newer:4,newkei:0,next:[0,2,4],nginx:[0,5],nice:0,noauth:0,node:[0,4],node_modul:4,non:[0,5],nope:0,nor:0,note:[2,4],notif:4,now:[0,4,5],npm:4,nuanc:0,nvr:1,object:5,occur:0,off:0,offer:0,often:0,old:0,onc:[0,4],one:[0,2,5],onli:[1,4,5],onward:0,open:[0,2,4,5],openssl:0,oper:2,opt_auth:0,option:4,order:[0,4],osx:2,other:4,otherwis:2,out:[0,2,4],outler:0,output:[4,5],over:[0,4],overwrit:1,own:[3,4],packag:[0,4],page:[0,2,5],pair:0,pan:2,paramet:0,pars:0,part:0,pass:0,passabl:0,passthru:0,password:0,patch:5,path:[0,2,5],peopl:0,per:0,perfectli:0,permiss:5,phone:4,php5:0,php:[0,5],pick:0,pin:2,plai:[0,2,4],playback:0,playstor:0,pleas:[0,1,4],pliablepixel:4,plug:0,plugin:0,pod:4,polici:0,port:[3,4],portal:0,possibl:[0,2],post:[0,4,5],pre:5,prefer:1,prepar:4,prepare_desktop:4,preset:0,pretti:1,previou:[0,2],prime256v1:0,problem:5,proce:4,process:[0,1,4],processor:0,produc:4,profess:0,profil:2,program:0,prohibit:0,project:[0,4],properli:[0,4],protocol:0,provid:[0,1],proxi:0,proxy_pass:0,proxy_set_head:0,ptz:[0,2],pull:1,purchas:0,put:0,python:1,qs_token:0,qualifi:0,query_str:0,question:[0,3],rare:0,readi:4,realli:0,realtim:0,reason:[0,5],recommend:[0,2],red:2,refresh:0,regener:0,regist:1,registeravailablelanguagekei:1,relat:[3,5],releas:[0,4],release_fil:4,relev:[0,1],rememb:0,remot:[0,4,5],remov:[0,2,5],render:0,replac:[0,1,5],req:0,request:[0,1,4],request_uri:0,requesthead:0,requir:0,requireani:0,reset:2,resolut:0,resolv:4,resourc:4,respons:5,restart:0,restor:0,restrict:0,result:0,revers:0,rewritecond:0,rewriteengin:0,rewriterul:0,rid:0,right:[0,2,5],root:[0,4],rout:4,rsa:0,rude:0,rule:0,run:2,safe:0,sai:[2,4],said:0,same:[0,1,2,5],sass:4,save:4,savvi:0,scale:0,schedul:0,screen:2,script:4,sdk:4,search:0,secp384r1:0,secp521r1:0,section:[0,4],see:[2,3,4,5],seem:4,seen:0,sent:0,server:[2,5],servic:0,set:[2,5],setenvif:0,setup:0,sever:0,share:[0,5],shift:[0,2],shortcut:3,should:[1,2,4,5],show:[2,5],side:0,sigh:0,sim:4,similar:0,simpler:0,simpli:[0,1],simultan:0,sinc:0,singl:[0,2],site:0,skim:0,snapshot:2,some:4,someth:[0,4],sometim:[0,5],sorri:0,sort:0,soul:3,sourc:[0,3,5],space:0,special:0,specif:0,specifi:0,spend:[0,4],spent:0,src:0,ssl_ecdh_curv:0,sslcertificatefil:0,sslcertificatekeyfil:0,stack:0,start:[0,2],step:[0,4,5],still:[0,5],storag:4,store:[0,2],strategi:0,stream:[3,5],strict:0,strip:0,strongli:[0,2],stuff:4,sub:0,submit:5,substitut:0,successfulli:4,suddenli:0,sudo:[0,4],suffici:0,support:[2,4],sure:[0,1,3],surpris:0,sync:[0,1],system:[0,2,4,5],tab:[0,4,5],tag:[0,1],take:4,tap:0,tcp:0,tell:0,templat:0,termin:0,terribl:0,test:0,text:[0,1,5],than:[0,5],thank:[0,4],thei:[0,1],them:[0,4],themselv:0,thi:[1,2,4],thing:[2,4],think:0,those:[0,4],though:0,thread:0,tighten:0,till:[0,5],time:2,time_wait:0,timelin:2,timestamp:0,tip:3,todai:0,togeth:0,toggl:[0,2],token:0,told:0,too:0,tool:[0,4],toolkit:4,top:[0,5],total:0,track:0,transmit:0,trial:0,trick:[2,3],trivial:0,troubleshoot:3,trust:0,tweak:0,two:0,type:[0,5],typic:[0,2,4],typo:0,ubuntu:0,uncom:5,understand:0,unfortun:0,uninstal:0,uniqu:[0,2],unix:0,unless:0,unsaf:0,unzip:4,upgrad:4,upleft:2,upload:0,upright:2,uri:0,usabl:3,usag:0,use:[2,4,5],used:[0,2],useful:[0,2],user:[0,2,4,5],uses:0,usin:0,using:[1,4,5],usr:[0,4,5],usual:4,utf8:5,v59:0,valid:[0,1,3,4],valu:[0,4],variou:[3,4],veri:4,version:[1,2,5],view:[2,5],virtualhost:0,visibl:0,wai:[0,1],wait:0,want:[2,3,4],watch:2,webserv:0,webview:[0,4],well:[0,2,4],wget:4,what:[1,2,4],when:[1,2,5],where:[0,1],which:[0,1,4],whichev:4,whine:0,who:[3,4],why:4,willing:0,win:4,window:[0,2,4],wipe:0,wizard:0,wkwebview:0,won:0,work:[1,2,3],workaround:0,workspac:4,would:[0,3],write:0,wrong:[0,4],www:[0,5],x264:0,x509:0,x86_64:2,xcode:4,xcworkspac:4,xdg_config_hom:2,yeah:0,year:0,yet:[0,4],you:[1,2,3],your:[0,1,2,3,4,5],yourself:[0,4],yourserv:0,ysammi:0,zmninja:[1,2],zmninjadesktop:2,zmninjapro:2,zmview:0,zone:5,zonemind:[3,5],zoom:2},titles:["zmNinja FAQ","Contributing a new language","Desktop port tips","Welcome to zmNinja\u2019s documentation!","Building from Source","Validating APIs"],titleterms:{"24hr":0,"new":1,"try":0,Adding:1,And:0,For:4,Not:0,ONE:0,The:0,abov:0,actual:0,alarm:0,all:[0,4],allow:0,android:[0,4],api:[0,5],app:0,ask:0,auth:0,authent:0,author:0,basic:0,befor:[0,5],behind:0,beyond:[0,4],bin:0,bind:2,bower:4,browser:0,bui:0,build:4,can:0,caus:0,cert:0,cgi:0,clear:0,code:0,command:2,compar:0,compil:0,complet:0,configur:4,connect:0,consol:0,contribut:1,cool:0,cordova:4,custom:0,data:[0,2],delai:0,depend:4,descript:0,desktop:[2,4],develop:0,document:3,doe:0,doesn:0,don:0,donat:0,download:[0,4],either:0,enabl:0,enter:0,error:0,even:0,event:0,everyth:0,except:0,expertis:0,faq:0,featur:0,feed:0,file:1,fine:0,firefox:0,first:4,fix:0,frame:0,free:0,frequenc:0,from:4,gener:0,get:[0,4],great:0,have:[0,4],help:[0,1],hotkei:2,how:[0,1],iOS:[0,4],idea:0,imag:0,improv:0,individu:0,inform:0,instal:4,instanc:2,ionic:4,issu:0,keep:0,keyboard:2,lan:0,languag:1,like:0,line:2,littl:0,live:0,locat:2,look:0,main:1,make:[0,4,5],mean:0,messag:0,minimum:0,misc:0,miss:0,mocord:0,modifi:0,monei:0,monitor:0,montag:0,more:0,multi:0,multipl:2,mysql:0,need:[0,4],nodej:4,note:[0,5],notif:0,nph:0,offici:0,older:4,onli:0,opera:0,option:0,other:0,own:0,pan:0,paramet:2,person:0,phone:0,platform:4,playabl:0,pleas:5,plugin:4,port:[0,2],problem:0,product:0,profil:0,push:0,reach:0,read:0,recogn:1,record:0,redirect:0,refund:0,regular:0,relat:0,report:0,requir:4,reverseproxi:0,review:0,run:[0,4],sai:0,save:0,scope:2,screen:0,second:0,secur:0,see:0,seem:0,self:0,send:0,server:0,set:[0,4],setup:4,should:0,show:0,sign:0,simpl:0,skip:0,smooth:0,snapshot:0,some:0,sourc:4,ssl:0,starter:0,stop:0,storag:[0,2],stream:0,subsequ:4,suddent:0,summari:0,support:0,sure:[4,5],take:0,than:4,thi:[0,5],thing:0,through:5,thumbnail:0,tilt:0,time:[0,4],timeout:0,tip:[0,2],translat:1,tri:0,troubleshoot:4,unabl:0,updat:0,upgrad:0,url:0,use:0,using:0,valid:5,veri:0,version:[0,4],video:0,view:0,wan:0,want:0,wasn:0,web:0,webconsol:0,welcom:3,were:0,what:0,when:0,who:0,why:[0,5],without:0,wonder:5,work:[0,4,5],you:[0,4,5],zm_auth_hash_login:0,zmninja:[0,3,4,5],zms:0,zonemind:0,zoom:0}}) \ No newline at end of file +Search.setIndex({docnames:["guides/FAQ","guides/contributing-language","guides/desktop","guides/source","guides/validating-api","index"],envversion:53,filenames:["guides/FAQ.rst","guides/contributing-language.rst","guides/desktop.rst","guides/source.rst","guides/validating-api.rst","index.rst"],objects:{},objnames:{},objtypes:{},terms:{"10b61":3,"32bit":3,"64bit":3,"case":0,"class":4,"default":0,"final":3,"import":4,"long":0,"new":[0,2,4,5],"public":0,"return":4,"short":0,"super":2,"switch":[0,2,3],"var":1,"while":[2,4],And:[2,3],But:0,DNS:4,For:[0,5],Has:4,IOS:0,Its:0,NOT:0,Not:1,One:0,That:0,The:[1,2,3],Then:[0,3],There:[0,3],Use:0,Yes:0,abl:[0,3],about:[0,3,5],abov:3,access:[0,4],act:0,activ:0,actual:[2,3,4],adam:0,adb:[0,3],add:[0,1,3,4],added:[0,1],addit:4,adjust:3,affect:0,after:[0,1],again:0,ago:0,aka:0,all:1,alloc:4,allow:[1,2],also:[0,1,3],alt:0,alwai:0,amaz:0,anchor:0,ani:[0,1],anoth:[2,4],answer:[0,5],anymor:0,anytim:0,anywher:1,apach:0,apache2:0,apc:0,api:5,apivers:4,apk:3,app:[1,2,3,4],appdata:2,append:0,appimag:2,appl:0,applic:[0,2],appreci:0,approach:0,appstor:[0,3],apr:0,arg:2,arg_basicauth:0,argument:2,arm:3,around:[0,4],arrai:1,arrow:2,asar:3,assum:[0,4],assumpt:4,async:3,attempt:0,auth_hash_login:0,auth_relai:0,authnam:0,authtyp:0,authuserfil:0,auto:3,autom:3,automat:0,avail:[0,1],avoid:0,awai:0,back:[0,2],backend:0,background:3,backup:0,bad:0,bandwidth:[0,3],base64:0,base:0,basicauth:0,becam:0,becaus:[0,2],been:0,befor:3,behavior:0,being:[0,2],below:0,benefit:0,best:[0,1],better:3,between:[2,3],big:0,bin:3,binari:[0,2,3],blank:4,both:[0,2],bottom:0,bought:0,brave:5,breath:0,briefli:0,bring:[0,4],broken:0,brows:0,browser:4,btw:0,bug:[0,4],build:[0,5],build_android:3,build_io:3,builder:3,bunch:3,bundl:2,button:[0,2,3],cake:4,cakephp:0,call:[0,3],camera:[0,4],can:[3,4],capabl:3,care:1,carefulli:3,caus:4,certain:0,certif:[0,3],certpathvalidatorexcept:0,chanc:0,chang:[0,3],chapter:0,charact:[0,4],charg:0,check:[0,3],checklang:1,choos:[0,3],chose:0,chrome:0,clean:0,clearli:0,cli:3,click:[3,4],clone:3,close:0,cloud:0,clue:0,cmd:[0,2],cnf:0,code:[1,2,3,4],coder:0,com:[0,3],come:0,comma:1,command:3,comment:1,common:[0,5],compil:3,complain:3,complet:[1,2,3],complex:0,compris:0,comput:0,conf:0,config:[0,2,4],configur:0,conflict:2,constantli:0,construct:0,contact:[0,4],contain:0,contribut:[0,5],control:0,convert:0,cooki:0,copi:2,cor:0,core:0,correct:0,correctli:0,could:0,creat:[0,1,3],credenti:[0,4],critic:2,crt:0,csrf:0,ctrl:[0,2],current:[0,3],cycl:0,daemon:0,dai:[0,2],databas:4,debug:[0,2,3],debug_fil:3,dec:3,decod:0,decrypt:0,dedic:[0,2],definit:4,delet:2,depend:0,deploi:3,deprec:0,depth:3,desktop:[0,4,5],destkop:0,detail:[0,3,4,5],dev:[0,3],develop:[1,3],developmentteam:3,devic:0,did:[0,3],differ:[0,2,3,4],digest:0,dilig:0,dir:2,direct:0,directli:[0,3],directori:[0,2,3],disabl:0,discourag:0,discuss:0,displai:0,dist:3,distro:0,doe:3,doing:3,domain:0,don:[1,2,3,4],done:[0,3],down:2,downgrad:0,downleft:2,downright:2,drive:0,due:0,each:[0,2,3],earlier:0,easi:[0,5],easier:0,edit:[0,3,4],effici:0,electron:3,element:1,ellipsi:1,elsewher:0,email:0,embed:0,emphas:0,empti:4,enabl:3,encod:[0,4],encourag:0,encrypt:0,end:0,enforc:0,engin:0,english:1,enough:0,ensur:[0,4],enter:[2,4],entitl:0,entri:0,env:0,envelop:0,environ:[0,3],error:3,esc:2,especi:[0,2],etc:[0,3],even:3,event:[2,4],eventscontrol:0,everi:0,everyth:3,evolv:0,exactli:0,exampl:0,exist:[0,1],expect:3,expert:3,extract:0,face:[0,4],facil:0,fail:0,fair:0,fallback:1,familiar:1,faq:5,fee:0,feel:0,few:[0,3],ffmpeg:0,figur:[0,3],file:[0,3],fill:0,find:[0,4],first:[0,2,4],fit:2,fix:[3,4],focu:1,folder:3,folk:0,follow:[0,1,2,3],footag:2,forc:0,forget:0,format:[0,1],forum:[0,4],found:[0,3],framework:3,from:[0,2,4,5],frustrat:0,full:[0,2,4],funki:0,getvers:4,git:[1,3],github:[0,3],give:0,glob:1,gob:4,going:[0,2,3],good:[0,1],googl:0,got:0,grab:0,grunt:3,guarante:0,guidelin:0,gulp:3,had:0,handl:0,handshak:0,happen:[0,4],happi:0,hard:0,has:[0,4,5],hash:0,have:4,haven:0,header:0,hei:0,help:4,helper:3,here:[0,1,3,5],high:0,him:0,hint:0,his:0,hit:0,home:2,hope:0,host:4,hostnam:0,hour:0,how:[3,5],howev:0,html:[1,4],htpasswd:0,http:[0,3,4],icloud:[0,3],icon:0,ideal:1,imag:3,img:0,implement:0,includ:5,incorrect:0,increas:0,increment:0,index:0,infer:0,info:[0,3],inform:2,input:0,insert:0,insid:[0,1,3],inspect:0,instal:[0,5],instanc:0,instance1:2,instance2:2,instruct:[0,3],interfac:0,internet:3,introduc:0,invalid:4,invok:[0,3],ionic1:3,ios:3,ipa:3,isol:0,issu:[3,4,5],its:[0,1,4],java:0,jpeg:0,jpg:0,jshint:3,json:[0,1,3,4],just:[0,3],kei:[0,1,3],keyboard:3,keyout:0,keyword:1,know:0,knowledg:0,lang:1,languag:5,last:[0,1],later:0,latest:0,launch:[0,2],learn:0,least:0,left:2,legaci:3,legitim:0,less:0,let:[0,2],letsencrypt:0,lgoogletoolboxformac:3,lib:3,librari:[0,2,3],licens:0,life:0,like:[3,4,5],limit:[0,3],lin:3,line:[0,3,4],link:0,linux:[2,3],list:[0,1,4],listen:0,live:2,local:[1,3],localhost:0,locat:[0,1],lock:2,log:[0,4],login:0,look:[1,3],lot:[0,3,4],low:0,mac:3,machin:0,maco:3,made:0,mai:[0,2,3,4],maintain:0,make:[1,5],make_desktop:3,manag:[0,3],mani:[0,3,4],manual:[0,4],map:1,mark:0,match:0,max_connect:0,maximum:0,memori:0,mention:[0,3],menu:0,merg:4,mess:1,messag:[1,3,4],might:[0,4],migrat:3,miss:[1,3],mjpeg:0,mkdir:2,mobil:0,mod_head:0,mod_rewrit:0,mode:[0,2,3],model:1,modifi:1,modul:0,mojav:3,monitor:[2,4],montag:2,more:[3,4],mostli:[0,3],move:[0,2],much:0,mungl:0,must:3,myport:0,myserv:0,name:[0,4],nativ:0,need:[1,4],neither:0,network:0,newer:3,newkei:0,next:[0,2,3],nginx:[0,4],nice:0,noauth:0,node:[0,3],node_modul:3,non:[0,4],nope:0,nor:0,note:[2,3],notif:3,now:[0,3,4],npm:3,nuanc:0,nvr:1,object:4,occur:0,off:0,offer:0,often:0,old:0,onc:[0,3],one:[0,2,4],onli:[1,3,4],onward:0,open:[0,2,3,4],openssl:0,oper:2,opt_auth:0,option:3,order:[0,3],osx:2,other:3,otherwis:2,out:[0,2,3],outler:0,output:[3,4],over:[0,3],overwrit:1,own:[3,5],packag:[0,3],page:[0,2,4],pair:0,pan:2,paramet:0,pars:0,part:0,pass:0,passabl:0,passthru:0,password:0,patch:4,path:[0,2,4],peopl:0,per:0,perfectli:0,permiss:4,phone:3,php5:0,php:[0,4],pick:0,pin:2,plai:[0,2,3],playback:0,playstor:0,pleas:[0,1,3],pliablepixel:3,plug:0,plugin:0,pod:3,polici:0,port:[3,5],portal:0,possibl:[0,2],post:[0,3,4],pre:4,prefer:1,prepar:3,prepare_desktop:3,preset:0,pretti:1,previou:[0,2],prime256v1:0,problem:4,proce:3,process:[0,1,3],processor:0,produc:3,profess:0,profil:2,program:0,prohibit:0,project:[0,3],properli:[0,3],protocol:0,provid:[0,1],proxi:0,proxy_pass:0,proxy_set_head:0,ptz:[0,2],pull:1,purchas:0,put:0,python:1,qs_token:0,qualifi:0,query_str:0,question:[0,5],rare:0,readi:3,realli:0,realtim:0,reason:[0,4],recommend:[0,2],red:2,refresh:0,regener:0,regist:1,registeravailablelanguagekei:1,relat:[4,5],releas:[0,3],release_fil:3,relev:[0,1],rememb:0,remot:[0,3,4],remov:[0,2,4],render:0,replac:[0,1,4],req:0,request:[0,1,3],request_uri:0,requesthead:0,requir:0,requireani:0,reset:2,resolut:0,resolv:3,resourc:3,respons:4,restart:0,restor:0,restrict:0,result:0,revers:0,rewritecond:0,rewriteengin:0,rewriterul:0,rid:0,right:[0,2,4],root:[0,3],rout:3,rsa:0,rude:0,rule:0,run:2,safe:0,sai:[2,3],said:0,same:[0,1,2,4],sass:3,save:3,savvi:0,scale:0,schedul:0,screen:2,script:3,sdk:3,search:0,secp384r1:0,secp521r1:0,section:[0,3],see:[2,3,4,5],seem:3,seen:0,sent:0,server:[2,4],servic:0,set:[2,4],setenvif:0,setup:0,sever:0,share:[0,4],shift:[0,2],shortcut:5,should:[1,2,3,4],show:[2,4],side:0,sigh:0,sim:3,similar:0,simpler:0,simpli:[0,1],simultan:0,sinc:0,singl:[0,2],site:0,skim:0,snapshot:2,some:3,someth:[0,3],sometim:[0,4],sorri:0,sort:0,soul:5,sourc:[0,4,5],space:0,special:0,specif:0,specifi:0,spend:[0,3],spent:0,src:0,ssl_ecdh_curv:0,sslcertificatefil:0,sslcertificatekeyfil:0,stack:0,start:[0,2],step:[0,3,4],still:[0,4],storag:3,store:[0,2],strategi:0,stream:[4,5],strict:0,strip:0,strongli:[0,2],stuff:3,sub:0,submit:4,substitut:0,successfulli:3,suddenli:0,sudo:[0,3],suffici:0,support:[2,3],sure:[0,1,5],surpris:0,sync:[0,1],system:[0,2,3,4],tab:[0,3,4],tag:[0,1],take:3,tap:0,tcp:0,tell:0,templat:0,termin:0,terribl:0,test:0,text:[0,1,4],than:[0,4],thank:[0,3],thei:[0,1],them:[0,3],themselv:0,thi:[1,2,3],thing:[2,3],think:0,those:[0,3],though:0,thread:0,tighten:0,till:[0,4],time:2,time_wait:0,timelin:2,timestamp:0,tip:5,todai:0,togeth:0,toggl:[0,2],token:0,told:0,too:0,tool:[0,3],toolkit:3,top:[0,4],total:0,track:0,transmit:0,trial:0,trick:[2,5],trivial:0,troubleshoot:5,trust:0,tweak:0,two:0,type:[0,4],typic:[0,2,3],typo:0,ubuntu:0,uncom:4,understand:0,unfortun:0,uninstal:0,uniqu:[0,2],unix:0,unless:0,unsaf:0,unzip:3,upgrad:3,upleft:2,upload:0,upright:2,uri:0,usabl:5,usag:0,use:[2,3,4],used:[0,2],useful:[0,2],user:[0,2,3,4],uses:0,usin:0,using:[1,3,4],usr:[0,3,4],usual:3,utf8:4,v59:0,valid:[0,1,3,5],valu:[0,3],variou:[3,5],veri:3,version:[1,2,4],view:[2,4],virtualhost:0,visibl:0,wai:[0,1],wait:0,want:[2,3,5],watch:2,webserv:0,webview:[0,3],well:[0,2,3],wget:3,what:[1,2,3],when:[1,2,4],where:[0,1],which:[0,1,3],whichev:3,whine:0,who:[3,5],why:3,willing:0,win:3,window:[0,2,3],wipe:0,wizard:0,wkwebview:0,won:0,work:[1,2,3,5],workaround:0,workspac:3,would:[0,5],write:0,wrong:[0,3],www:[0,4],x264:0,x509:0,x86_64:2,xcode:3,xcworkspac:3,xdg_config_hom:2,yeah:0,year:0,yet:[0,3],you:[1,2,5],your:[0,1,2,3,4,5],yourself:[0,3],yourserv:0,ysammi:0,zmninja:[1,2],zmninjadesktop:2,zmninjapro:2,zmview:0,zone:4,zonemind:[4,5],zoom:2},titles:["zmNinja FAQ","Contributing a new language","Desktop port tips","Building from Source","Validating APIs","Welcome to zmNinja\u2019s documentation!"],titleterms:{"24hr":0,"new":1,"try":0,Adding:1,And:0,For:3,Not:0,ONE:0,The:0,abov:0,actual:0,alarm:0,all:[0,3],allow:0,android:[0,3],api:[0,4],app:0,ask:0,auth:0,authent:0,author:0,basic:0,befor:[0,4],behind:0,beyond:[0,3],bin:0,bind:2,bower:3,browser:0,bui:0,build:3,can:0,caus:0,cert:0,cgi:0,clear:0,code:0,command:2,compar:0,compil:0,complet:0,configur:3,connect:0,consol:0,contribut:1,cool:0,cordova:3,custom:0,data:[0,2],delai:0,depend:3,descript:0,desktop:[2,3],develop:0,document:5,doe:0,doesn:0,don:0,donat:0,download:[0,3],either:0,enabl:0,enter:0,error:0,even:0,event:0,everyth:0,except:0,expertis:0,faq:0,featur:0,feed:0,file:1,fine:0,firefox:0,first:3,fix:0,frame:0,free:0,frequenc:0,from:3,gener:0,get:[0,3],great:0,have:[0,3],help:[0,1],hotkei:2,how:[0,1],iOS:[0,3],idea:0,imag:0,improv:0,individu:0,inform:0,instal:3,instanc:2,ionic:3,issu:0,keep:0,keyboard:2,lan:0,languag:1,like:0,line:2,littl:0,live:0,locat:2,look:0,main:1,make:[0,3,4],mean:0,messag:0,minimum:0,misc:0,miss:0,mocord:0,modifi:0,monei:0,monitor:0,montag:0,more:0,multi:0,multipl:2,mysql:0,need:[0,3],nodej:3,note:[0,4],notif:0,nph:0,offici:0,onli:0,opera:0,option:0,other:0,own:0,pan:0,paramet:2,person:0,phone:0,platform:3,playabl:0,pleas:4,plugin:3,port:[0,2],problem:0,product:0,profil:0,push:0,reach:0,read:0,recogn:1,record:0,redirect:0,refund:0,regular:0,relat:0,report:0,requir:3,reverseproxi:0,review:0,run:[0,3],sai:0,save:0,scope:2,screen:0,second:0,secur:0,see:0,seem:0,self:0,send:0,server:0,set:[0,3],setup:3,should:0,show:0,sign:0,simpl:0,skip:0,smooth:0,snapshot:0,some:0,sourc:3,ssl:0,starter:0,stop:0,storag:[0,2],stream:0,subsequ:3,suddent:0,summari:0,support:0,sure:[3,4],take:0,thi:[0,4],thing:0,through:4,thumbnail:0,tilt:0,time:[0,3],timeout:0,tip:[0,2],translat:1,tri:0,troubleshoot:3,unabl:0,updat:0,upgrad:0,url:0,use:0,using:0,valid:4,veri:0,version:[0,3],video:0,view:0,wan:0,want:0,wasn:0,web:0,webconsol:0,welcom:5,were:0,what:0,when:0,who:0,why:[0,4],without:0,wonder:4,work:[0,4],you:[0,3,4],zm_auth_hash_login:0,zmninja:[0,3,4,5],zms:0,zonemind:0,zoom:0}}) \ No newline at end of file diff --git a/docs/_build/html/source.html b/docs/_build/html/source.html deleted file mode 100644 index d0c57209..00000000 --- a/docs/_build/html/source.html +++ /dev/null @@ -1,473 +0,0 @@ - - - - - - - - - - - Building from Source — zmNinja documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - -
- - - - - - -
-
- - - - - - - - - - - - - - - - -
- - - - -
-
-
-
- -
-

Building from Source

-

NOTE If you want to run it on your desktop, you can directly -download desktop binaries -here -and if you want it for Android/iOS you can get from the play/appstore. -This is only for those who want to run from source.

-
-
Note: If you are building from source, you are mostly on your own. I -have very limited time to debug environment differences/package -differences between what I have and what you may have. I’m not a -nodejs/grunt etc expert and stuff seems to change all the time.
-

Version note: The code is compiled using the following versions of -tools. If you are using newer versions of ionic the code may not -compile - I don’t have the time to upgrade yet. Finally, if you choose -to go the source route, I expect you to spend a lot of time yourself -debugging first before you create an issue. Even if you do create an -issue, I have very limited bandwidth to debug source compilation issues -for you. Thanks.

-

Output of ionic info

-
Ionic:
-
-   ionic (Ionic CLI) : 4.5.0 (/usr/local/lib/node_modules/ionic)
-   Ionic Framework   : ionic1 1.3.5
-   @ionic/v1-toolkit : 1.0.19
-
-Cordova:
-
-   cordova (Cordova CLI) : 8.1.2 (cordova-lib@8.1.1)
-   Cordova Platforms     : android 7.1.4, ios 5.0.0
-   Cordova Plugins       : cordova-plugin-ionic-keyboard 2.1.3, cordova-plugin-ionic-webview 2.2.0,
-(and 30 other plugins)
-
-System:
-
-   Android SDK Tools : 26.1.1 (/Users/pp/Library/Android/sdk/)
-   ios-deploy        : 2.0.0
-   ios-sim           : 7.0.0
-   NodeJS            : v8.11.2 (/usr/local/bin/node)
-   npm               : 5.6.0
-   OS                : macOS Mojave
-   Xcode             : Xcode 10.1 Build version 10B61
-
-
-
-

Install Dependencies - needed for all platforms

-
-

Install NodeJS

-

Install NodeJS from here. As of -Dec 2018, I’m using Node v8.11.2. I use -n to manage node versions and switch -between them.

-
-
-

Install cordova, ionic, and bower

-
npm install -g cordova ionic bower
-npm install @ionic/v1-toolkit --save-dev
-
-
-

And some more:

-
npm install -g gulp
-npm install node-sass
-npm install async
-npm install jshint
-
-
-

(Note you may need to do sudo depending on how your system is set -up. It’s better you -don’t, -but if you must, well, you must)

-

If you get a newer version, you should adjust your cordova version to -the mentioned version above in order to be able to successfully compile -zmNinja. To change the version you can follow these instructions: -change cordova -version

-
-
-
-

Download zmNinja

-
git clone --depth 1 https://github.com/pliablepixels/zmNinja.git
-
-
-
-
-

Configure build configure zmNinja and get all required plugins

-
cd zmNinja
-npm install
-bower install
-ionic cordova platform add android (or ios)
-cordova prepare
-
-
-
-
-

Making an iOS build

-

Note: You need to be doing this on a mac, with Xcode and the SDK -installed. You also need to have your developer certificates/etc. (I am -not going to detail this out - there are many internet resources on -this)

-

There are a few steps you need to take to get the iOS build working for -the first time. If you don’t do this, you may get a compilation error -that says ld: library not found for -lGoogleToolboxForMac

-
cd platforms/ios
-pod install
-
-
-

This does not produce an iOS ready ipa. What you need to do then is to -open platforms/ios/zmNinja.xcworkspace in Xcode, and run.

-

To compile a debug build for iOS from command line, from zmNinja project -root: First edit ./build-auto.json and change the -developmentTeam id to yours. Then:

-
./build_ios.sh
-
-
-

To compile using XCode, open platforms/ios/zmNinja.xcworkspace - You -need to use “Legacy Build” system if you are on XCode 10+. You can -change this in XCode File->Workspace Settings and then build usual. -Also switch to the Capabilities tab and make sure “Remote Notifications” -is on in Background Modes and in iCloud section, Key-Value storage is -enabled. If you see a “Fix issue” there, clicking on that button -resolves everything.

-
-
-

Making an Android build

-

Note that you need the Android -SDK installed and -configured properly for this to work.

-

From the zmNinja project root:

-
./build_android.sh --debug (or --release)
-
-
-

If this complains of missing SDKs, you need to install the SDK version -it requests This should produce an APK file. To install it on your phone -over adb, you’d do something like

-
adb install -r debug_files/android-debug.apk #if you did --debug
-or,
-adb install -r release_files/zmNinja.apk #if you did --release
-
-
-
-
-

Making a desktop build

-

I use electron to build the desktop app.

-
-

For versions 1.3.018 and beyond

-

I’ve migrated to using -electron-builder -to automate the build process better.

-
-

Make sure you have all the dependencies

-

Typically, just running

-
npm install
-bower install
-
-
-

Should have installed everything. Validate by checking you have -electron installed by invoking it on the command line

-

You now have the following options:

-
npm run dist-all # builds linux, mac and windows packages
-npm run dist-mac # only builds mac packages
-npm run dist-lin # only builds linux packages (32bit, 64bit, arm)
-npm run dist-win # only builds win packages (32bit, 64bit)
-
-
-

Your packages will be created in the dist folder

-
-
-
-

For versions older than 1.3.018 (will not work in 1.3.018 and beyond)

-

Click to see details

-
-
-

Set up desktop dependencies

-
npm install -g electron
-npm install -g asar
-
-
-

Make sure electron is installed. You should be able to do a -which electron

-

Also make sure unzip and wget tools are installed in your -system.

-
-
-

First time setup

-

If this is the first time you are building a desktop version, you need -to download electron images for various platforms. There is a helper -script called prepare_desktop.sh that you can run. This creates a -directory called desktop inside your zmNinja directory. It currently -downloads all supported platforms.

-
./prepare_desktop.sh
-
-
-

This will download a bunch of files. If completed successfully, you can -proceed to the next step.

-
-
-

Make the desktop build

-

Once you are done with prepare_desktop.sh, you can do a -./make_desktop.sh. This will actually build images for all -platforms.

-
-
-

Running desktop builds

-

cd into the desktop directory and run whichever port you want

-
-
-

Subsequent builds

-

You need to ./make_desktop.sh each time you make changes.

-
-
-
-

Troubleshooting

-

Lots of things can go wrong. * Please make sure you don’t post issues -about why your own build is not working - please figure it out * Look -carefully at error messages

-
-
- - -
-
- -
-
- - -
-
- -
- -
- - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/docs/_build/html/validating-api.html b/docs/_build/html/validating-api.html deleted file mode 100644 index 1b56165b..00000000 --- a/docs/_build/html/validating-api.html +++ /dev/null @@ -1,331 +0,0 @@ - - - - - - - - - - - Validating APIs — zmNinja documentation - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - -
- - - - - - -
-
- - - - - - - - - - - - - - - - -
- - - - -
-
-
-
- -
-

Validating APIs

-
-

Please make sure you go through this before you wonder why zmNinja is not working.

-
-
Assumption: Your ZM server is accessible at http://server/zm -> -replace this with your actual path
-
-

Make sure ZM APIs are working:

-

(Note - nginx users, if you are facing API issues, please see if this -page -helps)

-
    -
  • Step 1: Open up a browser

    -
  • -
  • Step 2: Log into ZM

    -
  • -
  • Step 3: Open another tab in the same browser (IMPORTANT: Has to -be from the same browser you logged into ZM)

    -
  • -
  • Step 4: Type in http://server/zm/api/host/getVersion.json –> you -should see a response like:

    -
    {
    -"version": "1.30.0",
    -"apiversion": "1.0"
    -}
    -
    -
    -

    version/apiversion may be different. If you don’t see such a -response, your APIs are not working

    -
  • -
  • Step 5:make sure you can see monitors and events:

    -
  • -
-

Type in http://server/zm/api/monitors.json –> you should see a -response like:

-
{
-    "monitors": [
-        {
-            "Monitor": {
-                /*lots of additional details*/
-            },
-            /*more monitor objects if you have more than one*/
-        }]
-}
-
-
-
    -
  • Step 6: (If you find your APIs show ok, but zmNinja has issues)
  • -
  • Open a browser, log into ZM
  • -
  • Open a new tab, enter http://server/zm/api/host/getVersion.json
  • -
  • Now, right click and do a View Source in your browser (different -browsers may have different names for it). This brings up a full -source code view of the page. Do you ONLY see the JSON output or do -you see gobs of HTML on top like <pre class= and lots of cake -related messages? If you do, you need to fix it.
  • -
-

if you find the page empty, your APIs/permissions have a problem. Please -post in the ZM forums (please DON’T contact me first as its not a -zmNinja bug)

-

Type in http://server/zm/api/events.json –> you should see a -response like: (this list may be an empty set if you don’t have events -but you will still see the {"events":[]} text - if you find the page -empty, your APIs have a problem. Please post in the ZM forums (please -DON’T contact me first, as its not a zmNinja bug)

-
{"events":[{"Event":{ /* many more details */ }}]}
-
-
-

Top reasons why monitors and events API returns blank while getVersion -works: * You don’t have monitor/event view permissions allocated to -the user * You have an invalid camera definition (happens sometimes -when you remove and re-add cameras) * If you are using non UTF8 -characters in your monitor names/zone names this can cause issues. Edit -/usr/share/zoneminder/www/api/app/Config/database.php (assuming ZM -is in /usr/share) and make sure 'encoding' => 'utf8' is -uncommented (remove //) around line 74. I’ve submitted a -patch -but till its merged, you might have to do it manually.

-
-
-
-

zmNinja API notes:

-
    -
  • Please make sure the user credentials you use has:
  • -
  • view or edit access to monitors
  • -
  • view or edit access to streams
  • -
  • view or edit access to system
  • -
  • If you are accessing zmNinja remotely, make sure you first access ZM -remotely from your desktop browser, ensure it works and then use the -same DNS/IP for zmNinja
  • -
-
-
- - -
-
- -
-
- - -
-
- -
- -
- - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file -- cgit v1.2.3