Getting IP Camera image to Display in HG

Started by soxfan1966, April 18, 2019, 07:23:39 PM

Previous topic - Next topic

soxfan1966

So I have 3 IP Cameras added to HG. 

They will show up in the HG Full App - they are each defined with the API URL, and then the optional username and optional password.

If I pull up HG in a browser on my computer, the same images do not show up but it looks like its trying to get the image:


If I go to a separate browser tab and type in the API URL I get prompted for a user and password - if I enter them, the image will show up in the browser tab and in HG.

I tried defining the user and password as part of the API URL (i.e. http://user:password@ipaddress) but that does not seem to work either.

Thoughts ?

Tuicemen

I'm confused (maybe I need to wake up more) were are you accessing viewing HG full app from? The RPi ui?
I have my cameras setup with http://user:password@ISPasignedIP: CameraPort
Do you have port forwarding set up for your cameras?
Please Read Topic:
General Forum Etiquette
Before you post!

soxfan1966

So the HG App is on my phone (Android) and the browser I am opening is on my desktop computer - both accessing HomeGenie running on my RPi.

I do not have port forwarding enabled for the cameras because I have 3 of the same cameras - each with it's own IP address - but they all use the same port.

And if I am accessing on my local network would the port forwarding even come into play (I was under the impression that was for external access to forward from the IP of your internet provider to a specific node on the network).

So on my local network, opening a browser and using  http://user:password@ISPasignedIP does not work (I get prompted with  user / password input box).  Once I enter that then they image appears.  Every time I turn off my computer and log back on the same thing happens.

So I may have 2 problems?
1) Not port forwarding
2) Not passing the user:password correctly in my camera setup in HG


Tuicemen

So you can see images on you phone HG Plus app but not in a browser correct?
What browser are you running?
Please Read Topic:
General Forum Etiquette
Before you post!

soxfan1966


Tuicemen

Ok I have no problem viewing my cameras in HG with the window edge browser. Have you tried it or another browser?
Can you view from your phones browser if you use it instead of the app?
Please Read Topic:
General Forum Etiquette
Before you post!

soxfan1966

Phone browser has the same problem, but since its a Pixel2 its using Chrome as the Browser.

I tried on Firefox - instead of the user / pwd box I get a message box: You are about to log into the site "ip.address" with username "username".  NOTE: the actual IP and username appear.  It has an OK and Cancel button.  If I click OK, then it works.

I tried on MS Edge - same problem

Tuicemen

Ok it may be how the camera URL is specified in the generic camera app is incorrectly typed.
every manufacture doesn't use the same standard. This is the format for my easyn camera
http://MyIP:PORT/snapshot.cgi?user=NAME&pwd=PASSWORD&resolution=32  I use a different URL format like I posted I'll not get an image or get asked for a password in the browser
Please Read Topic:
General Forum Etiquette
Before you post!

soxfan1966

OK, I will give that a shot (I am currently VPN'd so need to wait till later).

Do you also have your cameras entered in your router for Port Forwarding ?

Also, what does the &resolution=32 at the end of the URL do?

Tuicemen

The &resolution=32 tells the camera what resolution(size) to send the captured image at I could use 64 but figured the smaller resolution is all that is needed for HG and it won't slow up my connection to my off grid play much.
I need port forwarding so my cameras can be seen on my phone(when not connected to the Routers Wi-fi) or connecting from my other home.
>!
Please Read Topic:
General Forum Etiquette
Before you post!

soxfan1966

So is each camera on a different port then?

If we can change resolution like that, can we also change orientation (other post on that)?

Tuicemen

The resolution is part of the manufactures API call if not specified it attempts to send at highest resolution I believe.  I don't believe it had a orientation call. I'll try some options for that maybe this weekend as I've freed up some time with the new RPi Tools now done. I do have the API calls for some of the Airsight cameras I'll see if there is a option in that which might work for orientation.
Please Read Topic:
General Forum Etiquette
Before you post!

soxfan1966

Just tried this in Chrome and it still prompts me for user and password:
http://IpAddress/snap.jpg?user=USER&pwd=PASSWORD

where IpAddress, USER and PASSWORD are my actual values

Same thing in Edge and Firefox.

Not sure if it's something I am not defining right or maybe just a limitation with the cameras I have

soxfan1966

Got my IP camera's all set up and port forwarded - I needed to download the PC software to be able to change the port on the camera (could not do from their android app)

Still playing around with the user name and password though

Another question - the cameras have an HTTP Port (what I am using now), an RTSB Port and an ONVIF port (with some other settings on each of those).

Not sure what the advantage of each of those is, or if they perhaps offer a better alternative to getting them to work better in HG.

soxfan1966

With my cameras port forwarded and set up in HG using Tuicemen's approach things seem to be working now.  Here is the current setup:

http://<ExternalIpAddress>:<Port>/snap.jpg!user=<user>&password=<password>

where <ExternalIpAddress> = router IP address (or domain name if you use that)
          <Port> = port specific to each camera
          <user> = user name used to log onto the camera
          <password> = password used to log onto the camera

I can see the camera pictures in HG on my desktop computer, on my android in the browser (same approach as Desktop in browser) and also in the HG Android App.  So I think this is now working.

Thanks

SMF spam blocked by CleanTalk