Page 9 of 28

Re: Dashticz - Bug report

Posted: Thursday 10 August 2017 15:39
by robgeerts
gielie wrote: Thursday 10 August 2017 15:34 HI Rob,

The following code doesn't work anymore in the latest beta.

Code: Select all

function getBlock_6(device,idx){ 
   $('.block_'+idx);
   var html='';
   html+='<div class="col-xs-4 col-icon">';
      if(device['Status']=='Off') html+='<img src="img/cust_away.png" class="off icon" />';
      else html+='<img src="img/cust_home.png" class="on icon" />';
   html+='</div>';
   html+='<div class="col-xs-8 col-data">';
   html+='<strong class="title">'+device['Name']+'</strong><br />';
   if(device['Status']=='Off') html+='<span class="state">AFWEZIG</span>';
   else html+='<span class="state">AANWEZIG</span>';
 
   if((_SHOW_LASTUPDATE && (typeof(blocks[idx])=='undefined' || typeof(blocks[idx]['hide_lastupdate'])=='undefined' || blocks[idx]['hide_lastupdate']===false)) || (!_SHOW_LASTUPDATE && (typeof(blocks[idx])!=='undefined' && typeof(blocks[idx]['show_lastupdate'])!=='undefined' && blocks[idx]['show_lastupdate']==true))  ){
          html+='<br /><span class="lastupdate">'+moment(device['LastUpdate']).format(_LASTUPDATE_FORMAT)+'</span>';
   }
   html+='</div>';
   return html;
}
Its the presence switch with is no a on/off again instead of a aan/afwezig.
Can you fix this?
Replace code with:

Code: Select all

function getBlock_117(device,idx,result){ 
   var html='';
   html+='<div class="col-xs-4 col-icon">';
      if(device['Status']=='Off') html+='<img src="img/cust_away.png" class="off icon" />';
      else html+='<img src="img/cust_home.png" class="on icon" />';
   html+='</div>';
   html+='<div class="col-xs-8 col-data">';
   html+='<strong class="title">'+device['Name']+'</strong><br />';
   if(device['Status']=='Off') html+='<span class="state">AFWEZIG</span>';
   else html+='<span class="state">AANWEZIG</span>';
 
   
	if((settings['last_update']==1 && (typeof(blocks[idx])=='undefined' || typeof(blocks[idx]['hide_lastupdate'])=='undefined' || blocks[idx]['hide_lastupdate']===false)) || 
	(settings['last_update']==0 && (typeof(blocks[idx])!=='undefined' && typeof(blocks[idx]['show_lastupdate'])!=='undefined' && blocks[idx]['show_lastupdate']==true)) 
	){
		html+='<br /><span class="lastupdate">'+moment(device['LastUpdate']).format(settings['timeformat'])+'</span>';
	}
   html+='</div>';
   return html;
}
:)

Re: Dashticz - Bug report

Posted: Friday 11 August 2017 8:15
by Blueone
robgeerts wrote: Tuesday 08 August 2017 22:43 Yes, thats the plugin I use to show a colorpicker..
Is it maybe possible to have an option to disable the RGB functionallity for the being? :)

Re: Dashticz - Bug report

Posted: Friday 11 August 2017 9:25
by robgeerts
Well not everyone has this problem, depending on the device Dashticz is running on...
I will check if theres another colorpicker-plugin I can use.

Re: Dashticz - Bug report

Posted: Friday 11 August 2017 14:40
by gielie
robgeerts wrote: Thursday 10 August 2017 15:39
gielie wrote: Thursday 10 August 2017 15:34 HI Rob,

The following code doesn't work anymore in the latest beta.

Code: Select all

function getBlock_6(device,idx){ 
   $('.block_'+idx);
   var html='';
   html+='<div class="col-xs-4 col-icon">';
      if(device['Status']=='Off') html+='<img src="img/cust_away.png" class="off icon" />';
      else html+='<img src="img/cust_home.png" class="on icon" />';
   html+='</div>';
   html+='<div class="col-xs-8 col-data">';
   html+='<strong class="title">'+device['Name']+'</strong><br />';
   if(device['Status']=='Off') html+='<span class="state">AFWEZIG</span>';
   else html+='<span class="state">AANWEZIG</span>';
 
   if((_SHOW_LASTUPDATE && (typeof(blocks[idx])=='undefined' || typeof(blocks[idx]['hide_lastupdate'])=='undefined' || blocks[idx]['hide_lastupdate']===false)) || (!_SHOW_LASTUPDATE && (typeof(blocks[idx])!=='undefined' && typeof(blocks[idx]['show_lastupdate'])!=='undefined' && blocks[idx]['show_lastupdate']==true))  ){
          html+='<br /><span class="lastupdate">'+moment(device['LastUpdate']).format(_LASTUPDATE_FORMAT)+'</span>';
   }
   html+='</div>';
   return html;
}
Its the presence switch with is no a on/off again instead of a aan/afwezig.
Can you fix this?
Replace code with:

Code: Select all

function getBlock_117(device,idx,result){ 
   var html='';
   html+='<div class="col-xs-4 col-icon">';
      if(device['Status']=='Off') html+='<img src="img/cust_away.png" class="off icon" />';
      else html+='<img src="img/cust_home.png" class="on icon" />';
   html+='</div>';
   html+='<div class="col-xs-8 col-data">';
   html+='<strong class="title">'+device['Name']+'</strong><br />';
   if(device['Status']=='Off') html+='<span class="state">AFWEZIG</span>';
   else html+='<span class="state">AANWEZIG</span>';
 
   
	if((settings['last_update']==1 && (typeof(blocks[idx])=='undefined' || typeof(blocks[idx]['hide_lastupdate'])=='undefined' || blocks[idx]['hide_lastupdate']===false)) || 
	(settings['last_update']==0 && (typeof(blocks[idx])!=='undefined' && typeof(blocks[idx]['show_lastupdate'])!=='undefined' && blocks[idx]['show_lastupdate']==true)) 
	){
		html+='<br /><span class="lastupdate">'+moment(device['LastUpdate']).format(settings['timeformat'])+'</span>';
	}
   html+='</div>';
   return html;
}
:)
Thanks for the help but the code doesn't work, when i switch back to the master the old code works great, thus only in the beta it doesn't work.

Re: Dashticz - Bug report

Posted: Friday 11 August 2017 14:52
by robgeerts
Wich master, the current one or an old one you have?

Re: Dashticz - Bug report

Posted: Friday 11 August 2017 17:53
by freakshock
robgeerts wrote: Friday 11 August 2017 9:25 Well not everyone has this problem, depending on the device Dashticz is running on...
I will check if theres another colorpicker-plugin I can use.
I had the same problem with the dashboard becoming unresponsive.
I could see the seconds of the clock freezing a few seconds and then unfreezing again.
This problem only occured on my android tablet (fully kiosk browser).
On Windows/Chrome I did not have this problem.

I removed the RGB lamps as a test and voila, dashboard fully responsive on the android tablet.
I'll try blocking out the RGB color picker element in custom css for now when I have time to find the code. Unless someone can already tell me the custom css? ;)

EDIT: Rob temporarily removed the RGB colorpicker in the latest beta, so that's a solution for the performance issues until a better solution is found!

Re: Dashticz - Bug report

Posted: Monday 14 August 2017 15:16
by gielie
I still have a problem with the aan/afwezig code, can't figure out why its not working.

Code: Select all

//Thuis
function getBlock_536(device,idx){ 
   $('.block_'+idx);
   var html='';
   html+='<div class="col-xs-4 col-icon">';
      if(device['Status']=='Off') html+=iconORimage(idx,'fa-toggle-off','','off icon');
      else html+=iconORimage(idx,'fa-toggle-on','','on icon');
   html+='</div>';
   html+='<div class="col-xs-8 col-data">';
   html+='<strong class="title">'+device['Name']+'</strong><br />';
   if(device['Status']=='Off') html+='<span class="state">Niet op AMC</span>';
   else html+='<span class="state">Op AMC</span>';

   if((_SHOW_LASTUPDATE && (typeof(blocks[idx])=='undefined' || typeof(blocks[idx]['hide_lastupdate'])=='undefined' || blocks[idx]['hide_lastupdate']===false)) || (!_SHOW_LASTUPDATE && (typeof(blocks[idx])!=='undefined' && typeof(blocks[idx]['show_lastupdate'])!=='undefined' && blocks[idx]['show_lastupdate']==true))  ){
          html+='<br /><span class="lastupdate">'+moment(device['LastUpdate']).format(_LASTUPDATE_FORMAT)+'</span>';
   }
   html+='</div>';
   return html;
}
i changed my code with some tips of Rob but still it doesn't work, above my original code which worked fine some time ago.

Re: Dashticz - Bug report

Posted: Monday 14 August 2017 21:07
by robgeerts
Did you triple check the idx (536) ??

Re: Dashticz - Bug report

Posted: Tuesday 15 August 2017 9:01
by gielie
robgeerts wrote: Monday 14 August 2017 21:07 Did you triple check the idx (536) ??
Yes i did, if I use the code you suggested it kinda works, 1 thing that doesn't work is the custom icon I use, when I change the icon, like I did with the previous code, it suddenly doesn't work anymore. So I've been combining your new code with my own changes with no luck. I'm not much of coder, so it's just trial and error for me.

Re: Dashticz - Bug report

Posted: Tuesday 15 August 2017 9:30
by robgeerts
Ok, show me what you've changed.
Although, you should not change to much to my example, because for example: '_SHOW_LASTUPDATE' doesnt work anymore and has been changed...

What did you try to change for the custom icon?

Thanks for your donation!
Appreciate it!

Re: Dashticz - Bug report

Posted: Tuesday 15 August 2017 15:38
by gielie
Ok after a lot of trial and error i started from scratch, and its working again. I changed the icon part so now i can simply change the on/off icon.

this is my final code

Code: Select all

//thuis
function getBlock_63(device,idx,result){ 
   var html='';
   html+='<div class="col-xs-4 col-icon">';
      if(device['Status']=='Off') html+=iconORimage(idx,'fa-toggle-off','','off icon');
      else html+=iconORimage(idx,'fa-toggle-on','','on icon');
   html+='</div>';
   html+='<div class="col-xs-8 col-data">';
   html+='<strong class="title">'+device['Name']+'</strong><br />';
   if(device['Status']=='Off') html+='<span class="state">AFWEZIG</span>';
   else html+='<span class="state">AANWEZIG</span>';
 
   
    if((settings['last_update']==1 && (typeof(blocks[idx])=='undefined' || typeof(blocks[idx]['hide_lastupdate'])=='undefined' || blocks[idx]['hide_lastupdate']===false)) || 
    (settings['last_update']==0 && (typeof(blocks[idx])!=='undefined' && typeof(blocks[idx]['show_lastupdate'])!=='undefined' && blocks[idx]['show_lastupdate']==true)) 
    ){
	html+='<br /><span class="lastupdate">'+moment(device['LastUpdate']).format(settings['timeformat'])+'</span>';
    }
   html+='</div>';
   return html;
}
thank for the help.

Re: Dashticz - Bug report

Posted: Tuesday 15 August 2017 20:14
by dutchdevil83
Have done the latest beta update and now my energy blocks give some "undefined" with total usage blocks for gas/energy.

Is there someway to fix this?

Re: Dashticz - Bug report

Posted: Wednesday 16 August 2017 9:40
by robgeerts
Could you send me (via PM) your config.js and the output of:
http://DOMOTICZ_IP:PORT/json.htm?type=devices&filter=all&used=true&order=Name

Re: Dashticz - Bug report

Posted: Friday 18 August 2017 14:14
by dutchdevil83
robgeerts wrote: Wednesday 16 August 2017 9:40 Could you send me (via PM) your config.js and the output of:
http://DOMOTICZ_IP:PORT/json.htm?type=devices&filter=all&used=true&order=Name
Send you a PM, can you help me out please?

It`s undefined with the total usages as stated in the config.JS (comments). So the _3 option gives undefined...

Re: Dashticz - Bug report

Posted: Friday 18 August 2017 22:16
by robgeerts
Should be fixed in latest beta!!

Re: Dashticz - Bug report

Posted: Saturday 19 August 2017 15:20
by gijsje
i am very new to the world of Domoticz but i am getting the hang of it and i love it with Dashticz :D .

I run in to an issue with the show_lastupdate
it does not seen to work for me

Code: Select all

blocks[23] = {} //TEMP HUISKAMER
blocks[23]['width'] = 3; 
blocks[23]['switch'] = true;
blocks[23]['show_lastupdate'] = false;
the switch function is ok but not the lastupdate

Were else can i look for this?

Re: Dashticz - Bug report

Posted: Saturday 19 August 2017 16:16
by robgeerts
Do you mean it still shows the last update

Re: Dashticz - Bug report

Posted: Saturday 19 August 2017 19:47
by gijsje
yes if i put in the blocks as shown above it still shows the update status

If this is done at the var config it is gone but gone for all,but with some things i want to have it and others i do not

Code: Select all

config['last_update'] = 0;

Re: Dashticz - Bug report

Posted: Saturday 19 August 2017 20:36
by robgeerts
Try :

Code: Select all

blocks[23]['hide_lastupdate'] = true;
If config['last_update'] = 1, you have to use hide_lastupdate to hide it in a single block.
If config['last_update'] = 0, you have to use show_lastupdate to show it in a single block.

Re: Dashticz - Bug report

Posted: Saturday 19 August 2017 20:47
by gijsje
Thanks a lot it works
i am liking it more and more :)