zmcontrol-visca.pl No such file or directory

Support and queries relating to all previous versions of ZoneMinder
Locked
johnnyzone
Posts: 5
Joined: Thu Mar 02, 2006 2:11 pm
Location: UK

zmcontrol-visca.pl No such file or directory

Post by johnnyzone »

I have a EVD D31 which does not seem to work from zm 1.22.1. Things tried so far:- libvisca downloaded & installed

Code: Select all

chmod 777 /dev/ttyS0
just to be sure then

Code: Select all

[root@zm examples]# ./testvisca /dev/ttyS0
Some camera info:
------------------
vendor: 0x0001
 model: 0x0402
 ROM version: 0x0005
 socket number: 0x02
Zoom value: 0x0000
power status: 0x02
Setting pan tilt home
Setting pan tilt absolute position
Absolute position, Pan value: -500, Tilt value: -200
Setting pan tilt absolute position
Absolute position, Pan value: 500, Tilt value: 200
Setting pan tilt home
camera moves arround and does what it is supposed to, at least this proves my serial port is working!!
Then start zm add a monitor with control enabled and control type Sony VISCA and control device zmcontrol-visca.pl and control address 1 i assume this refers to the VISCA address not the serial port /dev/ttyS0 or /dev/ttyS1 . I have tried a control address of both 0 & 1. When I start zm with debug set to 9 in the log I get

Code: Select all

