Foscam Keeps Loosing Connection

diver165

Young grasshopper
May 26, 2016
45
15
OK... I'm a long time Blue Iris user. I've had no real problems running the software for years. My setup is 24IP cams of various makes/models all connected by ethernet. Out of the 24 I've got 4 Foscam RS4 PTZ cameras in March 2024. They've operated flawlessly. They show in the Foscam software and Blue Iris. However.... in the last 2 weeks one of the Foscam is acting all stupid. It will work fine then randomly not show up in Blue Iris. With msgs saying failed connect, socket error, etc. However if I check the Foscam software the camera shows up just fine. NOTHING has changed in the setup. All cameras are DHCP and assigned static IP by my Opnsense router. I've tried reconfiguring the IP cam setup in Blue Iris, copying the config from another (exact model) Foscam to the one going stupid. Still intermittently goes in and out of connection with Blue Iris. I've tried deleting the camera and re-adding. I've tried deleting the camera and re-adding with a totally new IP address. Same thing... It will connect and work with Blue Iris randomly. It will show up just fine in Foscam software. I've even gone so far as to change the either net cable and use a different port on the switch. Same issue it will randomly work for a few hours to a day or so then disconnect.


SO....WTH is going on with this camera? Is it broke? If it's broke why does it show in Foscam software but not in Blue Iris? Remember I have 3 other cameras exactly like it setup exactly the same and running fine. I'm about to chuck it in the trash and get a different camera. But it irks me to do that when it works fine within Foscam VMS. One additional note, We did take this camera offline to paint the room. It was unplugged and stored for a couple days while we painted the room and put down new flooring. The problems arose when we set the camera back up.
 
Last edited:
Check in the Camera settings in BI, on the video tab, click the configure button and look for a setting "Skip initial HTTP DNS and reachability tests" if it is got a check mark, then remove it and see if this solves the problem! Also look on the Watchdog tab for a setting "Use MAC address to find a changing IP address" try unchecking this as a test also! There are a number of other setting on this page that may have an effect on BI thinking it has lost communications to the camera, read the help file, lots of good info!
 
Once upon a time, Blue Iris was known to occasionally change the IP address associated with your camera instance because it thought the camera got a new address via DHCP.

Could this be what is happening? When it breaks in Blue Iris, are you ever finding that Blue Iris has assigned the wrong IP address to that camera instance?

If so, check the "Skip initial MAC, HTTP, DNS reachability tests" box:

1763589018358.png

Otherwise I'm not sure what is wrong.
 
Did you try unchecking them, not sure if they where checked already or not. Have you confirmed that the IP address in BI is the correct one when the camera shows offline? Did you read the section of the help file for the watch dog tab? I have not read the whole section myself but all of my cameras are currently working!
 
I've checked and unchecked. I've even factory reset the camera. The camera is being assigned the correct IP. It's set to DHCP and it's showing 10.0.0.207. Which matches in Blue Iris and Opnsense
 
Sorry, this is about the limit of my BI camera trouble shooting knowledge level, I have had several similar issues, but in every case it turned out to actually be a faulty camera, just replaced two more this week, but they were completely dead and did not even respond to pings, although they were drawing POE power! Hopefully others may be able to provide some further suggestions!
 
  • Like
Reactions: diver165
Sorry, this is about the limit of my BI camera trouble shooting knowledge level, I have had several similar issues, but in every case it turned out to actually be a faulty camera, just replaced two more this week, but they were completely dead and did not even respond to pings, although they were drawing POE power! Hopefully others may be able to provide some further suggestions!
Well....

I got it working. I knew the camera wasn't broke. It showed up fine in Foscam VMS utility. So I kept fiddling with it.

Some background... I have all of my cameras setup with static IPs. The IPs are in a set range 10.0.0.201-10.0.0.224. I got it to work by resetting the camera to factory. I even went so far as to create a new user inside the camera for Blue Iris. Then changing the IP to the camera to a completely different IP. I deleted the camera completely (all db records, clips and everything) from Blue Iris. I restarted Blue Iris. Then added the new camera. And.....I'll be damned, it works! Doesn't completely make sense. It was like something was blocking connection to Blue Iris. I have windows firewall completely disabled. I could ping the camera. I could open a web browser to the camera and get the Foscam page referring me to the Foscam VMS app. SO I knew the problem had to be with Blue Iris. It's like it was blocking or refusing connection. The only way I got it to work was start completely fresh with a new IP and thus a new DB entry. Now it's got me wondering if the old address (10.0.0.207) is trashed in Blue Iris. Because it sure as heck wouldn't work until I changed it.
 
In your first post you stated "All cameras are DHCP and assigned static IP by my Opsense router."

In post #7 you stated "The camera is being assigned the correct IP. It's set to DHCP and it's showing 10.0.0.207."

In post #9 you stated "I have all of my cameras setup with static IPs."

The above is confusing to me but perhaps it's just a terminology issue. I'm guessing the cameras are set to DHCP and their assigned IP's are reserved in the router.

If you have any more issues in the future like you had in your post with any of your cameras (and especially that Foscam) I'd recommend logging into each camera's webGUI and literally configure it as a static IP, using the IP that the router chose to assign it via DHCP. IOW, I would not set the camera to DHCP and depend upon your router's ability to assign and maintain that IP.

People have their own reasons for how they like to configure their cameras regarding IP addressing, DHCP or static, and by all means that's their prerogative to do so. That said I have always logged into the cameras individually and set the cameras to a unique, static IP that is in the same subnet as the router's LAN IP but outside of the router's DHCP pool range. This method has provided excellent results and dependable performance regardless of combinations of various router brands and capabilities using various camera brands in a couple of dozen customer installations spanning several years and device generations. Based on my own experience, this is the method I recommend. :cool:
 
In your first post you stated "All cameras are DHCP and assigned static IP by my Opsense router."

In post #7 you stated "The camera is being assigned the correct IP. It's set to DHCP and it's showing 10.0.0.207."

In post #9 you stated "I have all of my cameras setup with static IPs."

The above is confusing to me but perhaps it's just a terminology issue. I'm guessing the cameras are set to DHCP and their assigned IP's are reserved in the router.

If you have any more issues in the future like you had in your post with any of your cameras (and especially that Foscam) I'd recommend logging into each camera's webGUI and literally configure it as a static IP, using the IP that the router chose to assign it via DHCP. IOW, I would not set the camera to DHCP and depend upon your router's ability to assign and maintain that IP.

People have their own reasons for how they like to configure their cameras regarding IP addressing, DHCP or static, and by all means that's their prerogative to do so. That said I have always logged into the cameras individually and set the cameras to a unique, static IP that is in the same subnet as the router's LAN IP but outside of the router's DHCP pool range. This method has provided excellent results and dependable performance regardless of combinations of various router brands and capabilities using various camera brands in a couple of dozen customer installations spanning several years and device generations. Based on my own experience, this is the method I recommend. :cool:

My cameras are all outside of the DHCP pool. They're assigned by my Opnsense router. But I've ran it that way for years. I think the problem was within BI. Somehow taking the camera down and putting it back online caused BI to insist it had different IP than what was assigned. I dunno.... All I know is it works. I've scrubbed all references of the old address from BI and Opnsense.
I've got an experiment camera I'll hook up and assign the offending address to and see if I can recreate the problem.
 
Last edited:
All kinds of weird stuff can happen on a network.

I advise looking at opnsense's system log for "arp" or "10.0.0.207" lines to see if anything weird is happening with the 10.0.0.207 IP address. I run pfsense myself and it tends to log when different MAC addresses take over an IP address (which is what happens in the case of an IP conflict I believe).

I know this because ... here's a real head scratcher... On my brother's network, once in a while a bad ARP packet appears seemingly out of nowhere reassigning the router's LAN IP address to some other random device on the network. This is revealed through the pfsense router's system log by searching for "arp":

Code:
Nov 15 16:28:51    kernel        arp: ec:b1:d7:70:f1:86 is using my IP address 10.197.0.1 on bridge0!
Nov 15 16:00:22    kernel        arp: ec:b1:d7:70:f1:86 is using my IP address 10.197.0.1 on bridge0!
Nov 13 17:30:18    kernel        arp: 4c:11:bf:a9:f8:c7 is using my IP address 10.197.0.1 on bridge0!
Nov 12 08:15:45    kernel        arp: a0:ff:0c:eb:92:e3 is using my IP address 10.197.0.1 on bridge0!
Nov 11 02:33:47    kernel        arp: ec:b1:d7:70:f1:86 is using my IP address 10.197.0.1 on bridge0!
Nov 8 08:00:55    kernel        arp: 30:dd:aa:34:e5:1b is using my IP address 10.197.0.1 on bridge0!
Nov 6 17:18:38    kernel        arp: ec:b1:d7:70:f1:86 is using my IP address 10.197.0.1 on bridge0!
Nov 5 20:12:33    kernel        arp: b4:4c:3b:cd:be:7a is using my IP address 10.197.0.1 on bridge0!
Nov 5 03:48:06    kernel        arp: 80:2a:a8:00:42:e1 is using my IP address 10.197.0.1 on bridge0!
Nov 4 20:00:25    kernel        arp: 4c:11:bf:a9:f8:c7 is using my IP address 10.197.0.1 on bridge0!

One of those MAC addresses belongs to a Windows PC.
One is an ubiquiti bridge radio.
The rest are IP cameras that aren't even assigned to the same subnet as 10.197.0.1.

They all share the same Layer 2 network though, so really it could be any device on the network sending out these bad packets and I have no way of knowing which is doing it. It is obviously out of the question to replace everything on the network so I really just have no idea what to do about the issue.
 
^^^^. This
:cool: