Page 1 of 2

Dashticz - v.3.4.1 beta

Posted: Saturday 28 March 2020 20:55
by Lokonli
Dashticz v.3.4.1 beta

Release notes: https://dashticz.readthedocs.io/en/beta ... .html#beta

Breaking changes
  • The interval parameter for several blocks have been renamed to 'refresh' to make it consistent with other blocks.
    The refresh parameter indicates the refresh time of frames, buttons, traffic info etc. in seconds (it was sometimes msec)
  • The interface to the functions in custom,js, like getStatus<idx>() and getChange_<idx>() have been changed. See the documentation for a description of the new interface:
    https://dashticz.readthedocs.io/en/beta ... tomjs.html
More detailed update instructions can be found here:
https://dashticz.readthedocs.io/en/beta ... /v341.html

Main changes

Redesign
  • Domoticz blocks: inline blocks. Use idx as parameter in your inline block definition to indicate the block is a domoticz device.
  • You can add a Domoticz device several times with different block parameters. Just define a block with a name of your choice, and add the idx parameter

    Code: Select all

    blocks['myblock'] = {
       idx: 123,
       width:2
    }
    and add 'myblock' to a column definition.
Enhancements
  • Support for showing a graph more than once on the dashboard.
  • Support for RGBWZ devices
  • Omrin garbage company
  • Calendar: Optionally display start time only by setting startonly block parameter
  • New block parameter password to password protect switches, buttons, thermostats, sliders.
  • Filter parameter for the news block. Define as block parameter. Example:

    Code: Select all

      blocks['my_news'] {
        feed: 'http://www.nu.nl/rss/Algemeen',
        filter : '5 items',  // to only show the 5 latest news items, or:
        filter: '2 days',    // to only show news items of the last 2 days, or:
        filter: '1 month',   // to only show news items from last month
      }
    
  • New special block: alarmmeldingen (Dutch). See https://dashticz.readthedocs.io/en/beta ... ingen.html
  • Update other blocks from custom.js functions by calling 'Dashticz.setBlock'. See:
    https://dashticz.readthedocs.io/en/beta ... ther-block

Fixes
  • Requests to Domoticz will not be send via a websocket connection (not reliable)
  • Fix for Evo devices
  • Improved the height adjustment of a news block with inline images
  • Fix for updating devices via getStatus_idx in custom.js
  • Fix for initial update of block defined by getBlock_<idx>() in custom.js

Re: Dashticz - v.3.4.1 beta

Posted: Saturday 28 March 2020 20:59
by Alfagek
Awesome guys :D

Re: Dashticz - v.3.4.1 beta

Posted: Saturday 28 March 2020 22:19
by EdwinK
Great :)

Re: Dashticz - v.3.4.1 beta

Posted: Saturday 28 March 2020 22:58
by Jimster
Good job!

So this must be the reason why the titles of some blocks doesn't work anymore.
I'm trying to figure out how it works when an IDX has 3 blocks and I only want the first block.
Old code:

Code: Select all

blocks[114] = {} 
blocks[114]['width'] = 4;
blocks[114]['title'] = 'Diverse' 
New code:

Code: Select all

blocks['test'] = {
   idx: 114,
   width:4,
   title: 'Diverse'
}
And I changed the column definition from '114' to 'test'. But now I see al 3 blocks instead of only the first one. 'test_1' doesn't work.

Re: Dashticz - v.3.4.1 beta

Posted: Saturday 28 March 2020 23:31
by HansieNL
I used the following code to dim the col-data text if status is off:

Code: Select all

function afterGetDevices(){  
  if (alldevices[6].Data == 'Off') {
    $('.block_6 .col-data').addClass('status-off');
  }
  else {
    $('.block_6 .col-data').removeClass('status-off');
  }
}

Code: Select all

.status-off {
    opacity: 0.4 !important;
}
This is not working anymore. What code do I have to use now to dim the text?

Just found out I have to use:

Code: Select all

function afterGetDevices(){  
  if (Domoticz.getAllDevices()[6].Data == 'Off') {
    $('.block_6 .col-data').addClass('status-off');
  }
  else {
    $('.block_6 .col-data').removeClass('status-off');
  }
}

Re: Dashticz - v.3.4.1 beta

Posted: Saturday 28 March 2020 23:33
by Lokonli
Jimster wrote: Saturday 28 March 2020 22:58 Good job!

So this must be the reason why the titles of some blocks doesn't work anymore.
I'm trying to figure out how it works when an IDX has 3 blocks and I only want the first block.
Old code:

Code: Select all

blocks[114] = {} 
blocks[114]['width'] = 4;
blocks[114]['title'] = 'Diverse' 
New code:

Code: Select all

blocks['test'] = {
   idx: 114,
   width:4,
   title: 'Diverse'
}
And I changed the column definition from '114' to 'test'. But now I see al 3 blocks instead of only the first one. 'test_1' doesn't work.
Try with idx: '114_1'

Re: Dashticz - v.3.4.1 beta

Posted: Sunday 29 March 2020 0:11
by Jimster
Lokonli wrote: Saturday 28 March 2020 23:33
Jimster wrote: Saturday 28 March 2020 22:58 Good job!

So this must be the reason why the titles of some blocks doesn't work anymore.
I'm trying to figure out how it works when an IDX has 3 blocks and I only want the first block.
Old code:

Code: Select all

blocks[114] = {} 
blocks[114]['width'] = 4;
blocks[114]['title'] = 'Diverse' 
New code:

Code: Select all

blocks['test'] = {
   idx: 114,
   width:4,
   title: 'Diverse'
}
And I changed the column definition from '114' to 'test'. But now I see al 3 blocks instead of only the first one. 'test_1' doesn't work.
Try with idx: '114_1'
Yes! Thanks. idx:'114_1' works indeed. Only 114_1 without the ' doesn't work. Why is that?

Re: Dashticz - v.3.4.1 beta

Posted: Sunday 29 March 2020 0:13
by Lokonli

HansieNL wrote:I used the following code to dim the col-data text if status is off:

Code: Select all

function afterGetDevices(){  
  if (alldevices[6].Data == 'Off') {
    $('.block_6 .col-data').addClass('status-off');
  }
  else {
    $('.block_6 .col-data').removeClass('status-off');
  }
}

Code: Select all

.status-off {
    opacity: 0.4 !important;
}
This is not working anymore. What code do I have to use now to dim the text?
Switches automatically get the on and off class attached to them. No need to use aftergetdevices anymore, but just add the following to custom.css:

Code: Select all

.block_6.off .col-data {
  opacity: 0.4 !important 
}

Sent from my SM-A320FL using Tapatalk


Re: Dashticz - v.3.4.1 beta

Posted: Sunday 29 March 2020 0:17
by Lokonli
Jimster wrote:
Lokonli wrote: Saturday 28 March 2020 23:33
Jimster wrote: Saturday 28 March 2020 22:58 Good job!

So this must be the reason why the titles of some blocks doesn't work anymore.
I'm trying to figure out how it works when an IDX has 3 blocks and I only want the first block.
Old code:

Code: Select all

blocks[114] = {} 
blocks[114]['width'] = 4;
blocks[114]['title'] = 'Diverse' 
New code:

Code: Select all

blocks['test'] = {
   idx: 114,
   width:4,
   title: 'Diverse'
}
And I changed the column definition from '114' to 'test'. But now I see al 3 blocks instead of only the first one. 'test_1' doesn't work.
Try with idx: '114_1'
Yes! Thanks. idx:'114_1' works indeed. Only 114_1 without the ' doesn't work. Why is that?
Because 114 is a number, and 114_1 is not. For correct interpretation Javascript requires that this is written like a string, meaning between quotes.


Sent from my SM-A320FL using Tapatalk


Re: Dashticz - v.3.4.1 beta

Posted: Sunday 29 March 2020 1:42
by HansieNL
Lokonli wrote: Sunday 29 March 2020 0:13
HansieNL wrote:I used the following code to dim the col-data text if status is off:

Code: Select all

function afterGetDevices(){  
  if (alldevices[6].Data == 'Off') {
    $('.block_6 .col-data').addClass('status-off');
  }
  else {
    $('.block_6 .col-data').removeClass('status-off');
  }
}

Code: Select all

.status-off {
    opacity: 0.4 !important;
}
This is not working anymore. What code do I have to use now to dim the text?
Switches automatically get the on and off class attached to them. No need to use aftergetdevices anymore, but just add the following to custom.css:

Code: Select all

.block_6.off .col-data {
  opacity: 0.4 !important 
}

Sent from my SM-A320FL using Tapatalk
Thanks. That’s easier than my solution :D

Re: Dashticz - v.3.4.1 beta

