[Wear OS Software and Hacking General] nyvram1:
barkside, great app!! i set it up to work with my foscam (a very popular webcam) so i'm going to post the details below to help others out and maybe some others can provide some input as well.

Foscam FI9821W V2 Cam on my LG G

The image above is a JPEG snapshot, but one that refreshes whenever I launch the webcam app on my watch.

Step 1 Purchase Foscam and setup on your local WiFi (not going into all the instructions, but basically its little more than giving your camera its on own IP address internally so you can see it on your local network.

Step 2 Launch the local URL, go to the your "settings" tab using IE, Firefox or Chrome and under "network" select the "port" option. Note the HTTP port, the only one you're interested in. Change it to something you like such as 8090 or 8095 or whatever and hit "save".

Step 3 Go to "basic settings", then "user accounts" and go ahead & create a "visitor" level user. You don't need or want your default admin account being the one you plug into the URL you'll ultimately put into your watch.

Step 4 Now that you have your visitor/user account, you just need to set up your virtual server/port forwarding for the IP address of your camera. Depending on the router, these settings are typically under "WAN" or "Virtual Servers" or "Port Forwarding". Its a very common feature that every router will have.

Step 5 After you've located your Virtual Server page, simply add a new "virtual server" and key in your IP cam's *LOCAL* web address. This is the same one you see at the top of your browser window in Step 3 above. Typically something like 192.168.2.210 or something. Add this IP address to the table along with the port you setup in Step 2 (8095 or whatever) and select "TCP" as the type.

Step 6You're almost done. Now you're ready to test the access to your camera on the web outside of your local WiFi. Make sure you have the NAME and PASSWORD handy for the visitor account you created.

You can do this one of 2 ways:

>> If using IP address (I don't recommend) do a 'whatismyip.com' lookup and get your 'outside facing' IP address.

>> If using a dynamic DNS (strongly recommended..i won't go into how to do this, but you should do this anyway when you set up your router) use that.

Here's an example of each type you'd want to type into your browser window VERY CAREFULLY

blah.freedomain.com = your DDNS or IP address

8095 = whatever port you are forwarding

blah = your visitor username

blah2 = your visitor password

http://blah.freedomain.com:8095/cgi-bin/CGIProxy.fcgi?cmd=snapPicture2&usr=blah&pwd=blah2

or

http://68.43.55.698:8095/cgi-bin/CGIProxy.fcgi?cmd=snapPicture2&usr=blah&pwd=blah2

Step 7 If you can see your webcam image in your browser window you're done! All you need to do now is to open Wear IP Cam on your phone and paste that in.

Step 8 Hit refresh on your watch and you will be able to see the updated web image on your watch each time!

Caveats

This works for the 19821W V2 and the CGI scripting language is slightly different for different foscam models. You might need to browse the Foscam site to see if the CGI code is. I can help out if needed but its really just getting the syntax down. NOTE the user is 'usr' in the code above. I was pulling my hair out for awhile because the older CGI script used 'user' and I kept misspelling it.

I haven't gotten the MJPEG working at all..in any browser. I get a broken image regardless of whether I'm internal or external. However the correct CGI to use for that (if you have better luck than me) is:

NOTE That the author says the end result is the same for MJPEG and JPEG; just a snapshot so there's no need to explore the MJPG option further unless you just want to play with it.

Example

http://blah.mydomain.com:8095/cgi-bin/CGIStream.cgi?cmd=GetMJStream&usr=blah&pwd=blah2

Of course you'll have to replace the DOMAIN, PORT, USERNAME and PASSWORD with your credentials.

Let me know if you have any questions!