Vistacam API

So these are jpg snap shot or mjpeg streams?

Might be able to add a VistaCam into my 3rd party dashboard app now, with this new information.

So what was the correct working url you ended up using ?

They are JPEG images. I’d recommend snapPicture2 as you only get the image which makes it easier to manipulate.

The URL I used is:

Where XXX is the admin password found in the log file.

If you figure out how to get the admin password without having to SSH into the camera, please let me know. As it stands, while I can hack up something for my own use, it’s not a scalable solution for other users.

There clearly has to be a way to get the image / stream without all of this - the Vera app does it, and the Mios dashboard does it. @Alvaro_Ochoa do you know how this is done?

In reading about the cameras, the newer cameras use a random admin password. Ideally we could get images / streams without needing credentials OR have an API that lets you set a password.

(Note: you could add a meta refresh tag in your HTML, or add some JavaScript to refresh the page / div every second. It’s not exactly a video, but it would give you a new image every second or so).

There is a 1.0.19 version of that manual dated 2016-12-08 out there somewhere

1.0.17 QiYongkun 2016-6-2 Add command:

1.0.18 LeiZhiPing 2016-11-8 Add command:

1.0.19 BaiShiYi 2016-12-08 Add command:

To close my initial question on this topic…

From what I can tell, there seems to be no way to currently get a video stream (or image) from the camera without the admin password (which requires SSH’ing to the hub and searching a log file). For the newer cameras, the admin passwords are random, so there’s not even a default that can be used.

@Alvaro_Ochoa Please confirm that there is currently no way to access the camera steam without the admin credentials. (If there is, or there are plans to, please let us know).

Thank you.

Hi @robotman

we already provided a rtsp url of the camera through the settings page on ezlogic. Hub itself takes the stream and republishes without the need for a password.


You can use rtsp if you want to access this stream directly.
Mobile apps were using rtsp to show the camera streams until recently.
With the introduction of web dashboard, we are moving to a newer technology webrtc. It is not finalized yet but we can hold the request to get the stream via webrtc for our roadmap.

Thanks. Yes, I saw the RTSP option, but no browser supports RTSP, so it’s not an option without an intermediate RTSP bridge.

I’ve been asking about how to do this without a password for weeks… but last time you suggested SSH’ing to the camera to get the credentials - not a solution for most users. So I am intrigued when you say:

“Hub itself takes the stream and republishes without the need for a password.”

How? What is the string following the IP address, and can this same approach be used to with cmd=snapPicture?

WebRTC is definitely the right long term solution. Glad to see that’s on the roadmap and look forward to when that’s available.

Thank you.

Hi @robotman

It is simple:

The camera itself produces an rtsp stream and you can get it by using the method I described and end up with an URL like http://ip address:port/cgi-bin/CGIStream.cgi?cmd=GetMJStream&usr=xxx&pwd=xxx
This is the camera native API. It requires a user and pass.

The second one is auto generated by the hub. Hub takes the stream and produces another one without the need for credentials. The Id after the IP is a new generated ID. That has nothing to do with the camera.

So if you want to use foscam API (snapPicture etc…) you should go with the 1st URL

So from what I can work out, once you have got the VistaCam’s password from the log file, these are the URL’s that should work.

Can anyone confirm all these do in fact work?

I was only able to get the RTSP VideoMain and the snapPicture2 ones working briefly in VLC player and then they just stopped working and VLC was no longer able to connect to the VistaCam for some reason.

IP being the IP address of your own VistaCam and “password” the cameras password found in the log file /tmp/log/firmware/ha-webrtcd.log

RTSP - VideoMain


RTSP - VideoSub


RTSP - Audio Only




Motion JPEG

Think you need to set the cameras sub stream to MJPEG first, by running a command in the browser.

Set Command -

Although mine returned this, so not sure if its working and I was unable to play the MJPEG stream In the browser.


Play Command -

I powered off the VistaCam and back on and I was able to initially play once the RTSP and snapshot and now again its stopped connecting and playing.

Seems I can only connect one time and then it stops working ?

I can still ping -t the VistaCam’s IP address OK however.

EDIT - I can still view the snapPicture2 in Chrome browser. (Time is also incorrect on the camera after the power cycle).

But I am no longer able to open the RTSP stream in VLC.

The camera seems pretty unstable connection wise.

EDIT 2 - Now the snapPicture2 no longer loads in Chrome browser. Can still ping the camera however. Seems very hit or miss as to if I can connect to the camera or not. Mostly not.

Same in the Vera mobile app this VistaCam has never been reliable and often I could not even view the cameras stream in the Vera app.

I had similar experience with instability. Sometimes it works in VLC, and sometimes it doesn’t. The only API call that works consistently is the snapPicture2 command. But, that still requires getting the credentials from SSH’ing in which is not scalable.

I’ve given up on these cameras for a custom app for now, until WebRTC is supported.

Hi, any update on an improved API for the cameras? Specifically, being able to get images and / a video feed in the browser via the API (without having to manually look at log files, etc.) (I inquired about this almost a year ago, so checking to see if there has been any progress?) Thanks.

Hi @robotman

Can you please give more detail about how exactly you want to use the camera stream ? and where ? which browser ? Are you developing a web application ? Do you want to get a URL directly and embed it in a 3rd party webpage and directly see the stream ?

Sure. It’s a custom web application I have developed (screen shots above in this thread). I’m currently using the WebSockets API to get events, and set device states. I’d like to show the camera feed/s on the web page. Ideally, if the camera exposed any events (such as motion), I’d like to be able to capture those too. Thanks.

Any news on this? Thanks.

Hi @robotman

We are updating our webrtc structure now so we will need some time on this. Meanwhile did you try a separate rtsp-2-webrtc intermediate local server to make the local rtsp camera stream to your web app ?

Thank you. To be fair, you (Ezlo) said that a year ago. Is there a timeline?

(I don’t want to set-up a separate intermediate server as that won’t work for my application, but thank you for the suggestion). I’d prefer this be supported natively via the API.