Dashticz - v.3.4.1 beta

Dashticz, alternative dashboard based on HTML, CSS, jQuery

Moderators: leecollings, htilburgs, robgeerts

Lokonli
Posts: 2287
Joined: Monday 29 August 2016 22:40
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Dashticz - v.3.4.1 beta

Post 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
Alfagek
Posts: 26
Joined: Sunday 09 February 2020 15:20
Target OS: Raspberry Pi / ODroid
Domoticz version: 2020.1
Location: Leeuwarden
Contact:

Re: Dashticz - v.3.4.1 beta

Post by Alfagek »

Awesome guys :D
User avatar
EdwinK
Posts: 1820
Joined: Sunday 22 January 2017 21:46
Target OS: Raspberry Pi / ODroid
Domoticz version: BETA
Location: Rhoon
Contact:

Re: Dashticz - v.3.4.1 beta

Post by EdwinK »

Great :)
Running latest BETA on a Pi-3 | Toon® Thermostat (rooted) | Hue | Tuya | IKEA tradfri | Dashticz V3 on Lenovo Huawei Tablet | Conbee
Jimster
Posts: 82
Joined: Tuesday 04 February 2020 11:42
Target OS: Raspberry Pi / ODroid
Domoticz version: 2020.2
Location: The Netherlands
Contact:

Re: Dashticz - v.3.4.1 beta

Post 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.
User avatar
HansieNL
Posts: 964
Joined: Monday 28 September 2015 15:13
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Dashticz - v.3.4.1 beta

Post 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');
  }
}
Last edited by HansieNL on Sunday 29 March 2020 0:09, edited 1 time in total.
Blah blah blah
Lokonli
Posts: 2287
Joined: Monday 29 August 2016 22:40
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Dashticz - v.3.4.1 beta

Post 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'
Jimster
Posts: 82
Joined: Tuesday 04 February 2020 11:42
Target OS: Raspberry Pi / ODroid
Domoticz version: 2020.2
Location: The Netherlands
Contact:

Re: Dashticz - v.3.4.1 beta

Post 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?
Lokonli
Posts: 2287
Joined: Monday 29 August 2016 22:40
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Dashticz - v.3.4.1 beta

Post 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

Lokonli
Posts: 2287
Joined: Monday 29 August 2016 22:40
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Dashticz - v.3.4.1 beta

Post 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

User avatar
HansieNL
Posts: 964
Joined: Monday 28 September 2015 15:13
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Dashticz - v.3.4.1 beta

Post 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
Blah blah blah
User avatar
Minglarn
Posts: 214
Joined: Friday 21 August 2015 19:27
Target OS: Raspberry Pi / ODroid
Domoticz version: v3.8153
Location: Stockholm / Sweden
Contact:

Re: Dashticz - v.3.4.1 beta

Post 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?
Attachments
iframe.JPG
iframe.JPG (39.62 KiB) Viewed 1749 times
When you eliminate the impossible, whatever remains, however improbable, must be the truth.” -Spock in Star Trek VI
Lokonli
Posts: 2287
Joined: Monday 29 August 2016 22:40
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Dashticz - v.3.4.1 beta

Post 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)
User avatar
Minglarn
Posts: 214
Joined: Friday 21 August 2015 19:27
Target OS: Raspberry Pi / ODroid
Domoticz version: v3.8153
Location: Stockholm / Sweden
Contact:

Re: Dashticz - v.3.4.1 beta

Post 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
}
Attachments
iframe2.JPG
iframe2.JPG (36.78 KiB) Viewed 1719 times
When you eliminate the impossible, whatever remains, however improbable, must be the truth.” -Spock in Star Trek VI
Lokonli
Posts: 2287
Joined: Monday 29 August 2016 22:40
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Dashticz - v.3.4.1 beta

Post by Lokonli »

Which browser do you use?
Lokonli
Posts: 2287
Joined: Monday 29 August 2016 22:40
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Dashticz - v.3.4.1 beta

Post by Lokonli »

Did it work with the previous beta and/or master?
User avatar
Minglarn
Posts: 214
Joined: Friday 21 August 2015 19:27
Target OS: Raspberry Pi / ODroid
Domoticz version: v3.8153
Location: Stockholm / Sweden
Contact:

Re: Dashticz - v.3.4.1 beta

Post by Minglarn »

Using incognito mode chrome (latest).
The Dash I was using is: "version": "2.5.7",
Attachments
iframe3.JPG
iframe3.JPG (43.84 KiB) Viewed 1712 times
When you eliminate the impossible, whatever remains, however improbable, must be the truth.” -Spock in Star Trek VI
User avatar
HansieNL
Posts: 964
Joined: Monday 28 September 2015 15:13
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Dashticz - v.3.4.1 beta

Post 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"
Blah blah blah
Lokonli
Posts: 2287
Joined: Monday 29 August 2016 22:40
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Dashticz - v.3.4.1 beta

Post 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?
User avatar
Minglarn
Posts: 214
Joined: Friday 21 August 2015 19:27
Target OS: Raspberry Pi / ODroid
Domoticz version: v3.8153
Location: Stockholm / Sweden
Contact:

Re: Dashticz - v.3.4.1 beta

Post 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.
When you eliminate the impossible, whatever remains, however improbable, must be the truth.” -Spock in Star Trek VI
Lokonli
Posts: 2287
Joined: Monday 29 August 2016 22:40
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Dashticz - v.3.4.1 beta

Post 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.
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest