Page 4 of 5
Posted: Thu Nov 13, 2008 1:57 am
by PowerRanger
Thanks for posting the old files. I've been trying off and on for a week to convert it to a module. While I've managed to learn a _little_ about Perl, I've not made any significant headway. The error I ca't seem to get around is :
zmcontrol[28877].FAT [Can't connect: No such file or directory]
I don't know if its a module problem or permissions to the /dev/ttyS0 or what...
So, until my frustration level wanes I will just monitor this thread and hope somebody gets around to converting the ptz-2 script. Be it known that whoever undertakes the endeavor, you have my full moral support and gratitude.
Mike
Posted: Thu Nov 13, 2008 2:14 am
by Normando
PowerRanger wrote:zmcontrol[28877].FAT [Can't connect: No such file or directory]
Please, look this issue, may be afected your script:
http://www.zoneminder.com/forums/viewtopic.php?t=12203
Posted: Thu Nov 13, 2008 3:39 am
by PowerRanger
Thanks for the pointer, but I checked and don't think that's my issue.
my module so far can be reconstructed from:
http://pastebin.ca/1254938
just make a file named Ptz2.pm, chmod to make executable + copy to /usr/share/perl5/ZoneMinder
I don't even think you need the actual hardware (or a camera for that matter) to see the error.
Mike
Posted: Thu Nov 13, 2008 3:44 am
by Normando
PowerRanger wrote:Thanks for the pointer, but I checked and don't think that's my issue.
In my experience, every time I was modify my module code, I need to delete the lock control file, because give the same error as you.
Posted: Thu Nov 13, 2008 3:48 am
by PowerRanger
Normando wrote:I need to delete the lock control file, because give the same error as you.
That's a little over my head, how would I do that?
Posted: Thu Nov 13, 2008 3:56 am
by Normando
PowerRanger wrote:That's a little over my head, how would I do that?
At my system, under
/var/lib/zoneminder remove all your
zmcontrol-*.sock files before try to test your modify module. Do this every time you want to test your module. It is the same folder for events - images - and temp folders.
Posted: Thu Nov 13, 2008 4:31 am
by PowerRanger
I have a /var/lib/zm but there's nothing there .
My ZM_PATH_SOCKS is set to /tmp
but I don't see any control sockets.
BTW I edited my earlier post with a pastebin link to the contents of the module.
Mike
Posted: Thu Nov 13, 2008 4:36 am
by Normando
If you have not socket files, then you will get the same errors:
zmcontrol[28877].FAT [Can't connect: No such file or directory]
Why can't connect to socket file? I don't know, but start looking at the tmp permissions, or if zm can write to this directory.
Look at your /var/log/messages file to see any ttySx file error.
Posted: Thu Nov 13, 2008 4:46 am
by PowerRanger
All of my log files write to the /tmp just fine. I've been tail -f on them and /var/log/messages, but I don't see any problems with permissions. I've chown'ed 777 the /dev/ttyS0
This is on Ubuntu 8.10 from repos. I think zm runs as user www-data. I've read that the user needs to be added to the modem users group to have access to the serial ports, but using the gui i couldn't figure out how to do that, hence the chown 777 /dev/ttys0
Probably the thing for me to do is try getting the original script working with .22 version , I have that installed on another machine. Once I get that working I can rule out permissions to the serial device.
Posted: Sat Nov 15, 2008 3:39 am
by PowerRanger
update-- I did a fresh install of ubuntu 8.04 and zm .22 from the repositories. I installed the original ptz2n script, and entered all parameters for PTZ and chown www-data.www-data /dev/ttyS0
The camera controls fine.
moved back to the 8.10 with my new module under zm .23, set permissions on serial device and still get the zmcontrol[8093].FAT [Can't connect: No such file or directory] error
I'm sure that if anyone knew how to debug modules a little better than me were to take my pastebin from above and make their own module, they could maybe get me past this problem without even having the actual hardware. I'm stuck. Any takers?
TIA
Mike
still stuck
Posted: Sat Nov 29, 2008 5:37 am
by PowerRanger
If somebody could give me a nudge by helping figuring out why I'm getting the 'can't connect; no file or directory' message, I would be very grateful. Again, the pastebin link from above can be used too re-create my module. I don't think the hardware is necessary to get to the point of the error. As an aside, can the module (or the the module through the control server) be called independently of ZM to exercise the code?
Something like: perl -d /usr/share/perl5/ZoneMinder/Ptz2n.pm
BTW-- I get a perl syntax error in the code when I execute this on my module.
Thanks
Mike
Posted: Sun Nov 30, 2008 8:17 am
by PowerRanger
I played with this some more and made quite a few changes. I'm still having the 'can't connect' message though.
http://pastebin.ca/1270957
Mike
Posted: Mon Dec 01, 2008 2:44 am
by PowerRanger
Anyone??
Please help me. I've been struggling with this for in earnest for 2 weeks now, and can't say whether I've made ANY headway. At this point I'm very depressed and discouraged and simply tired of banging my head with no results. I'm almost ready to toss in the towel. I am convinced that if somebody who knew how the stuff worked were to look at my code, they could in a few minutes tell me what I've been struggling with for days.
I'm not asking for somebody to do this work for me. I want to learn. I just need a little help.
I can post logs, or even make a whole system available for debug.
Sorry for the rant.
Mike
Posted: Mon Dec 01, 2008 3:09 am
by Normando
pm me with a public link to your camera, and I will try to help you running your camera controls at my zm server. If it is posible, you must leave for at least 72hours permanent connected to the inet.
Posted: Mon Dec 01, 2008 3:36 am
by PowerRanger
Thanks Normando
PM sent
Mike