Adding new control settings
-
- Posts: 41
- Joined: Thu Jan 01, 2009 8:11 am
Adding new control settings
The person that got the Orbit sphere working with the older uvc streamer is helping me gain control of the Orbit with the newer mjpg_streamer within zoneminder. I thought this would be somewhat easy but I'm beginning to think there is something wrong with either 1.24 or the way I installed it.
I can see the feed from the Orbit inside 1.24 no problem. If I click on the cam, then click control that is where the problems start. I've dropped a test file the person sent me in the folder along with Visca.pm and such and restarted Zoneminder.
Now, if I click control type edit button it brings up another window where I select add new. So far so good, I fill out the first tab called main. I give it a name, select remote and input mjpg_streamer for the protocl since I named the file mjpg_streamer.pm. Now, no matter what I do, if I click save right then and there or go onto the next tab and select some options and click save, it dumps the last pages settings. So I can get it to keep the name and protcol, and it will save the next tab if I tell it it can move, but If I go to the next tab for tilt and pan it dumps the option I selected in the last tab for it to move.
edit: I can go in to phpmyadmin under zm and manually put 1 instead of 0 next to some of the options, and the change will stick. As soon as I use the web interface it doesn't seem to work.
I can see the feed from the Orbit inside 1.24 no problem. If I click on the cam, then click control that is where the problems start. I've dropped a test file the person sent me in the folder along with Visca.pm and such and restarted Zoneminder.
Now, if I click control type edit button it brings up another window where I select add new. So far so good, I fill out the first tab called main. I give it a name, select remote and input mjpg_streamer for the protocl since I named the file mjpg_streamer.pm. Now, no matter what I do, if I click save right then and there or go onto the next tab and select some options and click save, it dumps the last pages settings. So I can get it to keep the name and protcol, and it will save the next tab if I tell it it can move, but If I go to the next tab for tilt and pan it dumps the option I selected in the last tab for it to move.
edit: I can go in to phpmyadmin under zm and manually put 1 instead of 0 next to some of the options, and the change will stick. As soon as I use the web interface it doesn't seem to work.
Last edited by foxtroop11 on Mon Jan 12, 2009 8:25 am, edited 3 times in total.
-
- Posts: 41
- Joined: Thu Jan 01, 2009 8:11 am
I just did another test install of zoneminder 1.23.3 from a deb package. That version has no issue's what so ever adding a new control device or parameter and saving it.
Last edited by foxtroop11 on Mon Jan 12, 2009 8:26 am, edited 1 time in total.
Re: Adding new control settings
I have also found this issue in 1.24.
The only way to get the settings for a new control to be done is to manipulate the db directly.
The only way to get the settings for a new control to be done is to manipulate the db directly.
-
- Posts: 41
- Joined: Thu Jan 01, 2009 8:11 am
Atleast I'm not the only one
I just find it strange that we are the only two people with this problem out of all the other people trying 1.24. I'm not sure what your using for your install base, but I'm using Kubuntu 8.04 and I went back and recompiled after installing, ah I forgot the name, libcpr3-dev maybe? This removed the warning while running the ./configure where it said something about May not be able to control network camera's. I also made sure I installed all the perl modules that it said was missing, like the X10 support, email support, and a couple others.
I just find it strange that we are the only two people with this problem out of all the other people trying 1.24. I'm not sure what your using for your install base, but I'm using Kubuntu 8.04 and I went back and recompiled after installing, ah I forgot the name, libcpr3-dev maybe? This removed the warning while running the ./configure where it said something about May not be able to control network camera's. I also made sure I installed all the perl modules that it said was missing, like the X10 support, email support, and a couple others.
-
- Posts: 41
- Joined: Thu Jan 01, 2009 8:11 am
I installed the newest build and this bug is still there. I find it hard to beleive only two people are having this issue. So no one else notices that when you try and add a new Camera control the settings are not saved per page? Honestly the only way you can setup a new Control entry is using phpmyadmin or something similar to directly edit the database, otherwise you cannot save any entries other then the first page of adding a new control.
No, I've seen it too. Setting up monitors isn't the only place these sorts of glitches are happening. Keep in mind afterall that 1.24 is still in development.foxtroop11 wrote:I installed the newest build and this bug is still there. I find it hard to beleive only two people are having this issue. So no one else notices that when you try and add a new Camera control the settings are not saved per page? Honestly the only way you can setup a new Control entry is using phpmyadmin or something similar to directly edit the database, otherwise you cannot save any entries other then the first page of adding a new control.
-
- Posts: 41
- Joined: Thu Jan 01, 2009 8:11 am
No, it's not just you.foxtroop11 wrote:No one else was saying anything so I was beginning to think it was a mistake in how I installed it.
http://www.zoneminder.com/forums/viewto ... 4&start=45
I have verified the problem and yes it does exist. There are no errors on the page so I assume that only the arrays for the current tab are loaded but when it saves it try's to save all the data from all the tabs even though it only has one tabs array or it try's to reload the array from the database, either case the array is not behaving properly.
I'll see if I can sort it out. Likely just need to move the call for data in the script.
I'll see if I can sort it out. Likely just need to move the call for data in the script.
-
- Posts: 41
- Joined: Thu Jan 01, 2009 8:11 am
- zoneminder
- Site Admin
- Posts: 5215
- Joined: Wed Jul 09, 2003 2:07 pm
- Location: Bristol, UK
- Contact:
- zoneminder
- Site Admin
- Posts: 5215
- Joined: Wed Jul 09, 2003 2:07 pm
- Location: Bristol, UK
- Contact:
Try the latest RC (2734) or apply the patch below
It's really only the last changed line that is significant I think however.
Code: Select all
Index: web/skins/classic/views/controlcap.php
===================================================================
--- web/skins/classic/views/controlcap.php (revision 2720)
+++ web/skins/classic/views/controlcap.php (working copy)
@@ -40,118 +40,122 @@
else
$tab = "main";
-if ( !empty($_REQUEST['cid']) )
+if ( isset( $_REQUEST['newControl'] ) )
{
- $control = dbFetchOne( "select * from Controls where Id = '".dbEscape($_REQUEST['cid'])."'" );
+ $newControl = $_REQUEST['newControl'];
}
else
{
- $control = array(
- 'Name' => $SLANG['New'],
- 'Type' => "Local",
- 'Protocol' => "",
- 'CanWake' => "",
- 'CanSleep' => "",
- 'CanReset' => "",
- 'CanMove' => "",
- 'CanMoveDiag' => "",
- 'CanMoveMap' => "",
- 'CanMoveAbs' => "",
- 'CanMoveRel' => "",
- 'CanMoveCon' => "",
- 'CanPan' => "",
- 'MinPanRange' => "",
- 'MaxPanRange' => "",
- 'MinPanStep' => "",
- 'MaxPanStep' => "",
- 'HasPanSpeed' => "",
- 'MinPanSpeed' => "",
- 'MaxPanSpeed' => "",
- 'HasTurboPan' => "",
- 'TurboPanSpeed' => "",
- 'CanTilt' => "",
- 'MinTiltRange' => "",
- 'MaxTiltRange' => "",
- 'MinTiltStep' => "",
- 'MaxTiltStep' => "",
- 'HasTiltSpeed' => "",
- 'MinTiltSpeed' => "",
- 'MaxTiltSpeed' => "",
- 'HasTurboTilt' => "",
- 'TurboTiltSpeed' => "",
- 'CanZoom' => "",
- 'CanZoomAbs' => "",
- 'CanZoomRel' => "",
- 'CanZoomCon' => "",
- 'MinZoomRange' => "",
- 'MaxZoomRange' => "",
- 'MinZoomStep' => "",
- 'MaxZoomStep' => "",
- 'HasZoomSpeed' => "",
- 'MinZoomSpeed' => "",
- 'MaxZoomSpeed' => "",
- 'CanFocus' => "",
- 'CanAutoFocus' => "",
- 'CanFocusAbs' => "",
- 'CanFocusRel' => "",
- 'CanFocusCon' => "",
- 'MinFocusRange' => "",
- 'MaxFocusRange' => "",
- 'MinFocusStep' => "",
- 'MaxFocusStep' => "",
- 'HasFocusSpeed' => "",
- 'MinFocusSpeed' => "",
- 'MaxFocusSpeed' => "",
- 'CanIris' => "",
- 'CanAutoIris' => "",
- 'CanIrisAbs' => "",
- 'CanIrisRel' => "",
- 'CanIrisCon' => "",
- 'MinIrisRange' => "",
- 'MaxIrisRange' => "",
- 'MinIrisStep' => "",
- 'MaxIrisStep' => "",
- 'HasIrisSpeed' => "",
- 'MinIrisSpeed' => "",
- 'MaxIrisSpeed' => "",
- 'CanGain' => "",
- 'CanAutoGain' => "",
- 'CanGainAbs' => "",
- 'CanGainRel' => "",
- 'CanGainCon' => "",
- 'MinGainRange' => "",
- 'MaxGainRange' => "",
- 'MinGainStep' => "",
- 'MaxGainStep' => "",
- 'HasGainSpeed' => "",
- 'MinGainSpeed' => "",
- 'MaxGainSpeed' => "",
- 'CanWhite' => "",
- 'CanAutoWhite' => "",
- 'CanWhiteAbs' => "",
- 'CanWhiteRel' => "",
- 'CanWhiteCon' => "",
- 'MinWhiteRange' => "",
- 'MaxWhiteRange' => "",
- 'MinWhiteStep' => "",
- 'MaxWhiteStep' => "",
- 'HasWhiteSpeed' => "",
- 'MinWhiteSpeed' => "",
- 'MaxWhiteSpeed' => "",
- 'HasPresets' => "",
- 'NumPresets' => "",
- 'HasHomePreset' => "",
- 'CanSetPresets' => "",
- );
-}
-if ( !isset( $newControl ) )
-{
+ if ( !empty($_REQUEST['cid']) )
+ {
+ $control = dbFetchOne( "select * from Controls where Id = '".dbEscape($_REQUEST['cid'])."'" );
+ }
+ else
+ {
+ $control = array(
+ 'Name' => $SLANG['New'],
+ 'Type' => "Local",
+ 'Protocol' => "",
+ 'CanWake' => "",
+ 'CanSleep' => "",
+ 'CanReset' => "",
+ 'CanMove' => "",
+ 'CanMoveDiag' => "",
+ 'CanMoveMap' => "",
+ 'CanMoveAbs' => "",
+ 'CanMoveRel' => "",
+ 'CanMoveCon' => "",
+ 'CanPan' => "",
+ 'MinPanRange' => "",
+ 'MaxPanRange' => "",
+ 'MinPanStep' => "",
+ 'MaxPanStep' => "",
+ 'HasPanSpeed' => "",
+ 'MinPanSpeed' => "",
+ 'MaxPanSpeed' => "",
+ 'HasTurboPan' => "",
+ 'TurboPanSpeed' => "",
+ 'CanTilt' => "",
+ 'MinTiltRange' => "",
+ 'MaxTiltRange' => "",
+ 'MinTiltStep' => "",
+ 'MaxTiltStep' => "",
+ 'HasTiltSpeed' => "",
+ 'MinTiltSpeed' => "",
+ 'MaxTiltSpeed' => "",
+ 'HasTurboTilt' => "",
+ 'TurboTiltSpeed' => "",
+ 'CanZoom' => "",
+ 'CanZoomAbs' => "",
+ 'CanZoomRel' => "",
+ 'CanZoomCon' => "",
+ 'MinZoomRange' => "",
+ 'MaxZoomRange' => "",
+ 'MinZoomStep' => "",
+ 'MaxZoomStep' => "",
+ 'HasZoomSpeed' => "",
+ 'MinZoomSpeed' => "",
+ 'MaxZoomSpeed' => "",
+ 'CanFocus' => "",
+ 'CanAutoFocus' => "",
+ 'CanFocusAbs' => "",
+ 'CanFocusRel' => "",
+ 'CanFocusCon' => "",
+ 'MinFocusRange' => "",
+ 'MaxFocusRange' => "",
+ 'MinFocusStep' => "",
+ 'MaxFocusStep' => "",
+ 'HasFocusSpeed' => "",
+ 'MinFocusSpeed' => "",
+ 'MaxFocusSpeed' => "",
+ 'CanIris' => "",
+ 'CanAutoIris' => "",
+ 'CanIrisAbs' => "",
+ 'CanIrisRel' => "",
+ 'CanIrisCon' => "",
+ 'MinIrisRange' => "",
+ 'MaxIrisRange' => "",
+ 'MinIrisStep' => "",
+ 'MaxIrisStep' => "",
+ 'HasIrisSpeed' => "",
+ 'MinIrisSpeed' => "",
+ 'MaxIrisSpeed' => "",
+ 'CanGain' => "",
+ 'CanAutoGain' => "",
+ 'CanGainAbs' => "",
+ 'CanGainRel' => "",
+ 'CanGainCon' => "",
+ 'MinGainRange' => "",
+ 'MaxGainRange' => "",
+ 'MinGainStep' => "",
+ 'MaxGainStep' => "",
+ 'HasGainSpeed' => "",
+ 'MinGainSpeed' => "",
+ 'MaxGainSpeed' => "",
+ 'CanWhite' => "",
+ 'CanAutoWhite' => "",
+ 'CanWhiteAbs' => "",
+ 'CanWhiteRel' => "",
+ 'CanWhiteCon' => "",
+ 'MinWhiteRange' => "",
+ 'MaxWhiteRange' => "",
+ 'MinWhiteStep' => "",
+ 'MaxWhiteStep' => "",
+ 'HasWhiteSpeed' => "",
+ 'MinWhiteSpeed' => "",
+ 'MaxWhiteSpeed' => "",
+ 'HasPresets' => "",
+ 'NumPresets' => "",
+ 'HasHomePreset' => "",
+ 'CanSetPresets' => "",
+ );
+ }
$newControl = $control;
}
$focusWindow = true;
-xhtmlHeaders(__FILE__, $SLANG['ControlCap']." - ".$control['Name'] );
+xhtmlHeaders(__FILE__, $SLANG['ControlCap']." - ".$newControl['Name'] );
?>
<body>
<div id="page">
@@ -172,7 +176,7 @@
else
{
?>
- <li><a href="?view=<?= $view ?>&cid=<?= requestVar( 'cid' ) ?>&tab=<?= $name ?>"><?= $value ?></a></li>
+ <li><a href="#" onclick="submitTab( '<?= $name ?>' ); return( false );"><?= $value ?></a></li>
<?php
}
}
Phil
-
- Posts: 41
- Joined: Thu Jan 01, 2009 8:11 am