Page 1 of 1

Latest beta and Camera blocks

Posted: Monday 01 February 2021 11:44
by pvklink
Hi, i like to use the latest camera block options .
my cams dont use the commandline options user/pwd options. I click on the cam image to add username password.
In domoticz and domoticz app these cams work with the configured usernames and passwords...
With the current setup i dont have images and cant input username / password
Perhaps pushng username and password can be solved by the same trick as in domoticz / domoticz app push them ?

My config (old and new)

Code: Select all

<old cam settings disabled>

var buttons = {}
// buttons.webcama = {key:'webcama', width:4,  icon: 'fas fa-video',     title:'Cam',    url: 'http://<ip>/cgi-bin/snapshot.cgi?user=<user>&pwd=<pwd>', framewidth:500, frameheight:400, slide:2}
// buttons.webcam3 = {key:'divcam3', width:12, isimage:true, forcerefresh:true,  refreshimage: 5000, refreshurl: 5000, btnimage: 'http://<ip>/cgi-bin/snapshot.cgi?user=<user>&pwd=<pwd>', url: 'http://<ip>/cgi-bin/snapshot.cgi?user=<user>&pwd=<pwd>'}
// buttons.webcam4 = {key:'divcam4', width:12, isimage:true, forcerefresh:true,  cheapwebcam:true, refreshimage: 5000, refreshurl: 5000, btnimage: 'https://<ip>/cgi-bin/currentpic.cgi?user=<user>&pwd=<pwd>', url: 'https://<ip>/'}

blocks["cameras"] = 	{
			type: "camera",cameras: [
				                {title: "Straatview",imageUrl: "http://192.168.20.50/cgi-bin/snapshot.cgi?user=<user>&pwd=<pwd>",videoUrl: "",},
				                {title: "Tuinview",imageUrl: "https://192.168.20.52/cgi-bin/currentpic.cgi?user=<user>&pwd=<pwd>",videoUrl: "",},        					
						],
			width: 12,height: 400,refresh: 0.5,traytimeout: 3,slidedelay: 3,forcerefresh: 1,
			};

<old column>
//columns[10]= {blocks: [buttons.webcam3,buttons.webcam4],width: 5}

new column
columns[10]= {blocks: ['cameras'],width: 6}

Re: Latest beta and Camera blocks

Posted: Monday 01 February 2021 11:53
by Chris12
I use this kind of config for my camera blocks which are working fine in latest beta releases:

Code: Select all

blocks['tuin_cam'] = {
   type: 'camera',
   imageUrl: 'http://192.168.1.11:8084/camsnapshot.jpg?idx=2',
   videoUrl: 'http://<user>:<password>@192.168.1.111:8080/cgi-bin/mjpg/video.cgi?subtype=1',
   refresh: 30,
   width: 4,
   height: 150
}

blocks['carport_cam'] = {
   type: 'camera',
   imageUrl: 'http://192.168.1.11:8084/camsnapshot.jpg?idx=3',
   videoUrl: 'http://192.168.1.11:8084/camsnapshot.jpg?idx=3',  
   refresh: 30,
   width: 4,
   height: 150
}
To find the correct URLs for your type of camera, I use a website with some nice overview which urls are supported.
https://www.ispyconnect.com/man.aspx?n=dahua (search for your own type of camera)

Re: Latest beta and Camera blocks

Posted: Monday 01 February 2021 12:04
by pvklink
@thanks chris, gonna try your config. I read the site but none are working for my cams....
Another option like domoticz and the app is also an (extra) option (post usename / pwd)

Re: Latest beta and Camera blocks

Posted: Monday 01 February 2021 12:06
by Chris12
which type of camera's are you using?

Re: Latest beta and Camera blocks

Posted: Monday 01 February 2021 12:18
by pvklink
the cheap one is a dafang 1s (works great 9 euro)
The other one is a IPC a35P / DH-IPC-A35
3MP A Series Wi-Fi Network PT Camera (from dahua)

blocks['tuin_cam'] = {
type: 'camera',
imageUrl: 'http://192.168.20.50/cgi-bin/snapshot.cgi',
videoUrl: 'http://192.168.20.50/cgi-bin/snapshot.c ... ?subtype=1',
refresh: 30,
width: 4,
height: 150
}

blocks['street_cam'] = {
type: 'camera',
imageUrl: 'https://192.168.20.52/cgi-bin/currentpic.cgi?',
videoUrl: 'https://192.168.20.52/cgi-bin/currentpic.cgi?',
refresh: 30,
width: 4,
height: 150
}

Re: Latest beta and Camera blocks

Posted: Monday 01 February 2021 12:57
by Chris12
OK, I have strugled to get my cams working too.

So I tried a lot of options (the site above does generate the correct url syntax very easy) first in a new browser window, and after found some working options I tried these in dashticz.

Have you tried different channels and confirmed those channels are enabled and configured as well in the camera itself?

For the IPC-A35P some working options for a snapshot should be:

Code: Select all

http://admin:[email protected]/cgi-bin/snapshot.cgi?loginuse=admin&loginpas=admin
http://admin:[email protected]/cgi-bin/snapshot.cgi?chn=1&u=admin&p=admin
(change with your configured user/password for the camera offcourse)

Re: Latest beta and Camera blocks

Posted: Monday 01 February 2021 13:33
by pvklink
yes i did, when i put these commands in my browser, it always comes with a popup screen for entering username and password regardless the username/pwd i give in the commandline

Re: Latest beta and Camera blocks

Posted: Monday 01 February 2021 13:48
by Chris12
Maybe try the URL's like this (with a port number, also configure that port in your camera)

Code: Select all

http://admin:[email protected]:8080/cgi-bin/snapshot.cgi?loginuse=admin&loginpas=admin
http://admin:[email protected]:8080/cgi-bin/snapshot.cgi?chn=1&u=admin&p=admin

Re: Latest beta and Camera blocks

Posted: Monday 01 February 2021 15:04
by Rtificial
I had issues as well, and now use Shinobi in a docker on my synology to provide an MJPEG stream without username and password.

Re: Latest beta and Camera blocks

Posted: Monday 01 February 2021 18:56
by pvklink
Via de browser it always asks for a user and password.
The cam option in domotcz can adress this issue.
Is it possible to call the stream via domoticz ?
or the cam option in dashticz must do the same trick as domoticz, to post the username/password

Re: Latest beta and Camera blocks

Posted: Monday 01 February 2021 19:19
by pvklink
Ok, i am a little step further!
I use domoticz as an intermediate....
I do have an image from both cams without giving credentials !
Only i dont have a refresh automatically...
@update
with forcerefresh: 2 it did work at some moment, now i does not, i think my domoiticz RPI dont like the calls to the cams...

Code: Select all

blocks["cameras"] =
	{
	type: "camera",
	cameras:[
		{title: "Straatview",imageUrl: "http://<DOMOTICZ_IP:PORT>/camsnapshot.jpg?idx=2",videoUrl: "http://<DOMOTICZ_IP:PORT>/camsnapshot.jpg?idx=2",},
		{title: "Tuinview",imageUrl: "http://<DOMOTICZ_IP:PORT>/camsnapshot.jpg?idx=3",videoUrl: "http://<DOMOTICZ_IP:PORT>/camsnapshot.jpg?idx=3",},        					
		],
	width: 12,
	height: 400,
	refresh: 0.5,
	traytimeout: 3,
	slidedelay: 3,
	forcerefresh: 1,
	};

Re: Latest beta and Camera blocks

Posted: Monday 01 February 2021 20:16
by pvklink
perhaps i install domoticz (with the same cams config) on the rpi with touchscreen which executes a browser and calls the dashticz site.
the dashticz cams config can then do a call to a dummy domoticz site on its own device to get the images...

strange config, but can work

Re: Latest beta and Camera blocks

Posted: Tuesday 09 February 2021 17:55
by pvklink
Solved it!
By adding two small dials, for each cam one. This dial activates the cam so you can type in username/password.
Aftering entering usernames/passwords, the camera block works!
camsol.jpg
camsol.jpg (228.54 KiB) Viewed 650 times