IP Cam live stream without port forwarding

I use url’s (i.e. http://192.168.x.x:8080/unicast) for ip cams with lovelace:picture-glance to show live streams. That works fine when viewing inside local network but not outside, i.e. cellular.

I have tried:

  • using camera_image: camera.xxxx, but limited to snapshot every 10(?) seconds
  • using the api/camera_proxy_stream, but the stream stops after a while, refresh will start the streaming again.

Without port forwarding every ip cams, is there a way to show live stream in and outside local network?

1 Like

Following this closely as it will be my next hoop to jump through after getting good/stable presence detection.

Unless you have your own class-C IP network or your router will allow more than one host to have traffic forwarded to… I don’t think so.
One other thing… if you wish for multiple cameras to live stream on your cell phone, I hope you have an unlimited data plan. Live-streaming will eat your bandwidth like a cannibal.

That’s very true about the bandwidth, I definitely want the live stream when in local network, I can live with snapshots outside. I may have to setup 2 views, one for each case then. Hope the user-specific views will be out soon.

Try clicking on that image :slight_smile:

Maybe won’t help but I record all my came on a dedicated PC running blue Iris. Basically a NVR. I can view live streams through BI.
I also don’t recommend Port forwarding cams. They have a reputation for having backdoors and being hackable.

Thank you all for suggestions.

I opted to have 2 versions of the camera view, one for wall tablet (live stream) and one for smartphone (outside network), default view set with home-setter.js.

Also, using a simple bash script (did that earlier to assemble views into ui-lovelace.yaml) to create the smartphone version by modifying the tablet version view so I don’t have to double-maintain 2 views.

Not ideal solution, will do for now until thing changes.

What about setting up an OpenVPN server on your router (many support this directly) or on a Pi?

You mean connecting to my HA through VPN?
I have VPN setup on my router, if I’m doing it right, I need to open the VPN app on the phone, connect to VPN, then connect HA, I’m just too lazy for it :sweat_smile:

I’m using the ‘OpenVPN Connect’ app on my Android devices - it allows me to set up a shortcut on the home screen. It’s only one additional ‘click’ for the VPN to open.
If that’s too much I think you really are lazy :sweat_smile:

Not sure they have the same thing for iphone, but yes, call me lazy :blush:

Here you go:

Not sure I should support the laziness this much :rofl:

I have this app but have not figure out how to add a desktop shortcut on iphone to do 1-click connect.

Not used lovelace yet but can you not pull the camera entity from HA? When i view my HA homepage externally i can see the live camera images, with standard URL for the cameras.

Yes, I guess that would be the cloud access url for your camera?

Andoid version of connect has a shortcut add button. iOS version doesn’t have this button. So it takes two pushes on iOS vs one on Android

Thanks for confirming about the connect app on iOS, feel better to know I’m not lazy AND going crazy :smile:

So I maybe extreme, but I keep my cams on a vlan so they can only talk to the PC that running Blue Iris, and recording the cam output. Like I said, cams are a known vulnerability.
And this issue is not someone will view your cams (although they could if they break in), the issue is the cams are running linux, and if a bad guy hacks your cams, then they have access to a linux machine inside your network. Really not good.

So I have no open ports, only vpn into my home network, and cams are not allowed to access the internet at all.

FYI - I just came across this comment:

Thank you for the link.
Not sure if I missed something.

From the link:
3. Save the *.ovpn config file and connect to the VPN using it.
. . . .
Next, browse to http://geoip.hidemyass.com - since we DID tell the client to use the VPN for this domain, it should show your the VPN-based IP, ISP and location.

It seems to me, I still need to open OpenVPN app and connect to my home VPN first, then start HA app.
This would help my laziness only if I keep my VPN connected at all times, then the modified opvn file will allow visit to my HA url (i.e. HA app) to only go through the VPN, and achieve live stream without opening port?