Posted: Sunday 29 March 2020 10:48
by Minglarn
Hi, just updated my old Dashtics to 3.4.1 (beta)..
Everything works just fine, but the iframe parameter: scrollbars does not work.

Using following code:

Code: Select all

frames.pi_hole_grap	= {
	width:12, 
	height:255,
	refreshiframe:300000, 
	frameurl: 'php/grap_pihole_today_quieries.php',
	scrollbars: false
};
Am I missing some config setting?

Re: Dashticz - v.3.4.1 beta

Posted: Sunday 29 March 2020 13:35
by Lokonli
Minglarn wrote: Sunday 29 March 2020 10:48 Hi, just updated my old Dashtics to 3.4.1 (beta)..
Everything works just fine, but the iframe parameter: scrollbars does not work.

Using following code:

Code: Select all

frames.pi_hole_grap	= {
	width:12, 
	height:255,
	refreshiframe:300000, 
	frameurl: 'php/grap_pihole_today_quieries.php',
	scrollbars: false
};
Am I missing some config setting?
hmm, it's working on my system.

Can you try scrollbars: true and scrollbars: false with the following block:

Code: Select all

frames.weather = {
    refresh:300,
    height:130,
    frameurl:'http://api.buienradar.nl/image/1.0/RadarMapNL?w=360&h=300',
    width:12,
    scrollbars: false
}
(In your block don't forget to change refreshiframe:300000 to refresh:300)

Re: Dashticz - v.3.4.1 beta

Posted: Sunday 29 March 2020 13:39
by Minglarn
Unfortunately the same result...

Code: Select all

frames.pi_hole_grap = {
    refresh:300,
    height:255,
    frameurl:'http://api.buienradar.nl/image/1.0/RadarMapNL?w=360&h=300',
    width:12,
    scrollbars: false
}

Re: Dashticz - v.3.4.1 beta

Posted: Sunday 29 March 2020 13:44
by Lokonli
Which browser do you use?

Re: Dashticz - v.3.4.1 beta

Posted: Sunday 29 March 2020 13:45
by Lokonli
Did it work with the previous beta and/or master?

Re: Dashticz - v.3.4.1 beta

Posted: Sunday 29 March 2020 13:50
by Minglarn
Using incognito mode chrome (latest).
The Dash I was using is: "version": "2.5.7",

Re: Dashticz - v.3.4.1 beta

Posted: Sunday 29 March 2020 13:53
by HansieNL
I'm trying to change css settings for a calendar, but I don't get the right unique key identifier back.

Code: Select all

var calendars = {}
    calendars.f1 = {
		maxitems: 3,
		key: 'f1_cal',
		image: '../custom/img/f1.png',
		url: 'https://www.f1calendar.com/#!/timezone/Europe-Amsterdam',
		icalurl: 'https://www.f1calendar.com/download/f1-calendar_gp.ics?t=1???????????3',
		// startonly: true
		}
If I inspect the element I get this data-id: data-id="calendars.block_48"

Re: Dashticz - v.3.4.1 beta

Posted: Sunday 29 March 2020 13:56
by Lokonli
Minglarn wrote: Sunday 29 March 2020 13:50 Using incognito mode chrome (latest).
The Dash I was using is: "version": "2.5.7",
On windows or ios?

Re: Dashticz - v.3.4.1 beta

Posted: Sunday 29 March 2020 14:00
by Minglarn
Lokonli wrote: Sunday 29 March 2020 13:56
Minglarn wrote: Sunday 29 March 2020 13:50 Using incognito mode chrome (latest).
The Dash I was using is: "version": "2.5.7",
On windows or ios?
Win 10 Pro.

Re: Dashticz - v.3.4.1 beta

Posted: Sunday 29 March 2020 14:01
by Lokonli
HansieNL wrote: Sunday 29 March 2020 13:53 I'm trying to change css settings for a calendar, but I don't get the right unique key identifier back.

Code: Select all

var calendars = {}
    calendars.f1 = {
		maxitems: 3,
		key: 'f1_cal',
		image: '../custom/img/f1.png',
		url: 'https://www.f1calendar.com/#!/timezone/Europe-Amsterdam',
		icalurl: 'https://www.f1calendar.com/download/f1-calendar_gp.ics?t=1???????????3',
		// startonly: true
		}
If I inspect the element I get this data-id: data-id="calendars.block_48"
This is indeed a bug. I'll analyze.