Foscam after integration 2021.2

Hi All,

Just updated to 2021.2 and since the update the live stream from my foscam no longer works. I get the static image that updates on my lovelace dashboard, and that’s working as it was, but when I click the image, my live feed is now blank. It was working fine up until today’s update, and works fine from the foscam app or in my browser when I go to the IP directly.

In my log I’m seeing this:

Error opening stream rtsp://CameraName:[email protected]:554/videoMain

And for my cam (Foscam G4)… the ports should be either 88 or 443. (At least that’s what it was when I configured manually in my config.yaml. And in my config.yaml it still says rtsp_port: 88)

Any ideas?

Someone opened an issue on Github. Hopefully it’ll be fixed soon.

Thanks for letting me know.

1 Like

Did this work for you on 2012.2.1? Still not for me…

I dont believe that the fix was included in 2021.2.1. I still have the issue.

Hopefully 2021.2.2.

Yup… it has been fixed in 2012.2.2.

I left the yaml in my config, but had to delete the integration and restart, but it worked.

All good again!

Here the same issue, removed the Foscam (FI9821W) camera from the YAML however it is not discovered, tried to add this camera manually however without any luck

So apparently this was fixed in version 2021.2.2. Yesterday I upgraded from 2021.1.5 to 2021.2.3, removed my Foscam code from configure.yaml and manually added my two cameras using the Foscam integration, yet there is no video in my formerly working Lovelace picture entity cards. The log says my connection is refused despite the same credentials giving me video in two other camera apps.

2021-02-15 20:49:18 ERROR (stream_worker) [libav.tcp] Connection to tcp://192.168.0.5:554?timeout=5000000 failed: Connection refused
2021-02-15 20:49:18 ERROR (stream_worker) [homeassistant.components.stream.worker] Error opening stream rtsp://User:[email protected]:554/videoMain

I read that a requirement to be admin user was removed in 2021.2.2. Did it find its way back into 2021.2.3?

In that error it appears that it’s still looking for port 554… is that the right port for your Foscam camera? (I think mine uses 88.)

i fixed it by adding the foscam via my serveillence station in my synology. The only problem i still have is no sound.

The old Foscam integration that was configured in YAML only used the HTTP stream on Port 88. This new GUI integration has blanks for both HTTP and RSTP video streams, defaulting to ports 88 and 554, respectively. RSTP doesn’t work for my model FI9900EP. I finally cleared the RSTP port, even though it is red to indicate that it is required, and that gave me an image in Lovelace again! Conclusion: only use HTTP on port 88 and delete the default port number for RSTP, leaving it blank.

2 Likes

Unfortunately this does not work with my FI9821W, if I leave the RTSP blank I get the red error line for this port. Hopefully this will be solved soon.

Having the same issue with my camera’s with the latest release which I upgraded to this morning.
None of them is showing a preview picture and the web interface of Home Assistant is reacting extremely slow.
The live views are also not working.
As soon as I remove the camera cards from the interface. HA interface works normally again.
I’m downgrading again as I can’t use HA like this.

I figured out my issue, I needed to remove the old camera configuration from the config and create all the camera’s through the integration.
In the latest version you can set the ports for http and rtsp and now all works fine again.

The new Foscam integration does not work for me.
I submitted details on Github, but haven’t had any responses yet.

Has anyone else experienced a similar issue?

[update… 3 months later]

My old FI9821W is not supported by the Foscam integration. I was able to get it working in HA using platform mjpeg. See my update on github.

1 Like

My R4M works nicely for a while, then eventually it drops out and the only way to get it working again seems to be removing the integration and reinstalling it again.

Which brings me to my question - where are the config settings for the latest integration stored? Apparently there is no way to change them (or even review them) afterwards. I always forget what the working settings were, and the installation dialog wipes everything out before a retry which is a pain on a tablet. Would be nice if it would seed itself from old style settings in configuration.yaml or whereever.

Furthermore, the latest version of the installation vehemently fights against any attempts to set both main and rtsp ports to 88, which are the working settings for this camera. I haven’t been able to get it working with the latest update :frowning_face:

I believe the only way to find them would be to look in the hidden “core.config_entries” file in the .storage folder.

It’s not supposed to be accessed by the user (hence why it’s hidden) but that’s the only place that those tyhings are stored.

This is one of the downsides of the “config everything only thru the UI” path that HA is taking.

It’s easier to set up but almost impossible to troubleshoot or fix if something goes wrong except to use the “nuclear option” and delete stuff and start over. Unless of course you know enough to override the system configs. But that’s not the intended method.

This makes me feel better. I thought it was just my setup that was having an issue. Only recently (weeks ago) jumped into Home Assistant. I added the Foscam integration and added 5 cameras (4 different models between them all). None of them show up for live view. I removed 554 from one of the cameras in that file to leave it blank and rebooted HA, but then it never came back (or stopped responding). So I went back and edited the file again but instead of leaving it blank, I used the RTSP port listed in the camera under the “Onvif” settings page (I did the same for most of the cams). Eventually, it started responding again and I rebooted again just in case. Everything came back. I click on the preview image of the cameras and in about 3-9 seconds the feed would come up. So Onvif RTSP port is the one to use it seems. :sunglasses:

Update: Actually, only certain models give you this port on that settings page. The ones that replace it with an authorization toggle does not offer this port information, so I am lost still for those models. Models affected by this in my scenario: R2 and R4. All others added just fine.

I don’t know why it takes so long for some of them to pop up. Kind of annoying that it is so unbearably slow. However, this is likely an issue with the cameras more than anything. So many of these cameras (Foscam and others) are so slow to respond despite how fast the network is.

In my case I needed to set RTSP port to 88. Now it also works with HomeKit. It is an R4M camera.

I know this thread has been stale for a while, but i was having a nightmare trying to get the big live streaming window working with my Focam C2M cameras and i think i might have just figured it out.

When i configured the camera from the Foscam integration i’d get the thumbnail preview, but when i clicked on that to get the full screen stream, a small blank pop up appeared. I had set the HTTP port to a different value from the default to fit in with my network schema and that worked fine, and to get the RTSP port that does the streaming i had used the CGI command which told me the RTSP port was 554. I couldn’t get the RTSP to stream using VLC or a QNAP machine i had so it looked like the camera wasn’t working.

In the end I used the ONVIF Device manager software to connect to the camera and that told me that the camera was using the same port that i’d set for the HTTP interface for the RTSP interface, despite what the CGI command was telling me.

In summary, to get this type of Foscam camera working in Home assistant it looks like the HTTP port and the RTSP port need to be set to the same value in order for everything to work properly.

1 Like