Skip to content

Commit a9c27f8

Browse files
committed
Update documents
1 parent 1a9a7b9 commit a9c27f8

2 files changed

Lines changed: 81 additions & 73 deletions

File tree

motion_build.html

Lines changed: 0 additions & 67 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,6 @@ <h1>
6868
<div class="dropdown-content">
6969
<a href="#Preparation_For_Building"> Preparation For Building </a>
7070
<a href="#BUILD_DEBIAN">Debian/Ubuntu/Raspberry Pi OS</a>
71-
<a href="#BUILD_OPENSUSE">Open SUSE</a>
7271
<a href="#BUILD_FREEBSD">Free BSD</a>
7372
<a href="#BUILD_CENTOS">CentOS</a>
7473
<a href="#BUILD_MACOSX">MacOSX </a>
@@ -311,72 +310,6 @@ <h4><a name="BUILD_DEBIAN"></a>Debian/Ubuntu/Raspberry Pi OS</a> </h4>
311310
<p></p>
312311
<p></p>
313312

314-
<h4><a name="BUILD_OPENSUSE"></a>openSUSE</a> </h4>
315-
<ul>
316-
<li>Required</li>
317-
<ul>
318-
<p></p>
319-
<code><strong>sudo zypper install autoconf automake autopoint libtool git </strong></code>
320-
<p></p>
321-
<code><strong>sudo zypper install --type pattern devel_basis </strong></code>
322-
<p></p>
323-
<code><strong>sudo zypper install libjpeg8-devel gettext libmicrohttpd </strong></code>
324-
<p></p>
325-
<code><strong>sudo zypper install -t pattern devel_C_C++ </strong></code>
326-
<p></p>
327-
</ul>
328-
<p></p>
329-
<li>Optional Packages</li>
330-
<ul>
331-
<li>FFMpeg Functionality(Required for creating movies, using network cameras, etc. SEE NOTE BELOW!)</li>
332-
<ul>
333-
<p></p>
334-
<code><strong>sudo zypper ar -f -n packman-essentials http://packman.inode.at/suse/openSUSE_13.1/Essentials/ packman-essentials</strong></code>
335-
<p></p>
336-
<code><strong>sudo zypper ar -f -n packman-multimedia http://packman.inode.at/suse/openSUSE_13.1/Multimedia/ packman-multimedia</strong></code>
337-
<p></p>
338-
<code><strong>sudo zypper install libffmpeg-devel</strong></code>
339-
<p></p>
340-
</ul>
341-
<li>MySQL database functionality</li>
342-
<ul>
343-
<p></p>
344-
<code><strong>Not known by author</strong></code>
345-
<p></p>
346-
</ul>
347-
<li>MariaDB database functionality</li>
348-
<ul>
349-
<p></p>
350-
<code><strong>Not known by author</strong></code>
351-
<p></p>
352-
</ul>
353-
<li>PostgreSQL database functionality</li>
354-
<ul>
355-
<p></p>
356-
<code><strong>Not known by author</strong></code>
357-
<p></p>
358-
</ul>
359-
<li>SQLite3 database functionality</li>
360-
<ul>
361-
<p></p>
362-
<code><strong>Not known by author</strong></code>
363-
<p></p>
364-
</ul>
365-
<li>Webp Image Support</li>
366-
<ul>
367-
<p></p>
368-
<code><strong>sudo zypper install libwebp-devel </strong></code>
369-
<p></p>
370-
</ul>
371-
</ul>
372-
Important ffmpeg note: The ffmpeg libraries indicated above are provided by a external repository. This may
373-
change in the future. Validate that the repository is still valid when doing the install on openSUSE systems.
374-
The default for the configure is to require that ffmpeg is installed. Use the configure option to
375-
compile without the ffmpeg functionality.
376-
</ul>
377-
<p></p>
378-
<p></p>
379-
380313
<h4><a name="BUILD_FREEBSD"></a>FreeBSD</a> </h4>
381314
<ul>
382315
<li>Required packages</li>

motionplus_examples.html

Lines changed: 81 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -213,8 +213,52 @@ <h3><a name="database_setup"></a>Database Setup</h3>
213213
<p></p>
214214

215215
<div>
216-
<i><h4>pgsql</h4></i>
217-
ToDo
216+
<i><h4>postgresql</h4></i>
217+
The following describes the process to set up a PostgreSQL database.
218+
If your machine already has a PostgreSQL database,
219+
adjust as appropriate to the situation that exists on your computer.
220+
Those with more experience with PostgreSQL are
221+
invited to provide suggestions and corrections to these steps.
222+
<small><small><code>
223+
<ul>
224+
sudo apt install postgresql postgresql-contrib
225+
<br>sudo -u postgres psql
226+
<ul>
227+
CREATE ROLE 'your_username_here' LOGIN PASSWORD 'YourPasswordHere';
228+
<br>CREATE DATABASE motionplus WITH OWNER = your_username_here;
229+
<br>GRANT ALL PRIVILEGES ON DATABASE motionplus TO your_username_here;
230+
<br>\quit
231+
</ul>
232+
</code></small></small>
233+
</ul>
234+
235+
Once the database is set up, check the status via systemctl.
236+
<ul>
237+
<small><small><code>
238+
sudo systemctl status postgresql
239+
</code></small></small>
240+
</ul>
241+
242+
Check the login information via the following command line. (note that the
243+
username only seems to accept lowercase)
244+
<ul>
245+
<small><small><code>
246+
psql -h localhost -d motionplus -U your_username_here -p 5432
247+
</code></small></small>
248+
249+
Specify the following in the MotionPlus configuration parameters.
250+
<ul>
251+
<small><small><code>
252+
database_type postgresql
253+
<br>database_dbname motionplus
254+
<br>database_host localhost
255+
<br>database_port 5432
256+
<br>database_user your_username_here
257+
<br>database_password YourPasswordHere
258+
</code></small></small>
259+
</ul>
260+
261+
</div>
218262
<p></p>
219263

220264

@@ -232,27 +276,58 @@ <h3><a name="webcontrol_pages"></a>Webcontrol pages</h3>
232276
<li><code>{IP}:{port0}/0/status.json</code> JSON object with information about status of all cameras</li>
233277
<li><code>{IP}:{port0}/0/movies.json</code> JSON object with information about all movies</li>
234278
</ul>
235-
The following mjpg pages are available via the webcontrol. (Update automatically)
279+
The following mjpg streams are available via the webcontrol. (Update automatically). Specify {camid}
280+
as 0 to obtain a consolidated mjpg stream of all cameras.
236281
<ul>
237282
<li><code>{IP}:{port0}/{camid}/mjpg</code> Primary stream for the camera updated as a mjpg</li>
238283
<li><code>{IP}:{port0}/{camid}/mjpg/substream</code> Substream for the camera updated as a mjpg</li>
239284
<li><code>{IP}:{port0}/{camid}/mjpg/motion</code> Stream of motion images for the camera as a mjpg</li>
240285
<li><code>{IP}:{port0}/{camid}/mjpg/source</code> Source image stream of the camera as a mjpg</li>
286+
<li><code>{IP}:{port0}/{camid}/mjpg/secondary</code> Image from secondary detection stream (if active) as a mjpg</li>
241287
</ul>
242-
The following mpegts pages are available via the webcontrol. (Update automatically)
288+
The following mpegts streams are available via the webcontrol. (Update automatically) Specify {camid}
289+
as 0 to obtain a consolidated mpegts stream of all cameras.
243290
<ul>
244291
<li><code>{IP}:{port0}/{camid}/mpegts</code> Primary stream for the camera updated as a mpeg transport stream</li>
245292
<li><code>{IP}:{port0}/{camid}/mpegts/substream</code> Substream for the camera updated as a mpeg transport stream</li>
246293
<li><code>{IP}:{port0}/{camid}/mpegts/motion</code> Stream of motion images for the camera as a mpeg transport stream</li>
247294
<li><code>{IP}:{port0}/{camid}/mpegts/source</code> Source image stream of the camera as a mpeg transport stream</li>
295+
<li><code>{IP}:{port0}/{camid}/mpegts/secondary</code> Image from secondary detection stream (if active) as a mpeg transport stream</li>
248296
</ul>
249-
250-
The following static pages are available via the webcontrol. (Update manually)
297+
The following static pages are available via the webcontrol. (Update manually) Specify {camid}
298+
as 0 to obtain a consolidated image of all cameras.
251299
<ul>
252300
<li><code>{IP}:{port0}/{camid}/static</code> Primary image for the camera</li>
253301
<li><code>{IP}:{port0}/{camid}/static/substream</code> Substream image for the camera</li>
254302
<li><code>{IP}:{port0}/{camid}/static/motion</code> Motion image for the camera</li>
255303
<li><code>{IP}:{port0}/{camid}/static/source</code> Source image of the camera</li>
304+
<li><code>{IP}:{port0}/{camid}/static/secondary</code> Image from secondary detection stream (if active)</li>
305+
</ul>
306+
The following actions can be executed by sending post request.
307+
<ul>
308+
<li><code>eventstart</code>Start an event</li>
309+
<li><code>eventend</code>End an event</li>
310+
<li><code>snapshot</code>Invoke a snapshot</li>
311+
<li><code>pause</code>Pause motion detection</li>
312+
<li><code>unpause</code>Unpause motion detection</li>
313+
<li><code>restart</code>Restart camera</li>
314+
<li><code>stop</code>Stop camera</li>
315+
<li><code>config_write</code>Write out the configuration to file. User account running Motionplus must have write access to directory</li>
316+
<li><code>camera_add</code>Add a camera</li>
317+
<li><code>camera_delete</code>Delete camera</li>
318+
<li><code>config</code>Set configuration item</li>
319+
<li><code>action_user</code>Execute the on_action_user command. Provide as needed the additional parameter of action_user</li>
320+
<li><code>pan_left</code>Execute the ptz_pan_left command</li>
321+
<li><code>pan_right</code>Execute the ptz_pan_left command</li>
322+
<li><code>tilt_up</code>Execute the ptz_tilt_up</li>
323+
<li><code>tilt_down</code>Execute the ptz_tilt_down</li>
324+
<li><code>zoom_in</code>Execute ptz_zoom_in command</li>
325+
<li><code>zoom_out</code>Execute the ptz_zoom_out command</li>
326+
</ul>
327+
Sample commands
328+
<ul>
329+
<li><code>curl -s -o -X POST {IP}:{port0} --data "camid={camid}" --data "command=eventstart" 1>/dev/null</code></li>
330+
<li><code>curl -s -o -X POST {IP}:{port0} --data "camid={camid}" --data "command=config" --data "framerate=12" 1>/dev/null</code></li>
256331
</ul>
257332
</ul>
258333

0 commit comments

Comments
 (0)