Foscam after integration 2021.2

For those of you trying to get “camera_view: live” working with select Foscam cameras (mine is an R2 model) while using the new Foscam plugin, you’ll notice that you can’t set the port and rtsp port to the same port number. You’ll need to configure the “port” to the http port you have set in the Foscam camera, and the “rtsp_port” set to the ONVIF port set in the Foscam camera. For me, this was port 80 and rtsp port 554.

But wait! There’s more! …Because it still won’t work with camera_view: live.

You now need to go onto your HA host, open the core.config_entries file in the .storage directory, find the entry for the camera, and update the rtsp_port value to be the same as the port value. In my case, this was port 80 for both, even though my ONVIF port in the camera UI is set to 554.

After setting both port and rtsp port in core.config_entries to 80 and restarting HA, the camera_view: live mode finally works. You may need 80, 88, 443, etc. … check your camera’s config under ‘Network’ → ‘Port’ on your camera’s frontend UI (not the HA UI … the camera’s web UI)

Hallelujah, holy shoot…where’s the tylenol?!?

2 Likes

Is there a way to do this without removing then re-adding the camera?

Will just editing the config registry files fix it?

I have tried this solution with many variations and it still does not work. My system was working correctly until I added a third camera. My information is below:

Error: Logger: homeassistant.components.stream.stream.camera.living_room_camera
Source: components/stream/init.py:415
Integration: Stream (documentation, issues)
First occurred: 9:37:45 PM (13 occurrences)
Last logged: 9:43:00 PM

Error from stream worker: Error opening stream (INVALIDDATA, Invalid data found when processing input) rtsp://:@10.32.XX.XX:888/videoSub

Foscam cameras:
Newest: Foscam PoE Ultra HD 2K 4MP IP Camera, Outdoor/Indoor Security Video Surveillance Camera,AI Human/Motion Detection & Alert Notification,66ft Night Vision with 30 IR-LEDs,2-Way Audio & IP66 Waterproof

Second installed: FOSCAM Home Security Camera R4S 4MP WiFi IP Camera,Wireless Baby Monitor with AI Human Detection Sound Detection 33ft Night Vision 2 Way Audio Camera Compatible with Alexa Black

Oldest camera: Insteon/Foscam outdoor camera - approximately 10 years old - but still works!

It worked to me!! Thanks a lot
Changing the rtsp port on config_entries was the icing on the cake!

I had no idea there was an ONVIF integration. Wish I knew that before. The FOSCAM integration did not work for me at all, not giving me any images whatsoever. There’s also no way to re-configure it.

I even cobbled together a URL that retrieves a still image in the browser, but adding it as a web page didn’t work. Nor did it work as a still image URL. It was an HTML page rendering a dynamically generated JPG image.

Setting up my cam with ONVIF, matched port(on the VMS setting) worked.