Dashticz V3.4.2 beta

Dashticz, alternative dashboard based on HTML, CSS, jQuery

Moderators: leecollings, htilburgs, robgeerts

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 V3.4.2 beta

Post by clinkadink »

I have responded on the 'corona block' thread.
https://www.domoticz.com/forum/viewtopi ... 21#p242221
"UI is the saddle, the stirrups, & the reins. UX is the feeling you get being able to ride the horse."
Lokonli
Posts: 2287
Joined: Monday 29 August 2016 22:40
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Dashticz V3.4.2 beta

Post by Lokonli »

geertvercamer wrote: Friday 03 April 2020 18:13 you're welcome.
Glad to learn something new.

new beta: the title of those blocks is gone
Did you define the subblocks in CONFIG.js?

That might have been solved in the most recent beta.
If not, can you post your CONFIG.js parts for this block? (the block and column definition)
alarm_guy1
Posts: 132
Joined: Tuesday 14 January 2014 0:03
Target OS: Linux
Domoticz version:
Contact:

Re: Dashticz V3.4.2 beta

Post by alarm_guy1 »

Hi just tried this Corona graph, and works gine on my pc but I am unable to view in my Ipad, I have it on the 3rd screen and just get a blank screen nothing just my selected backgrouns. it is an old ipad V3 running 9.35 any help cheers
toro
Posts: 47
Joined: Wednesday 09 August 2017 23:05
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Dashticz V3.4.2 beta

Post by toro »

Scene behaving strange.

I have a scene which turns off 8 lights.
If one or more lights are ON, the scene turns ON
Clicking the scene, the scene and all the lights turn off.
This is what happens in Domoticz, and in the Master version of Dashticz.

In 4.3.2 however, this happens:
If I turn on a light, only the light button turns on.
If I then click the scene button, the light is turned OFF, but the scene turns ON
If I refresh the page (F5) the scene is OFF.
Also, if the light is ON and the scene stays OFF, after F5 the scene is turned ON.
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 V3.4.2 beta

Post by Jimster »

I noticed the temps of my temp sensors are not updating. Only when I reload the page they update. Don't know if this was already like this in the previous beta.
Other sensors like power usage works fine.
Am I doing something wrong?
Lokonli
Posts: 2287
Joined: Monday 29 August 2016 22:40
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Dashticz V3.4.2 beta

Post by Lokonli »

I'll check the scenes and the temp sensors
Lokonli
Posts: 2287
Joined: Monday 29 August 2016 22:40
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Dashticz V3.4.2 beta

Post by Lokonli »

For the scenes/groups: Domoticz only sends a status update if the group/scene itself is clicked, not when one or more devices get a new state.

I'll think of a workaround.
jake
Posts: 742
Joined: Saturday 30 May 2015 22:40
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Contact:

Re: Dashticz V3.4.2 beta

Post by jake »

As of 3.4.2 the configuration of 'units' doesn't work anymore. I don't find it back (anymore) either in the documentation.

Somewher in 2018 this feature was introduced

Code: Select all

