+3
Answered: Discussion Open

Hikvision cameras for action tiles

eriksalo 7 years ago in Media Tiles / Video Camera Feeds updated by t t 2 years ago 38

This took me a while to figure out so I thought I would share.  I have a number of Hikvision cameras around the house, I had a hard time getting them to display on Action tiles.  All the literature said to do this:    

      http://username:password@ip/Streaming/channels/2/picture


The above did not work for me!  Pasting the above worked great in a Chrome browser but not in IE or Edge.  It didn't work at all in action tiles.  I did not get any image either in My Media or on the panel.

I finally found something that worked... I had to encode the username and password into base64 and append to the end like this:


      http://192.168.1.xx/streaming/channels/102/picture?auth=VGhpcyBpcyBqdXN0IGEgdGVzdA==


I added the part "?auth=" and then pasted in the encoded "username:password"


This worked great for pictures.  I used this site for encoding:  https://www.base64encode.org/


It works for video too but while I can see the video on the "My Media" test, I can't get it to display on the actual panel.


Any ideas?  Overall, I'm very happy with this product and bought two licenses (one for each of my hubs).


Erik

Waiting for Customer

Hi Erik,


Thanks for the topic, your discoveries, and discussion.


To possibly determine why the camera feed won't display on a Panel; it might be helpful to observe if there are any errors or warnings shown in the browser debugger output (only available on desktop PC/Mac browsers).


Press F12, then refresh the Panel. There is a tab or section of the debug pane called "Console". 

Hi Terry;  That's a great idea, there were errors in debug...


Failed to load resource: the server responded with a status of 403 (Forbidden)
4media:1 Mixed Content: The page at 'https://app.actiontiles.com/media' was loaded over HTTPS, but requested an insecure image 'http://192.168.1.22/streaming/channels/102/http?auth=fdsadsafyOlZpZXdlcjEyMw=='. This content should also be served over HTTPS.

So I changed to https and got...


httppreview:1 GET http://192.168.1.22/streaming/channels/102/httppreview?auth=dsfdsVyOlZpZXdlcjEyMw== 403 (Forbidden)


Of course, the https port (443) is different than the http port (80) so I changed that to:


https://192.168.1.22:443/streaming/channels/102/httppreview?auth=dsafsOlZpZXdlcjEyMw==

But no joy.....


192.168.1.22/streaming/channels/102/httppreview?auth=dmlld2VyOlZpZXdlcjEyMw==:1 GET https://192.168.1.22/streaming/channels/102/httppreview?auth=dmlld2VyOlZpZXdlcjEyMw== net::ERR_CONNECTION_REFUSED

Erik

I'm surprised this situation (mixed content: non-SSL on our SSL https App) isn't more commonly reported, but I think that's because mobile browsers (including Chrome; Fully?) do not actually block this, whereas the desktop browsers do.


Unlike the blocking of basic HTML authentication ("http://user:password@address"), I believe that mixed content can be allowed with a browser command line option. I've made only lame attempts (in Windows Chrome) so far, with no success.


What I'm saying is that this debug information certainly explains why the streaming isn't working in desktop browser: But ... have you tried on a tablet or phone? In Chrome, Fully, Firefox, Opera...? It is a shame that the browsers are not all handling this in some standard consistent way - but that means there is an opportunity to perhaps find a browser (or browser option) that might be successful!

Erik. Thanks for the auth tip. I had been manually inputting the credentials in to Fully since it wouldn't accept the user:pass@<ip> format. With my device (running Android 5.1) and my cameras (DS-2CD2132F-IS) the HTTPPreview actually works great. On iOS and Windows I only get a few seconds of video before it stops. Not sure why. What camera models and firmware are you running?


Digitac

Hi Terry;  


I rebooted everything and the video shows up great on my Chrome PC browser.  Works everywhere on the PC, both in "My Media" and in a Panel. It displays in "My Media" on a Chrome Android tablet but did not display on 


 Here's the URL:


      http://192.168.1.22/streaming/channels/102/httppreview?auth=dsdfsdyOlZpZXdlcjEyMw==


 Shows up great on an Android tablet but I first had to set the tile size to 2x2.  After it displays in 2x2 moce, I could set the tile size to whatever I wanted.  Could be just intermittent....


Erik

Hi Digitac;


My cameras are predominately DS-2CD2032F-IW 's.  Firmware is v5.3.0 build 150814


Erik

+1

The base64 trick worked perfectly to get my camera feeds working via Chrome on a Fire HD 10 tablet, until this post I've had to use my iPad mini because it was the only browser that would work with the feed.


THANK YOU!! :)

+1

I've been looking for this solution for months!!! Thanks so much Erik!

+1

Even when using ?auth=xxxxxxxx im still getting a login box from my tablet and also chrome/edge on my pc. has anyone resolved this?

+1

Are you using Firmware 5.4 or newer on your cameras? They seem to have broken that option on the new versions (among other things). I don't know of any workarounds.

Hi everyone, I was just wondering if anybody has any more progress on this. As it seems that I can get the pics but no feed.


Although I have found if you use the tiny cam app you can picture in picture over the top of a tile nicely. 🤔 Suppose that'll have to do for now.


Thanks anyways. Dan

Greetings:

I'm testing out Actiontiles and really like it.  Been working now on trying to get video feeds from Hikvision DS-2CD2042WD-I IP cameras.


Using Erik's great findings, I've been able to get a .gif feed on the PC Chrome Browser, but not on the Chrome browser on the Nexus 9 panel.


Maybe I've missed something within this discussion?

I have a number of hikvision cameras.  After some searching and trying a variety of options, I can't seem to find a solid solution.  Has anyone had more luck?


I've seen some posts using BlueIris.  I use Sighthound - haven't tried feeding the URL from SH to ActionTiles, but may try.  It's a shame, this is the only thing holding me back.  

Have you managed to Google or find the detailed technical manuals to see what browser compatible feeds it has? What's the exact model(s)?


This page seems to have a lot of documentation.... https://us.hikvision.com/en/support-resources


That's the first step to finding out if there's any possible streaming or snapshots.

I've tried several searches in google with varying combinations of key phrases.  One popular result on several threads includes a list of purported URL's for a number of cameras, none of which work and all are repeated on various pages within this forum.  Honestly, this specific thread is the most recent, looking here, on ST, IP Cam, and others.  So far I haven't found one thread with a "Bingo!  I found it!" response.  I know video is a pain.  It just annoys me when I see other similar boards and apps whereby people are showing their success and I can't believe it's impossible.  


Here is what I have, all Hikvision:


DS-2CD2032-I CCTV POE 3MP Bullet IP HD Security Network Camera, 4mm
4.1MP DS-2CD2042WD-I 4mm
DS-2CD2542FWD-IS HD 1080P


I found a Hikvision document that references one option for RSTP and another for http access.  For the http, the URL is http://ip/Streaming/channels/ID/httppreview, and for encoding the name/pword, http://username:password@ip/Streaming/channels/ID/httppreview.  Neither of these seem to work.  I did question whether the port was required in addition to the IP, but tried both unsuccessfully. 


Here are the variations I've tried:


http://admin:pword@192.168.1.118:89/doc/page/preview.asp

http://192.168.1.118/streaming/channels/102/httppreview?auth=dsdfsdyOlZpZXdlcjEyMw==

http://192.168.1.118:89/ISAPI/Security/sessionHeartbeat

http://192.168.1.118:89/doc/page/preview.asp

http://192.168.1.118:89/ISAPI/Streaming/channels/102/httppreview

http://192.168.1.25:8082/mjpg/Front_Lawn/video.mjpeg

http://192.168.1.118:89/mjpg/Downstairs_Hik_Cam/video.mjpeg


I can't help but think it is a two-part issue: the correct URL is needed AND certain settings are required on the camera setting itself.  I've selected for mjpeg on the camera. 


Many thanks.  

+1

I have DS-2CD2032 cameras.  I can tell you that both of these work without issue for pulling images from the camera.  Note that capitalization is important.  My cameras are running version 5.4.0.


http://username:password@192.168.0.21:80/Streaming/Channels/1/picture

http://192.168.0.21:80/Streaming/Channels/1/picture?auth=base64encodedpassword


You can then set the camera to any video settings you want to (quality, resolution, etc) and every time you reload the picture you'll see a difference in the image.


If you want to embed the picture directly into action tiles, most browsers these days will require the URL with the base64 encoded password.

Hey guys, I am new and slowly building my smarthome, I have the following questions.
I have 6 hikvision camera (DS-2CE56D0T-IRM) and Analog DVR  DS-7108HGHI-F1 HD 720p is there a way via the app or some other way to have the cameras display on the action tiles? If the questions is dumb, please forgive me I am now getting my feet wet in all of this and I need to know what can I use that I already have and adapt it to a smart echo system.Thanks


Im in the same boat as Roberto here. Im a little light when it comes to the coding side of things here. If any one could make a step by step walkthrough it would be appreciated.


Im using the DS-7116 with analogue cameras. 

Will this ONLY work with IP camera's or can you point to the NVR IP?

Answered: Discussion Open

Page 205 of the DS-7116 Manual PDF is the general section of where to set up IP ports for http, https, and rtsp. I cannot tell if there is a direct http (...) path to an MJPEG feed or JPG snapshot.


If only RTSP can be used to access a video stream, you will need an additional transcoder on your LAN, such as Blue Iris, or, for Android, try the App "tinyCam Monitor Pro". It can read RTSP feeds and it runs a mini-webserver that outputs MJPEG streams.

Sorry Terry, Im actually using DS-7216HQHI-F2 / N


Ive been through the settings and enabled Upnp which should technically open those ports for me as my router supports this. Ive confirmed in the NAT page that they are valid (both in router and config).


Im assuming that you need to use the local ip address for the nvr and not your external IP as you would then need dyndns or something of that nature?


If I use the 192.168.xxx.xxx/Streaming/Channels/1/picture?auth=Base64user:pass I just get "access error:404 --Not Found"


Tinycam wont show the pictures either...

I suggest contacting customer support for your NVR and/or Googling for peer support on that model. Accessing a stream from an particular NVR via a browser is a pretty common desire, but each model may or may not offer this feature and those which do have particular requirements.

+1

IP addresses that start with 192.168 are not able to be routed over the internet.  They are private addresses strictly limited to your local network.  If you want it to show up in actiontiles when you are not at home, you will have to change the URL to use your external IP address (visit whatismyip.com from your computer while at home to see what it is).  One option is to create two different media entries in actiontiles, one uses the local IP and one uses the external IP.  Then have two actiontiles dashboards, one uses the local IP media entries and one uses the external media entries.  It's not clean, but that's how it goes.


Additionally, UPnP is helpful, but a single port number can only be forwarded to one device.  So if one camera sets up a port forward for port 80 to itself, no other camera can.  If another camera does, it will wipe out and replace the original one.  If you have multiple cameras that you want to see while away from home, you are going to have to set up manual port forwards and not use UPnP (I personally do not like UPnP and always disable it).  Forward external port 80 to port 80 on camera 1.  Forward external port 81 to port 80 on camera 2.  Forward external port 82 to port 80 on camera 3.  Etc.  Then adjust your external media entries in actiontiles to reference the proper port for the camera you want.


This is not how I handle mine.  I run a web server at home that is accessible through a DNS record (a name lookup i.e. google.com).  This DNS entry points to a 192.168 IP at home and my external IP elsewhere.  That web server pulls a picture from all of my cameras every 5 seconds and stores them in a password protected folder.  Then I have actiontiles media entries configured to pull those pictures from the web server.  Actiontiles never touches a camera and the same media entries work both at home and away from home.  However, this is a much more complicated and technically challenging way to do it.


Having a single external IP address at home and private addresses internally is not straightforward, but this is standard practice and completely workable.  It just takes time and know how to do it.  IPv6 will resolve a lot of these problems, but my ISP doesn't provide IPv6 yet.




Ok, i couldnt seem to get this right going directly through the NVR, I did however get it to work with TinyCam Pro.


Terry, I only have one issue. The camera feed come up and runs for about 30 second and then freezes the picture. If I force a refresh it then keeps going. Im not sure if this is something in AT or Tinycam that isnt set up correctly?

It's up to the browser and the server (tinyCam) to cooperate to keep the stream from freezing.


Try calling it a "still image" and having it refresh every 30 seconds... worth a try, right?

ok figures out that I had to put it in background mode and then works fine. However Im worried that this forces it to record. There doesnt seem to be a way to limit the amount of storage it can use? Or im just missing the setting somewhere?


Also is there a way to use multiple cameras on the same server? or do you have to install to multiple devices and get each server to send one feed?

Hey Guys,
I'm running a few Hikvision DS-2CD2355FWD-I (Firmware V5.5.61 build 180718) cameras and wanting to connect to the MJPEG stream using the http preview url. I've verified the URL is correct but when i use the integrated base64 auth it still prompts for a username and password
I've seen suggestions that this feature is broken in later versions of the firmware. 
Any suggestions?
Example URL i'm using for a camera below:
http://192.168.1.23/ISAPI/Streaming/Channels/101/httppreview?auth=base64stringhere

i've also tried:

http://username:password@192.168.1.23/ISAPI/Streaming/Channels/101/httppreview

 I'm having the same problem reading up the thread it looks like the newest firmware is don't allow this

make sure you have this setting turned on or this method will not work

Hi Brandon,

Did you manage to get this working recently?

I've tried setting this up with no success. I see that your user list is empty? Is this not the username / password I should be using?

My old cameras have been working great with the above solution but I got a newer camera and its running the new firmware so the Base64 doesn't work anymore.  I got mine working....kinda.  

I used the base64 link from above but in fully on my tablet I navigated to the ip address of the camera and authenticated.  Then I went back to my actiontiles dashboard and it worked.  So far only 24 hours but my fire tablet is pretty solid and rarely needs to be reset so not a big deal for one camera.  I am curious if fully can make this process easier.  Save the password or launch and authenticate.  Have not played around with it much but if you are like me and love the camera feed just being there its an option.  

Mine worked for a short while doing as you suggest but fail thereafter...Quite annoying!

+1

My main panel is still going strong but one of my others seems to reset every few days.  I added a URL shortcut to the bottom of my actiontile panel which opens up the link to the camera login.  I need to see if I can have it save credentials so make the fix easier.  Still a pain in the butt but better than nothing.  


Need a way to authenticate in the background with saved credentials.  

any got this working? I added it worked as gif but never as video then lost it completely after a few seconds 

no, I'm afraid not. i had software re-stream but it failed after a few days...

Actually, I've just had success...I've relayed the connection via Motioneye and got it working.

My setup is a Raspberry Pi which is recording my Hikvision and Wyze cams on Motioneye and then I can re-stream to Action Tiles from there. 

It works! And has been working for 3 days..

Hi guys,

for all those who use a private public IP address (e.g. https://192.168.1.23).. For the correct function of video display in a web browser, it is necessary to access it via the IP address of the LAN network where the camera is located (e.g. https://10.0.0.11:444/ - 444 is HTTPS port). And in the advance setup -> HTTPS tab, you have to "Enable HTTPS browsing" to true. Then the video starts to appear and you can set the motion detection, etc.

Maybe it will help someone.

i finally got this working on my setup today. In reading the hikvision manual for substreams, I noticed a slight difference in the url.  I had to capitalize the P in httpPreview.  Without the cap, it would work in a browser, but not actiontiles.  I changed to cap and after encoding the username and password in base64, everything worked.

my url looks like this:

http://192.168.1.x:y/Streaming/channels/102/httpPreview?auth=yourbase64password.

Replace your x (and y, if applicable) and you should be good.  Hope this helps someone.