Controls command path not saved?

Support and queries relating to all previous versions of ZoneMinder
Locked
RoundSparrow
Posts: 23
Joined: Thu Oct 18, 2007 2:11 pm

Controls command path not saved?

Post by RoundSparrow »

If you go to edit an existing control configuration, the command path always comes up blank. Seems like a bug in the PHP to mySQL interaction?

I mean the "command" path on this screen:

http://sfpeter.com/files/trendnet/config_main.png

I've been unable to get it to work on my TrendNet camera, I'm guessing this value isn't being saved correctly.
User avatar
cordel
Posts: 5210
Joined: Fri Mar 05, 2004 4:47 pm
Location: /USA/Washington/Seattle

Post by cordel »

Do you really have the script in that path, and does apache have permitions to run it?
RoundSparrow
Posts: 23
Joined: Thu Oct 18, 2007 2:11 pm

Post by RoundSparrow »

cordel wrote:Do you really have the script in that path, and does apache have permitions to run it?

Yes, but that's not the issue. The issue seems the PHP "GUI" is broken. Put in a setting for command, SAVE, open the window - and it will NOT load.

It does not appear to be in the database either. Other settings on the same screen, such as the name of the control, save perfectly fine.
User avatar
zoneminder
Site Admin
Posts: 5215
Joined: Wed Jul 09, 2003 2:07 pm
Location: Bristol, UK
Contact:

Post by zoneminder »

Can you confirm which version of ZM you are referring to here?
Phil
RoundSparrow
Posts: 23
Joined: Thu Oct 18, 2007 2:11 pm

Post by RoundSparrow »

At the time I wrote this, RC1. I'm not on a fresh install of RC2 (new install of Ubuntu Gutsy). Will try again.
User avatar
zoneminder
Site Admin
Posts: 5215
Joined: Wed Jul 09, 2003 2:07 pm
Location: Bristol, UK
Contact:

Post by zoneminder »

The way that the control commands are sent has changed in 1.23. All of the built-in protocols no longer use separate scripts, rather they use protocol libraries and any new protocols should be implmented in the same way. So it may be that the custom command line should not even exist any more however I may have left it in there for compatibility. I will need to check and get back to you.
Phil
slbpatrol
Posts: 9
Joined: Sat Feb 03, 2007 10:12 pm

Protocol for PTZ Controls

Post by slbpatrol »

How do you add the name of the protocol for the PTZ controls now? When I look into the database I can see where the names of the control scripts but I cannot add a protocol name when I add a new PTZ control.
User avatar
zoneminder
Site Admin
Posts: 5215
Joined: Wed Jul 09, 2003 2:07 pm
Location: Bristol, UK
Contact:

Post by zoneminder »

This is a tricky one. Really the control stuff is all done via perl modules now. I have fixed the missing protocol field above for 1.23.1 but I'm not sure what to do about the command script field as it is really ignred now. However I don't want to break people's setups where they have written their own script and haven't had time to migrate it over to a module yet.

I think I will have to add something for this release to allow scripts (where defined) to still get used but hide the option from the UI as I think it will be confusing if left. So you have to add a custom script direct to entry in the DB the DB.

I need to have a short think. I think. :?
Phil
sfpeter
Posts: 9
Joined: Fri Jul 06, 2007 8:43 am

ptz scripts

Post by sfpeter »

I'm the author of the Trendnet PTZ scripts that is now broken in the latest release. I can update my scripts to libraries so they'll have the correct interface again, but will adding a custom PTZ library as straightforward as it was to add a PTZ script before?
A bunch of people are using my trendnet PTZ scripts so it would be nice if they wouldn't have to do any manual db updates to get it working again.

Alternatively, I'd be happy to submit the code to the project so Trendnet PTZ camera users can control their cameras right away without the need to install my script/library first.
User avatar
zoneminder
Site Admin
Posts: 5215
Joined: Wed Jul 09, 2003 2:07 pm
Location: Bristol, UK
Contact:

Post by zoneminder »

I think I may have replied on a different thread to this about the same subject.

The current status is that custom control scripts _should_ still work if you put an absolute path to the script in the protocol field. Note that the parameters have changed slightly and also that the monitor id is passed in instead of the device directly so you will have to get it from the DB. If you can change your script to workaround these issues then it should still work.

However the 'recommended' way is now to add it as a perl module. If you look at the examples in the scripts/ZoneMinder/lib/ZoneMinder/Control directory of the distro you will find some examples. Probably the Axis or Panasonic ones are most applicable as the Trendnet is an IP cam isn't it. You should be able to convert from one to the other in about half an hour to an hour.

I am happy to do it for you if you mail me the script but obviously can't test it so you will have to do that part. Are you using a build from source?
Phil
Locked