config['units'] = {
names: {
kwh: 'kWh',
watt: 'W',
gas: 'm3',
water: 'l',
time: ''
},
decimals: {
kwh: 1,
watt: 0,
gas: 1,
water: 0,
time: 0
}
However, in 3.4.2 I have 2 different results in 2 blocks:

1:
blocks['142_1'] = {}
blocks['142_1']['width'] = 4;
blocks['142_1']['title'] = 'Usage' //power in Watt 'Smart Meter P1'
blocks['142_1']['unit'] = 'Watt;W';

It now shows as 100 W Watt;W (when I remove the last line about 'units', it shows as 100 Watt (instead of 'W'))

2:
blocks['240_1'] = {}
blocks['240_1']['width'] = 4;
blocks['240_1']['title'] = 'Harvested'; //power in Watt 'Solar Total Power'
blocks['240_1']['icon'] = 'fas fa-sun';

It shows as 100W (this is as it is wanted)

So, my 142 P1 meter doesn't seem to be recognized equal as the virtual device 240

1:How can I get both devices recognized the same, both showing the unit 'W'?
2:To show from a distance when electricity usage is negative (more solar power than consumption) I made the background of the block green in custom.js. This doesn't work anymore, but it shows a '-' minus sign when there is a negative usage. What has changed?

Custom.js:

Code: Select all

function getStatus_142_1(idx,value,device){ //P1-smart meter: electricity usage
 if(parseFloat(device['UsageDeliv'])>0){
 $('div.block_142_1').addClass('background_green');
 }
 else {
 $('div.block_142_1').removeClass('background_green');
 }
 }
Lokonli
Posts: 2287
Joined: Monday 29 August 2016 22:40
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Dashticz V3.4.2 beta

Post by Lokonli »

Lokonli wrote: Sunday 05 April 2020 19:47 For the scenes/groups: Domoticz only sends a status update if the group/scene itself is clicked, not when one or more devices get a new state.

I'll think of a workaround.
Fixed in latest beta
(actively pulling group/scene status)
Alfagek
Posts: 26
Joined: Sunday 09 February 2020 15:20
Target OS: Raspberry Pi / ODroid
Domoticz version: 2020.1
Location: Leeuwarden
Contact:

Re: Dashticz V3.4.2 beta

Post by Alfagek »

jake wrote: 2:To show from a distance when electricity usage is negative (more solar power than consumption) I made the background of the block green in custom.js. This doesn't work anymore, but it shows a '-' minus sign when there is a negative usage. What has changed?

Custom.js:

Code: Select all

function getStatus_142_1(idx,value,device){ //P1-smart meter: electricity usage
 if(parseFloat(device['UsageDeliv'])>0){
 $('div.block_142_1').addClass('background_green');
 }
 else {
 $('div.block_142_1').removeClass('background_green');
 }
 }
Look at this Jake. There were a few changes: https://dashticz.readthedocs.io/en/bloc ... -idx-block


Verzonden vanaf mijn iPhone met Tapatalk
Lokonli
Posts: 2287
Joined: Monday 29 August 2016 22:40
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Dashticz V3.4.2 beta

Post by Lokonli »

jake wrote: Sunday 05 April 2020 20:04 As of 3.4.2 the configuration of 'units' doesn't work anymore. I don't find it back (anymore) either in the documentation.

Somewher in 2018 this feature was introduced

Code: Select all

config['units'] = {
names: {
kwh: 'kWh',
watt: 'W',
gas: 'm3',
water: 'l',
time: ''
},
decimals: {
kwh: 1,
watt: 0,
gas: 1,
water: 0,
time: 0
}
However, in 3.4.2 I have 2 different results in 2 blocks:

1:
blocks['142_1'] = {}
blocks['142_1']['width'] = 4;
blocks['142_1']['title'] = 'Usage' //power in Watt 'Smart Meter P1'
blocks['142_1']['unit'] = 'Watt;W';

It now shows as 100 W Watt;W (when I remove the last line about 'units', it shows as 100 Watt (instead of 'W'))

2:
blocks['240_1'] = {}
blocks['240_1']['width'] = 4;
blocks['240_1']['title'] = 'Harvested'; //power in Watt 'Solar Total Power'
blocks['240_1']['icon'] = 'fas fa-sun';

It shows as 100W (this is as it is wanted)

So, my 142 P1 meter doesn't seem to be recognized equal as the virtual device 240

1:How can I get both devices recognized the same, both showing the unit 'W'?
2:To show from a distance when electricity usage is negative (more solar power than consumption) I made the background of the block green in custom.js. This doesn't work anymore, but it shows a '-' minus sign when there is a negative usage. What has changed?

Custom.js:

Code: Select all

function getStatus_142_1(idx,value,device){ //P1-smart meter: electricity usage
 if(parseFloat(device['UsageDeliv'])>0){
 $('div.block_142_1').addClass('background_green');
 }
 else {
 $('div.block_142_1').removeClass('background_green');
 }
 }
I'll look into the units, but it will take some time to fix.

For the P1 meter: There was a request to present the value as a negative number in case of energy delivery, which I have implemented.

For the background color, add something like this in custom.js (the interface of the function slightly changed)

Code: Select all

function getStatus_142_1(block) {
	if(parseInt(block.device.UsageDeliv)>0 ) {
		block.addClass= 'background_green'
	}
	else
		block.addClass=''
}
toro
Posts: 47
Joined: Wednesday 09 August 2017 23:05
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Dashticz V3.4.2 beta

Post by toro »

Lokonli wrote: Sunday 05 April 2020 20:15
Lokonli wrote: Sunday 05 April 2020 19:47 For the scenes/groups: Domoticz only sends a status update if the group/scene itself is clicked, not when one or more devices get a new state.

I'll think of a workaround.
Fixed in latest beta
(actively pulling group/scene status)
Wow, that's fast.
I've tested it and it seems to be working fine now.
Thank you so much!!
Lokonli
Posts: 2287
Joined: Monday 29 August 2016 22:40
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Dashticz V3.4.2 beta

Post by Lokonli »

Good to hear it's fixed.
jake
Posts: 742
Joined: Saturday 30 May 2015 22:40
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Contact:

Re: Dashticz V3.4.2 beta

Post by jake »


Lokonli wrote:
jake wrote: Sunday 05 April 2020 20:04 As of 3.4.2 the configuration of 'units' doesn't work anymore. I don't find it back (anymore) either in the documentation.

Somewher in 2018 this feature was introduced

Code: Select all

config['units'] = {
names: {
kwh: 'kWh',
watt: 'W',
gas: 'm3',
water: 'l',
time: ''
},
decimals: {
kwh: 1,
watt: 0,
gas: 1,
water: 0,
time: 0
}
However, in 3.4.2 I have 2 different results in 2 blocks:

1:
blocks['142_1'] = {}
blocks['142_1']['width'] = 4;
blocks['142_1']['title'] = 'Usage' //power in Watt 'Smart Meter P1'
blocks['142_1']['unit'] = 'Watt;W';

It now shows as 100 W Watt;W (when I remove the last line about 'units', it shows as 100 Watt (instead of 'W'))

2:
blocks['240_1'] = {}
blocks['240_1']['width'] = 4;
blocks['240_1']['title'] = 'Harvested'; //power in Watt 'Solar Total Power'
blocks['240_1']['icon'] = 'fas fa-sun';

It shows as 100W (this is as it is wanted)

So, my 142 P1 meter doesn't seem to be recognized equal as the virtual device 240

1:How can I get both devices recognized the same, both showing the unit 'W'?
I'll look into the units, but it will take some time to fix.
You mean implementing the 'units' again, or straighting out the issue that one blocks says 'W' and the next 'Watt'?
For the P1 meter: There was a request to present the value as a negative number in case of energy delivery, which I have implemented.

For the background color, add something like this in custom.js (the interface of the function slightly changed)

Code: Select all

function getStatus_142_1(block) {
	if(parseInt(block.device.UsageDeliv)>0 ) {
		block.addClass= 'background_green'
	}
	else
		block.addClass=''
}
Yes, this worked nice. I tried to build on to this example to upgrade my 2nd background thing as well. This one is slightly more complex, because I update the background color of block 321_1, based on status of block 79 (this is to color the gasmeter value red when the OTGWdevice 'central heater' is 'on'), but it doesn't do anything, although it used to do before:

Code: Select all

 function getStatus_79(block) {
	if(block.device.Status == 'Off' ) { //switch: Central Heating ON
		'block_321_1'.addClass= 'background_red';
	}
	else
		'block_321_1'.addClass='';
}
Original code:

Code: Select all

  function getStatus_79(idx,value,device){ //switch: Central Heating ON
 if(device['Status']=='On'){
 $('div.block_321_1').addClass('background_red'); //gas usage: Central Heating
 }
 else {
 $('div.block_321_1').removeClass('background_red');
 }
 }
Lokonli
Posts: 2287
Joined: Monday 29 August 2016 22:40
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Dashticz V3.4.2 beta

Post by Lokonli »

Because of the inline block definitions and the possibility to add domoticz IDs with different settings more than once I had to refactor the code significantly.
But the good news: I've added a function call to set the block parameters of a different block as well.
See https://dashticz.readthedocs.io/en/beta ... ther-block for an example.

In your case:

Code: Select all

function getStatus_79(block) {
	if(block.device.Status == 'Off' ) { //switch: Central Heating ON 
               Dashticz.setBlock('321_1', {
                  addClass: 'background_red'
            });
	}
	else
               Dashticz.setBlock('321_1', {
                  addClass: ''
            });
}
I think you must have explicitly added '321_1' to a column. I'm not sure whether it works if you've added '321'
Let me know :)

Further, you might have to replace Off with On in the above function.
jake
Posts: 742
Joined: Saturday 30 May 2015 22:40
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Contact:

Re: Dashticz V3.4.2 beta

Post by jake »


Lokonli wrote:Because of the inline block definitions and the possibility to add domoticz IDs with different settings more than once I had to refactor the code significantly.
But the good news: I've added a function call to set the block parameters of a different block as well.
See https://dashticz.readthedocs.io/en/beta ... ther-block for an example.

In your case:

Code: Select all

function getStatus_79(block) {
	if(block.device.Status == 'Off' ) { //switch: Central Heating ON 
               Dashticz.setBlock('321_1', {
                  addClass: 'background_red'
            });
	}
	else
               Dashticz.setBlock('321_1', {
                  addClass: ''
            });
}
I think you must have explicitly added '321_1' to a column. I'm not sure whether it works if you've added '321'
Let me know :)

Further, you might have to replace Off with On in the above function.
Correct, correct:

I had seen the example, but since it manipulated a title and icon, I didn't know how or if it could manipulate the background as well.
Yes, I already had 321_1 defined, because I had it working in previous versions
Yes, I meant 'On', but I used 'Off' while playing with the code. Good catch!
Lokonli
Posts: 2287
Joined: Monday 29 August 2016 22:40
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Dashticz V3.4.2 beta

Post by Lokonli »

The addClass block parameter is new, and pretty convenient for this kind of use case.
madradrakie
Posts: 64
Joined: Wednesday 11 September 2019 21:24
Target OS: -
Domoticz version:
Contact:

Re: Dashticz V3.4.2 beta

Post by madradrakie »

after the update to 3.4.2 my custom.js functions are not working anymore. Maybe i missed something and the code changed?

These are my functions:

Code: Select all

function getStatus_84(idx,value,device){ 
	if(device['Status']=='Open'){
		$('div.block_84').addClass('warning');
		blocks['84']['icon'] = 'fas fa-door-open';
	}
	else {
		$('div.block_84').removeClass('warning');
		blocks['84']['icon'] = 'fas fa-door-closed';
	}
}
and

Code: Select all

function getStatus_413(idx,value,device){ 
   if(parseFloat(device['Usage'])>0){
      blocks['413_1']['icon'] = 'fas fa-sun slow-spin'; //if you use "fa-spin" instead of "slow-spin" then it is not necessary to add code to custom.css
      blocks['413_2']['icon'] = 'fas fa-sun slow-spin'; //if you use "fa-spin" instead of "slow-spin" then it is not necessary to add code to custom.css
      blocks['413_3']['icon'] = 'fas fa-sun slow-spin'; //if you use "fa-spin" instead of "slow-spin" then it is not necessary to add code to custom.css

   }
   else {
      blocks['413_1']['icon'] = 'fas fa-sun'; 
      blocks['413_2']['icon'] = 'fas fa-sun';
      blocks['413_3']['icon'] = 'fas fa-sun';
   }
}


function getStatus_76_1(idx,value,device){ 
   if(parseFloat(device['Usage'])>0){
      blocks['76_1']['icon'] = 'fas fa-bolt';
       }
   else {
      blocks['76_1']['icon'] = 'fas fa-sun slow-spin'; //if you use "fa-spin" instead of "slow-spin" then it is not necessary to add code to custom.css

   }
}
any idea? I hope someone can help me!
Lokonli
Posts: 2287
Joined: Monday 29 August 2016 22:40
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Dashticz V3.4.2 beta

Post by Lokonli »

Please check a few posts earlier, and read:
https://dashticz.readthedocs.io/en/beta ... fterupdate
madradrakie
Posts: 64
Joined: Wednesday 11 September 2019 21:24
Target OS: -
Domoticz version:
Contact:

Re: Dashticz V3.4.2 beta

Post by madradrakie »

thanks, probably i missed something :-)
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest