Page 1 of 1

Zoneminder and tinyCam Monitor and RPM install

Posted: Sat Mar 07, 2015 5:26 pm
by punch-card
Just a note to others who install or upgrade to a rpm installation of Zoneminder, the location of the CGI moved because of directory based conf files in centos 6 & 7.
What I found it tinyCam Monitor was now giving me 404 errors because it could not find nph-zms cgi.
This is easily solved by using the custom_vendors.xml file (setting -> developer), developers website in app. (http://tinycammonitor.com/custom.html)
Download the xml file and edit the file and change the paths in the zoneminder stanzas.
Then change the camera type for "Zoneminder" to "Zoneminder CUSTOMNAME" where CUSTOMNAME is the name in the xml file. (mine I called RPM)

<vendor name="ZoneMinder RPM">
<model name="Generic">
<request name="Login">/zm/index.php?view=watch&mid=%CAMERANO%&username=%USERNAME%&password=%PASSWORD%&action=login</request>
<request name="Push">/cgi-bin-zm/nph-zms?mode=jpeg&monitor=%CAMERANO%&user=%USERNAME%&pass=%PASSWORD%</request>
<request name="Push2">/cgi-bin-zm/nph-zms?mode=jpeg&monitor=%CAMERANO%&user=%USERNAME%&pass=%PASSWORD%&maxfps=1</request>
<request name="Snap">/cgi-bin-zm/nph-zms?mode=single&monitor=%CAMERANO%&user=%USERNAME%&pass=%PASSWORD%</request>
<request name="PtzMoveRelLeft">/zm/?view=request&request=control&id=%CAMERANO%&user=%USERNAME%&pass=%PASSWORD%&control=moveConLeft&yge=75</request>
<request name="PtzMoveRelRight">/zm/?view=request&request=control&id=%CAMERANO%&user=%USERNAME%&pass=%PASSWORD%&control=moveConRight&yge=75</request>
<request name="PtzMoveRelUp">/zm/?view=request&request=control&id=%CAMERANO%&user=%USERNAME%&pass=%PASSWORD%&control=moveConUp&yge=75</request>
<request name="PtzMoveRelDown">/zm/?view=request&request=control&id=%CAMERANO%&user=%USERNAME%&pass=%PASSWORD%&control=moveConDown&yge=75</request>
<request name="PtzMoveHome">/zm/?view=request&request=control&id=%CAMERANO%&user=%USERNAME%&pass=%PASSWORD%&control=presetHome</request>
<request name="PtzZoomTele">/zm/?view=request&request=control&id=%CAMERANO%&user=%USERNAME%&pass=%PASSWORD%&control=zoomConTele&yge=75</request>
<request name="PtzZoomWide">/zm/?view=request&request=control&id=%CAMERANO%&user=%USERNAME%&pass=%PASSWORD%&control=zoomConWide&yge=75</request>
<request name="PtzFocusAuto">/zm/?view=request&request=control&id=%CAMERANO%&user=%USERNAME%&pass=%PASSWORD%&control=focusAuto</request>
<request name="PtzFocusManual">/zm/?view=request&request=control&id=%CAMERANO%&user=%USERNAME%&pass=%PASSWORD%&control=focusMan</request>
<request name="PtzFocusFar">/zm/?view=request&request=control&id=%CAMERANO%&user=%USERNAME%&pass=%PASSWORD%&control=focusConFar&yge=75</request>
<request name="PtzFocusNear">/zm/?view=request&request=control&id=%CAMERANO%&user=%USERNAME%&pass=%PASSWORD%&control=focusConNear&yge=75</request>
<request name="PtzIrisAuto">/zm/?view=request&request=control&id=%CAMERANO%&user=%USERNAME%&pass=%PASSWORD%&control=irisAuto</request>
<request name="PtzIrisManual">/zm/?view=request&request=control&id=%CAMERANO%&user=%USERNAME%&pass=%PASSWORD%&control=irisMan</request>
<request name="PtzIrisOpen">/zm/?view=request&request=control&id=%CAMERANO%&user=%USERNAME%&pass=%PASSWORD%&control=irisConOpen&yge=75</request>
<request name="PtzIrisClose">/zm/?view=request&request=control&id=%CAMERANO%&user=%USERNAME%&pass=%PASSWORD%&control=irisConClose&yge=75</request>
<request name="PtzGotoPreset">/zm/?view=request&request=control&id=%CAMERANO%&user=%USERNAME%&pass=%PASSWORD%&control=presetGoto%PRESETNO%</request> <!-- where %PRESETNO% = [1..max] -->
<request name="PtzSetPreset">/zm/?view=request&request=control&id=%CAMERANO%&user=%USERNAME%&pass=%PASSWORD%&control=presetSet%PRESETNO%</request>
<request name="Sleep">/zm/?view=request&request=control&id=%CAMERANO%&user=%USERNAME%&pass=%PASSWORD%&control=sleep</request>
<request name="Wake">/zm/?view=request&request=control&id=%CAMERANO%&user=%USERNAME%&pass=%PASSWORD%&control=wake</request>
</model>
</vendor>

Thanks to the developer for the suggested solution.

Re: Zoneminder and tinyCam Monitor and RPM install

Posted: Wed Mar 11, 2015 1:32 pm
by knight-of-ni
Note that this only affects the CentOS 7 rpm, not the CentOS 6, nor the Fedora RPMs. CentOS 6 probably wont ever have this change (because it uses the older Apache 2.2). I will probably make this change to the Fedora rpm's following the next release (of Fedora).

It is unfortunate that the tinyCam Montior developer hard coded that value. The scriptalias path was never intended to be static. In this partiuclar case with Centos 7, there was a technical problem, which required us to change this to someting other than the current default value. Other times, a distro may have packaging guidlines that dictate it should go somewhere else. This is why this option is configurable during build time.

Hopefully the developer will make that a user slectable option. It must match the value of ZM_PATH_ZMS under zoneminder Options.