Page 1 of 1

Foscam FI8904W frequently has all blue images captured

Posted: Tue Aug 06, 2013 10:01 pm
by joseph85750
I've been running ZoneMinder for a week or 2, and noticed my FI8904W camera will frequently have frames which are simply all blue screens. There will be a series of image JPGs, then the BLUE images, then back to the JPGs. I'm not sure exactly how many there are, since there is no timestamp on the corner. It only does it on this one camera. I also have a newer FI8905W, which does not do this.
It might be the FI8904W camera itself. I bought it in July of 2011, and it's been coming up with more and more problems over the past few months.
Anyone know what could cause this?

Thanks!

Re: Foscam FI8904W frequently has all blue images captured

Posted: Wed Aug 07, 2013 6:50 pm
by mikb
Are the blue images coming from the camera, or from ZoneMinder?

With my cameras (not the same brand), when there's a comms error between the capture demon of Zoneminder, and the camera (over an IP Link), the capture demon returns a placeholder "blue picture" which is analyzed and saved instead. I can't remember if it comes with a timestamp or not :(

So this is "expected" operation if you are occasionally losing comms with the camera. Next time it happens, if you can work out the exact time (to the second) from the surrounding video, go check the zoneminder logs (from the web interface, or /var/log/zm/zm.log) and look for errors with that approximate time stamp. In my case, I get socket timeouts because the camera went to sleep in mid transaction ...

Re: Foscam FI8904W frequently has all blue images captured

Posted: Wed Aug 07, 2013 6:58 pm
by joseph85750
mikb:
Thanks for the reply! I was curious if it might be com related, but not sure. The other camera never loses com, but it's in a different location.

I don't have any log file in: /var/log/zm
It's an empty directory.

Where is this defined? On the 'logging' tab, I have an entry:
LOG_DEBUG_FILE Where extra debug is output to (?) [ /tmp/zm/zm_debug.log+ ]

In /tmp/zm I have:
root@zoneminder:~# ls -latR /tmp/zm/
/tmp/zm/:
total 16
drwx------ 4 www-data www-data 4096 Aug 7 11:50 .
drwxrwxrwt 3 root root 4096 Aug 7 11:49 ..
drwxr-xr-x 2 www-data www-data 4096 Aug 7 11:35 zmswap-m2
drwxr-xr-x 2 www-data www-data 4096 Aug 7 10:38 zmswap-m1
srwxr-xr-x 1 www-data www-data 0 Aug 5 17:45 zmdc.sock

/tmp/zm/zmswap-m2:
total 8
drwx------ 4 www-data www-data 4096 Aug 7 11:50 ..
drwxr-xr-x 2 www-data www-data 4096 Aug 7 11:35 .

/tmp/zm/zmswap-m1:
total 8
drwx------ 4 www-data www-data 4096 Aug 7 11:50 ..
drwxr-xr-x 2 www-data www-data 4096 Aug 7 10:38 .
root@zoneminder:~#

Re: Foscam FI8904W frequently has all blue images captured

Posted: Thu Aug 08, 2013 7:12 am
by Flasheart
Try using the camera wired rather than wireless.

Re: Foscam FI8904W frequently has all blue images captured

Posted: Thu Aug 08, 2013 6:17 pm
by mikb
joseph85750 wrote:mikb:
I don't have any log file in: /var/log/zm
It's an empty directory.

Where is this defined? On the 'logging' tab, I have an entry:
LOG_DEBUG_FILE Where extra debug is output to (?) [ /tmp/zm/zm_debug.log+ ]
I have that too, no idea what that's for :(

"Options" "Paths" : "PATH_LOGS Path to the various logs that the ZoneMinder daemons generate (?)

I think I have logs in there because I told syslogd to put them there, something like this ... (your system may do something different with all this, I'm a Slackware user).

Code: Select all

Adjust system logging by editing /etc/syslog.conf

Add one line to end to direct logging to its own file.

# Save Zoneminder messages to zm.log
local1.*                        /var/log/zm/zm.log

And exclude from existing messages/syslog with edits to add local1.!*; to these two lines

     local1.!*;authpriv.none;cron.none;mail.none;news.none   -/var/log/messages
     local1.!*;authpriv.none;cron.none;mail.none;news.none   -/var/log/syslog

Restart syslogd by sending it HUP signal.

Create /etc/logrotate.d/zoneminder with

/var/log/zm/*.log {
    missingok
    notifempty
    sharedscripts
    compress
    postrotate
        /usr/local/bin/zmpkg.pl logrot 2> /dev/null > /dev/null || true
        /bin/kill -HUP `cat /var/run/syslogd.pid 2>/dev/null` 2>/dev/null || true
    endscript
}
I didn't realise your camera was wireless: Yes that will probably have occasional comm errors and timeouts that ZoneMinder will treat as loss of signal, even if the TCP/IP connection does eventually get through.

Re: Foscam FI8904W frequently has all blue images captured

Posted: Sat Aug 10, 2013 10:39 pm
by joseph85750
mikb:
Thanks for the info. Actually, my first distro was slackware, so I get it. :)

I decided to drop the Pre-built VM, and build my own CentOS VM.
I got it working, 64bit, and it seems to perform quite a bit better. And it has a bunch of stuff enabled which wasn't in the original VM, which is kinda cool.


As far as that 'blue screen' thing, I just realized it shows up when the Event "Cause" is "Signal".
I tried all kinds of stuff to fix it, and finally I changed the 'channel' of my wireless router and the problem went away. I guess the Foscams we having a problem on that channel.

Is there a way to 'ignore' all Events which are "Signal"? I couldn't find a setting for that, other than the filter when listing the events. But I'd rather they not even get recorded, if possible.

ZoneMinder is really impressive. I like how I can get under the hood and figure out stuff on my own.

Re: Foscam FI8904W frequently has all blue images captured

Posted: Sun Aug 11, 2013 7:49 pm
by mikb
joseph85750 wrote: Thanks for the info. Actually, my first distro was slackware, so I get it. :)
So was mine, in '93/94, when it first came on 20-30 floppy disks. Continuity, that's the thing ;)
joseph85750 wrote: As far as that 'blue screen' thing, I just realized it shows up when the Event "Cause" is "Signal".
Oh, well that's a giveaway, sounds like it knows it lost the signal and even recorded the fact. Smart!

It could just be another device interfering on the channel. Either way, wireless cameras chew up valuable bandwidth and have reliability issues, you pay for the convenience of no-wires!

You could probably set up a filter (with "Cause: Equal To/Matches: Signal" ...) to auto-delete all events where the cause is signal, if you really want to purge them. Set it running in the background when you're happy it does what you think it does ... I just looked and it looks like all the bits are there to allow it, but I don't have any events of that type to test it!

Re: Foscam FI8904W frequently has all blue images captured

Posted: Sun Aug 11, 2013 10:29 pm
by joseph85750
Yep, 94 slackware for me. It was a CD though. The kernel version was asymptotically approaching 1.0 just prior to when i started, but it was post 1.0.something by the time I got there. Took me a long time to get X working; I remember that.

Anyway, I think I'm ok now.
My Foscam I8905 keeps locking up, and needs rebooting. I wish I could cron a daily reboot.

Re: Foscam FI8904W frequently has all blue images captured

Posted: Mon Aug 12, 2013 6:06 pm
by mikb
joseph85750 wrote:My Foscam I8905 keeps locking up, and needs rebooting. I wish I could cron a daily reboot.
I weekly give all mine (not the same brand) a dose of salts with :-

wget --http-user=root --http-password=$PASS -O /dev/null --post-data="Reset= Yes " http://cam01/DoReset.HTM
or
wget --http-user=root --http-password=$PASS -O /dev/null --post-data="Reset= Restart Device " http://cam01/File.htm

This culled from watching what happened (tcpdump) when I manually went to the webpage and did the "Reset Camera" thing on it. it stops the camera's memory leak from getting out of hand ... (lots of blue images as the camera drops the IP link, over and over again).

Yours may support something similar. Unless it's so locked up you can't talk to it over the net.

While that's going on I stop and restart zoneminder, just for good luck, that way everything gets a kick, to keep it happy.

Re: Foscam FI8904W frequently has all blue images captured

Posted: Mon Aug 12, 2013 7:31 pm
by joseph85750
Great idea! I may have to try that as well.

Thanks for the tip!