Dashticz - v.3.4.1 beta

Dashticz, alternative dashboard based on HTML, CSS, jQuery

Moderators: leecollings, htilburgs, robgeerts

Lokonli
Posts: 2290
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"
Fixed in latest beta. I''ve removed the 'calendars.' part as well, so now you will get: data-id='f1_cal'
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 »

Okey, regarding the SCROLLBARS in iframes...

Did some digging into the main.js and found a differance from the old Dashticz code...

At line 912 in latest beta:
html += '<iframe src="' + frame.frameurl + '" style="width:100%;border:0px;height:' + (frame.height - 14) + 'px;" scrolling="no"></iframe>';

In the old code there is no "scrolling". When I removed this part the scrollbars vanished. :D
When you eliminate the impossible, whatever remains, however improbable, must be the truth.” -Spock in Star Trek VI
Lokonli
Posts: 2290
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 15:40 Okey, regarding the SCROLLBARS in iframes...

Did some digging into the main.js and found a differance from the old Dashticz code...

At line 912 in latest beta:
html += '<iframe src="' + frame.frameurl + '" style="width:100%;border:0px;height:' + (frame.height - 14) + 'px;" scrolling="no"></iframe>';

In the old code there is no "scrolling". When I removed this part the scrollbars vanished. :D
Are you sure you are running latest beta? In latest beta the above line is line 20 in components/frame.js

What is the output of 'git remote -v'' ?
Should be something like:

Code: Select all

origin  https://github.com/Dashticz/dashticz (fetch)
origin  https://github.com/Dashticz/dashticz (push)
and 'git status' ?
This should give:

Code: Select all

On branch beta
Your branch is up to date with 'origin/beta'.

nothing to commit, working tree clean
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 »

It look like the thermostat setpoint will not be set in Domoticz set after change in Dashticz.
Someone else has the same problem?
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 »

Lokonli wrote: Sunday 29 March 2020 16:14
Minglarn wrote: Sunday 29 March 2020 15:40 Okey, regarding the SCROLLBARS in iframes...

Did some digging into the main.js and found a differance from the old Dashticz code...

At line 912 in latest beta:
html += '<iframe src="' + frame.frameurl + '" style="width:100%;border:0px;height:' + (frame.height - 14) + 'px;" scrolling="no"></iframe>';

In the old code there is no "scrolling". When I removed this part the scrollbars vanished. :D
Are you sure you are running latest beta? In latest beta the above line is line 20 in components/frame.js

What is the output of 'git remote -v'' ?
Should be something like:

Code: Select all

origin  https://github.com/Dashticz/dashticz (fetch)
origin  https://github.com/Dashticz/dashticz (push)
and 'git status' ?
This should give:

Code: Select all

On branch beta
Your branch is up to date with 'origin/beta'.

nothing to commit, working tree clean
Holy Crap! I did download the Dastichz, but not BETA branch.. Sorry.. Was on the latest stable.. 2.5.11...
When you eliminate the impossible, whatever remains, however improbable, must be the truth.” -Spock in Star Trek VI
Lokonli
Posts: 2290
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 21:16 It look like the thermostat setpoint will not be set in Domoticz set after change in Dashticz.
Someone else has the same problem?
It seems the setpoint gets adjusted. Domoticz shows the adjusted value on the tile, only Domoticz doesn't show the new value in the 'Adjust' (=Aanpassen) screen.

Is this also what you noticed, or do you experience something else?
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 22:43
HansieNL wrote: Sunday 29 March 2020 21:16 It look like the thermostat setpoint will not be set in Domoticz set after change in Dashticz.
Someone else has the same problem?
It seems the setpoint gets adjusted. Domoticz shows the adjusted value on the tile, only Domoticz doesn't show the new value in the 'Adjust' (=Aanpassen) screen.

Is this also what you noticed, or do you experience something else?
What I see is that the setpoint is not ajusted on the Domoticz tile at all.
Blah blah blah
Janco
Posts: 17
Joined: Monday 25 April 2016 10:27
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Dashticz - v.3.4.1 beta

Post by Janco »

Using a device more than once (with the idx parameter) is certainly a welcome addition, but it's not very clear to me whether it applies to all kinds of blocks. I tried it quickly on a switch device and on a sensor device. For the sensor device it worked, for the switch it didn't (I got an empty block).
So the question is: Is it supposed to work for any type of block?

Also, the parameter name is' idx'. Wouldn't it be more consistent to call it 'device', more or less same name as for multiple graphs, where it is called 'devices'?

I wonder if it would be an option to define all blocks, graphs and multigraphs in the same, uniform way, giving it just any name and then defining which device or devices it represents by simple or array parameter. I know it's all still beta, but it's just a thought.
Lokonli
Posts: 2290
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 »

Janco wrote: Monday 30 March 2020 1:06 Using a device more than once (with the idx parameter) is certainly a welcome addition, but it's not very clear to me whether it applies to all kinds of blocks. I tried it quickly on a switch device and on a sensor device. For the sensor device it worked, for the switch it didn't (I got an empty block).
So the question is: Is it supposed to work for any type of block?

Also, the parameter name is' idx'. Wouldn't it be more consistent to call it 'device', more or less same name as for multiple graphs, where it is called 'devices'?

I wonder if it would be an option to define all blocks, graphs and multigraphs in the same, uniform way, giving it just any name and then defining which device or devices it represents by simple or array parameter. I know it's all still beta, but it's just a thought.
Thanks for testing. It should work for any type of block. How did you define your switch block? What is the Domoticz device type?

The 'idx'-property can also be a variable ('v123') or a scene/group ('s123'), so for that reason I thought let's use a different property name.

On the uniform way of block definition: I'm indeed moving into that direction. In fact it's working already for all blocks, except the string blocks (like 'news', 'traffic'). For the string blocks probably I'll start using the 'type' property, since that's being used for blocktitles as well.
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 »

HansieNL wrote: Sunday 29 March 2020 23:06
Lokonli wrote: Sunday 29 March 2020 22:43
HansieNL wrote: Sunday 29 March 2020 21:16 It look like the thermostat setpoint will not be set in Domoticz set after change in Dashticz.
Someone else has the same problem?
It seems the setpoint gets adjusted. Domoticz shows the adjusted value on the tile, only Domoticz doesn't show the new value in the 'Adjust' (=Aanpassen) screen.

Is this also what you noticed, or do you experience something else?
What I see is that the setpoint is not ajusted on the Domoticz tile at all.
FIXED in latest beta
Last edited by HansieNL on Monday 30 March 2020 19:46, edited 1 time in total.
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 »

AS I'm trying out the latest beta i've got a few issues..
One of them is the FLASH option in blocks.

This wont work, it's a pir sensor and when it's activated only the last seen info is changed but no flash of the button.
Am I missing some settings?

Code: Select all

blocks[69] 	= {flash: 5000};
When you eliminate the impossible, whatever remains, however improbable, must be the truth.” -Spock in Star Trek VI
albertomarrod
Posts: 24
Joined: Tuesday 18 April 2017 6:50
Target OS: Raspberry Pi / ODroid
Domoticz version: Latest
Location: Spain
Contact:

Re: Dashticz - v.3.4.1 beta

Post by albertomarrod »

Hi guys!

Maybe you can help me...

I am trying to update to the latest version. I am currently in 3.4.0 beta.

When in do "git pull" on dashticz_v3 folder nothing happens. I am just getting an error and nothing more.

Image:
https://www.imagenes-temporales.com/subidas/ver/BB6Dqn/

Am I doing something wrong? It is not the way to update it?

Thank you in advance
Pi3, latest beta
z-wave (AEOTEC, switches, temhum, pir, contacts, roller shutter),
Pylips, WiFi ping, Mi-Light,
Xiaomi Xiaofang cams, zigbee2mqtt,
dashticz v3
Lokonli
Posts: 2290
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: Monday 30 March 2020 18:43 AS I'm trying out the latest beta i've got a few issues..
One of them is the FLASH option in blocks.

This wont work, it's a pir sensor and when it's activated only the last seen info is changed but no flash of the button.
Am I missing some settings?

Code: Select all

blocks[69] 	= {flash: 5000};
Apparently this bug was introduced some time ago already.

It's fixed in latest beta.
Lokonli
Posts: 2290
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 »

albertomarrod wrote: Monday 30 March 2020 21:40 Hi guys!

Maybe you can help me...

I am trying to update to the latest version. I am currently in 3.4.0 beta.

When in do "git pull" on dashticz_v3 folder nothing happens. I am just getting an error and nothing more.

Image:
https://www.imagenes-temporales.com/subidas/ver/BB6Dqn/

Am I doing something wrong? It is not the way to update it?

Thank you in advance
The link doesn't work. Can you repost?
albertomarrod
Posts: 24
Joined: Tuesday 18 April 2017 6:50
Target OS: Raspberry Pi / ODroid
Domoticz version: Latest
Location: Spain
Contact:

Re: Dashticz - v.3.4.1 beta

Post by albertomarrod »

Lokonli wrote: Monday 30 March 2020 22:32
albertomarrod wrote: Monday 30 March 2020 21:40 Hi guys!

Maybe you can help me...

I am trying to update to the latest version. I am currently in 3.4.0 beta.

When in do "git pull" on dashticz_v3 folder nothing happens. I am just getting an error and nothing more.

Image:
https://www.imagenes-temporales.com/subidas/ver/BB6Dqn/

Am I doing something wrong? It is not the way to update it?

Thank you in advance
The link doesn't work. Can you repost?
It worked, I had to forced the "git pull" after tried it worked.

Thank you anyway =) You did a great job
Pi3, latest beta
z-wave (AEOTEC, switches, temhum, pir, contacts, roller shutter),
Pylips, WiFi ping, Mi-Light,
Xiaomi Xiaofang cams, zigbee2mqtt,
dashticz v3
nfuse
Posts: 32
Joined: Thursday 26 March 2020 11:37
Target OS: -
Domoticz version:
Contact:

Re: Dashticz - v.3.4.1 beta

Post by nfuse »

i'am afraid i need some help with the custom.js code with the last v.3.4.1 beta my custom.js code is not working anymore.
after a lot of trial and error i have some parts working but not as it should. ( i'am not a coder)

old code

Code: Select all

//controller for 4 switch wtw fan

function getStatus_73(idx,value,device){
   if(parseFloat(device['Level'])==30){
      $('div.block_73').removeClass('warninggreen').removeClass('warningblue').addClass('warningred');
   }
   else if(parseFloat(device['Level'])==20){
      $('div.block_73').removeClass('warninggreen').removeClass('warningred').addClass('warningblue');
   } 
   else if(parseFloat(device['Level'])==10){
      $('div.block_73').removeClass('warningblue').removeClass('warningred').addClass('warninggreen');
   }
   else if(parseFloat(device['Level'])==40){
      $('div.block_73').removeClass('warninggreen').removeClass('warningblue').addClass('warningred');
   }
 }

// Watt consumption

function getStatus_15_1(idx,value,device){
   if(parseFloat(device['Usage'])>6500){
      $('div.block_15_1').removeClass('warninggreen').removeClass('warningblue').addClass('warningred');
   }
   else if(parseFloat(device['Usage'])>2000){
      $('div.block_15_1').removeClass('warninggreen').removeClass('warningred').addClass('warningblue');
   } 
   else if(parseFloat(device['Usage'])<2000){
      $('div.block_15_1').removeClass('warningblue').removeClass('warningred').addClass('warninggreen');
   }
 }
 
 // mailbin delivery notification

function getStatus_152(idx,value,device){
	if(device['Data']==""){
		$('div.block_152').removeClass('warningred').addClass('warninggreen');
		blocks['152']['icon'] = 'fas fa-envelope';
		blocks['152']['title'] = 'geen post';	
	}
	
	else if(device['Data']=="er is Post!"){
		$('div.block_152').addClass('warningred').removeClass('warninggreen');
		blocks['152']['icon'] = 'fas fa-envelope-open';
		blocks['152']['title'] = '';	
	}
}
new code

Code: Select all

//controller for 4 switch wtw fan ( how to add multiple entry's in one block this is a 4 switch funtion

function getStatus_20(block, afterupdate){
var idx = block.idx;
var device = block.device;
   if(parseFloat(device['Usage'])>4000){
      block.addClass='warningred';
   }
   else {
      block.addClass='warninggreen';
   }
}

function getStatus_73(block, afterupdate){
var idx = block.idx;
var device = block.device;
   if(parseFloat(device['Level'])==30){
      block.addClass='warningred';
   }
   else {
      block.addClass='warninggreen';
   }
}

// Watt consumption ( i need 3 levels 

// level <0 solar return = green
// level >0 normal usage 0 to 2000 watt
// lever >4000 high usage e.g. (shower is on message)

function getStatus_15_1(block, afterupdate){
var idx = block.idx;
var device = block.device;
   if(parseFloat(device['Usage'])>0){
      block.addClass='warningblue';
   }
   else {
      block.addClass='warninggreen';
   }
}

 // mailbin delivery notification how can i add the icons?

function getStatus_152(block){
var idx = block.idx;
var device = block.device;
   if(device['Data']=="er is Post!"){
      block.addClass='warningred';
	//  block.icon='fas fa-envelope-open'; (option not working
   }
   else {
      block.addClass='warninggreen';
   }
}
docker with sonos http api / mosquitto / zigbee2mqtt assistant / portainer / dashticz / nodeJS on windows with Zigbee2Mqtt, and some flask builds of my own
Lokonli
Posts: 2290
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 »

For block 73 I think you would like it to be as follows:

Code: Select all

function getStatus_73(block, afterupdate){
var idx = block.idx;
var device = block.device;
var level = parseFloat(device['Level']);
   block.addClass='warninggreen'
   if(level>=20){
      block.addClass='warningblue';
   }
   if(level>=30){
      block.addClass='warningred';
   }
}
and for 15_1 something similar:

Code: Select all

function getStatus_15_1(block, afterupdate){
var idx = block.idx;
var device = block.device;
var usage= parseFloat(device['Usage']);
   block.addClass='warninggreen'
   if(usage>=0){
      block.addClass='warningblue';
   }
   if(usage>=2000){
      block.addClass='warningred';
   }
}
For device 152 I read 'option not working' for setting the icon.
This should work. I'll check.

What is your question for device 20?
Lokonli
Posts: 2290
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 »

With my system setting the icon in the getStatus function works as normal.

Device 152 is a normal Domoticz text device?

If you set the icon in the getStatus function, then you should not define an image in the block definition in CONFIG.js
(or set the image in the getStatus function to an empty string as well)

If you open Devtools in Chrome (F12), and you refresh Dashticz, do you then see any error in the Devtools console tab?
nfuse
Posts: 32
Joined: Thursday 26 March 2020 11:37
Target OS: -
Domoticz version:
Contact:

Re: Dashticz - v.3.4.1 beta

Post by nfuse »

Thanks Lokonli exactly what i needed!

no need for device 20 just een alternative i try'd

for option 152 i have it working , i think there was nothing wrong but i made a typo :) the code below is working

Code: Select all

 // mailbin delivery notification

function getStatus_152(block){
var idx = block.idx;
var device = block.device;
   if(device['Data']=="er is Post!"){
      block.addClass='warningred';
	block.icon='fas fa-envelope-open';
   }
   else {
      block.addClass='warninggreen';
	  block.icon='fas fa-envelope';
	  block.title=' ';
   }
}
docker with sonos http api / mosquitto / zigbee2mqtt assistant / portainer / dashticz / nodeJS on windows with Zigbee2Mqtt, and some flask builds of my own
Lokonli
Posts: 2290
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 »

ok, thanks for the update!
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest