Page 2 of 2
Re: Dashticz - v.3.4.1 beta
Posted: Sunday 29 March 2020 14:32
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'
Re: Dashticz - v.3.4.1 beta
Posted: Sunday 29 March 2020 15:40
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.

Re: Dashticz - v.3.4.1 beta
Posted: Sunday 29 March 2020 16:14
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.
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
Re: Dashticz - v.3.4.1 beta
Posted: Sunday 29 March 2020 21:16
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?
Re: Dashticz - v.3.4.1 beta
Posted: Sunday 29 March 2020 22:01
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.
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...
Re: Dashticz - v.3.4.1 beta
Posted: Sunday 29 March 2020 22:43
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?
Re: Dashticz - v.3.4.1 beta
Posted: Sunday 29 March 2020 23:06
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.
Re: Dashticz - v.3.4.1 beta
Posted: Monday 30 March 2020 1:06
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.
Re: Dashticz - v.3.4.1 beta
Posted: Monday 30 March 2020 8:13
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.
Re: Dashticz - v.3.4.1 beta
Posted: Monday 30 March 2020 17:59
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
Re: Dashticz - v.3.4.1 beta
Posted: Monday 30 March 2020 18:43
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?
Re: Dashticz - v.3.4.1 beta
Posted: Monday 30 March 2020 21:40
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
Re: Dashticz - v.3.4.1 beta
Posted: Monday 30 March 2020 22:30
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?
Apparently this bug was introduced some time ago already.
It's fixed in latest beta.
Re: Dashticz - v.3.4.1 beta
Posted: Monday 30 March 2020 22:32
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?
Re: Dashticz - v.3.4.1 beta
Posted: Tuesday 31 March 2020 0:03
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
Re: Dashticz - v.3.4.1 beta
Posted: Friday 03 April 2020 13:23
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';
}
}
Re: Dashticz - v.3.4.1 beta
Posted: Friday 03 April 2020 13:56
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?
Re: Dashticz - v.3.4.1 beta
Posted: Friday 03 April 2020 15:25
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?
Re: Dashticz - v.3.4.1 beta
Posted: Friday 03 April 2020 16:54
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=' ';
}
}
Re: Dashticz - v.3.4.1 beta
Posted: Friday 03 April 2020 17:05
by Lokonli
ok, thanks for the update!