Latest beta and Camera blocks Topic is solved

Dashticz, alternative dashboard based on HTML, CSS, jQuery

Moderators: leecollings, htilburgs, robgeerts

Post Reply
pvklink
Posts: 822
Joined: Wednesday 12 November 2014 15:01
Target OS: Raspberry Pi / ODroid
Domoticz version: latest b
Contact:

Latest beta and Camera blocks

Post 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}
Raspberry (raspbian on rpi 3) , Domoticz Beta, dzVents , RFXtrx433e, P1, Hue, Yeelight, Zwave+, X10, ESP(easy), MQTT,Weather Underground, System Alive Checker, Domoticz Remote Server to RPI with Google Assistant,
Jablotron connection, Ikea
Chris12
Posts: 238
Joined: Tuesday 18 August 2020 8:41
Target OS: NAS (Synology & others)
Domoticz version: 2021.1
Location: NL
Contact:

Re: Latest beta and Camera blocks

Post 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)
Domoticz beta | Dashticz beta | Synology DS415+ | Wall tablet Teclast 11.6inch (Android) | TADO v3 controlled heating
pvklink
Posts: 822
Joined: Wednesday 12 November 2014 15:01
Target OS: Raspberry Pi / ODroid
Domoticz version: latest b
Contact:

Re: Latest beta and Camera blocks

Post 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)
Raspberry (raspbian on rpi 3) , Domoticz Beta, dzVents , RFXtrx433e, P1, Hue, Yeelight, Zwave+, X10, ESP(easy), MQTT,Weather Underground, System Alive Checker, Domoticz Remote Server to RPI with Google Assistant,
Jablotron connection, Ikea
Chris12
Posts: 238
Joined: Tuesday 18 August 2020 8:41
Target OS: NAS (Synology & others)
Domoticz version: 2021.1
Location: NL
Contact:

Re: Latest beta and Camera blocks

Post by Chris12 »

which type of camera's are you using?
Domoticz beta | Dashticz beta | Synology DS415+ | Wall tablet Teclast 11.6inch (Android) | TADO v3 controlled heating
pvklink
Posts: 822
Joined: Wednesday 12 November 2014 15:01
Target OS: Raspberry Pi / ODroid
Domoticz version: latest b
Contact:

Re: Latest beta and Camera blocks

Post 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
}
Raspberry (raspbian on rpi 3) , Domoticz Beta, dzVents , RFXtrx433e, P1, Hue, Yeelight, Zwave+, X10, ESP(easy), MQTT,Weather Underground, System Alive Checker, Domoticz Remote Server to RPI with Google Assistant,
Jablotron connection, Ikea
Chris12
Posts: 238
Joined: Tuesday 18 August 2020 8:41
Target OS: NAS (Synology & others)
Domoticz version: 2021.1
Location: NL
Contact:

Re: Latest beta and Camera blocks

Post 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)
Domoticz beta | Dashticz beta | Synology DS415+ | Wall tablet Teclast 11.6inch (Android) | TADO v3 controlled heating
pvklink
Posts: 822
Joined: Wednesday 12 November 2014 15:01
Target OS: Raspberry Pi / ODroid
Domoticz version: latest b
Contact:

Re: Latest beta and Camera blocks

Post 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
Raspberry (raspbian on rpi 3) , Domoticz Beta, dzVents , RFXtrx433e, P1, Hue, Yeelight, Zwave+, X10, ESP(easy), MQTT,Weather Underground, System Alive Checker, Domoticz Remote Server to RPI with Google Assistant,
Jablotron connection, Ikea
Chris12
Posts: 238
Joined: Tuesday 18 August 2020 8:41
Target OS: NAS (Synology & others)
Domoticz version: 2021.1
Location: NL
Contact:

Re: Latest beta and Camera blocks

Post 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
Domoticz beta | Dashticz beta | Synology DS415+ | Wall tablet Teclast 11.6inch (Android) | TADO v3 controlled heating
Rtificial
Posts: 5
Joined: Thursday 28 January 2021 16:38
Target OS: -
Domoticz version:
Contact:

Re: Latest beta and Camera blocks

Post 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.
pvklink
Posts: 822
Joined: Wednesday 12 November 2014 15:01
Target OS: Raspberry Pi / ODroid
Domoticz version: latest b
Contact:

Re: Latest beta and Camera blocks

Post 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
Raspberry (raspbian on rpi 3) , Domoticz Beta, dzVents , RFXtrx433e, P1, Hue, Yeelight, Zwave+, X10, ESP(easy), MQTT,Weather Underground, System Alive Checker, Domoticz Remote Server to RPI with Google Assistant,
Jablotron connection, Ikea
pvklink
Posts: 822
Joined: Wednesday 12 November 2014 15:01
Target OS: Raspberry Pi / ODroid
Domoticz version: latest b
Contact:

Re: Latest beta and Camera blocks

Post 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,
	};
Raspberry (raspbian on rpi 3) , Domoticz Beta, dzVents , RFXtrx433e, P1, Hue, Yeelight, Zwave+, X10, ESP(easy), MQTT,Weather Underground, System Alive Checker, Domoticz Remote Server to RPI with Google Assistant,
Jablotron connection, Ikea
pvklink
Posts: 822
Joined: Wednesday 12 November 2014 15:01
Target OS: Raspberry Pi / ODroid
Domoticz version: latest b
Contact:

Re: Latest beta and Camera blocks

Post 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
Raspberry (raspbian on rpi 3) , Domoticz Beta, dzVents , RFXtrx433e, P1, Hue, Yeelight, Zwave+, X10, ESP(easy), MQTT,Weather Underground, System Alive Checker, Domoticz Remote Server to RPI with Google Assistant,
Jablotron connection, Ikea
pvklink
Posts: 822
Joined: Wednesday 12 November 2014 15:01
Target OS: Raspberry Pi / ODroid
Domoticz version: latest b
Contact:

Re: Latest beta and Camera blocks

Post 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 646 times
Raspberry (raspbian on rpi 3) , Domoticz Beta, dzVents , RFXtrx433e, P1, Hue, Yeelight, Zwave+, X10, ESP(easy), MQTT,Weather Underground, System Alive Checker, Domoticz Remote Server to RPI with Google Assistant,
Jablotron connection, Ikea
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest