Skip to content

Commit

Permalink
Update documents
Browse files Browse the repository at this point in the history
  • Loading branch information
Mr-Dave committed Aug 10, 2024
1 parent 1a9a7b9 commit a9c27f8
Show file tree
Hide file tree
Showing 2 changed files with 81 additions and 73 deletions.
67 changes: 0 additions & 67 deletions motion_build.html
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@ <h1>
<div class="dropdown-content">
<a href="#Preparation_For_Building"> Preparation For Building </a>
<a href="#BUILD_DEBIAN">Debian/Ubuntu/Raspberry Pi OS</a>
<a href="#BUILD_OPENSUSE">Open SUSE</a>
<a href="#BUILD_FREEBSD">Free BSD</a>
<a href="#BUILD_CENTOS">CentOS</a>
<a href="#BUILD_MACOSX">MacOSX </a>
Expand Down Expand Up @@ -311,72 +310,6 @@ <h4><a name="BUILD_DEBIAN"></a>Debian/Ubuntu/Raspberry Pi OS</a> </h4>
<p></p>
<p></p>

<h4><a name="BUILD_OPENSUSE"></a>openSUSE</a> </h4>
<ul>
<li>Required</li>
<ul>
<p></p>
<code><strong>sudo zypper install autoconf automake autopoint libtool git </strong></code>
<p></p>
<code><strong>sudo zypper install --type pattern devel_basis </strong></code>
<p></p>
<code><strong>sudo zypper install libjpeg8-devel gettext libmicrohttpd </strong></code>
<p></p>
<code><strong>sudo zypper install -t pattern devel_C_C++ </strong></code>
<p></p>
</ul>
<p></p>
<li>Optional Packages</li>
<ul>
<li>FFMpeg Functionality(Required for creating movies, using network cameras, etc. SEE NOTE BELOW!)</li>
<ul>
<p></p>
<code><strong>sudo zypper ar -f -n packman-essentials http://packman.inode.at/suse/openSUSE_13.1/Essentials/ packman-essentials</strong></code>
<p></p>
<code><strong>sudo zypper ar -f -n packman-multimedia http://packman.inode.at/suse/openSUSE_13.1/Multimedia/ packman-multimedia</strong></code>
<p></p>
<code><strong>sudo zypper install libffmpeg-devel</strong></code>
<p></p>
</ul>
<li>MySQL database functionality</li>
<ul>
<p></p>
<code><strong>Not known by author</strong></code>
<p></p>
</ul>
<li>MariaDB database functionality</li>
<ul>
<p></p>
<code><strong>Not known by author</strong></code>
<p></p>
</ul>
<li>PostgreSQL database functionality</li>
<ul>
<p></p>
<code><strong>Not known by author</strong></code>
<p></p>
</ul>
<li>SQLite3 database functionality</li>
<ul>
<p></p>
<code><strong>Not known by author</strong></code>
<p></p>
</ul>
<li>Webp Image Support</li>
<ul>
<p></p>
<code><strong>sudo zypper install libwebp-devel </strong></code>
<p></p>
</ul>
</ul>
Important ffmpeg note: The ffmpeg libraries indicated above are provided by a external repository. This may
change in the future. Validate that the repository is still valid when doing the install on openSUSE systems.
The default for the configure is to require that ffmpeg is installed. Use the configure option to
compile without the ffmpeg functionality.
</ul>
<p></p>
<p></p>

<h4><a name="BUILD_FREEBSD"></a>FreeBSD</a> </h4>
<ul>
<li>Required packages</li>
Expand Down
87 changes: 81 additions & 6 deletions motionplus_examples.html
Original file line number Diff line number Diff line change
Expand Up @@ -213,8 +213,52 @@ <h3><a name="database_setup"></a>Database Setup</h3>
<p></p>

<div>
<i><h4>pgsql</h4></i>
ToDo
<i><h4>postgresql</h4></i>
The following describes the process to set up a PostgreSQL database.
If your machine already has a PostgreSQL database,
adjust as appropriate to the situation that exists on your computer.
Those with more experience with PostgreSQL are
invited to provide suggestions and corrections to these steps.
<small><small><code>
<ul>
sudo apt install postgresql postgresql-contrib
<br>sudo -u postgres psql
<ul>
CREATE ROLE 'your_username_here' LOGIN PASSWORD 'YourPasswordHere';
<br>CREATE DATABASE motionplus WITH OWNER = your_username_here;
<br>GRANT ALL PRIVILEGES ON DATABASE motionplus TO your_username_here;
<br>\quit
</ul>
</code></small></small>
</ul>

Once the database is set up, check the status via systemctl.
<ul>
<small><small><code>
sudo systemctl status postgresql
</code></small></small>
</ul>

Check the login information via the following command line. (note that the
username only seems to accept lowercase)
<ul>
<small><small><code>
psql -h localhost -d motionplus -U your_username_here -p 5432
</code></small></small>

Specify the following in the MotionPlus configuration parameters.
<ul>
<small><small><code>
database_type postgresql
<br>database_dbname motionplus
<br>database_host localhost
<br>database_port 5432
<br>database_user your_username_here
<br>database_password YourPasswordHere
</code></small></small>
</ul>

</div>
<p></p>


Expand All @@ -232,27 +276,58 @@ <h3><a name="webcontrol_pages"></a>Webcontrol pages</h3>
<li><code>{IP}:{port0}/0/status.json</code> JSON object with information about status of all cameras</li>
<li><code>{IP}:{port0}/0/movies.json</code> JSON object with information about all movies</li>
</ul>
The following mjpg pages are available via the webcontrol. (Update automatically)
The following mjpg streams are available via the webcontrol. (Update automatically). Specify {camid}
as 0 to obtain a consolidated mjpg stream of all cameras.
<ul>
<li><code>{IP}:{port0}/{camid}/mjpg</code> Primary stream for the camera updated as a mjpg</li>
<li><code>{IP}:{port0}/{camid}/mjpg/substream</code> Substream for the camera updated as a mjpg</li>
<li><code>{IP}:{port0}/{camid}/mjpg/motion</code> Stream of motion images for the camera as a mjpg</li>
<li><code>{IP}:{port0}/{camid}/mjpg/source</code> Source image stream of the camera as a mjpg</li>
<li><code>{IP}:{port0}/{camid}/mjpg/secondary</code> Image from secondary detection stream (if active) as a mjpg</li>
</ul>
The following mpegts pages are available via the webcontrol. (Update automatically)
The following mpegts streams are available via the webcontrol. (Update automatically) Specify {camid}
as 0 to obtain a consolidated mpegts stream of all cameras.
<ul>
<li><code>{IP}:{port0}/{camid}/mpegts</code> Primary stream for the camera updated as a mpeg transport stream</li>
<li><code>{IP}:{port0}/{camid}/mpegts/substream</code> Substream for the camera updated as a mpeg transport stream</li>
<li><code>{IP}:{port0}/{camid}/mpegts/motion</code> Stream of motion images for the camera as a mpeg transport stream</li>
<li><code>{IP}:{port0}/{camid}/mpegts/source</code> Source image stream of the camera as a mpeg transport stream</li>
<li><code>{IP}:{port0}/{camid}/mpegts/secondary</code> Image from secondary detection stream (if active) as a mpeg transport stream</li>
</ul>

The following static pages are available via the webcontrol. (Update manually)
The following static pages are available via the webcontrol. (Update manually) Specify {camid}
as 0 to obtain a consolidated image of all cameras.
<ul>
<li><code>{IP}:{port0}/{camid}/static</code> Primary image for the camera</li>
<li><code>{IP}:{port0}/{camid}/static/substream</code> Substream image for the camera</li>
<li><code>{IP}:{port0}/{camid}/static/motion</code> Motion image for the camera</li>
<li><code>{IP}:{port0}/{camid}/static/source</code> Source image of the camera</li>
<li><code>{IP}:{port0}/{camid}/static/secondary</code> Image from secondary detection stream (if active)</li>
</ul>
The following actions can be executed by sending post request.
<ul>
<li><code>eventstart</code>Start an event</li>
<li><code>eventend</code>End an event</li>
<li><code>snapshot</code>Invoke a snapshot</li>
<li><code>pause</code>Pause motion detection</li>
<li><code>unpause</code>Unpause motion detection</li>
<li><code>restart</code>Restart camera</li>
<li><code>stop</code>Stop camera</li>
<li><code>config_write</code>Write out the configuration to file. User account running Motionplus must have write access to directory</li>
<li><code>camera_add</code>Add a camera</li>
<li><code>camera_delete</code>Delete camera</li>
<li><code>config</code>Set configuration item</li>
<li><code>action_user</code>Execute the on_action_user command. Provide as needed the additional parameter of action_user</li>
<li><code>pan_left</code>Execute the ptz_pan_left command</li>
<li><code>pan_right</code>Execute the ptz_pan_left command</li>
<li><code>tilt_up</code>Execute the ptz_tilt_up</li>
<li><code>tilt_down</code>Execute the ptz_tilt_down</li>
<li><code>zoom_in</code>Execute ptz_zoom_in command</li>
<li><code>zoom_out</code>Execute the ptz_zoom_out command</li>
</ul>
Sample commands
<ul>
<li><code>curl -s -o -X POST {IP}:{port0} --data "camid={camid}" --data "command=eventstart" 1>/dev/null</code></li>
<li><code>curl -s -o -X POST {IP}:{port0} --data "camid={camid}" --data "command=config" --data "framerate=12" 1>/dev/null</code></li>
</ul>
</ul>

Expand Down

0 comments on commit a9c27f8

Please sign in to comment.