Page 5 of 28

Re: Dashticz - Bug report

Posted: Sunday 14 May 2017 21:08
by mvveelen
Fixed....

using Rob's code, but for the sensors you have to change the 'Off" to 'Closed" (of course.....) like this:

Code: Select all


function getBlock_3534(device,idx){ //change 124 to the idx of your device!
   $('.block_'+idx).attr('onclick','switchDevice(this)');
   var html='';
   html+='<div class="col-xs-4 col-icon">';
      if(device['Status']=='Closed') html+=iconORimage(idx,'','window_closed.png','off icon');
      else html+=iconORimage(idx,'','window_open.png','on icon');
   html+='</div>';
   html+='<div class="col-xs-8 col-data">';
   html+='<strong class="title">'+device['Name']+'</strong><br />';
   if(device['Status']=='Closed') html+='<span class="state">DICHT</span>';
   else html+='<span class="state">OPEN</span>';

   if(_SHOW_LASTUPDATE) html+='<br /><span class="lastupdate">'+moment(device['LastUpdate']).format(_LASTUPDATE_FORMAT)+'</span>';
   html+='</div>';
   return html;
}

Re: Dashticz - Bug report

Posted: Tuesday 16 May 2017 22:02
by Derik
bug or not.....
The rss feeds are killing my CPU....My CB2 cannot run more feeds.
Is there perhaps a option to set the refresh/read time of feeds?
Is this possible by the 'buienradar' app also?[ moving very fast

Re: Dashticz - Bug report

Posted: Tuesday 16 May 2017 22:48
by robgeerts
Do you mean the rss feeds?
The buienradar-image is a gif-image, thats why its moving so fast ;)

On my dashboard (with news feeds, buienradar, trash module, calendars etc I see the call to domoticz every 5 seconds and the calls for the calendars and trash etc. (not every 5 seconds) When you have a click on your buienradar-image (like I had before) to open a popup with weeronline.nl-info, indeed, you see more requests...will look into this.

Re: Dashticz - Bug report

Posted: Tuesday 16 May 2017 22:51
by Derik
robgeerts wrote:Do you mean the rss feeds?
The buienradar-image is a gif-image, thats why its moving so fast ;)

