Camera screen when doorbell pressed

Dashticz, alternative dashboard based on HTML, CSS, jQuery

Moderators: leecollings, htilburgs, robgeerts

Chris12
Posts: 238
Joined: Tuesday 18 August 2020 8:41
Target OS: NAS (Synology & others)
Domoticz version: 2021.1
Location: NL
Contact:

Camera screen when doorbell pressed

Post by Chris12 »

Hi,

I would like to know if it is possible when the doorbell is pressed, a live camera view is then shown on a new screen which is not part of the screen cyclus in dashticzs itself. I found the trigger/action options for the camera elsewhere on the forum.
But not sure if a seperate screen (or a popup) is possible.

I currently have a dashticz setup with 3 screens, and for the live camera feed shown when the doorbell is pressed a 4th screen (or a pop-up) should be shown and after the default rotation time (30secs in my case) this screen should then be switched, and the normal cyclus of the 3 screens runs again.

Maybe the above is something new, can it then be added as a feature request?
Domoticz beta | Dashticz beta | Synology DS415+ | Wall tablet Teclast 11.6inch (Android) | TADO v3 controlled heating
Lokonli
Posts: 2291
Joined: Monday 29 August 2016 22:40
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Camera screen when doorbell pressed

Post by Lokonli »

Chris12 wrote: Friday 11 December 2020 8:40 Hi,

I would like to know if it is possible when the doorbell is pressed, a live camera view is then shown on a new screen which is not part of the screen cyclus in dashticzs itself. I found the trigger/action options for the camera elsewhere on the forum.
But not sure if a seperate screen (or a popup) is possible.

I currently have a dashticz setup with 3 screens, and for the live camera feed shown when the doorbell is pressed a 4th screen (or a pop-up) should be shown and after the default rotation time (30secs in my case) this screen should then be switched, and the normal cyclus of the 3 screens runs again.

Maybe the above is something new, can it then be added as a feature request?
Would this work:

https://dashticz.readthedocs.io/en/mast ... pup-on-off
Chris12
Posts: 238
Joined: Tuesday 18 August 2020 8:41
Target OS: NAS (Synology & others)
Domoticz version: 2021.1
Location: NL
Contact:

Re: Camera screen when doorbell pressed

Post by Chris12 »

I looked into that, but was struggeling to get the code working.

it seems that it should be like this:
Spoiler: show

Code: Select all

blocks[309] = {}
blocks[309]['openpopupOn'] = {}
blocks[309]['openpopupOn']['url'] = 'http://192.168.1.11:8084/camsnapshot.jpg?idx=1';
blocks[309]['openpopupOn']['auto_close'] = 10; //seconds
blocks[309]['openpopupOn']['framewidth'] = 500;
blocks[309]['openpopupOn']['frameheight'] = 400; 
But this is not working, when pressing the doorbell in Domoticz, no pop-up is shown in dashticz. Doorbell is working, as I get an email with ascreenshot (as configured in domoticz itself)

Maybe the code above is not complete? Or I missed something, as this kind of block definition I'm not used to in my config (I use the other (more readable) way of defining blocks)
Domoticz beta | Dashticz beta | Synology DS415+ | Wall tablet Teclast 11.6inch (Android) | TADO v3 controlled heating
Lokonli
Posts: 2291
Joined: Monday 29 August 2016 22:40
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Camera screen when doorbell pressed

Post by Lokonli »

Your code is correct, and working on my system.

You can rewrite it like:

Code: Select all

blocks[309] = {
    openpopupOn:{
        url: 'http://192.168.1.11:8084/camsnapshot.jpg?idx=1',
        auto_close: 1,
        framewidth: 500,
        frameheight: 400
    }
} 
This will give exactly the same result as your code.

Device 309 is a switch device?
Device 309 must be on the dasboard. (add it to a column) Is it visible?

Do you not see a popup window at all when the devices switches to On? or do you get a popup screen but without content?

Check that you don't redefine block 309 a second time in CONFIG.js
Chris12
Posts: 238
Joined: Tuesday 18 August 2020 8:41
Target OS: NAS (Synology & others)
Domoticz version: 2021.1
Location: NL
Contact:

Re: Camera screen when doorbell pressed

Post by Chris12 »

Hi,

Changed the code to the other markup, added the 309 device into a column.
When the doorbell (switch on/off) is pressed now a pop-up is shown, but the camera image is offered to save in my browser, instead of shown in the pop-up. The pop-up disapears after the configured time.

instead of a snapshot I will use the live video stream url.
Thats crafted like this: http://dashticz:[email protected]/ ... ?subtype=1

But unfortunatelly it keeps give me a pop-up for the user/password, which I have to type everytime.
So will look for a sollution for that, maybe get the stream of my NAS surveilance station instead directly form the camera (Dahua).

Also noticed that the pop-up window of dashticz is bigger than the configured video frame size, which gives a lot of white backgroud surrounding the videostream itself.

edit: for the camera carousel (when clicking on the camera's on the dashboard itself, no username/password is asked (using the same videostream url)
also noticed that the carousel does not show the first camera feed directly, but after it rotates between the different camera's (I have 3 configured), or when manually skip to next camera. Maybe this is a bug?
Domoticz beta | Dashticz beta | Synology DS415+ | Wall tablet Teclast 11.6inch (Android) | TADO v3 controlled heating
Chris12
Posts: 238
Joined: Tuesday 18 August 2020 8:41
Target OS: NAS (Synology & others)
Domoticz version: 2021.1
Location: NL
Contact:

Re: Camera screen when doorbell pressed

Post by Chris12 »

Does dashticz support RTSP streams? or RTSP-over-HTTP ?
I tried both options for the pop-up window, but no video feed is shown.
Domoticz beta | Dashticz beta | Synology DS415+ | Wall tablet Teclast 11.6inch (Android) | TADO v3 controlled heating
Lokonli
Posts: 2291
Joined: Monday 29 August 2016 22:40
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Camera screen when doorbell pressed

Post by Lokonli »

Chris12 wrote: Saturday 12 December 2020 11:44 Does dashticz support RTSP streams? or RTSP-over-HTTP ?
I tried both options for the pop-up window, but no video feed is shown.
Browsers don't support a rtsp stream. So that means the rtsp stream first has to be converted to mjpeg for instance.

For me Shinobi worked quite ok.
Chris12
Posts: 238
Joined: Tuesday 18 August 2020 8:41
Target OS: NAS (Synology & others)
Domoticz version: 2021.1
Location: NL
Contact:

Re: Camera screen when doorbell pressed

Post by Chris12 »

Ok, I found a possible solution that synolgy surveilance station kan offer the mjpeg stream by itself (https://community.hubitat.com/t/hikvisi ... d/17108/12).

But when using that generated url, in the pop-up shown an error is displayed: {"error":{"code":105},"success":false}
The url pasted directly in my browser works fine, and the live feed is shown.

I read that the kiosk browser (android) which I use om my tablet, should be able to play the rstp streams.
I will further investigate this option as well.
Last edited by Chris12 on Wednesday 16 December 2020 13:54, edited 1 time in total.
Domoticz beta | Dashticz beta | Synology DS415+ | Wall tablet Teclast 11.6inch (Android) | TADO v3 controlled heating
Chris12
Posts: 238
Joined: Tuesday 18 August 2020 8:41
Target OS: NAS (Synology & others)
Domoticz version: 2021.1
Location: NL
Contact:

Re: Camera screen when doorbell pressed

Post by Chris12 »

@lokonli, do you have any suggestions what to configure so the pop-up does show the video stream?

Somehow I cannot get it to work. I tried nummerous different video stream url options, but they give or a user/pass pop-up, or do not show the videostream, or give the error posted).

using the following config:
(inlcuded all url options tried. The last url is working fine in the browser, but gives a error message in the pop-up)
Spoiler: show

Code: Select all

blocks['deurbel'] = {
	idx: '309',
	title: 'Deurbel voordeur',
    openpopupOn:{
        //url: 'http://dashticz:[email protected]/cgi-bin/mjpg/video.cgi?subtype=1',
		//url: 'rtsp://syno:[email protected]:554/Sms=11.unicast',
		//url: 'rtsp://192.168.1.11:5000/webman/3rdparty/SurveillanceStation/cgi/rtsp.cgi?Sms=11.unicast&DsId=0&StmKey=b77a1054b8cd472190dc99617e05e704',
		//url: 'http://dashticz:[email protected]/img/video.mjpeg',
		url: 'http://192.168.1.11:5000/webapi/entry.cgi?api=SYNO.SurveillanceStation.Stream.VideoStreaming&version=1&method=Stream&format=mjpeg&cameraId=11&StmKey="b77a1054b8cd472190dc99617e05e704"', //HTTP MJPEG stream vanuit synology
        auto_close: 120,  //seconds
        framewidth: 700,
        frameheight: 400,
		hidedate: true
    }
} 
also good to know:
dashticz version: 3.7.0 beta (latest)
domoticz version: 2020.2(12731)
phyton: 3.8.2
Domoticz beta | Dashticz beta | Synology DS415+ | Wall tablet Teclast 11.6inch (Android) | TADO v3 controlled heating
networkerict
Posts: 9
Joined: Wednesday 16 December 2020 19:37
Target OS: Linux
Domoticz version: 2022.1
Location: NL
Contact:

Re: Camera screen when doorbell pressed

Post by networkerict »

Hi @lokonli @Chris12, I also have looked for a solution like the one you're looking for in this topic. EG setting focus to a camera-stream whenever there is movement at any of them. The camera block and carousel work fine. I would just want to know if it's possible to open a popup and focus the camera block directly (full screen ; just as in the camera carousel). When using the same VideoUrl from the camera block in a OpenPopUp block, I also need to fill in the username/password, just as Chris12 reported.

Any thoughts?
Lokonli
Posts: 2291
Joined: Monday 29 August 2016 22:40
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Camera screen when doorbell pressed

Post by Lokonli »

The difference is that in a openpopup block an iframe is used, and in the video block an img.

I've updated beta: you can add parameter newwindow: 5 to show the url as an image instead as an iframe.

Add it as part of the openpopupOn block.

Can you test? I don't have such a cam myself, so I can't test.

Update beta with 'git pull'
Chris12
Posts: 238
Joined: Tuesday 18 August 2020 8:41
Target OS: NAS (Synology & others)
Domoticz version: 2021.1
Location: NL
Contact:

Re: Camera screen when doorbell pressed

Post by Chris12 »

Hi lokonli,

I'm happy to test it!
Thanks for the sollution. Is it also possible to update the downloadable zip file from git?
As I have a synology NAS on which dashticz run, I can not use git pull AFAIK. Should the git pull be done in the dashticz directory?
Domoticz beta | Dashticz beta | Synology DS415+ | Wall tablet Teclast 11.6inch (Android) | TADO v3 controlled heating
Lokonli
Posts: 2291
Joined: Monday 29 August 2016 22:40
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Camera screen when doorbell pressed

Post by Lokonli »

You can download the zip as well. You have to select the beta branch first.

And for your other system: yes, git pull in the dashticz folder should work.
Chris12
Posts: 238
Joined: Tuesday 18 August 2020 8:41
Target OS: NAS (Synology & others)
Domoticz version: 2021.1
Location: NL
Contact:

Re: Camera screen when doorbell pressed

Post by Chris12 »

Hi Lokonli,

Updated with the lastest beta available from git.
Added the newwindow: 5 into the config

Now when pressing the doorbell to ON it shows no error anymore but no videostream (broken icon), also no new pop-up for user/pass anymore (for some urls). I tried different URLs which are working in a normal browser.
Spoiler: show
Image
The black outline shown is the size configured for the videostream (700x400)
Domoticz beta | Dashticz beta | Synology DS415+ | Wall tablet Teclast 11.6inch (Android) | TADO v3 controlled heating
networkerict
Posts: 9
Joined: Wednesday 16 December 2020 19:37
Target OS: Linux
Domoticz version: 2022.1
Location: NL
Contact:

Re: Camera screen when doorbell pressed

Post by networkerict »

Hi Lokonli,

Updated with the lastest beta available from git.
Added the newwindow: 5 into the config.

It does exactly what I requested now. Thanks!
The AutoClose part however, does not seem to work! It keeps the image open indefinitely. That needs fixing.

Great Going Lokonli!

For those who are interested: I'm using three Hikvision camera's here, who all write to a Synology NVR1218. I'm using the folowing camera blocks here:
imageUrl: 'http://[IP_OF_CAMERA]/ISAPI/Streaming/channels/1/picture',
videoUrl: 'http://[IP_OF_CAMERA]/ISAPI/Streaming/channels/102/httppreview',

The reason I don't have to put in a username/password is that this information is being cached on the tablet (Samsung Galaxy Tab A 10.5" (2018)) itself by filling in this info once and / or because I'm using a script together with Fully Kiosk Browser to re-update/reset this info every time I wish to. I use this command in a bash script which can be triggered by Domoticz/Dashticz:

curl -s "http://[IP-OF-TABLET]:2323/?cmd=loadUrl&url="http://admin:'=[PASSWORD OF THE HIKVISION CAMERA]'@[IP-OF-CAMERA]/ISAPI/Streaming/channels/102/httppreview"&newtab=true&focus=false&password=[PASSWORD OF FULLY ADMIN]"

Image
Chris12
Posts: 238
Joined: Tuesday 18 August 2020 8:41
Target OS: NAS (Synology & others)
Domoticz version: 2021.1
Location: NL
Contact:

Re: Camera screen when doorbell pressed

Post by Chris12 »

It is also working partly for me now!

But only when I once have loaded the camera feed in another (firefox latest) browser window and have entered enter user/pass, or give aproval to use pre-defined credentials. And start the dashticz dashboard in a new tab as well, then the feed is shown in the pop-up when the doorbell is pressed. But not live streaming.

But as soon if I refresh the dashticz page and test again the feed is not shown anymore (broken icon again). So somehow the cached(?) credentails are not working anymore.

I'm using the same video url as been configured in the videostream carousel, that one is working fine. It's shows the live videostream.
And no username/password is asked there.

On the pop-up window, can the close button X be set to black color as well (it's now white-on-white and not visible).
Domoticz beta | Dashticz beta | Synology DS415+ | Wall tablet Teclast 11.6inch (Android) | TADO v3 controlled heating
Chris12
Posts: 238
Joined: Tuesday 18 August 2020 8:41
Target OS: NAS (Synology & others)
Domoticz version: 2021.1
Location: NL
Contact:

Re: Camera screen when doorbell pressed

Post by Chris12 »

@lokonli, any sugestions what else I could try?

Or maybe collect some debug info for you to see why it's the video is failing in the pop-up but not in the carrousel video view?
Domoticz beta | Dashticz beta | Synology DS415+ | Wall tablet Teclast 11.6inch (Android) | TADO v3 controlled heating
networkerict
Posts: 9
Joined: Wednesday 16 December 2020 19:37
Target OS: Linux
Domoticz version: 2022.1
Location: NL
Contact:

Re: Camera screen when doorbell pressed

Post by networkerict »

Hi @lokonli I've detected a 'bug' in the new openpopup(On)(Off) function in the beta version (3.7.x). The documentation states to use the 'autoclose' function to autoclose the popup window after x seconds, but the blocks.js script uses 'auto_close' instead. So basically with an underscore instead of without. The function itself (using auto_close for the time being) works as expected.

I do have a question on the popup window itself. Is there a quick way to make it fullscreen without using the framewidth/height (pixels)? If not; as I'm using these functions I notice that the window is not aligned to the top. How can I do that at least?
Lokonli
Posts: 2291
Joined: Monday 29 August 2016 22:40
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Camera screen when doorbell pressed

Post by Lokonli »

networkerict wrote: Monday 21 December 2020 15:14 Hi @lokonli I've detected a 'bug' in the new openpopup(On)(Off) function in the beta version (3.7.x). The documentation states to use the 'autoclose' function to autoclose the popup window after x seconds, but the blocks.js script uses 'auto_close' instead. So basically with an underscore instead of without. The function itself (using auto_close for the time being) works as expected.
Thanks, I've updated the documentation in the beta branch. It will be merged into master with the next update.
Chris12
Posts: 238
Joined: Tuesday 18 August 2020 8:41
Target OS: NAS (Synology & others)
Domoticz version: 2021.1
Location: NL
Contact:

Re: Camera screen when doorbell pressed

Post by Chris12 »

networkerict wrote: Monday 21 December 2020 15:14 Hi @lokonli I've detected a 'bug' in the new openpopup(On)(Off) function in the beta version (3.7.x). The documentation states to use the 'autoclose' function to autoclose the popup window after x seconds, but the blocks.js script uses 'auto_close' instead. So basically with an underscore instead of without. The function itself (using auto_close for the time being) works as expected.

I do have a question on the popup window itself. Is there a quick way to make it fullscreen without using the framewidth/height (pixels)? If not; as I'm using these functions I notice that the window is not aligned to the top. How can I do that at least?
The autoclose does work in my config setup using the lastest released beta (3.7.1). Configured it to close after 60secs, and it does close properly.

And the pop-up did show me the video feed as well... but the next time I tested it, it was still 'loading....' with the broken feed/icon.
I noticed that the normal camera view (little image on the dashboard) was also not working at that time. (maybe caused by limited viewing resources setup in my camera).

I tested it a few more time after that, and sometimes the video feed is shown in the pop-up, and sometimes not ?!??
Like 4 times Ok, 1 time not... or 2 times Ok, and then 2 times not OK. Usually after a config refresh, it does not work directly, after waiting like 1 minute after the dashticz refresh then it works OK.

So the video feed does work in my FF browser (v84.0), now trying to accomplish the same in the kiosk browser which runs on the tablet as main display page for dashticz in my livingroom.
Domoticz beta | Dashticz beta | Synology DS415+ | Wall tablet Teclast 11.6inch (Android) | TADO v3 controlled heating
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest