diff options
Diffstat (limited to 'docs/docgen/html/guides')
| -rw-r--r-- | docs/docgen/html/guides/FAQ.html | 984 | ||||
| -rw-r--r-- | docs/docgen/html/guides/contributing-language.html | 297 | ||||
| -rw-r--r-- | docs/docgen/html/guides/desktop.html | 336 | ||||
| -rw-r--r-- | docs/docgen/html/guides/source.html | 457 | ||||
| -rw-r--r-- | docs/docgen/html/guides/validating-api.html | 339 |
5 files changed, 2413 insertions, 0 deletions
diff --git a/docs/docgen/html/guides/FAQ.html b/docs/docgen/html/guides/FAQ.html new file mode 100644 index 00000000..51357d63 --- /dev/null +++ b/docs/docgen/html/guides/FAQ.html @@ -0,0 +1,984 @@ + + +<!DOCTYPE html> +<!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]--> +<!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]--> +<head> + <meta charset="utf-8"> + + <meta name="viewport" content="width=device-width, initial-scale=1.0"> + + <title>zmNinja FAQ — zmNinja documentation</title> + + + + + + + + + + + + + + + + + + <link rel="stylesheet" href="../_static/css/theme.css" type="text/css" /> + + + + + + <link rel="index" title="Index" + href="../genindex.html"/> + <link rel="search" title="Search" href="../search.html"/> + <link rel="top" title="zmNinja documentation" href="../index.html"/> + <link rel="next" title="Validating APIs" href="validating-api.html"/> + <link rel="prev" title="Welcome to zmNinja’s documentation!" href="../index.html"/> + + + <script src="../_static/js/modernizr.min.js"></script> + +</head> + +<body class="wy-body-for-nav" role="document"> + + + <div class="wy-grid-for-nav"> + + + <nav data-toggle="wy-nav-shift" class="wy-nav-side"> + <div class="wy-side-scroll"> + <div class="wy-side-nav-search"> + + + + <a href="../index.html" class="icon icon-home"> zmNinja + + + + + <img src="../_static/ninja.png" class="logo" /> + + </a> + + + + + + + +<div role="search"> + <form id="rtd-search-form" class="wy-form" action="../search.html" method="get"> + <input type="text" name="q" placeholder="Search docs" /> + <input type="hidden" name="check_keywords" value="yes" /> + <input type="hidden" name="area" value="default" /> + </form> +</div> + + + </div> + + <div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation"> + + + + + + + <ul class="current"> +<li class="toctree-l1 current"><a class="current reference internal" href="#">zmNinja FAQ</a><ul> +<li class="toctree-l2"><a class="reference internal" href="#what-is-the-minimum-supported-version-of-zoneminder-android-and-ios">What is the minimum supported version of ZoneMinder, Android and iOS?</a></li> +<li class="toctree-l2"><a class="reference internal" href="#zmninja-help">zmNinja Help</a></li> +<li class="toctree-l2"><a class="reference internal" href="#asking-for-refunds">Asking for refunds</a></li> +<li class="toctree-l2"><a class="reference internal" href="#things-you-should-own-up-to">Things you should own up to</a><ul> +<li class="toctree-l3"><a class="reference internal" href="#read-the-app-description">Read the app description</a></li> +<li class="toctree-l3"><a class="reference internal" href="#try-before-buy">Try before buy</a></li> +<li class="toctree-l3"><a class="reference internal" href="#zmninja-doesn-t-work-actually-even-zoneminder-web-console-doesn-t-work-you-should-fix-this">zmNinja doesn’t work. Actually, even ZoneMinder web console doesn’t work. You should fix this!</a></li> +<li class="toctree-l3"><a class="reference internal" href="#zmninja-doesn-t-work-zoneminder-works-but-i-have-no-idea-why-apis-don-t-work-you-should-fix-this">zmNinja doesn’t work. Zoneminder works, but I have no idea why APIs don’t work. You should fix this!</a></li> +<li class="toctree-l3"><a class="reference internal" href="#i-can-t-compile-zmninja-help-me">I can’t compile zmNinja, help me!</a></li> +<li class="toctree-l3"><a class="reference internal" href="#how-to-report-errors">How to report errors</a></li> +</ul> +</li> +<li class="toctree-l2"><a class="reference internal" href="#profile-information-storage-related">Profile information storage related</a><ul> +<li class="toctree-l3"><a class="reference internal" href="#zmninja-is-not-saving-my-information-it-keeps-asking-me-to-re-enter-all-my-data">zmNinja is not saving my information. It keeps asking me to re-enter all my data</a></li> +<li class="toctree-l3"><a class="reference internal" href="#i-updated-my-zmninja-app-and-all-my-server-settings-were-cleared-why">I updated my zmNinja app and all my server settings were cleared. Why?</a></li> +</ul> +</li> +<li class="toctree-l2"><a class="reference internal" href="#connection-authentication-issues">Connection/Authentication issues</a><ul> +<li class="toctree-l3"><a class="reference internal" href="#general-tips">General tips</a></li> +<li class="toctree-l3"><a class="reference internal" href="#server-redirects">Server Redirects</a></li> +<li class="toctree-l3"><a class="reference internal" href="#self-signed-certs">Self signed certs</a></li> +<li class="toctree-l3"><a class="reference internal" href="#ssl-settings">SSL settings</a></li> +<li class="toctree-l3"><a class="reference internal" href="#everything-works-when-i-use-lan-ip-but-i-get-not-authenticated-when-i-use-wan-ip">Everything works when I use LAN IP, but I get “not authenticated” when I use WAN IP</a></li> +</ul> +</li> +<li class="toctree-l2"><a class="reference internal" href="#live-streaming-issues">Live streaming issues</a><ul> +<li class="toctree-l3"><a class="reference internal" href="#summary-of-everything-works-but-i-can-t-see-live-feed">Summary of Everything works, but I can’t see live feed</a></li> +<li class="toctree-l3"><a class="reference internal" href="#general-note">General note</a></li> +<li class="toctree-l3"><a class="reference internal" href="#i-can-t-see-stream-and-i-can-t-see-streams-in-zoneminder-webconsole-either">I can’t see stream: And I can’t see streams in ZoneMinder webconsole either</a></li> +<li class="toctree-l3"><a class="reference internal" href="#i-can-t-see-streams-i-use-basic-auth">I can’t see streams: I use basic auth</a><ul> +<li class="toctree-l4"><a class="reference internal" href="#skipping-auth-for-nph-zms-urls">Skipping auth for <code class="docutils literal"><span class="pre">nph-zms</span></code> URLs</a></li> +<li class="toctree-l4"><a class="reference internal" href="#authorization-with-a-reverseproxy">Authorization with a ReverseProxy</a></li> +</ul> +</li> +<li class="toctree-l3"><a class="reference internal" href="#i-can-t-see-streams-multi-server-is-enabled">I can’t see streams: Multi-server is enabled</a></li> +<li class="toctree-l3"><a class="reference internal" href="#i-can-t-see-streams-you-have-cgi-bin-issues">I can’t see streams: you have cgi-bin issues</a></li> +<li class="toctree-l3"><a class="reference internal" href="#zmninja-montage-does-not-seem-smooth-feeds-seem-a-little-delayed-compared-to-zm-console">zmNinja montage does not seem smooth - feeds seem a little delayed compared to ZM console</a></li> +</ul> +</li> +<li class="toctree-l2"><a class="reference internal" href="#event-images-streaming-related">Event images/streaming related</a><ul> +<li class="toctree-l3"><a class="reference internal" href="#id1">General note</a></li> +<li class="toctree-l3"><a class="reference internal" href="#event-stream-viewing-does-not-work">Event stream viewing does not work</a></li> +<li class="toctree-l3"><a class="reference internal" href="#video-not-playable">Video Not Playable</a></li> +<li class="toctree-l3"><a class="reference internal" href="#event-thumbnails-images-don-t-show">Event thumbnails/images don’t show</a></li> +<li class="toctree-l3"><a class="reference internal" href="#when-viewing-individual-frames-some-event-frames-show-but-some-don-t">When viewing individual frames, some event frames show, but some don’t</a></li> +<li class="toctree-l3"><a class="reference internal" href="#zmninja-montage-screen-shows-all-my-monitors-but-in-event-montage-i-only-see-5">zmNinja montage screen shows all my monitors, but in Event Montage, I only see 5?</a></li> +</ul> +</li> +<li class="toctree-l2"><a class="reference internal" href="#other-misc-issues">Other misc. issues</a><ul> +<li class="toctree-l3"><a class="reference internal" href="#i-suddently-see-an-error-message-saying-i-need-to-enable-zm-auth-hash-logins-this-wasn-t-there-before">I suddently see an error message saying I need to enable ZM_AUTH_HASH_LOGINS. This wasn’t there before</a></li> +<li class="toctree-l3"><a class="reference internal" href="#zmninja-1-2-515-and-beyond-says-need-api-upgrade-for-the-24hr-review-feature-what-does-that-mean">zmNinja 1.2.515 and beyond says “Need API Upgrade” for the 24hr review feature. What does that mean?</a></li> +<li class="toctree-l3"><a class="reference internal" href="#i-upgraded-zoneminder-to-1-30-2-or-above-and-zmninja-stopped-working">I upgraded ZoneMinder to 1.30.2 or above and zmNinja stopped working!</a></li> +<li class="toctree-l3"><a class="reference internal" href="#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">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</a></li> +<li class="toctree-l3"><a class="reference internal" href="#the-montage-screen-is-causing-issues-with-my-zm-server-i-get-connection-timeout-issues-or-mysql-connection-problems">The Montage screen is causing issues with my ZM server - I get connection timeout issues or MySQL connection problems</a></li> +<li class="toctree-l3"><a class="reference internal" href="#the-app-works-great-except-it-doesn-t-work-on-one-android-phone-works-in-others">The app works great - except it doesn’t work on ONE Android phone - works in others!</a></li> +<li class="toctree-l3"><a class="reference internal" href="#apis-are-not-working-zm-console-works-fine">APIs are not working ! ZM console works fine.</a></li> +<li class="toctree-l3"><a class="reference internal" href="#i-m-using-mocord-record-and-i-don-t-see-events-without-alarms">I’m using mocord/record and I don’t see events without alarms</a></li> +<li class="toctree-l3"><a class="reference internal" href="#taking-snapshots-or-downloading-videos-don-t-work-in-android">Taking snapshots or downloading videos don’t work in Android</a></li> +<li class="toctree-l3"><a class="reference internal" href="#pan-tilt-zoom-doesn-t-work">Pan/Tilt/Zoom doesn’t work</a></li> +</ul> +</li> +<li class="toctree-l2"><a class="reference internal" href="#what-is-this-event-server">What is this Event Server?</a><ul> +<li class="toctree-l3"><a class="reference internal" href="#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">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?</a></li> +</ul> +</li> +<li class="toctree-l2"><a class="reference internal" href="#is-zmninja-free">Is zmNinja free?</a></li> +<li class="toctree-l2"><a class="reference internal" href="#who-are-the-developers-behind-this">Who are the developers behind this?</a></li> +<li class="toctree-l2"><a class="reference internal" href="#the-code-needs-improvement">The code needs improvement</a></li> +<li class="toctree-l2"><a class="reference internal" href="#is-zmninja-an-official-zoneminder-product">Is zmNinja an official ZoneMinder product?</a></li> +<li class="toctree-l2"><a class="reference internal" href="#i-want-to-donate-money">I want to donate money</a></li> +<li class="toctree-l2"><a class="reference internal" href="#how-does-zmninja-use-my-personal-data">How does zmNinja use my personal data?</a></li> +<li class="toctree-l2"><a class="reference internal" href="#i-want-to-donate-time-expertise-code">I want to donate time/expertise/code</a></li> +</ul> +</li> +<li class="toctree-l1"><a class="reference internal" href="validating-api.html">Validating APIs</a></li> +<li class="toctree-l1"><a class="reference internal" href="desktop.html">Desktop port tips</a></li> +<li class="toctree-l1"><a class="reference internal" href="contributing-language.html">Contributing a new language</a></li> +<li class="toctree-l1"><a class="reference internal" href="source.html">Building from Source</a></li> +</ul> + + + + </div> + </div> + </nav> + + <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap"> + + + <nav class="wy-nav-top" role="navigation" aria-label="top navigation"> + + <i data-toggle="wy-nav-top" class="fa fa-bars"></i> + <a href="../index.html">zmNinja</a> + + </nav> + + + + <div class="wy-nav-content"> + <div class="rst-content"> + + + + + + + + + + + + + + + + +<div role="navigation" aria-label="breadcrumbs navigation"> + + <ul class="wy-breadcrumbs"> + + <li><a href="../index.html">Docs</a> »</li> + + <li>zmNinja FAQ</li> + + + <li class="wy-breadcrumbs-aside"> + + + <a href="../_sources/guides/FAQ.rst.txt" rel="nofollow"> View page source</a> + + + </li> + + </ul> + + + <hr/> +</div> + <div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article"> + <div itemprop="articleBody"> + + <div class="section" id="zmninja-faq"> +<h1>zmNinja FAQ<a class="headerlink" href="#zmninja-faq" title="Permalink to this headline">¶</a></h1> +<div class="section" id="what-is-the-minimum-supported-version-of-zoneminder-android-and-ios"> +<h2>What is the minimum supported version of ZoneMinder, Android and iOS?<a class="headerlink" href="#what-is-the-minimum-supported-version-of-zoneminder-android-and-ios" title="Permalink to this headline">¶</a></h2> +<p>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.</p> +<p>Starting version 1.3.26 of zmNinja, only IOS 10+ and Android 5.0+ +devices are supported.</p> +</div> +<div class="section" id="zmninja-help"> +<h2>zmNinja Help<a class="headerlink" href="#zmninja-help" title="Permalink to this headline">¶</a></h2> +<p>I’ve just started uploading instructional videos for zmNinja. I’ll add +more over time. See them +<a class="reference external" href="https://github.com/pliablepixels/zmNinja/wiki/Help-Videos-for-zmNinja">here</a></p> +</div> +<div class="section" id="asking-for-refunds"> +<h2>Asking for refunds<a class="headerlink" href="#asking-for-refunds" title="Permalink to this headline">¶</a></h2> +<p>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 +<a class="reference external" href="https://support.apple.com/en-us/HT204084">this</a> link.</p> +<p>For Android: If you’re not happy with zmNinja and have bought the app, +please <a class="reference external" href="mailto:pliablepixels%40gmail.com">send me an email</a> <strong>with your +order id</strong>.</p> +<p>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.</p> +<p>Also, please read <a class="reference external" href="#things-you-should-own-up-to">Things you should own up +to</a></p> +</div> +<div class="section" id="things-you-should-own-up-to"> +<h2>Things you should own up to<a class="headerlink" href="#things-you-should-own-up-to" title="Permalink to this headline">¶</a></h2> +<div class="section" id="read-the-app-description"> +<h3>Read the app description<a class="headerlink" href="#read-the-app-description" title="Permalink to this headline">¶</a></h3> +<p>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.</p> +</div> +<div class="section" id="try-before-buy"> +<h3>Try before buy<a class="headerlink" href="#try-before-buy" title="Permalink to this headline">¶</a></h3> +<p>Some users legitimately look around for an option to try before they buy +and they are not savvy enough to <a class="reference external" href="https://github.com/pliablepixels/zmNinja">download the +code</a> and compile (<a class="reference internal" href="source.html"><span class="doc">Building from Source</span></a>) for +themselves. Fair enough. In that case, <a class="reference external" href="https://github.com/pliablepixels/zmNinja/releases">download the Desktop +version</a> of +zmNinja. It’s free and is the same code as mobile. Make sure the desktop +version works before you buy the mobile version.</p> +<p>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.</p> +</div> +<div class="section" id="zmninja-doesn-t-work-actually-even-zoneminder-web-console-doesn-t-work-you-should-fix-this"> +<h3>zmNinja doesn’t work. Actually, even ZoneMinder web console doesn’t work. You should fix this!<a class="headerlink" href="#zmninja-doesn-t-work-actually-even-zoneminder-web-console-doesn-t-work-you-should-fix-this" title="Permalink to this headline">¶</a></h3> +<p>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 <a class="reference external" href="https://forums.zoneminder.com">ZM +forum</a>. 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, <strong>I’m happy to +refund it anytime - just send me an email.</strong></p> +<p>In short, I don’t have the time to support ZoneMinder install issues - +sorry about that</p> +</div> +<div class="section" id="zmninja-doesn-t-work-zoneminder-works-but-i-have-no-idea-why-apis-don-t-work-you-should-fix-this"> +<h3>zmNinja doesn’t work. Zoneminder works, but I have no idea why APIs don’t work. You should fix this!<a class="headerlink" href="#zmninja-doesn-t-work-zoneminder-works-but-i-have-no-idea-why-apis-don-t-work-you-should-fix-this" title="Permalink to this headline">¶</a></h3> +<p><em>Sigh</em>. I don’t maintain ZoneMinder. I only develop the app. <em>You</em> 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 +<em>not</em> going to fix them for you, especially if you act like its not your +problem. <a class="reference external" href="https://medium.com/zmninja/no-soup-for-you-42ac0927952">I’m perfectly fine if you choose not to use my +app</a>, which +is why I refund, anytime.</p> +</div> +<div class="section" id="i-can-t-compile-zmninja-help-me"> +<h3>I can’t compile zmNinja, help me!<a class="headerlink" href="#i-can-t-compile-zmninja-help-me" title="Permalink to this headline">¶</a></h3> +<p>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.</p> +</div> +<div class="section" id="how-to-report-errors"> +<h3>How to report errors<a class="headerlink" href="#how-to-report-errors" title="Permalink to this headline">¶</a></h3> +<ul class="simple"> +<li>I don’t know why something is not working if you don’t provide +sufficient inputs. Start by creating a <a class="reference external" href="https://github.com/pliablepixels/zmNinja/issues">GitHub +issue</a> and please +fill in the template correctly. If you don’t want to post debug logs +in the issue, <a class="reference external" href="mailto:pliablepixels+zmNinja%40gmail.com">email</a> 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)</li> +<li>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</li> +<li>Before you create an issue, please make sure you have read the +sections on <a class="reference external" href="#connectionauthentication-issues">connection +issues</a> +and <a class="reference external" href="#live-streaming-issues">streaming</a> +issues and Step 6 of <a class="reference internal" href="validating-api.html"><span class="doc">Validating APIs</span></a></li> +<li>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</li> +<li>I have released the desktop version free - download it +<a class="reference external" href="https://github.com/pliablepixels/zmNinja/releases">here</a>. 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</li> +<li>Always tell me what your ZoneMinder & zmNinja versions are</li> +<li>If your app suddenly stopped working:<ul> +<li>Send me DEBUG logs of the app</li> +<li>tell me what changed (got to be something. You updated the app, +you upgraded ZM)</li> +<li>What exactly is not working?</li> +</ul> +</li> +</ul> +</div> +</div> +<div class="section" id="profile-information-storage-related"> +<h2>Profile information storage related<a class="headerlink" href="#profile-information-storage-related" title="Permalink to this headline">¶</a></h2> +<div class="section" id="zmninja-is-not-saving-my-information-it-keeps-asking-me-to-re-enter-all-my-data"> +<h3>zmNinja is not saving my information. It keeps asking me to re-enter all my data<a class="headerlink" href="#zmninja-is-not-saving-my-information-it-keeps-asking-me-to-re-enter-all-my-data" title="Permalink to this headline">¶</a></h3> +<p>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</p> +</div> +<div class="section" id="i-updated-my-zmninja-app-and-all-my-server-settings-were-cleared-why"> +<h3>I updated my zmNinja app and all my server settings were cleared. Why?<a class="headerlink" href="#i-updated-my-zmninja-app-and-all-my-server-settings-were-cleared-why" title="Permalink to this headline">¶</a></h3> +<p>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)</p> +<p>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.</p> +</div> +</div> +<div class="section" id="connection-authentication-issues"> +<h2>Connection/Authentication issues<a class="headerlink" href="#connection-authentication-issues" title="Permalink to this headline">¶</a></h2> +<div class="section" id="general-tips"> +<h3>General tips<a class="headerlink" href="#general-tips" title="Permalink to this headline">¶</a></h3> +<ul class="simple"> +<li>Disable server redirects like 302 and then try if using the mobile +app</li> +<li>To make sure there are no connection issues, launch your <strong>phone +browser</strong> 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!</li> +<li>Some phones need the SSL certificate installed in the device</li> +<li>Specific SSL settings can cause issues with Android or iOS</li> +<li>Don’t use funky/special characters in passwords - try changing it to +a complex password without funky characters and try</li> +<li>Use the wizard - I’ve seen many examples of typos when the user +thinks they don’t have a typo</li> +<li>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.</li> +<li>Please note zmNinja does NOT support Digest authentication. So please +don’t put in digest auth info when zmNinja asks for basic +authentication</li> +<li>Look at your ZM logs and zmNinja logs - they help isolate the problem</li> +</ul> +</div> +<div class="section" id="server-redirects"> +<h3>Server Redirects<a class="headerlink" href="#server-redirects" title="Permalink to this headline">¶</a></h3> +<p>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 <code class="docutils literal"><span class="pre">login.json</span></code> API first.</p> +</div> +<div class="section" id="self-signed-certs"> +<h3>Self signed certs<a class="headerlink" href="#self-signed-certs" title="Permalink to this headline">¶</a></h3> +<p>A lot of people use self-signed certs. I’d strongly recommend you use +<a class="reference external" href="https://letsencrypt.org">LetsEncrypt</a> 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.</p> +</div> +<div class="section" id="ssl-settings"> +<h3>SSL settings<a class="headerlink" href="#ssl-settings" title="Permalink to this headline">¶</a></h3> +<p>If you are getting <code class="docutils literal"><span class="pre">SSL</span> <span class="pre">protocol/handshake</span> <span class="pre">errors</span></code> 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.</p> +<p>One use reported that a setting of <code class="docutils literal"><span class="pre">ssl_ecdh_curve</span> <span class="pre">secp384r1</span></code> in his +nginx config was resulting in zmNinja Android not being able to connect +to the server. Changing it to +<code class="docutils literal"><span class="pre">ssl_ecdh_curve</span> <span class="pre">secp521r1:secp384r1:prime256v1;</span></code> worked for him.</p> +<p>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.</p> +</div> +<div class="section" id="everything-works-when-i-use-lan-ip-but-i-get-not-authenticated-when-i-use-wan-ip"> +<h3>Everything works when I use LAN IP, but I get “not authenticated” when I use WAN IP<a class="headerlink" href="#everything-works-when-i-use-lan-ip-but-i-get-not-authenticated-when-i-use-wan-ip" title="Permalink to this headline">¶</a></h3> +<p>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.</p> +<p>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.</p> +<p>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)</p> +<p>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)</p> +<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">sudo</span> <span class="n">openssl</span> <span class="n">req</span> <span class="o">-</span><span class="n">x509</span> <span class="o">-</span><span class="n">nodes</span> <span class="o">-</span><span class="n">days</span> <span class="mi">365</span> <span class="o">-</span><span class="n">newkey</span> <span class="n">rsa</span><span class="p">:</span><span class="mi">2048</span> <span class="o">-</span><span class="n">keyout</span> <span class="o">/</span><span class="n">etc</span><span class="o">/</span><span class="n">apache2</span><span class="o">/</span><span class="n">ssl</span><span class="o">/</span><span class="n">zoneminder</span><span class="o">.</span><span class="n">key</span> <span class="o">-</span><span class="n">out</span> <span class="o">/</span><span class="n">etc</span><span class="o">/</span><span class="n">apache2</span><span class="o">/</span><span class="n">ssl</span><span class="o">/</span><span class="n">zoneminder</span><span class="o">.</span><span class="n">crt</span> +</pre></div> +</div> +<p>Next up, edit your apache ssl config (example +/etc/apache2/sites-available/default-ssl.conf) And add/modify the +following lines:</p> +<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">SSLCertificateFile</span> <span class="o">/</span><span class="n">etc</span><span class="o">/</span><span class="n">apache2</span><span class="o">/</span><span class="n">ssl</span><span class="o">/</span><span class="n">zoneminder</span><span class="o">.</span><span class="n">crt</span> +<span class="n">SSLCertificateKeyFile</span> <span class="o">/</span><span class="n">etc</span><span class="o">/</span><span class="n">apache2</span><span class="o">/</span><span class="n">ssl</span><span class="o">/</span><span class="n">zoneminder</span><span class="o">.</span><span class="n">key</span> +</pre></div> +</div> +<p>restart apache</p> +<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">sudo</span> <span class="n">service</span> <span class="n">apache2</span> <span class="n">restart</span> +</pre></div> +</div> +</div> +</div> +<div class="section" id="live-streaming-issues"> +<h2>Live streaming issues<a class="headerlink" href="#live-streaming-issues" title="Permalink to this headline">¶</a></h2> +<div class="section" id="summary-of-everything-works-but-i-can-t-see-live-feed"> +<h3>Summary of Everything works, but I can’t see live feed<a class="headerlink" href="#summary-of-everything-works-but-i-can-t-see-live-feed" title="Permalink to this headline">¶</a></h3> +<p><em>Please</em> 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.</p> +<ul class="simple"> +<li>Please enable <code class="docutils literal"><span class="pre">AUTH_HASH_LOGINS</span></code> as well as set <code class="docutils literal"><span class="pre">AUTH_RELAY</span></code> to +“hashed”</li> +<li>You think your APIs are working, but they are really not. If you open +a browser and type in <code class="docutils literal"><span class="pre">https://yourserver/zm/api/monitors.json</span></code> and +you see some text on top followed by monitor data, your APIs are +<em>not</em> working. You need to search the forums and figure out how to +get rid of that text.</li> +<li>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.</li> +<li>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</li> +<li>Always try with the <a class="reference external" href="https://github.com/pliablepixels/zmNinja/releases">free desktop +version</a> 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.</li> +<li>Your <code class="docutils literal"><span class="pre">cgi-bin</span></code> 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.</li> +</ul> +<p>For example:</p> +<p>In the above case my zmNinja cgi-bin setting is +<code class="docutils literal"><span class="pre">https://myserver:myport/zm/cgi-bin</span></code></p> +<ul class="simple"> +<li>You are using Basic Authentication. See +<a class="reference external" href="#i-can-t-see-streams-i-use-basic-auth">here</a></li> +<li>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</li> +<li>When trying to view live images, look at your <em>webserver</em> error logs +- example Apache’s <code class="docutils literal"><span class="pre">error.log</span></code> - see any image/jpg errors? That +means you are missing libraries</li> +<li>You have set up a multi-server install of ZM without knowing you did +See <a class="reference external" href="#i-can-t-see-streams-multi-server-is-enabled">here</a></li> +<li>Look at zmNinja, ZoneMinder and web server error logs at the time of +error - one of them should give more clues. Please send me <em>all</em> the +logs if you ask for help</li> +<li>Read the set of notes below</li> +</ul> +</div> +<div class="section" id="general-note"> +<h3>General note<a class="headerlink" href="#general-note" title="Permalink to this headline">¶</a></h3> +<p>To debug streaming notes, always try with the free desktop version +first. When trying to stream simultaneously look at the debug logs of +zmNinja (<code class="docutils literal"><span class="pre">Ctrl/Cmd+Alt+D</span></code> in desktop build, console and/or network +tab) and your webserver error logs.</p> +</div> +<div class="section" id="i-can-t-see-stream-and-i-can-t-see-streams-in-zoneminder-webconsole-either"> +<h3>I can’t see stream: And I can’t see streams in ZoneMinder webconsole either<a class="headerlink" href="#i-can-t-see-stream-and-i-can-t-see-streams-in-zoneminder-webconsole-either" title="Permalink to this headline">¶</a></h3> +<p>Check if streaming works in the web interface. If it does not work, +zmNinja won’t work either. Fix ZM first</p> +</div> +<div class="section" id="i-can-t-see-streams-i-use-basic-auth"> +<h3>I can’t see streams: I use basic auth<a class="headerlink" href="#i-can-t-see-streams-i-use-basic-auth" title="Permalink to this headline">¶</a></h3> +<p>Starting Chrome v59, the browser changed basic credential behavior. The +issue report is +<a class="reference external" href="https://bugs.chromium.org/p/chromium/issues/detail?id=435547#c33">here</a>. +Here is the core issue: zmNinja constructs URLs as +<code class="docutils literal"><span class="pre">http://user:password@server</span></code> when you have basic auth (and starting +v1.3 uses the <code class="docutils literal"><span class="pre">Authorization</span></code> header). However, since images are +rendered using <code class="docutils literal"><span class="pre"><img</span> <span class="pre">src></span></code> there is no option but to put in a +<code class="docutils literal"><span class="pre">user:password</span></code> in the URL. Chrome allows this format for direct +requests (such as API calls) but will strip out the <code class="docutils literal"><span class="pre">user:password</span></code> +part for <em>embedded</em> requests (like <code class="docutils literal"><span class="pre"><img</span> <span class="pre">src=""></span></code> 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 <em>right</em> way to do this is to replace the +<code class="docutils literal"><span class="pre">user:pass</span></code> with an <code class="docutils literal"><span class="pre">Authorization</span></code> header but there is no way to do +that with images that are rendered with <code class="docutils literal"><span class="pre"><img</span> <span class="pre">src></span></code> (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.</p> +<p>How this affects you: * If you are using HTTP Basic Authentication</p> +<p>Then your images won’t show.</p> +<p>Possible Workarounds: * Configure your web server to skip basic +authentication for <code class="docutils literal"><span class="pre">nph-zms</span></code> 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</p> +<div class="section" id="skipping-auth-for-nph-zms-urls"> +<h4>Skipping auth for <code class="docutils literal"><span class="pre">nph-zms</span></code> URLs<a class="headerlink" href="#skipping-auth-for-nph-zms-urls" title="Permalink to this headline">¶</a></h4> +<p>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 <a class="reference external" href="https://github.com/adamoutler">Adam Outler</a> - he +uses a different approach using reverse proxies, which I link to later)</p> +<div class="code apache highlight-default"><div class="highlight"><pre><span></span> <span class="c1"># this configuration assumes your server portal is server:port/zm</span> + <span class="c1"># and cgi-path is /zm/cgi-bin. Please change it to your specific environment</span> + <span class="c1"># Also requires Apache 2.4 or above</span> + +<span class="o"><</span><span class="n">Location</span> <span class="o">/></span> + <span class="n">SetEnvIf</span> <span class="n">Request_URI</span> <span class="o">^/</span><span class="n">zm</span><span class="o">/</span><span class="n">cgi</span><span class="o">-</span><span class="nb">bin</span><span class="o">/</span> <span class="n">noauth</span><span class="o">=</span><span class="mi">1</span> + <span class="n">SetEnvIf</span> <span class="n">Request_URI</span> <span class="o">^/</span><span class="n">zm</span><span class="o">/</span><span class="n">index</span><span class="o">.</span><span class="n">php</span> <span class="n">noauth</span><span class="o">=</span><span class="mi">1</span> + <span class="n">AuthType</span> <span class="n">Basic</span> + <span class="n">AuthName</span> <span class="s2">"Auth Required"</span> + <span class="n">AuthUserFile</span> <span class="s2">"/etc/apache2/.htpasswd"</span> + <span class="o"><</span><span class="n">RequireAny</span><span class="o">></span> + <span class="n">Require</span> <span class="n">valid</span><span class="o">-</span><span class="n">user</span> + <span class="n">Require</span> <span class="n">env</span> <span class="n">noauth</span> + <span class="o"></</span><span class="n">RequireAny</span><span class="o">></span> +<span class="o"></</span><span class="n">Location</span><span class="o">></span> +</pre></div> +</div> +</div> +<div class="section" id="authorization-with-a-reverseproxy"> +<h4>Authorization with a ReverseProxy<a class="headerlink" href="#authorization-with-a-reverseproxy" title="Permalink to this headline">¶</a></h4> +<div class="section" id="simple-starter"> +<h5>Simple starter<a class="headerlink" href="#simple-starter" title="Permalink to this headline">¶</a></h5> +<p><strong>STEP 1</strong>: 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.</p> +<p><strong>STEP 2 (Apache)</strong>: Use mod_rewrite and mod_header to convert the +token into an authorization in your Apache config. Add this to the +relevant section (<code class="docutils literal"><span class="pre">VirtualHost</span></code> or others)</p> +<div class="code apache highlight-default"><div class="highlight"><pre><span></span>RewriteEngine on +RewriteCond %{QUERY_STRING} (?:^|&)basicauth=([^&]+) +RewriteRule (.*) - [E=QS_TOKEN:%1] +RequestHeader set Authorization "Basic %{QS_TOKEN}e" env=QS_TOKEN +</pre></div> +</div> +<p><strong>STEP 2 (Nginx)</strong>: Thanks to user [@ysammy](<a class="reference external" href="https://github.com/ysammy">https://github.com/ysammy</a>)</p> +<div class="code nginx highlight-default"><div class="highlight"><pre><span></span><span class="n">location</span> <span class="o">/</span><span class="n">zm</span><span class="o">/</span><span class="n">cgi</span><span class="o">-</span><span class="nb">bin</span><span class="o">/</span><span class="n">nph</span><span class="o">-</span><span class="n">zms</span> <span class="p">{</span> + <span class="n">proxy_pass</span> <span class="n">http</span><span class="p">:</span><span class="o">//<</span><span class="n">IP</span><span class="o">></span><span class="p">:</span><span class="o"><</span><span class="n">PORT</span><span class="o">>/</span><span class="n">zm</span><span class="o">/</span><span class="n">cgi</span><span class="o">-</span><span class="nb">bin</span><span class="o">/</span><span class="n">nph</span><span class="o">-</span><span class="n">zms</span><span class="p">;</span> + <span class="n">proxy_set_header</span> <span class="n">Authorization</span> <span class="s2">"Basic $arg_basicauth"</span><span class="p">;</span> + <span class="p">}</span> +</pre></div> +</div> +</div> +<div class="section" id="a-more-complete-and-more-secure-option"> +<h5>A more complete and more secure option<a class="headerlink" href="#a-more-complete-and-more-secure-option" title="Permalink to this headline">¶</a></h5> +<p>User <a class="reference external" href="https://github.com/adamoutler">Adam Outler</a> has contributed the +following process: see +<a class="reference external" href="https://github.com/pliablepixels/zmNinja/wiki/Apache-Proxy-Authorization-with-HTTPS,-Basic-Auth,-and-ProxyPass">HERE</a>. +Adam also has this to say about why proxies should be recommended for +HTTPS enabled ZoneMinder instances:</p> +<blockquote> +<div>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 :).</div></blockquote> +</div> +</div> +</div> +<div class="section" id="i-can-t-see-streams-multi-server-is-enabled"> +<h3>I can’t see streams: Multi-server is enabled<a class="headerlink" href="#i-can-t-see-streams-multi-server-is-enabled" title="Permalink to this headline">¶</a></h3> +<p>The chances are very high that you have enabled ZoneMinder’s +<a class="reference external" href="http://zoneminder.readthedocs.io/en/stable/installationguide/multiserver.html">Multi-Server</a> +option and you entered something like <code class="docutils literal"><span class="pre">localhost</span></code> in server settings. +<strong>DON’T. You can’t enter localhost</strong>. 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 <code class="docutils literal"><span class="pre">localhost</span></code>. BTW, if you did +put in <code class="docutils literal"><span class="pre">localhost</span></code> 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.</p> +</div> +<div class="section" id="i-can-t-see-streams-you-have-cgi-bin-issues"> +<h3>I can’t see streams: you have cgi-bin issues<a class="headerlink" href="#i-can-t-see-streams-you-have-cgi-bin-issues" title="Permalink to this headline">¶</a></h3> +<ul class="simple"> +<li>Try to use the wizard. If it fails,</li> +<li>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.</li> +</ul> +</div> +<div class="section" id="zmninja-montage-does-not-seem-smooth-feeds-seem-a-little-delayed-compared-to-zm-console"> +<h3>zmNinja montage does not seem smooth - feeds seem a little delayed compared to ZM console<a class="headerlink" href="#zmninja-montage-does-not-seem-smooth-feeds-seem-a-little-delayed-compared-to-zm-console" title="Permalink to this headline">¶</a></h3> +<p>zmNinja does not use <code class="docutils literal"><span class="pre">nph-zms</span></code> 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)</p> +<p>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 +<a class="reference external" href="https://medium.com/zmninja/multi-port-storage-areas-and-more-d5836a336c93">this</a> +post for more details.</p> +</div> +</div> +<div class="section" id="event-images-streaming-related"> +<h2>Event images/streaming related<a class="headerlink" href="#event-images-streaming-related" title="Permalink to this headline">¶</a></h2> +<div class="section" id="id1"> +<h3>General note<a class="headerlink" href="#id1" title="Permalink to this headline">¶</a></h3> +<p>To debug streaming notes, always try with the free desktop version +first. When trying to stream simultaneously look at the debug logs of +zmNinja (<code class="docutils literal"><span class="pre">Ctrl/Cmd+Alt+D</span></code> in desktop build, console and/or network +tab) and your webserver error logs.</p> +<p>Also, Starting ZM 1.32 and beyond, please enable <code class="docutils literal"><span class="pre">AUTH_HASH_LOGINS</span></code> as +well as set <code class="docutils literal"><span class="pre">AUTH_RELAY</span></code> to “hashed”</p> +</div> +<div class="section" id="event-stream-viewing-does-not-work"> +<h3>Event stream viewing does not work<a class="headerlink" href="#event-stream-viewing-does-not-work" title="Permalink to this headline">¶</a></h3> +<ul class="simple"> +<li>Look at apache error logs - it often gives you hints</li> +</ul> +</div> +<div class="section" id="video-not-playable"> +<h3>Video Not Playable<a class="headerlink" href="#video-not-playable" title="Permalink to this headline">¶</a></h3> +<ul class="simple"> +<li>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</li> +<li>There could be other reasons due to which the video is not playable:</li> +<li>There is an encoding issue in the video generated</li> +<li>The video resolution is too big (see <a class="reference external" href="https://forums.zoneminder.com/viewtopic.php?f=33&p=108788#p108774">this +thread</a>)</li> +<li>In general, to get to the root of what is going on, you’ll need +device logs using ADB (see +<a class="reference external" href="https://forums.zoneminder.com/viewtopic.php?f=33&p=108788#p108753">this</a>)</li> +</ul> +</div> +<div class="section" id="event-thumbnails-images-don-t-show"> +<h3>Event thumbnails/images don’t show<a class="headerlink" href="#event-thumbnails-images-don-t-show" title="Permalink to this headline">¶</a></h3> +<p>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.</p> +</div> +<div class="section" id="when-viewing-individual-frames-some-event-frames-show-but-some-don-t"> +<h3>When viewing individual frames, some event frames show, but some don’t<a class="headerlink" href="#when-viewing-individual-frames-some-event-frames-show-but-some-don-t" title="Permalink to this headline">¶</a></h3> +<p>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 <code class="docutils literal"><span class="pre">ffmpeg</span></code> 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.</p> +</div> +<div class="section" id="zmninja-montage-screen-shows-all-my-monitors-but-in-event-montage-i-only-see-5"> +<h3>zmNinja montage screen shows all my monitors, but in Event Montage, I only see 5?<a class="headerlink" href="#zmninja-montage-screen-shows-all-my-monitors-but-in-event-montage-i-only-see-5" title="Permalink to this headline">¶</a></h3> +<p>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 <em>not</em> 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.</p> +</div> +</div> +<div class="section" id="other-misc-issues"> +<h2>Other misc. issues<a class="headerlink" href="#other-misc-issues" title="Permalink to this headline">¶</a></h2> +<div class="section" id="i-suddently-see-an-error-message-saying-i-need-to-enable-zm-auth-hash-logins-this-wasn-t-there-before"> +<h3>I suddently see an error message saying I need to enable ZM_AUTH_HASH_LOGINS. This wasn’t there before<a class="headerlink" href="#i-suddently-see-an-error-message-saying-i-need-to-enable-zm-auth-hash-logins-this-wasn-t-there-before" title="Permalink to this headline">¶</a></h3> +<p>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.</p> +</div> +<div class="section" id="zmninja-1-2-515-and-beyond-says-need-api-upgrade-for-the-24hr-review-feature-what-does-that-mean"> +<h3>zmNinja 1.2.515 and beyond says “Need API Upgrade” for the 24hr review feature. What does that mean?<a class="headerlink" href="#zmninja-1-2-515-and-beyond-says-need-api-upgrade-for-the-24hr-review-feature-what-does-that-mean" title="Permalink to this headline">¶</a></h3> +<p>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 <code class="docutils literal"><span class="pre">EventsController.php</span></code> (typically in +<code class="docutils literal"><span class="pre">/usr/share/zoneminder/www/api/app/Controller</span></code>) with <a class="reference external" href="https://raw.githubusercontent.com/ZoneMinder/zoneminder/85b7baa13178a838fe9fae94405c99fe7d2c669c/web/api/app/Controller/EventsController.php">this +one</a>.</p> +</div> +<div class="section" id="i-upgraded-zoneminder-to-1-30-2-or-above-and-zmninja-stopped-working"> +<h3>I upgraded ZoneMinder to 1.30.2 or above and zmNinja stopped working!<a class="headerlink" href="#i-upgraded-zoneminder-to-1-30-2-or-above-and-zmninja-stopped-working" title="Permalink to this headline">¶</a></h3> +<p>ZoneMinder changed API packaging with ZM 1.30.2 and above. You will have +to read your distro notes on how to <strong>properly</strong> update. Read +<a class="reference external" href="https://forums.zoneminder.com/viewtopic.php?f=36&t=26002&start=30&hilit=api+broken">this</a> +thread. Before you think zmNinja is the problem, make sure your APIs +are working (see <a class="reference internal" href="validating-api.html"><span class="doc">Validating APIs</span></a>)</p> +<p>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 <code class="docutils literal"><span class="pre">php5-apc</span></code> 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)</p> +</div> +<div class="section" id="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"> +<h3>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<a class="headerlink" href="#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" title="Permalink to this headline">¶</a></h3> +<p>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 +<a class="reference external" href="http://tech-stuff.org/which-ports-are-considered-unsafe-in-browsers/">here</a></p> +</div> +<div class="section" id="the-montage-screen-is-causing-issues-with-my-zm-server-i-get-connection-timeout-issues-or-mysql-connection-problems"> +<h3>The Montage screen is causing issues with my ZM server - I get connection timeout issues or MySQL connection problems<a class="headerlink" href="#the-montage-screen-is-causing-issues-with-my-zm-server-i-get-connection-timeout-issues-or-mysql-connection-problems" title="Permalink to this headline">¶</a></h3> +<ul class="simple"> +<li>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 <code class="docutils literal"><span class="pre">max_connections</span></code> in <code class="docutils literal"><span class="pre">my.cnf</span></code> if +you are facing time_wait/timeout issues.</li> +</ul> +</div> +<div class="section" id="the-app-works-great-except-it-doesn-t-work-on-one-android-phone-works-in-others"> +<h3>The app works great - except it doesn’t work on ONE Android phone - works in others!<a class="headerlink" href="#the-app-works-great-except-it-doesn-t-work-on-one-android-phone-works-in-others" title="Permalink to this headline">¶</a></h3> +<p>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 +<a class="reference external" href="https://forums.zoneminder.com/viewtopic.php?f=33&t=25946">this</a> +discussion</p> +</div> +<div class="section" id="apis-are-not-working-zm-console-works-fine"> +<h3>APIs are not working ! ZM console works fine.<a class="headerlink" href="#apis-are-not-working-zm-console-works-fine" title="Permalink to this headline">¶</a></h3> +<p><a class="reference internal" href="validating-api.html"><span class="doc">Validating APIs</span></a></p> +</div> +<div class="section" id="i-m-using-mocord-record-and-i-don-t-see-events-without-alarms"> +<h3>I’m using mocord/record and I don’t see events without alarms<a class="headerlink" href="#i-m-using-mocord-record-and-i-don-t-see-events-without-alarms" title="Permalink to this headline">¶</a></h3> +<p>Tap on the “…” menu option and toggle “Show all events”. By default, +it shows events with at least one alarm frame</p> +</div> +<div class="section" id="taking-snapshots-or-downloading-videos-don-t-work-in-android"> +<h3>Taking snapshots or downloading videos don’t work in Android<a class="headerlink" href="#taking-snapshots-or-downloading-videos-don-t-work-in-android" title="Permalink to this headline">¶</a></h3> +<p>If you are unable to download/save, look at your logs. If you see +something like +<code class="docutils literal"><span class="pre">"exception":"java.security.cert.CertPathValidatorException:</span> <span class="pre">Trust</span> <span class="pre">anchor</span> <span class="pre">for</span> <span class="pre">certification</span> <span class="pre">path</span> <span class="pre">not</span> <span class="pre">found."</span></code> +, 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.</p> +</div> +<div class="section" id="pan-tilt-zoom-doesn-t-work"> +<h3>Pan/Tilt/Zoom doesn’t work<a class="headerlink" href="#pan-tilt-zoom-doesn-t-work" title="Permalink to this headline">¶</a></h3> +<p>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.</p> +</div> +</div> +<div class="section" id="what-is-this-event-server"> +<h2>What is this Event Server?<a class="headerlink" href="#what-is-this-event-server" title="Permalink to this headline">¶</a></h2> +<p>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 +<a class="reference external" href="https://github.com/pliablepixels/zmeventserver">here</a>. I’d encourage +you to install and use it - its very nice.</p> +<div class="section" id="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"> +<h3>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?<a class="headerlink" href="#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" title="Permalink to this headline">¶</a></h3> +<p>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.</p> +</div> +</div> +<div class="section" id="is-zmninja-free"> +<h2>Is zmNinja free?<a class="headerlink" href="#is-zmninja-free" title="Permalink to this headline">¶</a></h2> +<p>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.</p> +</div> +<div class="section" id="who-are-the-developers-behind-this"> +<h2>Who are the developers behind this?<a class="headerlink" href="#who-are-the-developers-behind-this" title="Permalink to this headline">¶</a></h2> +<p>Me.</p> +</div> +<div class="section" id="the-code-needs-improvement"> +<h2>The code needs improvement<a class="headerlink" href="#the-code-needs-improvement" title="Permalink to this headline">¶</a></h2> +<p>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 <a class="reference external" href="https://github.com/pliablepixels">profile</a> says what it says. +But hey, if you can improve it, please PR!</p> +</div> +<div class="section" id="is-zmninja-an-official-zoneminder-product"> +<h2>Is zmNinja an official ZoneMinder product?<a class="headerlink" href="#is-zmninja-an-official-zoneminder-product" title="Permalink to this headline">¶</a></h2> +<p>No. But the ZM developers are amazing people who have been very helpful.</p> +</div> +<div class="section" id="i-want-to-donate-money"> +<h2>I want to donate money<a class="headerlink" href="#i-want-to-donate-money" title="Permalink to this headline">¶</a></h2> +<p>You could either <a class="reference external" href="https://www.bountysource.com/teams/zoneminder">donate to to +Zoneminder</a> or <a class="reference external" href="https://salt.bountysource.com/teams/zmninja">donate +to zmNinja</a>. Donations +to ZoneMinder don’t contribute to zmNinja, but the ZoneMinder devs will +benefit from it, which is fine too.</p> +</div> +<div class="section" id="how-does-zmninja-use-my-personal-data"> +<h2>How does zmNinja use my personal data?<a class="headerlink" href="#how-does-zmninja-use-my-personal-data" title="Permalink to this headline">¶</a></h2> +<p>Please read +<a class="reference external" href="https://medium.com/zmninja/zmninja-privacy-and-your-data-5489a5974baf">this</a></p> +</div> +<div class="section" id="i-want-to-donate-time-expertise-code"> +<h2>I want to donate time/expertise/code<a class="headerlink" href="#i-want-to-donate-time-expertise-code" title="Permalink to this headline">¶</a></h2> +<p>Great. Make sure you read the +<a class="reference external" href="https://github.com/pliablepixels/zmNinja/blob/master/LICENSE">license</a> +, read the <a class="reference external" href="https://github.com/pliablepixels/zmNinja/blob/master/CONTRIBUTING.md">contributing +guidelines</a> +and if it works for you, happy to see what you’d like to do.</p> +</div> +</div> + + + </div> + <div class="articleComments"> + + </div> + </div> + <footer> + + <div class="rst-footer-buttons" role="navigation" aria-label="footer navigation"> + + <a href="validating-api.html" class="btn btn-neutral float-right" title="Validating APIs" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right"></span></a> + + + <a href="../index.html" class="btn btn-neutral" title="Welcome to zmNinja’s documentation!" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"></span> Previous</a> + + </div> + + + <hr/> + + <div role="contentinfo"> + <p> + © Copyright 2019, Pliable Pixels. + + </p> + </div> + Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a <a href="https://github.com/snide/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>. + +</footer> + + </div> + </div> + + </section> + + </div> + + + + + + <script type="text/javascript"> + var DOCUMENTATION_OPTIONS = { + URL_ROOT:'../', + VERSION:'', + COLLAPSE_INDEX:false, + FILE_SUFFIX:'.html', + HAS_SOURCE: true, + SOURCELINK_SUFFIX: '.txt' + }; + </script> + <script type="text/javascript" src="../_static/jquery.js"></script> + <script type="text/javascript" src="../_static/underscore.js"></script> + <script type="text/javascript" src="../_static/doctools.js"></script> + + + + + + <script type="text/javascript" src="../_static/js/theme.js"></script> + + + + + <script type="text/javascript"> + jQuery(function () { + SphinxRtdTheme.StickyNav.enable(); + }); + </script> + + +</body> +</html>
\ No newline at end of file diff --git a/docs/docgen/html/guides/contributing-language.html b/docs/docgen/html/guides/contributing-language.html new file mode 100644 index 00000000..bba4438b --- /dev/null +++ b/docs/docgen/html/guides/contributing-language.html @@ -0,0 +1,297 @@ + + +<!DOCTYPE html> +<!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]--> +<!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]--> +<head> + <meta charset="utf-8"> + + <meta name="viewport" content="width=device-width, initial-scale=1.0"> + + <title>Contributing a new language — zmNinja documentation</title> + + + + + + + + + + + + + + + + + + <link rel="stylesheet" href="../_static/css/theme.css" type="text/css" /> + + + + + + <link rel="index" title="Index" + href="../genindex.html"/> + <link rel="search" title="Search" href="../search.html"/> + <link rel="top" title="zmNinja documentation" href="../index.html"/> + <link rel="next" title="Building from Source" href="source.html"/> + <link rel="prev" title="Desktop port tips" href="desktop.html"/> + + + <script src="../_static/js/modernizr.min.js"></script> + +</head> + +<body class="wy-body-for-nav" role="document"> + + + <div class="wy-grid-for-nav"> + + + <nav data-toggle="wy-nav-shift" class="wy-nav-side"> + <div class="wy-side-scroll"> + <div class="wy-side-nav-search"> + + + + <a href="../index.html" class="icon icon-home"> zmNinja + + + + + <img src="../_static/ninja.png" class="logo" /> + + </a> + + + + + + + +<div role="search"> + <form id="rtd-search-form" class="wy-form" action="../search.html" method="get"> + <input type="text" name="q" placeholder="Search docs" /> + <input type="hidden" name="check_keywords" value="yes" /> + <input type="hidden" name="area" value="default" /> + </form> +</div> + + + </div> + + <div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation"> + + + + + + + <ul class="current"> +<li class="toctree-l1"><a class="reference internal" href="FAQ.html">zmNinja FAQ</a></li> +<li class="toctree-l1"><a class="reference internal" href="validating-api.html">Validating APIs</a></li> +<li class="toctree-l1"><a class="reference internal" href="desktop.html">Desktop port tips</a></li> +<li class="toctree-l1 current"><a class="current reference internal" href="#">Contributing a new language</a><ul> +<li class="toctree-l2"><a class="reference internal" href="#adding-a-new-language">Adding a new language</a></li> +<li class="toctree-l2"><a class="reference internal" href="#main-language-file">Main Language file</a></li> +<li class="toctree-l2"><a class="reference internal" href="#translating-help-language-file">Translating Help language file</a></li> +<li class="toctree-l2"><a class="reference internal" href="#how-to-recognize-a-new-language">How to recognize a new language:</a></li> +</ul> +</li> +<li class="toctree-l1"><a class="reference internal" href="source.html">Building from Source</a></li> +</ul> + + + + </div> + </div> + </nav> + + <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap"> + + + <nav class="wy-nav-top" role="navigation" aria-label="top navigation"> + + <i data-toggle="wy-nav-top" class="fa fa-bars"></i> + <a href="../index.html">zmNinja</a> + + </nav> + + + + <div class="wy-nav-content"> + <div class="rst-content"> + + + + + + + + + + + + + + + + +<div role="navigation" aria-label="breadcrumbs navigation"> + + <ul class="wy-breadcrumbs"> + + <li><a href="../index.html">Docs</a> »</li> + + <li>Contributing a new language</li> + + + <li class="wy-breadcrumbs-aside"> + + + <a href="../_sources/guides/contributing-language.rst.txt" rel="nofollow"> View page source</a> + + + </li> + + </ul> + + + <hr/> +</div> + <div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article"> + <div itemprop="articleBody"> + + <div class="section" id="contributing-a-new-language"> +<h1>Contributing a new language<a class="headerlink" href="#contributing-a-new-language" title="Permalink to this headline">¶</a></h1> +<p>If you are familiar with using git, I’d prefer if you follow the Pull +Request process +<a class="reference external" href="https://github.com/pliablepixels/zmNinja/blob/master/CONTRIBUTING.md#steps-for-code-contribution">here</a>.</p> +<div class="section" id="adding-a-new-language"> +<h2>Adding a new language<a class="headerlink" href="#adding-a-new-language" title="Permalink to this headline">¶</a></h2> +<ul class="simple"> +<li>Languages translations are available +<a class="reference external" href="https://github.com/pliablepixels/zmNinja/tree/master/www/lang">here</a></li> +<li>To contribute a new language, add a new <code class="docutils literal"><span class="pre">locale-xx.json</span></code> (where +<code class="docutils literal"><span class="pre">xx</span></code> is your language code).</li> +<li>Ideally, you should also provide a language translation for the +zmNinja help file inside +<a class="reference external" href="https://github.com/pliablepixels/zmNinja/tree/master/www/lang/help">lang/help</a></li> +</ul> +<p>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.</p> +</div> +<div class="section" id="main-language-file"> +<h2>Main Language file<a class="headerlink" href="#main-language-file" title="Permalink to this headline">¶</a></h2> +<ul class="simple"> +<li>Make sure there is no comma after the last element</li> +<li>Comments are not allowed</li> +<li>Make sure you don’t add ellipsis “…” anywhere, they are added to +messages in code when needed</li> +<li>After you complete the translation file, do the following:</li> +</ul> +<p>(replace <code class="docutils literal"><span class="pre">-it</span></code> with the language you are working on)</p> +<p><code class="docutils literal"><span class="pre">python</span> <span class="pre">./checklang.py</span> <span class="pre">-f</span> <span class="pre">locale-it.json</span> <span class="pre">-b</span></code></p> +<p>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,</p> +<p><code class="docutils literal"><span class="pre">python</span> <span class="pre">./checklang.py</span> <span class="pre">-f</span> <span class="pre">locale-it.json</span> <span class="pre">-b</span> <span class="pre">-o</span></code></p> +<p>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</p> +</div> +<div class="section" id="translating-help-language-file"> +<h2>Translating Help language file<a class="headerlink" href="#translating-help-language-file" title="Permalink to this headline">¶</a></h2> +<ul class="simple"> +<li>Located inside lang/help</li> +<li>Please be careful not to mess up the html tags, please only focus on +text translation</li> +</ul> +</div> +<div class="section" id="how-to-recognize-a-new-language"> +<h2>How to recognize a new language:<a class="headerlink" href="#how-to-recognize-a-new-language" title="Permalink to this headline">¶</a></h2> +<p>(This is only for zmNinja developers. Not relevant for language +translators)</p> +<ul class="simple"> +<li>Modify languages array in NVR.js (look for <code class="docutils literal"><span class="pre">var</span> <span class="pre">languages</span></code>)</li> +<li>Register language glob code in app.js - make sure its added to array list and mapping (look for <code class="docutils literal"><span class="pre">registerAvailableLanguageKeys</span></code>)</li> +</ul> +</div> +</div> + + + </div> + <div class="articleComments"> + + </div> + </div> + <footer> + + <div class="rst-footer-buttons" role="navigation" aria-label="footer navigation"> + + <a href="source.html" class="btn btn-neutral float-right" title="Building from Source" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right"></span></a> + + + <a href="desktop.html" class="btn btn-neutral" title="Desktop port tips" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"></span> Previous</a> + + </div> + + + <hr/> + + <div role="contentinfo"> + <p> + © Copyright 2019, Pliable Pixels. + + </p> + </div> + Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a <a href="https://github.com/snide/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>. + +</footer> + + </div> + </div> + + </section> + + </div> + + + + + + <script type="text/javascript"> + var DOCUMENTATION_OPTIONS = { + URL_ROOT:'../', + VERSION:'', + COLLAPSE_INDEX:false, + FILE_SUFFIX:'.html', + HAS_SOURCE: true, + SOURCELINK_SUFFIX: '.txt' + }; + </script> + <script type="text/javascript" src="../_static/jquery.js"></script> + <script type="text/javascript" src="../_static/underscore.js"></script> + <script type="text/javascript" src="../_static/doctools.js"></script> + + + + + + <script type="text/javascript" src="../_static/js/theme.js"></script> + + + + + <script type="text/javascript"> + jQuery(function () { + SphinxRtdTheme.StickyNav.enable(); + }); + </script> + + +</body> +</html>
\ No newline at end of file diff --git a/docs/docgen/html/guides/desktop.html b/docs/docgen/html/guides/desktop.html new file mode 100644 index 00000000..bef5e3e0 --- /dev/null +++ b/docs/docgen/html/guides/desktop.html @@ -0,0 +1,336 @@ + + +<!DOCTYPE html> +<!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]--> +<!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]--> +<head> + <meta charset="utf-8"> + + <meta name="viewport" content="width=device-width, initial-scale=1.0"> + + <title>Desktop port tips — zmNinja documentation</title> + + + + + + + + + + + + + + + + + + <link rel="stylesheet" href="../_static/css/theme.css" type="text/css" /> + + + + + + <link rel="index" title="Index" + href="../genindex.html"/> + <link rel="search" title="Search" href="../search.html"/> + <link rel="top" title="zmNinja documentation" href="../index.html"/> + <link rel="next" title="Contributing a new language" href="contributing-language.html"/> + <link rel="prev" title="Validating APIs" href="validating-api.html"/> + + + <script src="../_static/js/modernizr.min.js"></script> + +</head> + +<body class="wy-body-for-nav" role="document"> + + + <div class="wy-grid-for-nav"> + + + <nav data-toggle="wy-nav-shift" class="wy-nav-side"> + <div class="wy-side-scroll"> + <div class="wy-side-nav-search"> + + + + <a href="../index.html" class="icon icon-home"> zmNinja + + + + + <img src="../_static/ninja.png" class="logo" /> + + </a> + + + + + + + +<div role="search"> + <form id="rtd-search-form" class="wy-form" action="../search.html" method="get"> + <input type="text" name="q" placeholder="Search docs" /> + <input type="hidden" name="check_keywords" value="yes" /> + <input type="hidden" name="area" value="default" /> + </form> +</div> + + + </div> + + <div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation"> + + + + + + + <ul class="current"> +<li class="toctree-l1"><a class="reference internal" href="FAQ.html">zmNinja FAQ</a></li> +<li class="toctree-l1"><a class="reference internal" href="validating-api.html">Validating APIs</a></li> +<li class="toctree-l1 current"><a class="current reference internal" href="#">Desktop port tips</a><ul> +<li class="toctree-l2"><a class="reference internal" href="#scope">Scope</a></li> +<li class="toctree-l2"><a class="reference internal" href="#command-line-parameters">Command Line parameters</a></li> +<li class="toctree-l2"><a class="reference internal" href="#multiple-instances">Multiple instances</a></li> +<li class="toctree-l2"><a class="reference internal" href="#hotkeys">Hotkeys</a></li> +<li class="toctree-l2"><a class="reference internal" href="#keyboard-bindings">Keyboard bindings</a></li> +<li class="toctree-l2"><a class="reference internal" href="#desktop-data-storage-locations">Desktop data storage locations</a></li> +</ul> +</li> +<li class="toctree-l1"><a class="reference internal" href="contributing-language.html">Contributing a new language</a></li> +<li class="toctree-l1"><a class="reference internal" href="source.html">Building from Source</a></li> +</ul> + + + + </div> + </div> + </nav> + + <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap"> + + + <nav class="wy-nav-top" role="navigation" aria-label="top navigation"> + + <i data-toggle="wy-nav-top" class="fa fa-bars"></i> + <a href="../index.html">zmNinja</a> + + </nav> + + + + <div class="wy-nav-content"> + <div class="rst-content"> + + + + + + + + + + + + + + + + +<div role="navigation" aria-label="breadcrumbs navigation"> + + <ul class="wy-breadcrumbs"> + + <li><a href="../index.html">Docs</a> »</li> + + <li>Desktop port tips</li> + + + <li class="wy-breadcrumbs-aside"> + + + <a href="../_sources/guides/desktop.rst.txt" rel="nofollow"> View page source</a> + + + </li> + + </ul> + + + <hr/> +</div> + <div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article"> + <div itemprop="articleBody"> + + <div class="section" id="desktop-port-tips"> +<h1>Desktop port tips<a class="headerlink" href="#desktop-port-tips" title="Permalink to this headline">¶</a></h1> +<div class="section" id="scope"> +<h2>Scope<a class="headerlink" href="#scope" title="Permalink to this headline">¶</a></h2> +<p>This page is dedicated to the Desktop version of zmNinja and tips & +tricks</p> +</div> +<div class="section" id="command-line-parameters"> +<h2>Command Line parameters<a class="headerlink" href="#command-line-parameters" title="Permalink to this headline">¶</a></h2> +<p>The following command line parameters are supported:</p> +<div class="highlight-default"><div class="highlight"><pre><span></span><span class="o">--</span><span class="n">path</span><span class="o">=<</span><span class="nb">dir</span><span class="o">></span> <span class="o">-</span> <span class="n">starts</span> <span class="n">zmNinja</span> <span class="ow">and</span> <span class="n">stores</span> <span class="n">user</span> <span class="n">profile</span> <span class="n">information</span> <span class="n">to</span> <span class="n">that</span> <span class="n">directory</span><span class="o">.</span> + <span class="n">This</span> <span class="n">allows</span> <span class="n">you</span> <span class="n">to</span> <span class="n">switch</span> <span class="n">between</span> <span class="n">different</span> <span class="n">user</span> <span class="n">settings</span><span class="o">.</span> + +<span class="o">--</span><span class="n">fs</span> <span class="o">-</span> <span class="n">starts</span> <span class="n">zmNinja</span> <span class="ow">in</span> <span class="n">full</span> <span class="n">screen</span> <span class="n">mode</span> +</pre></div> +</div> +</div> +<div class="section" id="multiple-instances"> +<h2>Multiple instances<a class="headerlink" href="#multiple-instances" title="Permalink to this headline">¶</a></h2> +<p>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 <code class="docutils literal"><span class="pre">--path</span></code> arguments with each instance because otherwise one +instance will conflict with another.</p> +<p>So lets say you want to run 2 copies of zmNinja at the same time:</p> +<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">mkdir</span> <span class="o">-</span><span class="n">p</span> <span class="o">/</span><span class="n">path</span><span class="o">/</span><span class="n">to</span><span class="o">/</span><span class="n">instance1</span> +<span class="n">mkdir</span> <span class="o">-</span><span class="n">p</span> <span class="o">/</span><span class="n">path</span><span class="o">/</span><span class="n">to</span><span class="o">/</span><span class="n">instance2</span> +</pre></div> +</div> +<p>And then:</p> +<div class="highlight-default"><div class="highlight"><pre><span></span><span class="c1"># for linux</span> +<span class="n">zmninjapro</span><span class="o">-</span><span class="mf">1.3</span><span class="o">.</span><span class="mi">22</span><span class="o">-</span><span class="n">x86_64</span><span class="o">.</span><span class="n">AppImage</span> <span class="o">--</span><span class="n">path</span><span class="o">=/</span><span class="n">path</span><span class="o">/</span><span class="n">to</span><span class="o">/</span><span class="n">instance1</span> +<span class="n">zmninjapro</span><span class="o">-</span><span class="mf">1.3</span><span class="o">.</span><span class="mi">22</span><span class="o">-</span><span class="n">x86_64</span><span class="o">.</span><span class="n">AppImage</span> <span class="o">--</span><span class="n">path</span><span class="o">=/</span><span class="n">path</span><span class="o">/</span><span class="n">to</span><span class="o">/</span><span class="n">instance2</span> + +<span class="c1">#for OSX. Note the -n is critical to launch a new instance</span> +<span class="nb">open</span> <span class="o">-</span><span class="n">n</span> <span class="o">./</span><span class="n">zmninjapro</span><span class="o">.</span><span class="n">app</span> <span class="o">--</span><span class="n">args</span> <span class="o">--</span><span class="n">path</span><span class="o">=/</span><span class="n">path</span><span class="o">/</span><span class="n">to</span><span class="o">/</span><span class="n">instance1</span> <span class="o">&</span> +<span class="nb">open</span> <span class="o">-</span><span class="n">n</span> <span class="o">./</span><span class="n">zmninjapro</span><span class="o">.</span><span class="n">app</span> <span class="o">--</span><span class="n">args</span> <span class="o">--</span><span class="n">path</span><span class="o">=/</span><span class="n">path</span><span class="o">/</span><span class="n">to</span><span class="o">/</span><span class="n">instance2</span> <span class="o">&</span> +</pre></div> +</div> +</div> +<div class="section" id="hotkeys"> +<h2>Hotkeys<a class="headerlink" href="#hotkeys" title="Permalink to this headline">¶</a></h2> +<p>The following hotkeys are supported while the app is running:</p> +<div class="highlight-default"><div class="highlight"><pre><span></span><span class="p">[</span><span class="n">Cmd</span><span class="o">/</span><span class="n">Ctrl</span><span class="p">]</span> <span class="o">+</span> <span class="n">L</span> <span class="o">-></span> <span class="n">Lock</span> <span class="n">app</span> <span class="p">(</span><span class="k">if</span> <span class="n">pin</span> <span class="n">code</span> <span class="ow">is</span> <span class="n">being</span> <span class="n">used</span><span class="p">)</span> +<span class="p">[</span><span class="n">Cmd</span><span class="o">/</span><span class="n">Ctrl</span><span class="p">]</span> <span class="o">+</span> <span class="n">Shift</span> <span class="o">+</span> <span class="n">F</span> <span class="o">-></span> <span class="n">toggle</span> <span class="n">between</span> <span class="n">full</span> <span class="n">screen</span> <span class="ow">and</span> <span class="n">windowed</span> <span class="n">mode</span> +<span class="p">[</span><span class="n">Cmd</span><span class="o">/</span><span class="n">Ctrl</span><span class="p">]</span> <span class="o">+</span> <span class="n">Shift</span> <span class="o">+</span> <span class="n">D</span> <span class="o">-></span> <span class="n">opens</span> <span class="n">the</span> <span class="n">debug</span> <span class="n">window</span><span class="o">.</span> + <span class="n">Super</span> <span class="n">useful</span> <span class="n">to</span> <span class="n">see</span> <span class="n">what</span> <span class="ow">is</span> <span class="n">going</span> <span class="n">on</span><span class="p">,</span> + <span class="n">especially</span> <span class="n">when</span> <span class="n">things</span> <span class="n">don</span><span class="s1">'t work</span> +</pre></div> +</div> +</div> +<div class="section" id="keyboard-bindings"> +<h2>Keyboard bindings<a class="headerlink" href="#keyboard-bindings" title="Permalink to this headline">¶</a></h2> +<p><strong>Live Monitor View (single view, not montage):</strong></p> +<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">Arrow</span> <span class="n">Left</span> <span class="o">-></span> <span class="n">move</span> <span class="n">to</span> <span class="n">previous</span> <span class="n">monitor</span> +<span class="n">Arrow</span> <span class="n">Right</span> <span class="o">-></span> <span class="n">move</span> <span class="n">to</span> <span class="nb">next</span> <span class="n">monitor</span> +<span class="n">Esc</span> <span class="o">-></span> <span class="n">remove</span> <span class="n">live</span> <span class="n">view</span> +<span class="n">P</span> <span class="o">-></span> <span class="n">toggle</span> <span class="n">PTZ</span> +</pre></div> +</div> +<p><strong>PTZ Operations to move (PTZ should be toggled to on first):</strong></p> +<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">Q</span> <span class="n">W</span> <span class="n">E</span> <span class="o">-></span> <span class="n">UpLeft</span><span class="p">,</span> <span class="n">Up</span><span class="p">,</span> <span class="n">UpRight</span> +<span class="n">A</span> <span class="n">S</span> <span class="n">D</span> <span class="o">-></span> <span class="n">Left</span><span class="p">,</span> <span class="n">Home</span><span class="p">,</span><span class="n">Right</span> +<span class="n">Z</span> <span class="n">X</span> <span class="n">C</span> <span class="o">-></span> <span class="n">DownLeft</span><span class="p">,</span> <span class="n">Down</span><span class="p">,</span> <span class="n">DownRight</span> +</pre></div> +</div> +<p><strong>Event Footage View:</strong></p> +<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">Arrow</span> <span class="n">Left</span> <span class="o">-></span> <span class="n">move</span> <span class="n">to</span> <span class="n">previous</span> <span class="n">event</span> +<span class="n">Arrow</span> <span class="n">Right</span> <span class="o">-></span> <span class="n">move</span> <span class="n">to</span> <span class="nb">next</span> <span class="n">event</span> +<span class="n">Enter</span> <span class="o">-></span> <span class="n">play</span> <span class="n">the</span> <span class="n">event</span> <span class="k">if</span> <span class="ow">in</span> <span class="n">snapshot</span> <span class="n">mode</span> <span class="p">(</span><span class="n">shows</span> <span class="n">red</span> <span class="n">play</span> <span class="n">button</span><span class="p">)</span> +<span class="n">Esc</span> <span class="o">-></span> <span class="n">remove</span> <span class="n">event</span> <span class="n">footage</span> <span class="n">view</span> +</pre></div> +</div> +<p><strong>Timeline:</strong></p> +<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">Arrow</span> <span class="n">Up</span> <span class="o">-></span> <span class="n">Zoom</span> <span class="n">In</span> +<span class="n">Arrow</span> <span class="n">Down</span> <span class="o">-></span> <span class="n">Zoom</span> <span class="n">Out</span> +<span class="n">Arrow</span> <span class="n">Left</span> <span class="o">-></span> <span class="n">Pan</span> <span class="n">Left</span> +<span class="n">Arrow</span> <span class="n">Right</span> <span class="o">-></span> <span class="n">Pan</span> <span class="n">Right</span> +<span class="n">Esc</span> <span class="o">-></span> <span class="n">Fit</span> <span class="n">timeline</span> <span class="n">back</span> <span class="n">to</span> <span class="n">view</span> <span class="p">(</span><span class="n">reset</span><span class="p">)</span> +<span class="n">A</span> <span class="o">-></span> <span class="n">Previous</span> <span class="n">Day</span> +<span class="n">D</span> <span class="o">-></span> <span class="n">Next</span> <span class="n">Day</span> +</pre></div> +</div> +</div> +<div class="section" id="desktop-data-storage-locations"> +<h2>Desktop data storage locations<a class="headerlink" href="#desktop-data-storage-locations" title="Permalink to this headline">¶</a></h2> +<p>User data is typically stored in the following locations: +- <code class="docutils literal"><span class="pre">%APPDATA%/zmNinjaDesktop</span></code> for Windows, +- <code class="docutils literal"><span class="pre">$XDG_CONFIG_HOME/zmNinjaDesktop</span></code> or <code class="docutils literal"><span class="pre">~/.config/zmNinjaDesktop</span></code> for Linux, +- <code class="docutils literal"><span class="pre">~/Library/Application</span> <span class="pre">Support/zmNinjaDesktop</span></code> for OSX</p> +<p>To completely remove the app, you may want to delete both the app +bundle/binary and these locations as applicable on your system</p> +</div> +</div> + + + </div> + <div class="articleComments"> + + </div> + </div> + <footer> + + <div class="rst-footer-buttons" role="navigation" aria-label="footer navigation"> + + <a href="contributing-language.html" class="btn btn-neutral float-right" title="Contributing a new language" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right"></span></a> + + + <a href="validating-api.html" class="btn btn-neutral" title="Validating APIs" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"></span> Previous</a> + + </div> + + + <hr/> + + <div role="contentinfo"> + <p> + © Copyright 2019, Pliable Pixels. + + </p> + </div> + Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a <a href="https://github.com/snide/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>. + +</footer> + + </div> + </div> + + </section> + + </div> + + + + + + <script type="text/javascript"> + var DOCUMENTATION_OPTIONS = { + URL_ROOT:'../', + VERSION:'', + COLLAPSE_INDEX:false, + FILE_SUFFIX:'.html', + HAS_SOURCE: true, + SOURCELINK_SUFFIX: '.txt' + }; + </script> + <script type="text/javascript" src="../_static/jquery.js"></script> + <script type="text/javascript" src="../_static/underscore.js"></script> + <script type="text/javascript" src="../_static/doctools.js"></script> + + + + + + <script type="text/javascript" src="../_static/js/theme.js"></script> + + + + + <script type="text/javascript"> + jQuery(function () { + SphinxRtdTheme.StickyNav.enable(); + }); + </script> + + +</body> +</html>
\ No newline at end of file diff --git a/docs/docgen/html/guides/source.html b/docs/docgen/html/guides/source.html new file mode 100644 index 00000000..b436ca08 --- /dev/null +++ b/docs/docgen/html/guides/source.html @@ -0,0 +1,457 @@ + + +<!DOCTYPE html> +<!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]--> +<!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]--> +<head> + <meta charset="utf-8"> + + <meta name="viewport" content="width=device-width, initial-scale=1.0"> + + <title>Building from Source — zmNinja documentation</title> + + + + + + + + + + + + + + + + + + <link rel="stylesheet" href="../_static/css/theme.css" type="text/css" /> + + + + + + <link rel="index" title="Index" + href="../genindex.html"/> + <link rel="search" title="Search" href="../search.html"/> + <link rel="top" title="zmNinja documentation" href="../index.html"/> + <link rel="prev" title="Contributing a new language" href="contributing-language.html"/> + + + <script src="../_static/js/modernizr.min.js"></script> + +</head> + +<body class="wy-body-for-nav" role="document"> + + + <div class="wy-grid-for-nav"> + + + <nav data-toggle="wy-nav-shift" class="wy-nav-side"> + <div class="wy-side-scroll"> + <div class="wy-side-nav-search"> + + + + <a href="../index.html" class="icon icon-home"> zmNinja + + + + + <img src="../_static/ninja.png" class="logo" /> + + </a> + + + + + + + +<div role="search"> + <form id="rtd-search-form" class="wy-form" action="../search.html" method="get"> + <input type="text" name="q" placeholder="Search docs" /> + <input type="hidden" name="check_keywords" value="yes" /> + <input type="hidden" name="area" value="default" /> + </form> +</div> + + + </div> + + <div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation"> + + + + + + + <ul class="current"> +<li class="toctree-l1"><a class="reference internal" href="FAQ.html">zmNinja FAQ</a></li> +<li class="toctree-l1"><a class="reference internal" href="validating-api.html">Validating APIs</a></li> +<li class="toctree-l1"><a class="reference internal" href="desktop.html">Desktop port tips</a></li> +<li class="toctree-l1"><a class="reference internal" href="contributing-language.html">Contributing a new language</a></li> +<li class="toctree-l1 current"><a class="current reference internal" href="#">Building from Source</a><ul> +<li class="toctree-l2"><a class="reference internal" href="#install-dependencies-needed-for-all-platforms">Install Dependencies - needed for all platforms</a><ul> +<li class="toctree-l3"><a class="reference internal" href="#install-nodejs">Install NodeJS</a></li> +<li class="toctree-l3"><a class="reference internal" href="#install-cordova-ionic-and-bower">Install cordova, ionic, and bower</a></li> +</ul> +</li> +<li class="toctree-l2"><a class="reference internal" href="#download-zmninja">Download zmNinja</a></li> +<li class="toctree-l2"><a class="reference internal" href="#configure-build-configure-zmninja-and-get-all-required-plugins">Configure build configure zmNinja and get all required plugins</a></li> +<li class="toctree-l2"><a class="reference internal" href="#making-an-ios-build">Making an iOS build</a><ul> +<li class="toctree-l3"><a class="reference internal" href="#harder-if-you-need-picture-notification-support-in-push">(Harder) If you need picture notification support in push</a></li> +<li class="toctree-l3"><a class="reference internal" href="#easier-if-you-don-t-need-picture-notification-support-in-push">(Easier) If you don’t need picture notification support in push</a></li> +</ul> +</li> +<li class="toctree-l2"><a class="reference internal" href="#making-an-android-build">Making an Android build</a></li> +<li class="toctree-l2"><a class="reference internal" href="#making-a-desktop-build">Making a desktop build</a><ul> +<li class="toctree-l3"><a class="reference internal" href="#for-versions-1-3-018-and-beyond">For versions 1.3.018 and beyond</a><ul> +<li class="toctree-l4"><a class="reference internal" href="#make-sure-you-have-all-the-dependencies">Make sure you have all the dependencies</a></li> +</ul> +</li> +</ul> +</li> +<li class="toctree-l2"><a class="reference internal" href="#troubleshooting">Troubleshooting</a></li> +</ul> +</li> +</ul> + + + + </div> + </div> + </nav> + + <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap"> + + + <nav class="wy-nav-top" role="navigation" aria-label="top navigation"> + + <i data-toggle="wy-nav-top" class="fa fa-bars"></i> + <a href="../index.html">zmNinja</a> + + </nav> + + + + <div class="wy-nav-content"> + <div class="rst-content"> + + + + + + + + + + + + + + + + +<div role="navigation" aria-label="breadcrumbs navigation"> + + <ul class="wy-breadcrumbs"> + + <li><a href="../index.html">Docs</a> »</li> + + <li>Building from Source</li> + + + <li class="wy-breadcrumbs-aside"> + + + <a href="../_sources/guides/source.rst.txt" rel="nofollow"> View page source</a> + + + </li> + + </ul> + + + <hr/> +</div> + <div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article"> + <div itemprop="articleBody"> + + <div class="section" id="building-from-source"> +<h1>Building from Source<a class="headerlink" href="#building-from-source" title="Permalink to this headline">¶</a></h1> +<p><strong>NOTE</strong> If you want to run it on your desktop, you can directly +download desktop binaries +<a class="reference external" href="https://github.com/pliablepixels/releases">here</a> +and if you want it for Android/iOS you can get from the play/appstore. +This is only for those who <em>want</em> to run from source.</p> +<blockquote> +<div>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.</div></blockquote> +<p>Version note: The code is compiled using the following versions of +tools. <strong>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.</strong> Thanks.</p> +<p>Output of <code class="docutils literal"><span class="pre">ionic</span> <span class="pre">info</span></code></p> +<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">Ionic</span><span class="p">:</span> + + <span class="n">ionic</span> <span class="p">(</span><span class="n">Ionic</span> <span class="n">CLI</span><span class="p">)</span> <span class="p">:</span> <span class="mf">4.5</span><span class="o">.</span><span class="mi">0</span> <span class="p">(</span><span class="o">/</span><span class="n">usr</span><span class="o">/</span><span class="n">local</span><span class="o">/</span><span class="n">lib</span><span class="o">/</span><span class="n">node_modules</span><span class="o">/</span><span class="n">ionic</span><span class="p">)</span> + <span class="n">Ionic</span> <span class="n">Framework</span> <span class="p">:</span> <span class="n">ionic1</span> <span class="mf">1.3</span><span class="o">.</span><span class="mi">5</span> + <span class="nd">@ionic</span><span class="o">/</span><span class="n">v1</span><span class="o">-</span><span class="n">toolkit</span> <span class="p">:</span> <span class="mf">1.0</span><span class="o">.</span><span class="mi">19</span> + +<span class="n">Cordova</span><span class="p">:</span> + + <span class="n">cordova</span> <span class="p">(</span><span class="n">Cordova</span> <span class="n">CLI</span><span class="p">)</span> <span class="p">:</span> <span class="mf">8.1</span><span class="o">.</span><span class="mi">2</span> <span class="p">(</span><span class="n">cordova</span><span class="o">-</span><span class="n">lib</span><span class="nd">@8</span><span class="o">.</span><span class="mf">1.1</span><span class="p">)</span> + <span class="n">Cordova</span> <span class="n">Platforms</span> <span class="p">:</span> <span class="n">android</span> <span class="mf">7.1</span><span class="o">.</span><span class="mi">4</span><span class="p">,</span> <span class="n">ios</span> <span class="mf">5.0</span><span class="o">.</span><span class="mi">0</span> + <span class="n">Cordova</span> <span class="n">Plugins</span> <span class="p">:</span> <span class="n">cordova</span><span class="o">-</span><span class="n">plugin</span><span class="o">-</span><span class="n">ionic</span><span class="o">-</span><span class="n">keyboard</span> <span class="mf">2.1</span><span class="o">.</span><span class="mi">3</span><span class="p">,</span> <span class="n">cordova</span><span class="o">-</span><span class="n">plugin</span><span class="o">-</span><span class="n">ionic</span><span class="o">-</span><span class="n">webview</span> <span class="mf">2.2</span><span class="o">.</span><span class="mi">0</span><span class="p">,</span> +<span class="p">(</span><span class="ow">and</span> <span class="mi">30</span> <span class="n">other</span> <span class="n">plugins</span><span class="p">)</span> + +<span class="n">System</span><span class="p">:</span> + + <span class="n">Android</span> <span class="n">SDK</span> <span class="n">Tools</span> <span class="p">:</span> <span class="mf">26.1</span><span class="o">.</span><span class="mi">1</span> <span class="p">(</span><span class="o">/</span><span class="n">Users</span><span class="o">/</span><span class="n">pp</span><span class="o">/</span><span class="n">Library</span><span class="o">/</span><span class="n">Android</span><span class="o">/</span><span class="n">sdk</span><span class="o">/</span><span class="p">)</span> + <span class="n">ios</span><span class="o">-</span><span class="n">deploy</span> <span class="p">:</span> <span class="mf">2.0</span><span class="o">.</span><span class="mi">0</span> + <span class="n">ios</span><span class="o">-</span><span class="n">sim</span> <span class="p">:</span> <span class="mf">7.0</span><span class="o">.</span><span class="mi">0</span> + <span class="n">NodeJS</span> <span class="p">:</span> <span class="n">v8</span><span class="o">.</span><span class="mf">11.2</span> <span class="p">(</span><span class="o">/</span><span class="n">usr</span><span class="o">/</span><span class="n">local</span><span class="o">/</span><span class="nb">bin</span><span class="o">/</span><span class="n">node</span><span class="p">)</span> + <span class="n">npm</span> <span class="p">:</span> <span class="mf">5.6</span><span class="o">.</span><span class="mi">0</span> + <span class="n">OS</span> <span class="p">:</span> <span class="n">macOS</span> <span class="n">Mojave</span> + <span class="n">Xcode</span> <span class="p">:</span> <span class="n">Xcode</span> <span class="mf">10.1</span> <span class="n">Build</span> <span class="n">version</span> <span class="mi">10</span><span class="n">B61</span> +</pre></div> +</div> +<div class="section" id="install-dependencies-needed-for-all-platforms"> +<h2>Install Dependencies - needed for all platforms<a class="headerlink" href="#install-dependencies-needed-for-all-platforms" title="Permalink to this headline">¶</a></h2> +<div class="section" id="install-nodejs"> +<h3>Install NodeJS<a class="headerlink" href="#install-nodejs" title="Permalink to this headline">¶</a></h3> +<p>Install NodeJS from <a class="reference external" href="https://nodejs.org/en/download/">here</a>. As of +Dec 2018, I’m using Node <code class="docutils literal"><span class="pre">v8.11.2</span></code>. I use +<a class="reference external" href="https://github.com/tj/n">n</a> to manage node versions and switch +between them.</p> +</div> +<div class="section" id="install-cordova-ionic-and-bower"> +<h3>Install cordova, ionic, and bower<a class="headerlink" href="#install-cordova-ionic-and-bower" title="Permalink to this headline">¶</a></h3> +<div class="code bash highlight-default"><div class="highlight"><pre><span></span><span class="n">npm</span> <span class="n">install</span> <span class="o">-</span><span class="n">g</span> <span class="n">cordova</span> <span class="n">ionic</span> <span class="n">bower</span> +<span class="n">npm</span> <span class="n">install</span> <span class="nd">@ionic</span><span class="o">/</span><span class="n">v1</span><span class="o">-</span><span class="n">toolkit</span> <span class="o">--</span><span class="n">save</span><span class="o">-</span><span class="n">dev</span> +</pre></div> +</div> +<p>And some more:</p> +<div class="code bash highlight-default"><div class="highlight"><pre><span></span><span class="n">npm</span> <span class="n">install</span> <span class="o">-</span><span class="n">g</span> <span class="n">gulp</span> +<span class="n">npm</span> <span class="n">install</span> <span class="n">node</span><span class="o">-</span><span class="n">sass</span> +<span class="n">npm</span> <span class="n">install</span> <span class="k">async</span> +<span class="n">npm</span> <span class="n">install</span> <span class="n">jshint</span> +</pre></div> +</div> +<p>(Note you may need to do <code class="docutils literal"><span class="pre">sudo</span></code> depending on how your system is set +up. It’s <a class="reference external" href="https://johnpapa.net/how-to-use-npm-global-without-sudo-on-osx/">better you +don’t</a>, +but if you must, well, you must)</p> +<p>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: +<a class="reference external" href="https://iphonedevlog.wordpress.com/2014/06/25/updating-and-reverting-to-different-cordova-phonegap-versions">change cordova +version</a></p> +</div> +</div> +<div class="section" id="download-zmninja"> +<h2>Download zmNinja<a class="headerlink" href="#download-zmninja" title="Permalink to this headline">¶</a></h2> +<div class="code bash highlight-default"><div class="highlight"><pre><span></span><span class="n">git</span> <span class="n">clone</span> <span class="o">--</span><span class="n">depth</span> <span class="mi">1</span> <span class="n">https</span><span class="p">:</span><span class="o">//</span><span class="n">github</span><span class="o">.</span><span class="n">com</span><span class="o">/</span><span class="n">pliablepixels</span><span class="o">/</span><span class="n">zmNinja</span><span class="o">.</span><span class="n">git</span> +</pre></div> +</div> +</div> +<div class="section" id="configure-build-configure-zmninja-and-get-all-required-plugins"> +<h2>Configure build configure zmNinja and get all required plugins<a class="headerlink" href="#configure-build-configure-zmninja-and-get-all-required-plugins" title="Permalink to this headline">¶</a></h2> +<div class="code bash highlight-default"><div class="highlight"><pre><span></span><span class="n">cd</span> <span class="n">zmNinja</span> +<span class="n">npm</span> <span class="n">install</span> +<span class="n">bower</span> <span class="n">install</span> +<span class="n">ionic</span> <span class="n">cordova</span> <span class="n">platform</span> <span class="n">add</span> <span class="n">android</span> <span class="p">(</span><span class="ow">or</span> <span class="n">ios</span><span class="p">)</span> +<span class="n">cordova</span> <span class="n">prepare</span> +</pre></div> +</div> +</div> +<div class="section" id="making-an-ios-build"> +<h2>Making an iOS build<a class="headerlink" href="#making-an-ios-build" title="Permalink to this headline">¶</a></h2> +<p>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)</p> +<div class="section" id="harder-if-you-need-picture-notification-support-in-push"> +<h3>(Harder) If you need picture notification support in push<a class="headerlink" href="#harder-if-you-need-picture-notification-support-in-push" title="Permalink to this headline">¶</a></h3> +<p>As of Mar 2019, cordova-ios does not support multiple targets, nor does +it support automatic building of notification extensions. So there is manual work to be done:</p> +<ul class="simple"> +<li>Open up <code class="docutils literal"><span class="pre">platforms/ios/zmNinja.xcworkspace</span></code> in XCode</li> +<li>Go to <code class="docutils literal"><span class="pre">File->New->Target->Notification</span> <span class="pre">Service</span> <span class="pre">Extension</span></code>, select Objective C</li> +<li>In the “Product Name” put in <code class="docutils literal"><span class="pre">zmNinjaNotification</span></code> (your BundleID should now read <code class="docutils literal"><span class="pre">com.pliablepixels.zmninja-pro.zmNinjaNotification</span></code>)</li> +<li>Say “Yes” to “Activate zmNinjaNotification scheme?” popup</li> +<li>Now go to zmNinjaNotification target and make version and build same as zmNinja</li> +<li>Now in XCode Targets, select <code class="docutils literal"><span class="pre">zmNinjaNotification</span></code>, and make sure you select a Team and make sure Deployment Target is 10 or above</li> +<li>Change Deployment target to 10.1 (same as zmNinja target)</li> +<li><code class="docutils literal"><span class="pre">`cp</span> <span class="pre">www/external/NotificationService.m</span> <span class="pre">platforms/ios/zmNinjaNotication/</span></code></li> +<li><code class="docutils literal"><span class="pre">cd</span> <span class="pre">platforms/ios/</span></code></li> +<li><code class="docutils literal"><span class="pre">pod</span> <span class="pre">install</span></code></li> +</ul> +<p>You can now do <cite>build_ios.sh</cite>. However, after you build, you will have to go back to XCode +after the build to make the following changes:</p> +<ol class="arabic simple"> +<li>Sync notification version with app version</li> +<li>Change notification bundle ID back to com.pliablepixels.zmninja-pro.zmNinjaNotification (cordova removes the last word)</li> +</ol> +</div> +<div class="section" id="easier-if-you-don-t-need-picture-notification-support-in-push"> +<h3>(Easier) If you don’t need picture notification support in push<a class="headerlink" href="#easier-if-you-don-t-need-picture-notification-support-in-push" title="Permalink to this headline">¶</a></h3> +<p>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 <code class="docutils literal"><span class="pre">ld:</span> <span class="pre">library</span> <span class="pre">not</span> <span class="pre">found</span> <span class="pre">for</span> <span class="pre">-lGoogleToolboxForMac</span></code></p> +<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">cd</span> <span class="n">platforms</span><span class="o">/</span><span class="n">ios</span> +<span class="n">pod</span> <span class="n">install</span> +</pre></div> +</div> +<p>This does not produce an iOS ready ipa. What you need to do then is to +open <code class="docutils literal"><span class="pre">platforms/ios/zmNinja.xcworkspace</span></code> in Xcode, and run.</p> +<p>To compile a debug build for iOS from command line, from zmNinja project +root: First edit <code class="docutils literal"><span class="pre">./build-auto.json</span></code> and change the +<code class="docutils literal"><span class="pre">developmentTeam</span></code> id to yours. Then:</p> +<div class="code bash highlight-default"><div class="highlight"><pre><span></span><span class="o">./</span><span class="n">build_ios</span><span class="o">.</span><span class="n">sh</span> +</pre></div> +</div> +<p>To compile using XCode, open <code class="docutils literal"><span class="pre">platforms/ios/zmNinja.xcworkspace</span></code> - You +need to use “Legacy Build” system if you are on XCode 10+. You can +change this in XCode <code class="docutils literal"><span class="pre">File->Workspace</span> <span class="pre">Settings</span></code> 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.</p> +</div> +</div> +<div class="section" id="making-an-android-build"> +<h2>Making an Android build<a class="headerlink" href="#making-an-android-build" title="Permalink to this headline">¶</a></h2> +<p>Note that you need the <a class="reference external" href="http://developer.android.com/sdk/index.html">Android +SDK</a> installed and +configured properly for this to work.</p> +<p>From the zmNinja project root:</p> +<div class="code bash highlight-default"><div class="highlight"><pre><span></span><span class="o">./</span><span class="n">build_android</span><span class="o">.</span><span class="n">sh</span> <span class="o">--</span><span class="n">debug</span> <span class="p">(</span><span class="ow">or</span> <span class="o">--</span><span class="n">release</span><span class="p">)</span> +</pre></div> +</div> +<p>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</p> +<div class="code bash highlight-default"><div class="highlight"><pre><span></span><span class="n">adb</span> <span class="n">install</span> <span class="o">-</span><span class="n">r</span> <span class="n">debug_files</span><span class="o">/</span><span class="n">android</span><span class="o">-</span><span class="n">debug</span><span class="o">.</span><span class="n">apk</span> <span class="c1">#if you did --debug</span> +<span class="ow">or</span><span class="p">,</span> +<span class="n">adb</span> <span class="n">install</span> <span class="o">-</span><span class="n">r</span> <span class="n">release_files</span><span class="o">/</span><span class="n">zmNinja</span><span class="o">.</span><span class="n">apk</span> <span class="c1">#if you did --release</span> +</pre></div> +</div> +</div> +<div class="section" id="making-a-desktop-build"> +<h2>Making a desktop build<a class="headerlink" href="#making-a-desktop-build" title="Permalink to this headline">¶</a></h2> +<p>I use <a class="reference external" href="https://electron.atom.io">electron</a> to build the desktop app.</p> +<div class="section" id="for-versions-1-3-018-and-beyond"> +<h3>For versions 1.3.018 and beyond<a class="headerlink" href="#for-versions-1-3-018-and-beyond" title="Permalink to this headline">¶</a></h3> +<p>I’ve migrated to using +<a class="reference external" href="https://github.com/electron-userland/electron-builder">electron-builder</a> +to automate the build process better.</p> +<div class="section" id="make-sure-you-have-all-the-dependencies"> +<h4>Make sure you have all the dependencies<a class="headerlink" href="#make-sure-you-have-all-the-dependencies" title="Permalink to this headline">¶</a></h4> +<p>Typically, just running</p> +<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">npm</span> <span class="n">install</span> +<span class="n">bower</span> <span class="n">install</span> +</pre></div> +</div> +<p>Should have installed everything. Validate by checking you have +<code class="docutils literal"><span class="pre">electron</span></code> installed by invoking it on the command line</p> +<p>You now have the following options:</p> +<div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">npm</span> <span class="n">run</span> <span class="n">dist</span><span class="o">-</span><span class="nb">all</span> <span class="c1"># builds linux, mac and windows packages</span> +<span class="n">npm</span> <span class="n">run</span> <span class="n">dist</span><span class="o">-</span><span class="n">mac</span> <span class="c1"># only builds mac packages</span> +<span class="n">npm</span> <span class="n">run</span> <span class="n">dist</span><span class="o">-</span><span class="n">lin</span> <span class="c1"># only builds linux packages (32bit, 64bit, arm)</span> +<span class="n">npm</span> <span class="n">run</span> <span class="n">dist</span><span class="o">-</span><span class="n">win</span> <span class="c1"># only builds win packages (32bit, 64bit)</span> +</pre></div> +</div> +<p>Your packages will be created in the <code class="docutils literal"><span class="pre">dist</span></code> folder</p> +</div> +</div> +</div> +<div class="section" id="troubleshooting"> +<h2>Troubleshooting<a class="headerlink" href="#troubleshooting" title="Permalink to this headline">¶</a></h2> +<p>Lots of things can go wrong.</p> +<ul class="simple"> +<li>Please make sure you don’t post issues about why your own build is not working - please figure it out</li> +<li>Look carefully at error messages</li> +</ul> +</div> +</div> + + + </div> + <div class="articleComments"> + + </div> + </div> + <footer> + + <div class="rst-footer-buttons" role="navigation" aria-label="footer navigation"> + + + <a href="contributing-language.html" class="btn btn-neutral" title="Contributing a new language" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"></span> Previous</a> + + </div> + + + <hr/> + + <div role="contentinfo"> + <p> + © Copyright 2019, Pliable Pixels. + + </p> + </div> + Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a <a href="https://github.com/snide/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>. + +</footer> + + </div> + </div> + + </section> + + </div> + + + + + + <script type="text/javascript"> + var DOCUMENTATION_OPTIONS = { + URL_ROOT:'../', + VERSION:'', + COLLAPSE_INDEX:false, + FILE_SUFFIX:'.html', + HAS_SOURCE: true, + SOURCELINK_SUFFIX: '.txt' + }; + </script> + <script type="text/javascript" src="../_static/jquery.js"></script> + <script type="text/javascript" src="../_static/underscore.js"></script> + <script type="text/javascript" src="../_static/doctools.js"></script> + + + + + + <script type="text/javascript" src="../_static/js/theme.js"></script> + + + + + <script type="text/javascript"> + jQuery(function () { + SphinxRtdTheme.StickyNav.enable(); + }); + </script> + + +</body> +</html>
\ No newline at end of file diff --git a/docs/docgen/html/guides/validating-api.html b/docs/docgen/html/guides/validating-api.html new file mode 100644 index 00000000..6762554a --- /dev/null +++ b/docs/docgen/html/guides/validating-api.html @@ -0,0 +1,339 @@ + + +<!DOCTYPE html> +<!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]--> +<!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]--> +<head> + <meta charset="utf-8"> + + <meta name="viewport" content="width=device-width, initial-scale=1.0"> + + <title>Validating APIs — zmNinja documentation</title> + + + + + + + + + + + + + + + + + + <link rel="stylesheet" href="../_static/css/theme.css" type="text/css" /> + + + + + + <link rel="index" title="Index" + href="../genindex.html"/> + <link rel="search" title="Search" href="../search.html"/> + <link rel="top" title="zmNinja documentation" href="../index.html"/> + <link rel="next" title="Desktop port tips" href="desktop.html"/> + <link rel="prev" title="zmNinja FAQ" href="FAQ.html"/> + + + <script src="../_static/js/modernizr.min.js"></script> + +</head> + +<body class="wy-body-for-nav" role="document"> + + + <div class="wy-grid-for-nav"> + + + <nav data-toggle="wy-nav-shift" class="wy-nav-side"> + <div class="wy-side-scroll"> + <div class="wy-side-nav-search"> + + + + <a href="../index.html" class="icon icon-home"> zmNinja + + + + + <img src="../_static/ninja.png" class="logo" /> + + </a> + + + + + + + +<div role="search"> + <form id="rtd-search-form" class="wy-form" action="../search.html" method="get"> + <input type="text" name="q" placeholder="Search docs" /> + <input type="hidden" name="check_keywords" value="yes" /> + <input type="hidden" name="area" value="default" /> + </form> +</div> + + + </div> + + <div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation"> + + + + + + + <ul class="current"> +<li class="toctree-l1"><a class="reference internal" href="FAQ.html">zmNinja FAQ</a></li> +<li class="toctree-l1 current"><a class="current reference internal" href="#">Validating APIs</a><ul> +<li class="toctree-l2"><a class="reference internal" href="#please-make-sure-you-go-through-this-before-you-wonder-why-zmninja-is-not-working">Please make sure you go through this before you wonder why zmNinja is not working.</a><ul> +<li class="toctree-l3"><a class="reference internal" href="#make-sure-zm-apis-are-working">Make sure ZM APIs are working:</a></li> +</ul> +</li> +<li class="toctree-l2"><a class="reference internal" href="#zmninja-api-notes">zmNinja API notes:</a></li> +</ul> +</li> +<li class="toctree-l1"><a class="reference internal" href="desktop.html">Desktop port tips</a></li> +<li class="toctree-l1"><a class="reference internal" href="contributing-language.html">Contributing a new language</a></li> +<li class="toctree-l1"><a class="reference internal" href="source.html">Building from Source</a></li> +</ul> + + + + </div> + </div> + </nav> + + <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap"> + + + <nav class="wy-nav-top" role="navigation" aria-label="top navigation"> + + <i data-toggle="wy-nav-top" class="fa fa-bars"></i> + <a href="../index.html">zmNinja</a> + + </nav> + + + + <div class="wy-nav-content"> + <div class="rst-content"> + + + + + + + + + + + + + + + + +<div role="navigation" aria-label="breadcrumbs navigation"> + + <ul class="wy-breadcrumbs"> + + <li><a href="../index.html">Docs</a> »</li> + + <li>Validating APIs</li> + + + <li class="wy-breadcrumbs-aside"> + + + <a href="../_sources/guides/validating-api.rst.txt" rel="nofollow"> View page source</a> + + + </li> + + </ul> + + + <hr/> +</div> + <div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article"> + <div itemprop="articleBody"> + + <div class="section" id="validating-apis"> +<h1>Validating APIs<a class="headerlink" href="#validating-apis" title="Permalink to this headline">¶</a></h1> +<div class="section" id="please-make-sure-you-go-through-this-before-you-wonder-why-zmninja-is-not-working"> +<h2>Please make sure you go through this before you wonder why zmNinja is not working.<a class="headerlink" href="#please-make-sure-you-go-through-this-before-you-wonder-why-zmninja-is-not-working" title="Permalink to this headline">¶</a></h2> +<blockquote> +<div>Assumption: Your ZM server is accessible at <code class="docutils literal"><span class="pre">http://server/zm</span></code> -> +replace this with your actual path</div></blockquote> +<div class="section" id="make-sure-zm-apis-are-working"> +<h3>Make sure ZM APIs are working:<a class="headerlink" href="#make-sure-zm-apis-are-working" title="Permalink to this headline">¶</a></h3> +<p>(Note - nginx users, if you are facing API issues, please see if <a class="reference external" href="https://github.com/pliablepixels/zmNinja/wiki/How-to-configure-APIs-with-nginx">this +page</a> +helps)</p> +<ul> +<li><p class="first">Step 1: Open up a browser</p> +</li> +<li><p class="first">Step 2: Log into ZM</p> +</li> +<li><p class="first">Step 3: Open another tab in the same browser (<strong>IMPORTANT</strong>: Has to +be from the same browser you logged into ZM)</p> +</li> +<li><p class="first">Step 4: Type in <code class="docutils literal"><span class="pre">http://server/zm/api/host/getVersion.json</span></code> –> you +should see a response like:</p> +<div class="code json highlight-default"><div class="highlight"><pre><span></span><span class="p">{</span> +<span class="s2">"version"</span><span class="p">:</span> <span class="s2">"1.30.0"</span><span class="p">,</span> +<span class="s2">"apiversion"</span><span class="p">:</span> <span class="s2">"1.0"</span> +<span class="p">}</span> +</pre></div> +</div> +<p>version/apiversion may be different. If you don’t see such a +response, your APIs are <strong>not</strong> working</p> +</li> +<li><p class="first">Step 5:make sure you can see monitors and events:</p> +</li> +</ul> +<p>Type in <code class="docutils literal"><span class="pre">http://server/zm/api/monitors.json</span></code> –> you should see a +response like:</p> +<div class="code jsonld highlight-default"><div class="highlight"><pre><span></span><span class="p">{</span> + <span class="s2">"monitors"</span><span class="p">:</span> <span class="p">[</span> + <span class="p">{</span> + <span class="s2">"Monitor"</span><span class="p">:</span> <span class="p">{</span> + <span class="o">/*</span><span class="n">lots</span> <span class="n">of</span> <span class="n">additional</span> <span class="n">details</span><span class="o">*/</span> + <span class="p">},</span> + <span class="o">/*</span><span class="n">more</span> <span class="n">monitor</span> <span class="n">objects</span> <span class="k">if</span> <span class="n">you</span> <span class="n">have</span> <span class="n">more</span> <span class="n">than</span> <span class="n">one</span><span class="o">*/</span> + <span class="p">}]</span> +<span class="p">}</span> +</pre></div> +</div> +<ul> +<li><p class="first">Step 6: (If you find your APIs show ok, but zmNinja has issues)</p> +<blockquote> +<div><ul class="simple"> +<li>Open a browser, log into ZM</li> +<li>Open a new tab, enter <code class="docutils literal"><span class="pre">http://server/zm/api/host/getVersion.json</span></code></li> +<li>Now, right click and do a <code class="docutils literal"><span class="pre">View</span> <span class="pre">Source</span></code> 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 <code class="docutils literal"><span class="pre"><pre</span> <span class="pre">class=</span></code> and lots of cake +related messages? If you do, you need to fix it.</li> +</ul> +</div></blockquote> +</li> +</ul> +<p>if you find the page empty, your APIs/permissions have a problem. Please +post in the ZM forums (<strong>please DON’T</strong> contact me first as its not a +zmNinja bug)</p> +<p>Type in <code class="docutils literal"><span class="pre">http://server/zm/api/events.json</span></code> –> 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 <code class="docutils literal"><span class="pre">{"events":[]}</span></code> text - if you find the page +empty, your APIs have a problem. Please post in the ZM forums (please +<strong>DON’T</strong> contact me first, as its not a zmNinja bug)</p> +<div class="code jsonld highlight-default"><div class="highlight"><pre><span></span><span class="p">{</span><span class="s2">"events"</span><span class="p">:[{</span><span class="s2">"Event"</span><span class="p">:{</span> <span class="o">/*</span> <span class="n">many</span> <span class="n">more</span> <span class="n">details</span> <span class="o">*/</span> <span class="p">}}]}</span> +</pre></div> +</div> +<p><em>Top reasons why monitors and events API returns blank while getVersion +works:</em> * 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 +<code class="docutils literal"><span class="pre">/usr/share/zoneminder/www/api/app/Config/database.php</span></code> (assuming ZM +is in /usr/share) and make sure <code class="docutils literal"><span class="pre">'encoding'</span> <span class="pre">=></span> <span class="pre">'utf8'</span></code> is +<em>uncommented</em> (remove <code class="docutils literal"><span class="pre">//</span></code>) around line 74. I’ve submitted a +<a class="reference external" href="https://github.com/ZoneMinder/ZoneMinder/pull/1635/commits/92d7cad5f154359a5b249d7a63fb5034f7d1b51a">patch</a> +but till its merged, you might have to do it manually.</p> +</div> +</div> +<div class="section" id="zmninja-api-notes"> +<h2>zmNinja API notes:<a class="headerlink" href="#zmninja-api-notes" title="Permalink to this headline">¶</a></h2> +<ul class="simple"> +<li>Please make sure the user credentials you use has:</li> +<li>view or edit access to monitors</li> +<li>view or edit access to streams</li> +<li>view or edit access to system</li> +<li>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</li> +</ul> +</div> +</div> + + + </div> + <div class="articleComments"> + + </div> + </div> + <footer> + + <div class="rst-footer-buttons" role="navigation" aria-label="footer navigation"> + + <a href="desktop.html" class="btn btn-neutral float-right" title="Desktop port tips" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right"></span></a> + + + <a href="FAQ.html" class="btn btn-neutral" title="zmNinja FAQ" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"></span> Previous</a> + + </div> + + + <hr/> + + <div role="contentinfo"> + <p> + © Copyright 2019, Pliable Pixels. + + </p> + </div> + Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a <a href="https://github.com/snide/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>. + +</footer> + + </div> + </div> + + </section> + + </div> + + + + + + <script type="text/javascript"> + var DOCUMENTATION_OPTIONS = { + URL_ROOT:'../', + VERSION:'', + COLLAPSE_INDEX:false, + FILE_SUFFIX:'.html', + HAS_SOURCE: true, + SOURCELINK_SUFFIX: '.txt' + }; + </script> + <script type="text/javascript" src="../_static/jquery.js"></script> + <script type="text/javascript" src="../_static/underscore.js"></script> + <script type="text/javascript" src="../_static/doctools.js"></script> + + + + + + <script type="text/javascript" src="../_static/js/theme.js"></script> + + + + + <script type="text/javascript"> + jQuery(function () { + SphinxRtdTheme.StickyNav.enable(); + }); + </script> + + +</body> +</html>
\ No newline at end of file |