06/20/06 19:24:41.978744 zmfix[9566].INF-zm_debug.c/304 [New Debug Level = 9, New Debug Log = /tmp/zm_debug.log.09566]
06/20/06 19:24:41.979838 zmfix[9566].DB1-zmfix.cpp/67 [Permissions on /dev/video are ok at 20666]
06/20/06 19:24:41.980968 zmfix[9566].ERR-zmfix.cpp/40 [Can't stat : No such file or directory]
06/20/06 19:24:41.981232 zmfix[9566].ERR-zmfix.cpp/40 [Can't stat zmcontrol-visca.pl: No such file or directory]
which I assume means zm can't find my zmcontrol-visca.pl, now if i type

Code: Select all

[root@zm examples]# zmcontrol-visca.pl --device=/dev/ttyS0 --panspeed=254 --panstep=9381 --command=move_rel_right
[root@zm examples]#
it looks like at least the code worked although the camera does not move & if i type

Code: Select all

[root@zm examples]# zmcontrol-visca.pl --device=/dev/ttyS3 --panspeed=254 --panstep=9381 --command=move_rel_right
can't getattr: Input/output error at /usr/local/bin/zmcontrol-visca.pl line 95
Can't call method "baudrate" on an undefined value at /usr/local/bin/zmcontrol-visca.pl line 96.
[root@zm examples]#
the code barfs which it would as i have no /dev/ttyS3 & shows that the 1st script using /dev/ttyS0 seem to be working although still no camera motion.
The zm-visc.log gives

Code: Select all

20/06/06 19:32:29.866534 zmctrl-visc-jdh[9980].DBG [--device=/dev/ttyS0 --panspeed=254 --panstep=-7381 --command=move_rel_right]
20/06/06 19:32:29.869339 zmctrl-visc-jdh[9980].DBG [Step Right]
20/06/06 19:33:13.063076 zmctrl-visc-jdh[10011].DBG [--device=/dev/ttyS0 --panspeed=254 --panstep=-7381 --command=move_rel_left]
20/06/06 19:33:13.065851 zmctrl-visc-jdh[10011].DBG [Step Left]
20/06/06 19:40:24.443330 zmctrl-visc-jdh[10315].DBG [--device=/dev/ttyS0 --panspeed=254 --panstep=-200 --command=move_rel_left]
20/06/06 19:40:24.446044 zmctrl-visc-jdh[10315].DBG [Step Left]
20/06/06 20:19:44.482649 zmctrl-visc-jdh[12094].DBG [--device=/dev/ttyS0 --panspeed=254 --panstep=9381 --command=move_rel_right]
20/06/06 20:19:44.485411 zmctrl-visc-jdh[12094].DBG [Step Right]
20/06/06 20:21:00.481432 zmctrl-visc-jdh[12141].DBG [--device=/dev/ttyS3 --panspeed=254 --panstep=9381 --command=move_rel_right]
20/06/06 20:32:58.534860 zmctrl-visc-jdh[12661].DBG [--device=/dev/ttyS0 --panspeed=254 --panstep=10000 --command=move_rel_right]
20/06/06 20:32:58.537448 zmctrl-visc-jdh[12661].DBG [Step Right]
It does seem odd that zm can't find zmcontrol-visca.pl.
Any further things I should try before giving up & going back to using my trusty axis 2400 to do the serial control?
User avatar
cordel
Posts: 5210
Joined: Fri Mar 05, 2004 4:47 pm
Location: /USA/Washington/Seattle

Post by cordel »

It seems odd that while the file exists, zmfix can't find it. Check your folder permisions because if zmfix can't find the file then the other zm scripts can't either.
Also make sure your running as the webuser.

Regards,
Corey
User avatar
zoneminder
Site Admin
Posts: 5215
Joined: Wed Jul 09, 2003 2:07 pm
Location: Bristol, UK
Contact:

Post by zoneminder »

It's been quite a long time sincce I used this script. I will get my old Visca cam out and see if I can reproduce this problem.
Phil
johnnyzone
Posts: 5
Joined: Thu Mar 02, 2006 2:11 pm
Location: UK

Post by johnnyzone »

Things appear a little better, it seems I misunderstood the 'Main tab' in the 'Control Capability' page where it says 'Type', the only way I could see 'Sony VISCA' for my monitor was in 'Local' but the EVI-D31 gets into ZoneMinder via an Axis 2400 video server on the network so the 'Monitor/Control/Control Type' will only show network capable PTZ scripts.
:idea: I then added a new control with the 'Type Remote' and copied all the default settings from the default Local VISCA control & named it 'Sony VISCA R'.
This now allowed the control to show up in my 'Monitor/Control/Control Type' dropdown, but as posted above it dosen't work.
I have since used one of my other 'Local Monitors' and added 'Control Capability' with 'Control Type Sony VISCA' & 'Control Device /dev/ttyS0' & 'Control Address 1' and it works (sort of), at least I'm able to pan/tilt/zoom the camera with the ZoneMinder window while viewing the camera in an Axis browser window although the picture in the ZoneMinder window is of the static local monitor.

How dificult would it be for me to modify the appropriate script to allow my 'Monitor setup' window to allow a remote monitor ie. my EVI-D31 via the Axis video server to use a 'Control Type' of the local variety? or.....wait for it is it possible to have a 'zmcontrol-visca-via-network-to-axis-2400.pl' script to actually send controls to the Axis box via html on the netwotk & let it send the serial commands to the camera....

Thanks for the quick responses & Phil I don't think you need to get your VISCA cam out.

Cheers
John
jameswilson
Posts: 5111
Joined: Wed Jun 08, 2005 8:07 pm
Location: Midlands UK

Post by jameswilson »

I have read a little on the axis servers but i think you pass axis teletry commands to them over ip then tell the video server what telemetry to pass through its 485 port
James Wilson

Disclaimer: The above is pure theory and may work on a good day with the wind behind it. etc etc.
http://www.securitywarehouse.co.uk
User avatar
cordel
Posts: 5210
Joined: Fri Mar 05, 2004 4:47 pm
Location: /USA/Washington/Seattle

Post by cordel »

That can be set in the database in the Controls table. If you look at the structure it should make since to you. You can even use the existing zmcontrol-visca.pl file. It just has to be put in the database as a new line and set to remote instead of local.

Code: Select all

mysql zm
mysql> select * from Controls where name='Sony VISCA'; 
Regards,
Corey
Last edited by cordel on Thu Jun 22, 2006 12:48 am, edited 2 times in total.
jameswilson
Posts: 5111
Joined: Wed Jun 08, 2005 8:07 pm
Location: Midlands UK

Post by jameswilson »

ill explain my post a bit more. Basically you send axis coammds over ip from your zm server to your axis server. You then connect the 485 port (assuming you have one) to your telemetry reciever of you ptz unit. I think you have to buy protocols for the axis server but the may offer some basic free ones. The other option is to copy accross the req protocol to an ip named one. Then connect your 485 lines to your zm server serial port in the usual way. But if you want to pass telemetry over ip to your axis server tahn im afraid (i think) the first option is the only way to go.
James Wilson

Disclaimer: The above is pure theory and may work on a good day with the wind behind it. etc etc.
http://www.securitywarehouse.co.uk
Locked