On my dashboard (with news feeds, buienradar, trash module, calendars etc I see the call to domoticz every 5 seconds and the calls for the calendars and trash etc. (not every 5 seconds) When you have a click on your buienradar-image (like I had before) to open a popup with weeronline.nl-info, indeed, you see more requests...will look into this.

Yes the rss feeds:
Today set 2 feeds:
ScreenShot251.jpg
ScreenShot251.jpg (59.65 KiB) Viewed 4441 times
When i stop with the feeds, the CPU is more running slower..

Perhaps a time variable in the feeds an calendar.. every 5 seconds?? To much?

Re: Dashticz - Bug report

Posted: Tuesday 16 May 2017 23:00
by robgeerts
The calendar and news-blocks refreshes not every 5 seconds but every 5 minutes.
Only the switches (states) refreshes every 5 seconds.

In latest beta I changed something, could you test that version?

Re: Dashticz - Bug report

Posted: Wednesday 17 May 2017 14:27
by Blueone
I checked for the bug which causes issues with displaying the graphs for _1 en _2 devices.

I changed two function in blocks.js for this:

Code: Select all

function getStatusBlock(device,block){
	
	var value = block.value;
	var title = block.title;
	
	for(d in device) {
		value = value.replace('<'+d+'>',device[d]);
		title = title.replace('<'+d+'>',device[d]);
	}
	if(device['SubType']=='Percentage' || device['SubType']=='Custom Sensor' || device['TypeImg']=='counter' || device['Type']=='Temp' || device['Type']=='Wind' || device['Type']=='Rain' || device['Type']== 'Temp + Humidity' || device['Type']== 'Temp + Humidity + Baro'){
		//debugger;
		getButtonGraphs(device);
		$('.block_'+device['idx']).addClass('hover');
		$('.block_'+device['idx']).attr('data-toggle','modal');
		$('.block_'+device['idx']).attr('data-target','#opengraph'+device['idx']);
		
		$('.block_'+device['idx']+'_1').addClass('hover');
		$('.block_'+device['idx']+'_1').attr('data-toggle','modal');
		$('.block_'+device['idx']+'_1').attr('data-target','#opengraph'+device['idx']);
		
		$('.block_'+device['idx']+'_1').addClass('hover');
		$('.block_'+device['idx']+'_2').attr('data-toggle','modal');
		$('.block_'+device['idx']+'_2').attr('data-target','#opengraph'+device['idx']);
	}
	
	var attr='';
	if(typeof(device['Direction'])!=='undefined' && typeof(device['DirectionStr'])!=='undefined'){
		attr+=' style="-webkit-transform: rotate('+device['Direction']+'deg);-moz-transform: rotate('+device['Direction']+'deg);-ms-transform: rotate('+device['Direction']+'deg);-o-transform: rotate('+device['Direction']+'deg); transform: rotate('+device['Direction']+'deg);"';
		//start alteration
		if (_USE_BEAUFORT ==true){
			value = Beaufort(device['Speed'])+', '; 
		} else {
			value = device['Speed']+' m/s, '; 
		}
		value+=device['Direction']+'&deg ';
		if (_TRANSLATE_SPEED==true){
			value+=TranslateDirection(device['DirectionStr'])
		} else {
			value+=device['DirectionStr'];
		}
		//end alteration
	}
and

Code: Select all

function getStateBlock(id,icon,title,value,device){
	
	if(device['SubType']=='Percentage' || device['SubType']=='Custom Sensor' || device['TypeImg']=='counter' || device['Type']=='Temp' || device['Type']=='Wind' || device['Type']=='Rain' || device['Type']== 'Temp + Humidity' || device['Type']== 'Temp + Humidity + Baro'){
		getButtonGraphs(device);
		$('.block_'+device['idx']).addClass('hover');
		$('.block_'+device['idx']).attr('data-toggle','modal');
		$('.block_'+device['idx']).attr('data-target','#opengraph'+device['idx']);
		
		$('.block_'+device['idx']+'_1').addClass('hover');
		$('.block_'+device['idx']+'_1').attr('data-toggle','modal');
		$('.block_'+device['idx']+'_1').attr('data-target','#opengraph'+device['idx']);
		
		$('.block_'+device['idx']+'_2').addClass('hover');
		$('.block_'+device['idx']+'_2').attr('data-toggle','modal');
		$('.block_'+device['idx']+'_2').attr('data-target','#opengraph'+device['idx']);
	}
	
	triggerChange(device['idx'],value);
	
	var stateBlock ='<div class="col-xs-4 col-icon">';
		stateBlock+='<em class="'+icon+'"></em>';
	stateBlock+='</div>';
	stateBlock+='<div class="col-xs-8 col-data">';
		
		if(typeof(blocks[device['idx']])!=='undefined' && typeof(blocks[device['idx']]['switch'])!=='undefined' && blocks[device['idx']]['switch']==true){
			stateBlock+='<strong class="title">'+title+'</strong><br />';
			stateBlock+='<span>'+value+'</span>';
		}
		else {
			stateBlock+='<strong class="title">'+value+'</strong><br />';
			stateBlock+='<span>'+title+'</span>';

		}
	
	stateBlock+='</div>';
	return stateBlock;
}
It now simply tries to add the class for each type, maybe this can be done more efficiently.

I din't find anything yet for the problem the graph isn't readable with a 7 day log. Domoticz always return 7 days (or the number of days set in the setting). I think the result have to be split in pages for each day to make it readable.

Re: Dashticz - Bug report

Posted: Wednesday 17 May 2017 21:06
by robgeerts
Thanks I fixed this in latest beta!
About the 7 day problem, will look into this..

Re: RE: Re: RE: Re: Dashticz - Bug report

Posted: Wednesday 17 May 2017 23:23
by jake
jake wrote:
robgeerts wrote:could you post the output of the device in domoticz so I can test with it?
The device only reports graphically (P1 smart meter electricity = std. Domoticz device for smart meter). The JSON command can be found here in the Wiki: http://www.domoticz.com/wiki/Domoticz_A ... mart_meter
/json.htm?type=command&param=udevice&idx=IDX&nvalue=0&svalue=USAGE1;USAGE2;RETURN1;RETURN2;CONS;PROD

I assume that the calculation should be CONS - PROD to generate a negative number when production is higher than consumption. At that point consumption will be 0 and Production (PROD) will be the remaining power that is fed into the grid
@robgeerts were you able to work something out with the given information here above?



Verstuurd vanaf mijn K00C met Tapatalk

Re: Dashticz - Bug report

Posted: Thursday 18 May 2017 9:21
by robgeerts
Unfortunately not, I need to have real values.
OR, if someone could provide me a url to your domoticz-installation (yes, external access but only for me, temporarily) ?

Re: Dashticz - Bug report

Posted: Thursday 18 May 2017 12:36
by blacksn0w
mlamie wrote:I think it is a bug, but don't know for sure. When I click a button to request the graph data and the graph is already displayed on one of the pages it will will not display the graph and is will mess up the graph on the dashboard page it selfs. See screenshot.

P.s. I use the beta version.
This was finally solved in latest beta.

Re: Dashticz - Bug report

Posted: Saturday 20 May 2017 11:10
by Derik
Did set the ping:

Code: Select all

blocks[9] = {} // D1 Kamer
blocks[9]['width'] = 12; //1 to 12, remove this line if you want to use the default (4)
blocks[9]['title'] = 'D1' //if you want change the name of switch different then domoticz
blocks[9]['icon'] = 'fa-lightbulb-o'; //if you want an other icon instead of the default, choose from: http://fontawesome.io/cheatsheet/
blocks[9]['switch'] = true; //if you want to switch the title and data
blocks[9]['hide_data'] = true; //if you want to hide the data of this block
blocks[9]['show_lastupdate'] = true; //if you want to show the last update specific for this block
blocks[9]['playsound'] = 'sounds/ping.mp3'; //play a sound when a device changes
blocks[9]['protected'] = false; //protect switching manually in Dashticz
Nice the button change a ping great new feature...

Only now i get 2 pings...
1 when the button change.
And after 2-3 second a ping again...
ScreenShot001.jpg
ScreenShot001.jpg (13.2 KiB) Viewed 4306 times
Because the data change...

Please a option for 1 ping :-)

Re: Dashticz - Bug report

Posted: Sunday 21 May 2017 17:07
by robgeerts
But the date should only change when the state of the switch is changed??

Re: Dashticz - Bug report

Posted: Sunday 21 May 2017 20:59
by Derik
Mmmm

I did found the problem....
I swtched a scene..
And in the scene there is a single switch.
Placed on my dashboard.
First sound scene
Second sound the switch ......
Stupid from me..

So sorry
No bug

Re: Dashticz - Bug report

Posted: Sunday 28 May 2017 23:59
by Phantom
Not sure if it is just me, but when the standby screen is active it switches back to the main screen for a second and then back again to standby.
It happens pretty regular, sometimes a couple of times in a min sometimes longer.
i am running the latest beta.

Re: Dashticz - Bug report

Posted: Monday 29 May 2017 20:09
by Phantom
Did some more testing, it happens when i add a blocks that has an value in it, like cpu, mem, hdd or even temperature or humidity.
Every time one of those value's change the screen blinks to the main screen for a second and then back to the standby screen, when i remove all those blocks so the screen only shows switches the issue is gone.

I hope you can fix/change this.

Re: Dashticz - Bug report

Posted: Friday 02 June 2017 13:29
by htilburgs
Bug??

Latest Beta version Dashticz.
I've made a CONFIG.js for my iPhone (block width 12, 1 column) in custom_2 / index2.html:
Spoiler: show

Code: Select all

// PRODUCTION 

var _LANGUAGE 				= 'nl_NL'; //or: en_US, fr_FR, hu_HU
var _HOST_DOMOTICZ			= 'http://192.168.x.x:xxxx';
var _DOMOTICZ_REFRESH			= 5; //in seconds
var _DASHTICZ_REFRESH			= 30; //in minutes

/*
IF YOU HAVE A MEDIABOX FROM ZIGGO (HORIZON), COPY SWITCH_HORIZON.PHP ON A WEBSERVER INSIDE YOUR NETWORK AND CHANGE THE IP.
ENTER THE PATH TO THIS FILE BELOW.
*/
var _HOST_ZIGGO_HORIZON	  	= ''; //e.g. http://192.168.1.3/domoticz/switch_horizon.php';
var _APIKEY_WUNDERGROUND  		= 'xxxxxxxxxxx';
var _WEATHER_CITY 				= 'Eindhoven';
var _WEATHER_CITYNAME 			= ''; //show a different city name, leave empty if same as _WEATHER_CITY
var _WEATHER_COUNTRY 			= 'NL';
var _USE_AUTO_POSITIONING 		= true; //don't want to configure positions, use auto positioning
var _USE_FAVORITES				= true; //only used when using auto positioning
var _HIDE_SECONDS_IN_CLOCK  	= false; //do not show the seconds in the clock
var _HIDE_MEDIAPLAYER_WHEN_OFF 	= false; //when you have a mediaplayer connected, hide it if nothing is playing
var _NEWS_RSSFEED				= 'https://crossorigin.me/http://www.nu.nl/rss/algemeen';
var _USE_FAHRENHEIT			= false;
var _USE_BEAUFORT 				= true; //Bft instead of m/s
var _TRANSLATE_SPEED 			= false; //windspeed, north northwest instead of NNW
var _STANDBY_AFTER_MINUTES  	= 15; //enter amount of minutes like: 5 (5 minutes)
var _SCROLL_NEWS_AFTER 		= 9000; //milliseconds, so 7000 is 7 seconds
var _SHOW_LASTUPDATE 			= false;
var _LASTUPDATE_FORMAT 		= 'DD-MM-YY HH:mm';
var _SCREENSLIDER_EFFECT 		= 'slide'; //'slide' or 'fade' or 'cube' or 'coverflow' or 'flip'
var _USE_STATIC_WEATHERICONS 	= false; // Static of 'moving'  weather icons

var _AUTO_SWIPEBACK_TO		= 1; //when no activity, swipe back to main screen after x seconds
var _AUTO_SWIPEBACK_TIME		= 30; //seconds


// MAIN CONFIGURATION
var blocks = {}

//Schakelaars
blocks[6] = {} //Rolluik woonkamer
blocks[6]['width'] = 12;
blocks[6]['hide_stop'] = true;

blocks[217] = {} //Rolluik slaapkamer
blocks[217]['width'] = 12;
blocks[217]['hide_stop'] = true;

blocks[46] = {} //Lamp zolder
blocks[46]['width'] = 12;

blocks[70] = {} //Lamp overloop
blocks[70]['width'] = 12;

blocks[193] = {} //Woonkamer voor
blocks[193]['width'] = 12;

blocks[179] = {} //Woonkamer achter
blocks[179]['width'] = 12;

blocks[213] = {} //Yeelight Huiskamer
blocks[213]['width'] = 12;

blocks[214] = {} //Yeelight RGBW
blocks[214]['width'] = 12;
blocks[214]['icon'] = ''

//Overige
blocks[4] = {} //Pi Temperatuur
blocks[4]['width'] = 12;
blocks[4]['icon'] = 'fa-thermometer-1';

blocks[178] = {} //Regen verwachting
blocks[178]['title'] = '';
blocks[178]['width'] = 12;
blocks[178]['image'] = 'buien_radar.png';

blocks[151] = {} //iPhone Batterij Harm
blocks[151]['width'] = 12;
blocks[151]['icon'] = 'fa-battery-three-quarters';
blocks[151]['show_lastupdate'] = true;

blocks[152] = {} //iPhone Batterij Nassira
blocks[152]['width'] = 12;
blocks[152]['icon'] = 'fa-battery-three-quarters'
blocks[152]['show_lastupdate'] = true;

blocks[150] = {} //iPhone Harm
blocks[150]['width'] = 12;
blocks[150]['icon'] = 'fa-male'
blocks[150]['show_lastupdate'] = true;
blocks[150]['protected'] = true;
blocks[150]['playsound'] = 'sounds/sonar.mp3';	
blocks[150]['title'] = 'Harm'

blocks[153] = {} //iPhone Nassira
blocks[153]['width'] = 12;
blocks[153]['icon'] = 'fa-female'
blocks[153]['show_lastupdate'] = true;
blocks[153]['protected'] = true;
blocks[153]['playsound'] = 'sounds/sonar.mp3';	
blocks[153]['title'] = 'Nassira'

blocks[149] = {} //Locatie Harm
blocks[149]['width'] = 12;
blocks[149]['icon'] = 'fa-street-view'
blocks[149]['switch'] = true;

blocks[154] = {} //Locatie Nassira
blocks[154]['width'] = 12;
blocks[154]['icon'] = 'fa-street-view'
blocks[154]['switch'] = true;

var columns = {}
columns[1] = {}
columns[1]['blocks'] = [46,70,179,193,213,214,6,217,4,178,151,152,150,153,149,154] 
columns[1]['width'] = 12;

var screens = {}
screens[1] = {}
screens[1]['background'] = 'dv2-bg10.jpg';
screens[1]['background_night'] = 'dv2-bg10.jpg';
screens[1]['columns'] = [1]
The issue I have is when I scroll up and release, the screen is refreshed imediate.

Re: Dashticz - Bug report

Posted: Friday 02 June 2017 13:37
by htilburgs
htilburgs wrote:Bug??

Latest Beta version Dashticz.
I've made a CONFIG.js for my iPhone (block width 12, 1 column) in custom_2 / index2.html:
Spoiler: show

Code: Select all

// PRODUCTION 

var _LANGUAGE 				= 'nl_NL'; //or: en_US, fr_FR, hu_HU
var _HOST_DOMOTICZ			= 'http://192.168.x.x:xxxx';
var _DOMOTICZ_REFRESH			= 5; //in seconds
var _DASHTICZ_REFRESH			= 30; //in minutes

/*
IF YOU HAVE A MEDIABOX FROM ZIGGO (HORIZON), COPY SWITCH_HORIZON.PHP ON A WEBSERVER INSIDE YOUR NETWORK AND CHANGE THE IP.
ENTER THE PATH TO THIS FILE BELOW.
*/
var _HOST_ZIGGO_HORIZON	  	= ''; //e.g. http://192.168.1.3/domoticz/switch_horizon.php';
var _APIKEY_WUNDERGROUND  		= 'xxxxxxxxxxx';
var _WEATHER_CITY 				= 'Eindhoven';
var _WEATHER_CITYNAME 			= ''; //show a different city name, leave empty if same as _WEATHER_CITY
var _WEATHER_COUNTRY 			= 'NL';
var _USE_AUTO_POSITIONING 		= true; //don't want to configure positions, use auto positioning
var _USE_FAVORITES				= true; //only used when using auto positioning
var _HIDE_SECONDS_IN_CLOCK  	= false; //do not show the seconds in the clock
var _HIDE_MEDIAPLAYER_WHEN_OFF 	= false; //when you have a mediaplayer connected, hide it if nothing is playing
var _NEWS_RSSFEED				= 'https://crossorigin.me/http://www.nu.nl/rss/algemeen';
var _USE_FAHRENHEIT			= false;
var _USE_BEAUFORT 				= true; //Bft instead of m/s
var _TRANSLATE_SPEED 			= false; //windspeed, north northwest instead of NNW
var _STANDBY_AFTER_MINUTES  	= 15; //enter amount of minutes like: 5 (5 minutes)
var _SCROLL_NEWS_AFTER 		= 9000; //milliseconds, so 7000 is 7 seconds
var _SHOW_LASTUPDATE 			= false;
var _LASTUPDATE_FORMAT 		= 'DD-MM-YY HH:mm';
var _SCREENSLIDER_EFFECT 		= 'slide'; //'slide' or 'fade' or 'cube' or 'coverflow' or 'flip'
var _USE_STATIC_WEATHERICONS 	= false; // Static of 'moving'  weather icons

var _AUTO_SWIPEBACK_TO		= 1; //when no activity, swipe back to main screen after x seconds
var _AUTO_SWIPEBACK_TIME		= 30; //seconds


// MAIN CONFIGURATION
var blocks = {}

//Schakelaars
blocks[6] = {} //Rolluik woonkamer
blocks[6]['width'] = 12;
blocks[6]['hide_stop'] = true;

blocks[217] = {} //Rolluik slaapkamer
blocks[217]['width'] = 12;
blocks[217]['hide_stop'] = true;

blocks[46] = {} //Lamp zolder
blocks[46]['width'] = 12;

blocks[70] = {} //Lamp overloop
blocks[70]['width'] = 12;

blocks[193] = {} //Woonkamer voor
blocks[193]['width'] = 12;

blocks[179] = {} //Woonkamer achter
blocks[179]['width'] = 12;

blocks[213] = {} //Yeelight Huiskamer
blocks[213]['width'] = 12;

blocks[214] = {} //Yeelight RGBW
blocks[214]['width'] = 12;
blocks[214]['icon'] = ''

//Overige
blocks[4] = {} //Pi Temperatuur
blocks[4]['width'] = 12;
blocks[4]['icon'] = 'fa-thermometer-1';

blocks[178] = {} //Regen verwachting
blocks[178]['title'] = '';
blocks[178]['width'] = 12;
blocks[178]['image'] = 'buien_radar.png';

blocks[151] = {} //iPhone Batterij Harm
blocks[151]['width'] = 12;
blocks[151]['icon'] = 'fa-battery-three-quarters';
blocks[151]['show_lastupdate'] = true;

blocks[152] = {} //iPhone Batterij Nassira
blocks[152]['width'] = 12;
blocks[152]['icon'] = 'fa-battery-three-quarters'
blocks[152]['show_lastupdate'] = true;

blocks[150] = {} //iPhone Harm
blocks[150]['width'] = 12;
blocks[150]['icon'] = 'fa-male'
blocks[150]['show_lastupdate'] = true;
blocks[150]['protected'] = true;
blocks[150]['playsound'] = 'sounds/sonar.mp3';	
blocks[150]['title'] = 'Harm'

blocks[153] = {} //iPhone Nassira
blocks[153]['width'] = 12;
blocks[153]['icon'] = 'fa-female'
blocks[153]['show_lastupdate'] = true;
blocks[153]['protected'] = true;
blocks[153]['playsound'] = 'sounds/sonar.mp3';	
blocks[153]['title'] = 'Nassira'

blocks[149] = {} //Locatie Harm
blocks[149]['width'] = 12;
blocks[149]['icon'] = 'fa-street-view'
blocks[149]['switch'] = true;

blocks[154] = {} //Locatie Nassira
blocks[154]['width'] = 12;
blocks[154]['icon'] = 'fa-street-view'
blocks[154]['switch'] = true;

var columns = {}
columns[1] = {}
columns[1]['blocks'] = [46,70,179,193,213,214,6,217,4,178,151,152,150,153,149,154] 
columns[1]['width'] = 12;

var screens = {}
screens[1] = {}
screens[1]['background'] = 'dv2-bg10.jpg';
screens[1]['background_night'] = 'dv2-bg10.jpg';
screens[1]['columns'] = [1]
The issue I have is when I scroll up and release, the screen is refreshed imediate.
Fixed:
When I create a shortcut on main screen (Zet op beginscherm), Dashticz loads full-screen and no issues with the refresh.

Re: Dashticz - Bug report

Posted: Friday 02 June 2017 23:53
by Hesmink
With the latest beta, all my RFXMeter counter type blocks, generate a third block with 'undefined':

In Dashtics:
HeatDashticks.jpg
HeatDashticks.jpg (8.45 KiB) Viewed 4088 times
In Domoticz default:
HeatDomo.jpg
HeatDomo.jpg (11.11 KiB) Viewed 4088 times
This is tested with a default config, with only the Domiticz ip and port modified.

Re: Dashticz - Bug report

Posted: Saturday 03 June 2017 15:01
by Hesmink
Hesmink wrote:With the latest beta, all my RFXMeter counter type blocks, generate a third block with 'undefined':

In Dashtics:
HeatDashticks.jpg

In Domoticz default:
HeatDomo.jpg

This is tested with a default config, with only the Domiticz ip and port modified.
Dug a little deeper, and I see Dashtics is searching for a third datapoint that is simply not there in an RFXMeter Counter:
rfxmeter.jpg
rfxmeter.jpg (165.95 KiB) Viewed 4070 times
I don't understand what the code is trying to do here. It tests for 'undefined', but the value still makes the dashticz screen, and doesn't get filtered out.
For now I commented out this part for me, but I think the check should be more strict, and remove the 3rd parameter completely if it's not there.

Re: Dashticz - Bug report

Posted: Sunday 04 June 2017 13:24
by gielie
I still can't switch the following from my Toon temp.

Image
blocks[#]['switch'] = true doesn't work, can someone help me with this or is this something Rob can change? I know this item has passed before but it still doesn't work.