Dashticz - v.3.4.7 beta

Dashticz, alternative dashboard based on HTML, CSS, jQuery

Moderators: leecollings, htilburgs, robgeerts

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

Dashticz - v.3.4.7 beta

Post by Lokonli »

A new beta release of Dashticz, with as new functionality dials for your EvoHome devices, thermostats and dimmers:
dials9.jpg
dials9.jpg (69.11 KiB) Viewed 1105 times
To enable the dial representation for your device add the type parameter to the block definition as follows:

Code: Select all

blocks['My device'] = {
   idx: 123,
   type: 'dial'
}
For documentation see:
https://dashticz.readthedocs.io/en/beta ... st-changes

Thanks to clinkadink for the dial functionality. For the dedicated 'Dial' topic see:
https://www.domoticz.com/forum/viewtopi ... 67&t=32749
jaaap
Posts: 59
Joined: Sunday 28 July 2019 22:59
Target OS: NAS (Synology & others)
Domoticz version:
Contact:

Re: Dashticz - v.3.4.7 beta

Post by jaaap »

Hi! The new version looks very nice! It also works like a charm on all my android devices...

However, if I try to load it on an apple ipad 3, it loads forever and finally it gives me:

Code: Select all

error loading custom/custom.js
ReferenceError: Can't find variable: Intl at line 11:14
Here's my custom.js file:

Code: Select all

/** afterGetDevices will be called when Dashticz receives any Domoticz device update */
function afterGetDevices(){

   // wasmachine klaar functie

   if(alldevices[35].Status == 'On') {
      $('div.block_35').addClass('wasmachineklaar');
      $('div.block_35').removeClass('invisible');
   }
   else {
      $('div.block_35').removeClass('wasmachineklaar');
      $('div.block_35').addClass('invisible');
   }

   // wasmachine draait functie

   if(alldevices[52].Data == 'Wasmachine draait' || alldevices[52].Data == 'Wasmachine is bijna klaar'){
      $('div.block_52').removeClass('invisible');
      $('div.block_34').addClass('wasdraait');
      $('div.block_35').addClass('invisible');
   }
   else {
      $('div.block_52').addClass('invisible');
      $('div.block_34').removeClass('wasdraait');
      $('div.block_34').addClass('invisible');
   }

   // dakraam open bij regen

   if(alldevices[23].Data != 'Voorlopig blijft het droog!' && alldevices[40].Data == 'Open'){
      $('.block_40').addClass('warning');
      $('div[data-id="dakraamalarm"] .dt_title').addClass('warning');
      $('div[data-id="dakraamalarm"]').removeClass('invisible');
   }
   else {
      $('.block_40').removeClass('warning');
      $('div[data-id="dakraamalarm"] .dt_title').removeClass('warning');
      $('div[data-id="dakraamalarm"]').addClass('invisible');
   }


}


/** getStatus_<idx> will be called when Dashticz receives an update for device <idx>
 * @param {block}
 * 
 */
function getStatus_1(block) {
    var device = block.device;      //The Domoticz device
    var idx = block.idx;            //The block idx, as used in CONFIG.js
    if (device.Status==='On') {
        block.icon = 'fas fa-car';
        block.title = 'Device is on';
        block.addClass = 'myOwnCSSClass'    //The class 'myOwnCSSClass' will be applied
                                            //Define this class in custom.css

        Dashticz.setBlock('123', {          //Example how to redefine another block
            icon:'fas fa-car',
            addClass: 'myOtherCSSClass'
        })                                    
    }
    else {
        block.icon = 'fas fa-bus';
        block.title = '';
        block.addClass = '';
    }
}


// wasmachine klaar functie
//function getStatus_35(idx,value,device){
//   if(device['Status']=='On'){
//      $('div.block_35').addClass('wasmachineklaar');
//      $('div.block_35').removeClass('invisible');
//      $('div.block_34').addClass('invisible');
//   }
//   else {
//      $('div.block_35').removeClass('wasmachineklaar');
//      $('div.block_35').addClass('invisible');
//      $('div.block_34').removeClass('invisible');
//   }
//}

// wasmachine draait functie
//function getStatus_52(idx,value,device){
//   if(device['Data']=='Wasmachine draait' || device['Data']=='Wasmachine is bijna klaar'){
//      $('div.block_34').addClass('wasdraait');
//      $('div.block_35').addClass('invisible');
//   }
//   else {
//      $('div.block_34').removeClass('wasdraait');
//      $('div.block_34').addClass('invisible');
//   }
//}


/** getExtendedBlockTypes will be called to extend the predefined blocktypes
 * As an example a blocktype for the Domoticz device with subtype 'MySubtype' has been added
 * The function MUST return blocktypes as it receives as parameter.
 * For more examples see js/blocktypes.js
 * @param {blocktypes}
 */
function getExtendedBlockTypes(blocktypes){
    blocktypes.SubType['MySubtype'] = {
        icon: 'fas fa-seedling',
        title: '<Name>',
        value: '<Data>+ <Desc>',
    };
    return blocktypes;
}
I hope you can help me get it going. Thanks in advance!
Lokonli
Posts: 2290
Joined: Monday 29 August 2016 22:40
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Dashticz - v.3.4.7 beta

Post by Lokonli »

jaaap wrote: Tuesday 19 May 2020 23:32 Hi! The new version looks very nice! It also works like a charm on all my android devices...

However, if I try to load it on an apple ipad 3, it loads forever and finally it gives me:

Code: Select all

error loading custom/custom.js
ReferenceError: Can't find variable: Intl at line 11:14
Here's my custom.js file:

Code: Select all

/** afterGetDevices will be called when Dashticz receives any Domoticz device update */
function afterGetDevices(){

   // wasmachine klaar functie

   if(alldevices[35].Status == 'On') {
      $('div.block_35').addClass('wasmachineklaar');
      $('div.block_35').removeClass('invisible');
   }
   else {
      $('div.block_35').removeClass('wasmachineklaar');
      $('div.block_35').addClass('invisible');
   }

   // wasmachine draait functie

   if(alldevices[52].Data == 'Wasmachine draait' || alldevices[52].Data == 'Wasmachine is bijna klaar'){
      $('div.block_52').removeClass('invisible');
      $('div.block_34').addClass('wasdraait');
      $('div.block_35').addClass('invisible');
   }
   else {
      $('div.block_52').addClass('invisible');
      $('div.block_34').removeClass('wasdraait');
      $('div.block_34').addClass('invisible');
   }

   // dakraam open bij regen

   if(alldevices[23].Data != 'Voorlopig blijft het droog!' && alldevices[40].Data == 'Open'){
      $('.block_40').addClass('warning');
      $('div[data-id="dakraamalarm"] .dt_title').addClass('warning');
      $('div[data-id="dakraamalarm"]').removeClass('invisible');
   }
   else {
      $('.block_40').removeClass('warning');
      $('div[data-id="dakraamalarm"] .dt_title').removeClass('warning');
      $('div[data-id="dakraamalarm"]').addClass('invisible');
   }


}


/** getStatus_<idx> will be called when Dashticz receives an update for device <idx>
 * @param {block}
 * 
 */
function getStatus_1(block) {
    var device = block.device;      //The Domoticz device
    var idx = block.idx;            //The block idx, as used in CONFIG.js
    if (device.Status==='On') {
        block.icon = 'fas fa-car';
        block.title = 'Device is on';
        block.addClass = 'myOwnCSSClass'    //The class 'myOwnCSSClass' will be applied
                                            //Define this class in custom.css

        Dashticz.setBlock('123', {          //Example how to redefine another block
            icon:'fas fa-car',
            addClass: 'myOtherCSSClass'
        })                                    
    }
    else {
        block.icon = 'fas fa-bus';
        block.title = '';
        block.addClass = '';
    }
}


// wasmachine klaar functie
//function getStatus_35(idx,value,device){
//   if(device['Status']=='On'){
//      $('div.block_35').addClass('wasmachineklaar');
//      $('div.block_35').removeClass('invisible');
//      $('div.block_34').addClass('invisible');
//   }
//   else {
//      $('div.block_35').removeClass('wasmachineklaar');
//      $('div.block_35').addClass('invisible');
//      $('div.block_34').removeClass('invisible');
//   }
//}

// wasmachine draait functie
//function getStatus_52(idx,value,device){
//   if(device['Data']=='Wasmachine draait' || device['Data']=='Wasmachine is bijna klaar'){
//      $('div.block_34').addClass('wasdraait');
//      $('div.block_35').addClass('invisible');
//   }
//   else {
//      $('div.block_34').removeClass('wasdraait');
//      $('div.block_34').addClass('invisible');
//   }
//}


/** getExtendedBlockTypes will be called to extend the predefined blocktypes
 * As an example a blocktype for the Domoticz device with subtype 'MySubtype' has been added
 * The function MUST return blocktypes as it receives as parameter.
 * For more examples see js/blocktypes.js
 * @param {blocktypes}
 */
function getExtendedBlockTypes(blocktypes){
    blocktypes.SubType['MySubtype'] = {
        icon: 'fas fa-seedling',
        title: '<Name>',
        value: '<Data>+ <Desc>',
    };
    return blocktypes;
}
I hope you can help me get it going. Thanks in advance!
Your iPad 3 is using iOS 9?

It seems Intl is not supported on iOS 9 (it's used for some time/date formatting).
We can look for an alternative.
jaaap
Posts: 59
Joined: Sunday 28 July 2019 22:59
Target OS: NAS (Synology & others)
Domoticz version:
Contact:

Re: Dashticz - v.3.4.7 beta

Post by jaaap »

Hi Lokonli,

Thanks for the reply. My iPad is limited to iOS 9 indeed. Apple doesn't support a newer version of iOS unfortunately :-(

How would an alternative look? Can I fix it myself or is it something that could be added in a new version of Dashticz?

EDIT:

The version 3.4.0 of Dashticz works fine on the iPad.
Last edited by jaaap on Wednesday 20 May 2020 21:01, edited 1 time in total.
Lokonli
Posts: 2290
Joined: Monday 29 August 2016 22:40
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Dashticz - v.3.4.7 beta

Post by Lokonli »

We have to change something it Dashticz. I've to investigate whether we can use a different javascript library for the date/time localization. We already use a different library which probably can be used for this, but I've to check the side effects ....
Lokonli
Posts: 2290
Joined: Monday 29 August 2016 22:40
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Dashticz - v.3.4.7 beta

Post by Lokonli »

There are also some issues with IE11 which we are investigating.
toro
Posts: 47
Joined: Wednesday 09 August 2017 23:05
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Dashticz - v.3.4.7 beta

Post by toro »

Very nice, I really love the look of this new dials.
I’m on 3.4.7 now and the dial shows great.

But I'm having a problem with the screens now.
The slide function no longer work and all the screens are placed underneath each other.
So it's one long vertical page now.
I didn’t have the options vertical_scroll and enable_swiper yet. I added them now but it made no difference.

Edit:
Also, the clock isn't showing anymore, and the sunrise and sunset only shows the icons, not the time.
The console shows this error: TypeError: Cannot read property 'split' of undefined, don't know if this is related
Aadr
Posts: 19
Joined: Tuesday 09 June 2015 21:26
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: The Nederlands
Contact:

Re: Dashticz - v.3.4.7 beta

Post by Aadr »

I had the same problem, with the clock and the swipe.
But it was already with v.3.4.6.

I removed some graphs and the problem was gone. I was not able to pinpoint exact what the problem is, but it is related with graphs. I suppose an old graph block.
jaaap
Posts: 59
Joined: Sunday 28 July 2019 22:59
Target OS: NAS (Synology & others)
Domoticz version:
Contact:

Re: Dashticz - v.3.4.7 beta

Post by jaaap »

Version 3.4.8 works perfect on iOS 9. Thanks Lokonli!
toro
Posts: 47
Joined: Wednesday 09 August 2017 23:05
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Dashticz - v.3.4.7 beta

Post by toro »

Aadr wrote: Wednesday 20 May 2020 21:53 I had the same problem, with the clock and the swipe.
But it was already with v.3.4.6.

I removed some graphs and the problem was gone. I was not able to pinpoint exact what the problem is, but it is related with graphs. I suppose an old graph block.
I skipped version 3.4.6, so that's indeed very good possible.
After some debugging I found a problem with a block with a subdevice in config.js
I removed this and it's ok now.
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest