Dashticz IP Cameras - Features, Fixes & Updates

Dashticz, alternative dashboard based on HTML, CSS, jQuery

Moderators: leecollings, htilburgs, robgeerts

User avatar
gielie
Posts: 290
Joined: Tuesday 12 January 2016 11:40
Target OS: Raspberry Pi / ODroid
Domoticz version: latest β
Location: The Netherlands (Alkmaar)
Contact:

Re: Dashticz IP Cameras - Features, Fixes & Updates

Post by gielie »

I have a problem with the new way of showing a security cam. In the previous versions I used this code

Code: Select all

buttons.mycamera2 = {width:12, isimage:true, refresh:2500, btnimage: 'http://Admin:[email protected]/tmpfs/auto.jpg',slide:6}
But in the new beta this code doesn't work anymore, I only get an picture and no movie.
When I use the new code it works again but then I can't use the 'slide:6' code to slide on click to a page of my liking
This cod works

Code: Select all

blocks['cam1'] = {
   type: 'camera',
   imageUrl: 'http://Admin:[email protected]/tmpfs/auto.jpg',
   videoUrl: 'http://Admin:[email protected]/tmpfs/auto.jpg',
//    slide: 6,		//this piece of code doesn't work.
   refresh: 1000,
   width: 12,
   height: 200,
   
}
Can someone help get my old code working or the new one with the slide effect.
- Aeon Labs USB Stick met Z-wave plus
- Aeotec MultiSensor 6
- FIBARO FGS223
- FIBARO FGWPE Wall Plug
- Neo CoolCam Power plug
- Popp Smoke Detector
- Toon
- Kodi Media Server
Lokonli
Posts: 2262
Joined: Monday 29 August 2016 22:40
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Dashticz IP Cameras - Features, Fixes & Updates

Post by Lokonli »

gielie wrote: Wednesday 27 May 2020 10:01 I have a problem with the new way of showing a security cam. In the previous versions I used this code

Code: Select all

buttons.mycamera2 = {width:12, isimage:true, refresh:2500, btnimage: 'http://Admin:[email protected]/tmpfs/auto.jpg',slide:6}
But in the new beta this code doesn't work anymore, I only get an picture and no movie.
When I use the new code it works again but then I can't use the 'slide:6' code to slide on click to a page of my liking
This cod works

Code: Select all

blocks['cam1'] = {
   type: 'camera',
   imageUrl: 'http://Admin:[email protected]/tmpfs/auto.jpg',
   videoUrl: 'http://Admin:[email protected]/tmpfs/auto.jpg',
//    slide: 6,		//this piece of code doesn't work.
   refresh: 1000,
   width: 12,
   height: 200,
   
}
Can someone help get my old code working or the new one with the slide effect.
I think the old code did not contain a movie but an image that was refreshing every 2.5 seconds. Correct?
In beta I decided to standardize the refresh parameter to be in seconds. So that means you have to change 'refresh:2500' into 'refresh:2' for the old code.

The new camera module however still uses refresh in msec. Yes, somewhat confusing ...
The new camera module is not a button, and doesn't support the slide parameter.
User avatar
gielie
Posts: 290
Joined: Tuesday 12 January 2016 11:40
Target OS: Raspberry Pi / ODroid
Domoticz version: latest β
Location: The Netherlands (Alkmaar)
Contact:

Re: Dashticz IP Cameras - Features, Fixes & Updates

Post by gielie »

Lokonli wrote: Wednesday 27 May 2020 13:04
gielie wrote: Wednesday 27 May 2020 10:01 I have a problem with the new way of showing a security cam. In the previous versions I used this code

Code: Select all

buttons.mycamera2 = {width:12, isimage:true, refresh:2500, btnimage: 'http://Admin:[email protected]/tmpfs/auto.jpg',slide:6}
But in the new beta this code doesn't work anymore, I only get an picture and no movie.
When I use the new code it works again but then I can't use the 'slide:6' code to slide on click to a page of my liking
This cod works

Code: Select all

blocks['cam1'] = {
   type: 'camera',
   imageUrl: 'http://Admin:[email protected]/tmpfs/auto.jpg',
   videoUrl: 'http://Admin:[email protected]/tmpfs/auto.jpg',
//    slide: 6,		//this piece of code doesn't work.
   refresh: 1000,
   width: 12,
   height: 200,
   
}
Can someone help get my old code working or the new one with the slide effect.
I think the old code did not contain a movie but an image that was refreshing every 2.5 seconds. Correct?
In beta I decided to standardize the refresh parameter to be in seconds. So that means you have to change 'refresh:2500' into 'refresh:2' for the old code.

The new camera module however still uses refresh in msec. Yes, somewhat confusing ...
The new camera module is not a button, and doesn't support the slide parameter.
Yes, the change between ms and s did the trick, thanks a lot.
- Aeon Labs USB Stick met Z-wave plus
- Aeotec MultiSensor 6
- FIBARO FGS223
- FIBARO FGWPE Wall Plug
- Neo CoolCam Power plug
- Popp Smoke Detector
- Toon
- Kodi Media Server
Ashitaka
Posts: 10
Joined: Monday 11 May 2020 10:17
Target OS: NAS (Synology & others)
Domoticz version: 2020.2
Contact:

Re: Dashticz IP Cameras - Features, Fixes & Updates

Post by Ashitaka »

Hello ;o)

I have a question, I'm not sure if it is a bug or not.

I'm using the camera block.
The block is working well, it shows the camera picture.
When I'm clicking it, it shows a popup with the live feed, this is working too.
I can click a button on the bottom of the live feed to expand/show a sidebar which is showing every camera I have.

Here is my problem:
The picture showing the cameras are not working (inside this sidebar)

<img class="cam-tray-img" src="htt p://10.XXX.XXX.XXX/Streaming/channels/102/picture&d=1590590737504" data-video="http://10.XXX.XXX.XXX/Streaming/channel ... ttppreview" data-mjpeg="true" data-refresh="5000">
the &d=1590590737504 feature is somehow added to the imageUrl I set in the camera block and this is why it is not working.
Is this intended?
I would have expected to eventually have
?t=timestamp
but definitely not
&d=1590590737504
So I Workarounded this bug by adding "?" character at the end of my imageUrl and it solved the problem.

Anyway, big thanks for all the work done so far! Dashticz rocks!
Lokonli
Posts: 2262
Joined: Monday 29 August 2016 22:40
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Dashticz IP Cameras - Features, Fixes & Updates

Post by Lokonli »

Can you post how you defined your block?
Ashitaka
Posts: 10
Joined: Monday 11 May 2020 10:17
Target OS: NAS (Synology & others)
Domoticz version: 2020.2
Contact:

Re: Dashticz IP Cameras - Features, Fixes & Updates

Post by Ashitaka »

Working block (with workaround)

Code: Select all

blocks['cam_stairs'] = {
        type: 'camera',
        imageUrl: 'http://10.XXX.XXX.XXX/Streaming/channels/102/picture?',
        videoUrl: 'http://10.XXX.XXX.XXX/Streaming/channels/102/httppreview',
        refresh: 5000,
        width: 12,
        height: 300
}
Block with problem (without workaround)
Originally (without the ?):

Code: Select all

blocks['cam_stairs'] = {
        type: 'camera',
        imageUrl: 'http://10.XXX.XXX.XXX/Streaming/channels/102/picture',
        videoUrl: 'http://10.XXX.XXX.XXX/Streaming/channels/102/httppreview',
        refresh: 5000,
        width: 12,
        height: 300
}
User avatar
clinkadink
Posts: 417
Joined: Tuesday 31 December 2019 1:15
Target OS: Linux
Domoticz version: 2020.2
Location: Swindon, UK
Contact:

Re: Dashticz IP Cameras - Features, Fixes & Updates

Post by clinkadink »

The issue is in js/components/camera.js on line 90.

Replace this ...

Code: Select all

video += '&d=' + Date.now();
With this ...

Code: Select all

video += (video.includes('?') ? '&t=' : '?t=') + Date.now();
Please test and confirm this fixes the issue. Thanks.
"UI is the saddle, the stirrups, & the reins. UX is the feeling you get being able to ride the horse."
Ashitaka
Posts: 10
Joined: Monday 11 May 2020 10:17
Target OS: NAS (Synology & others)
Domoticz version: 2020.2
Contact:

Re: Dashticz IP Cameras - Features, Fixes & Updates

Post by Ashitaka »

Thanks, I'll test that !

Ok, it doesn't work..
<div class="cam-container">
<img class="stream" src="h ttp://xxxx/Streaming/channels/102/httppreview">
<div class="cam-tray shut">
<img class="cam-tray-img"
src="h ttp://xxxx/Streaming/channels/102/picture&d=1590674321001"
data-video="h ttp://xxxx/Streaming/channels/102/httppreview"
data-mjpeg="true"
data-refresh="5000">
</div>
<div class="handle">
<i class="fas fa-angle-double-up"></i>
</div>
</div>
Anyway, I think I've spot where the block is generated:
here was the file : /dashticz/tpl/camera_video.tpl

Code: Select all

        <img class="cam-tray-img" src="{{this.image}}&d={{../dt}}" data-video="{{this.video}}" data-mjpeg="{{this.mjpeg}}" data-refresh="{{refresh}}">
I think the modif would lie here. I try to change it, but I failed to force the cache to renew, so I didn't manage to test it !
daemonshome
Posts: 19
Joined: Saturday 30 May 2020 15:30
Target OS: -
Domoticz version:
Contact:

Re: Dashticz IP Cameras - Features, Fixes & Updates

Post by daemonshome »

I do like the idea to have the ip cameras in dashticz, however have difficulties to get it work.

These links are working as expected in the browser, brand: level8 ip camera:

Code: Select all

Picture: http://user:[email protected]/snap.jpg
Video ( vlc, stream ): rtsp://user:[email protected]:554/Streaming/Channels/101/
Tried several variations, without success.

Code: Select all

blocks['cam1'] = {
   type: 'camera'
   imageUrl: 'http://user:[email protected]/snap.jpg',
   videoUrl: 'rtsp://user:[email protected]:554/Streaming/Channels/101/', 
   refresh: 1000,
   width: 6,
   height: 300
}
Any hints to try? Thanks
User avatar
clinkadink
Posts: 417
Joined: Tuesday 31 December 2019 1:15
Target OS: Linux
Domoticz version: 2020.2
Location: Swindon, UK
Contact:

Re: Dashticz IP Cameras - Features, Fixes & Updates

Post by clinkadink »

Re the imageUrl, if this does not work, try using your Domoticz IP camera url.
Re the videoUrl, RTSP will not work. See post #1 for more info. This needs to be an http url.
"UI is the saddle, the stirrups, & the reins. UX is the feeling you get being able to ride the horse."
daemonshome
Posts: 19
Joined: Saturday 30 May 2020 15:30
Target OS: -
Domoticz version:
Contact:

Re: Dashticz IP Cameras - Features, Fixes & Updates

Post by daemonshome »

I see,
quite sad as per the rtsp :(. I dont have any other oprion for cam video, just rtsp stream. Any idea or future request to have rtsp available to use?

What is the domoticz ip camera url exactly? I have added the cameras to domoticz, same details as posted above, should i see a separate link somewhere?
User avatar
clinkadink
Posts: 417
Joined: Tuesday 31 December 2019 1:15
Target OS: Linux
Domoticz version: 2020.2
Location: Swindon, UK
Contact:

Re: Dashticz IP Cameras - Features, Fixes & Updates

Post by clinkadink »

With regards to RTSP, that's a limitation of browsers, not Domoticz or Dashticz. The only way (that I know of) to view RTSP streams in a browser is to convert RTSP stream to WebRTC stream first on the server, then view the WebRTC stream in the browser. Up until a few years ago, it was possible to use Active X plugins, such as the VLC browser plugin - but these plugins are no longer supported/permitted. Like you have mentioned, VLC locally will play RTSP fine.

If you have added your camera to Domoticz, then you should be able to access it with this url:

Code: Select all

http://_Domoticz_IP_and_Port/camsnapshot.jpg?idx=1    // for the first camera.
"UI is the saddle, the stirrups, & the reins. UX is the feeling you get being able to ride the horse."
Trigun
Posts: 390
Joined: Wednesday 30 November 2016 11:58
Target OS: Raspberry Pi / ODroid
Domoticz version: 4.10717
Contact:

Re: Dashticz IP Cameras - Features, Fixes & Updates

Post by Trigun »

clinkadink wrote:With regards to RTSP, that's a limitation of browsers, not Domoticz or Dashticz. The only way (that I know of) to view RTSP streams in a browser is to convert RTSP stream to WebRTC stream first on the server, then view the WebRTC stream in the browser. Up until a few years ago, it was possible to use Active X plugins, such as the VLC browser plugin - but these plugins are no longer supported/permitted. Like you have mentioned, VLC locally will play RTSP fine.

If you have added your camera to Domoticz, then you should be able to access it with this url:

Code: Select all

http://_Domoticz_IP_and_Port/camsnapshot.jpg?idx=1    // for the first camera.
I also have one RTSP camera which I’ve added to zoneminder. Zoneminder converts it to mjpeg stream and I’ve added that stream to both domoticz as well as dashticz.
Works great!


Sent from my iPhone using Tapatalk
User avatar
clinkadink
Posts: 417
Joined: Tuesday 31 December 2019 1:15
Target OS: Linux
Domoticz version: 2020.2
Location: Swindon, UK
Contact:

Re: Dashticz IP Cameras - Features, Fixes & Updates

Post by clinkadink »

Trigun wrote: Monday 01 June 2020 12:21 I also have one RTSP camera which I’ve added to zoneminder. Zoneminder converts it to mjpeg stream and I’ve added that stream to both domoticz as well as dashticz.
Works great!
Yes, this is how I convert my RTSP stream, although I use Xeoma to convert the stream. I then use the mjpeg urls in Dashticz. Unlike the Domoticz approach, this is actually a video stream. Whereas Domoticz refreshes an image every n milliseconds.
"UI is the saddle, the stirrups, & the reins. UX is the feeling you get being able to ride the horse."
daemonshome
Posts: 19
Joined: Saturday 30 May 2020 15:30
Target OS: -
Domoticz version:
Contact:

Re: Dashticz IP Cameras - Features, Fixes & Updates

Post by daemonshome »

Trigun wrote: Monday 01 June 2020 12:21
clinkadink wrote:With regards to RTSP, that's a limitation of browsers, not Domoticz or Dashticz. The only way (that I know of) to view RTSP streams in a browser is to convert RTSP stream to WebRTC stream first on the server, then view the WebRTC stream in the browser. Up until a few years ago, it was possible to use Active X plugins, such as the VLC browser plugin - but these plugins are no longer supported/permitted. Like you have mentioned, VLC locally will play RTSP fine.

If you have added your camera to Domoticz, then you should be able to access it with this url:

Code: Select all

http://_Domoticz_IP_and_Port/camsnapshot.jpg?idx=1    // for the first camera.
I also have one RTSP camera which I’ve added to zoneminder. Zoneminder converts it to mjpeg stream and I’ve added that stream to both domoticz as well as dashticz.
Works great!


Sent from my iPhone using Tapatalk
Have tried sometime in the past year, but my experiance is that zoneminder uses a lots of resources in my nas system.
Ierlandfan
Posts: 89
Joined: Friday 09 October 2015 17:40
Target OS: Linux
Domoticz version:
Contact:

Re: Dashticz IP Cameras - Features, Fixes & Updates

Post by Ierlandfan »

When I use the "onpopup" function my camera does not show anything. It keeps saying "loading" and gives a white screen. I tried Motioneye url (works inside browser) and domoticz url (Also works inside browser) Any ideas?
User avatar
clinkadink
Posts: 417
Joined: Tuesday 31 December 2019 1:15
Target OS: Linux
Domoticz version: 2020.2
Location: Swindon, UK
Contact:

Re: Dashticz IP Cameras - Features, Fixes & Updates

Post by clinkadink »

Trigun wrote: Monday 18 May 2020 13:47 If I may take the liberty to add a suggestion to you great work, I would say; it would be cool to have one big picture that rotates all the cameras every X seconds with a small preview of all camera's in the bottom. if you click on the specific (rotated) image you will see the view you have already created. Nevertheless fantastic setup and definitly something I've been waiting for! Cheers.
I have been working on this for the past few days. It required a complete rewrite of the camera component. Basically, I have implemented a camera carousel, every n seconds it slides to the next camera (in the same viewer). I have improved the camera tray at the bottom of the screen too. Before, each image was a static snapshot, now they are live (refreshing every n seconds). The camera block has also been updated to allow multiple cameras to be added to a single block. This cuts down on a lot of code in CONFIG.js. Obviously, one camera per block is still permitted.

Its in testing at the moment. I hope to release this very soon.
"UI is the saddle, the stirrups, & the reins. UX is the feeling you get being able to ride the horse."
User avatar
clinkadink
Posts: 417
Joined: Tuesday 31 December 2019 1:15
Target OS: Linux
Domoticz version: 2020.2
Location: Swindon, UK
Contact:

Re: Dashticz IP Cameras - Features, Fixes & Updates

Post by clinkadink »

Ierlandfan wrote: Monday 01 June 2020 22:59 When I use the "onpopup" function my camera does not show anything. It keeps saying "loading" and gives a white screen. I tried Motioneye url (works inside browser) and domoticz url (Also works inside browser) Any ideas?
Sorry, I do not know what the "onpopup" function is. Please can you explain?
"UI is the saddle, the stirrups, & the reins. UX is the feeling you get being able to ride the horse."
Ierlandfan
Posts: 89
Joined: Friday 09 October 2015 17:40
Target OS: Linux
Domoticz version:
Contact:

Re: Dashticz IP Cameras - Features, Fixes & Updates

Post by Ierlandfan »

Sure! Whenever switch 338 changes to "On" (And only to On) a popup will show the videostream of the camera. It's a built-in gem of Dashticz.

Here's the block:

Code: Select all

/* Camera popup when roomswitch is triggered */
blocks[338] = {}
blocks[338]['openpopupOn'] = {}
blocks[338]['openpopupOn']['url'] = 'http://192.168.1.102:9999';
blocks[338]['openpopupOn']['auto_close'] = 1200; //seconds
blocks[338]['openpopupOn']['framewidth']= 600; //specific width of the frame
blocks[338]['openpopupOn']['frameheight']= 500;
blocks[338]['openpopupOn']['auto_close'] = 1200; //seconds
User avatar
clinkadink
Posts: 417
Joined: Tuesday 31 December 2019 1:15
Target OS: Linux
Domoticz version: 2020.2
Location: Swindon, UK
Contact:

Re: Dashticz IP Cameras - Features, Fixes & Updates

Post by clinkadink »

Ierlandfan wrote: Friday 05 June 2020 10:04 Sure! Whenever switch 338 changes to "On" (And only to On) a popup will show the videostream of the camera. It's a built-in gem of Dashticz.

Here's the block:
Spoiler: show

Code: Select all

/* Camera popup when roomswitch is triggered */
blocks[338] = {}
blocks[338]['openpopupOn'] = {}
blocks[338]['openpopupOn']['url'] = 'http://192.168.1.102:9999';
blocks[338]['openpopupOn']['auto_close'] = 1200; //seconds
blocks[338]['openpopupOn']['framewidth']= 600; //specific width of the frame
blocks[338]['openpopupOn']['frameheight']= 500;
blocks[338]['openpopupOn']['auto_close'] = 1200; //seconds
I see. That isn't the IP camera component, so i can't help sorry. Perhaps its a CORS or cache issue? I also note that your auto-close is set twice and to 20 minutes, I am not sure if that is intentional.
"UI is the saddle, the stirrups, & the reins. UX is the feeling you get being able to ride the horse."
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest