Auto log-in DAHUA camera's in Dashticz not working

Dashticz, alternative dashboard based on HTML, CSS, jQuery

Moderators: leecollings, htilburgs, robgeerts

Post Reply
dekoene
Posts: 11
Joined: Sunday 09 June 2019 10:21
Target OS: -
Domoticz version:
Contact:

Auto log-in DAHUA camera's in Dashticz not working

Post by dekoene »

Hi,

I have 5 Dahua Camera's integrated in my Dash. They are working perfect and refresh the images every x seconds as defined.

Code: Select all

buttons.webcam = {width:12, isimage:true, forcerefresh:true, refreshimage: 3000, image: 'http://192.168.1.130/cgi-bin/snapshot.cgi?', url: 'http://192.168.1.130/cgi-bin/snapshot.cgi?'}
The only thing I have to do after each restart of dashticz is to manually log-in to the camera's one by one. I tried the auto-log-in via the snapshot URL as specified by Dahua but I can't get it to work. I tried following combo's but none of them is working:
  • cgi-bin/snapshot.cgi?chn=[CHANNEL]&u=[USERNAME]&p=[PASSWORD]
  • cgi-bin/snapshot.cgi?loginuse=[USERNAME]&loginpas=[PASSWORD]

Has anyone working this correctly? Is there an alternative?

Thanks,
Koen
Lokonli
Posts: 2291
Joined: Monday 29 August 2016 22:40
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Auto log-in DAHUA camera's in Dashticz not working

Post by Lokonli »

Did you already test the URL directly in a browser?
dekoene
Posts: 11
Joined: Sunday 09 June 2019 10:21
Target OS: -
Domoticz version:
Contact:

Re: Auto log-in DAHUA camera's in Dashticz not working

Post by dekoene »

Yes - thats how I tested in the first place the different URL's.

The camera has an option for 'anonymous' login but enabling that option didn't change anything neither. I'm stuck with the pop-up login boxes.
User avatar
clinkadink
Posts: 417
Joined: Tuesday 31 December 2019 1:15
Target OS: Linux
Domoticz version: 2020.2
Location: Swindon, UK
Contact:

Re: Auto log-in DAHUA camera's in Dashticz not working

Post by clinkadink »

Are you passing an unencoded password in the URL? Browsers are clamping down on this. You could try encoding your password and passing that instead. Link below is what I use for my cameras.

https://www.base64encode.org/
"UI is the saddle, the stirrups, & the reins. UX is the feeling you get being able to ride the horse."
dekoene
Posts: 11
Joined: Sunday 09 June 2019 10:21
Target OS: -
Domoticz version:
Contact:

Re: Auto log-in DAHUA camera's in Dashticz not working

Post by dekoene »

clinkadink wrote: Monday 09 March 2020 18:44 Are you passing an unencoded password in the URL? Browsers are clamping down on this. You could try encoding your password and passing that instead. Link below is what I use for my cameras.

https://www.base64encode.org/
Thanks for this info. Indeed, I noticed after some more testing that Firefox accepts this way of working (unencoded password) and displayed correctly the camera image. Chrome and Fully Kiosk don't accept it.

How can I integrate the base 64 encode in dashticz?

Thanks,
Koen
User avatar
clinkadink
Posts: 417
Joined: Tuesday 31 December 2019 1:15
Target OS: Linux
Domoticz version: 2020.2
Location: Swindon, UK
Contact:

Re: Auto log-in DAHUA camera's in Dashticz not working

Post by clinkadink »

I just add my encoded password as the url's password parameter, instead of the unencoded one.
"UI is the saddle, the stirrups, & the reins. UX is the feeling you get being able to ride the horse."
dekoene
Posts: 11
Joined: Sunday 09 June 2019 10:21
Target OS: -
Domoticz version:
Contact:

Re: Auto log-in DAHUA camera's in Dashticz not working

Post by dekoene »

clinkadink wrote: Tuesday 10 March 2020 9:48 I just add my encoded password as the url's password parameter, instead of the unencoded one.

Ok thanks - I'll give it a try later today!
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest