Page 19 of 184

Re: New Dashboard Design v2, with custom positioning

Posted: Thursday 06 April 2017 15:14
by robgeerts
Ok, will try to explain it... first of all, if you just want to use the default behaviour, just set the following vars to true in config.js:

Code: Select all

var _USE_AUTO_POSITIONING 	= true;
var _USE_FAVORITES			= true;
If you want to customize the positions of each block, start with removing everything AFTER:

Code: Select all

var blocks = {}
Then add the following code, this will eventually result in 3 columns with a width of 5, 5 and 2 (use 1 to 12, sum of them must not exceed 12):

Code: Select all

var columns = {}

columns[1] = {}
columns[1]['blocks'] = []
columns[1]['width'] = 5;

columns[2] = {}
columns[2]['blocks'] = []
columns[2]['width'] = 5; 

columns[3] = {}
columns[3]['blocks'] = []
columns[3]['width'] = 2; 
Then add the idx of every device in the blocks-variable of the desired column, so if you want to add the devices with idx 43 and idx 44 in column 2, replace this code:

Code: Select all

columns[2]['blocks'] = []
with:

Code: Select all

columns[2]['blocks'] = [43,44]
Besides an idx, you can also add the following:
'currentweather_big','clock','sunrise'

For example:

Code: Select all

columns[2] = {}
columns[2]['blocks'] = ['currentweather_big',43,44]
columns[2]['width'] = 5; 
If you want a specific block to be wider then default, replace:

Code: Select all

var blocks = {}
with

Code: Select all

var blocks = {}
blocks[2] = {} //2 = IDX of device
blocks[2]['width'] = 8; 
Again, 8 can be a number from 1 to 12.

Re: New Dashboard Design v2, with custom positioning

Posted: Thursday 06 April 2017 15:46
by SwordFish
the idx for scenes seems not working 100%.
I add a scene with idx 1 but it displays memory pi also idx 1?

Re: New Dashboard Design v2, with custom positioning

Posted: Thursday 06 April 2017 16:08
by robgeerts
I havent fixed scenes yet.
In de next version it will be possible to add the idx for scenes AND groups as:

s1, so for example, to add a scene or group with idx 1 and a lamp with idx 1:

Code: Select all

columns[1]['blocks'] = ['s1',1]

Re: New Dashboard Design v2, with custom positioning

Posted: Thursday 06 April 2017 16:14
by SwordFish
robgeerts wrote:I havent fixed scenes yet.
In de next version it will be possible to add the idx for scenes as:

s1, so for example, to add a scene with idx 1 and a lamp with idx 1:

Code: Select all

columns[1]['blocks'] = ['s1',1]
Thanks
Can you also ad kodi mediaplayer
{
"ActTime" : 1491487843,
"ServerTime" : "2017-04-06 16:10:43",
"Sunrise" : "07:04",
"Sunset" : "20:20",
"result" : [
{
"AddjMulti" : 1.0,
"AddjMulti2" : 1.0,
"AddjValue" : 0.0,
"AddjValue2" : 0.0,
"BatteryLevel" : 255,
"CustomImage" : 0,
"Data" : "Arrow [S3E5] - The Secret Origin of Feli, 12%",
"Description" : "",
"Favorite" : 0,
"HardwareID" : 16,
"HardwareName" : "Kodi Media Server",
"HardwareType" : "Kodi Media Server",
"HardwareTypeVal" : 55,
"HaveDimmer" : true,
"HaveGroupCmd" : true,
"HaveTimeout" : false,
"ID" : "0000001",
"Image" : "Light",
"IsSubDevice" : false,
"LastUpdate" : "2017-04-06 16:10:35",
"Level" : 0,
"LevelInt" : 0,
"MaxDimLevel" : 15,
"Name" : "Kodi",
"Notifications" : "false",
"PlanID" : "16",
"PlanIDs" : [ 16 ],
"Protected" : false,
"ShowNotifications" : true,
"SignalLevel" : 7,
"Status" : "Video",
"StrParam1" : "",
"StrParam2" : "",
"SubType" : "AC",
"SwitchType" : "Media Player",
"SwitchTypeVal" : 17,
"Timers" : "false",
"Type" : "Lighting 2",
"TypeImg" : "Media",
"Unit" : 1,
"Used" : 1,
"UsedByCamera" : false,
"XOffset" : "0",
"YOffset" : "0",
"idx" : "46"
}
],
"status" : "OK",
"title" : "Devices"
}

Re: New Dashboard Design v2, with custom positioning

Posted: Thursday 06 April 2017 16:20
by SwordFish
@robgeerts
I just buy you a beer. Cheers
Thanks for al the good work.

Re: New Dashboard Design v2, with custom positioning

Posted: Thursday 06 April 2017 16:25
by robgeerts
SwordFish wrote:
robgeerts wrote:I havent fixed scenes yet.
In de next version it will be possible to add the idx for scenes as:

s1, so for example, to add a scene with idx 1 and a lamp with idx 1:

Code: Select all

columns[1]['blocks'] = ['s1',1]
Thanks
SwordFish wrote: Can you also ad kodi mediaplayer
Already working, will push this version later today!
Image

SwordFish wrote:@robgeerts
I just buy you a beer. Cheers
Thanks for al the good work.
Thank you very much, this goes in my savings-jar for a new tablet to display my dashboard on my wall :)

Re: New Dashboard Design v2, with custom positioning

Posted: Thursday 06 April 2017 16:28
by EdwinK
Kodi-logo's:

Image Image

If you need them; got them from somewhere on this forum

Re: New Dashboard Design v2, with custom positioning

Posted: Thursday 06 April 2017 16:29
by SwordFish
you're welcome
Don't buy a small one, otherwise you just have one colum visible like me :roll:

Re: New Dashboard Design v2, with custom positioning

Posted: Thursday 06 April 2017 16:35
by robgeerts
SwordFish wrote:you're welcome
Don't buy a small one, otherwise you just have one colum visible like me :roll:
But I can try to fix that.... whats your screen size?
Edit: How did you get the current title in the output (Data)?
I've added my kodi player too, started a movie, but the Data in the output stays empty?

Re: New Dashboard Design v2, with custom positioning

Posted: Thursday 06 April 2017 16:44
by SwordFish
I don't know what numbers you need, but its a Samsung SM-T310.
Hope you know enough :?

Re: New Dashboard Design v2, with custom positioning

Posted: Thursday 06 April 2017 16:46
by SwordFish
robgeerts wrote:
SwordFish wrote:you're welcome
Don't buy a small one, otherwise you just have one colum visible like me :roll:
But I can try to fix that.... whats your screen size?
Edit: How did you get the current title in the output (Data)?
I've added my kodi player too, started a movie, but the Data in the output stays empty?
I added kodi media server in the hardware tab

Re: New Dashboard Design v2, with custom positioning

Posted: Thursday 06 April 2017 16:57
by HansieNL
Hello Rob,
I got some small points:
- When I tried to replace nu.nl with www.bndestem.nl, but the page stays empty. Is it normal some html pages will not load/show?
- I can select a switch setting, but it's not set in Domoticz and jumps directly back to current setting.
- Maybe you can remove the text "Set" before setpoint in the pulldown menu? It's clear enough, I think, that it's a set(ing).
- Is it possible to add a variable in CONFIG.js to show or not to show seconds in the clock block?
Keep up the good work... and don't forget to take a rest sometimes.

Re: New Dashboard Design v2, with custom positioning

Posted: Thursday 06 April 2017 17:03
by robgeerts
SwordFish wrote:I don't know what numbers you need, but its a Samsung SM-T310.
Hope you know enough :?
Thanks, will try to fix this!
SwordFish wrote:
robgeerts wrote:
SwordFish wrote:you're welcome
Don't buy a small one, otherwise you just have one colum visible like me :roll:
But I can try to fix that.... whats your screen size?
Edit: How did you get the current title in the output (Data)?
I've added my kodi player too, started a movie, but the Data in the output stays empty?
I added kodi media server in the hardware tab
Well, me too, but dont get any output...
I can control the remote control in Domoticz, so I'v set the right IP and portnumber...

Re: New Dashboard Design v2, with custom positioning

Posted: Thursday 06 April 2017 17:11
by robgeerts
HansieNL wrote: - When I tried to replace nu.nl with http://www.bndestem.nl, but the page stays empty. Is it normal some html pages will not load/show?
- I can select a switch setting, but it's not set in Domoticz and jumps directly back to current setting.
- Maybe you can remove the text "Set" before setpoint in the pulldown menu? It's clear enough, I think, that it's a set(ing).
- Is it possible to add a variable in CONFIG.js to show or not to show seconds in the clock block?
1.) Yes, some sites block being opened in a frame
2.) In a setpoint you mean? What does console (f12) say?
3.) Fixed (var _HIDE_SECONDS_IN_CLOCK = false;)
4.) Fixed

Latest version is live!

Re: New Dashboard Design v2, with custom positioning

Posted: Thursday 06 April 2017 17:12
by robgeerts
SwordFish wrote:I don't know what numbers you need, but its a Samsung SM-T310.
Hope you know enough :?
Could you try with latest (and current) version in Gitlab?

Re: New Dashboard Design v2, with custom positioning

Posted: Thursday 06 April 2017 17:29
by SwordFish
robgeerts wrote:
SwordFish wrote:I don't know what numbers you need, but its a Samsung SM-T310.
Hope you know enough :?
Could you try with latest (and current) version in Gitlab?
Will try it later.
Do you use port 9090?

Re: New Dashboard Design v2, with custom positioning

Posted: Thursday 06 April 2017 17:37
by robgeerts
No, I set my port to 8080 in Kodi, so used that port in Domoticz too.

Re: New Dashboard Design v2, with custom positioning

Posted: Thursday 06 April 2017 17:44
by HansieNL
robgeerts wrote:
HansieNL wrote: - I can select a switch setting, but it's not set in Domoticz and jumps directly back to current setting.
2.) In a setpoint you mean? What does console (f12) say?
Uncaught SyntaxError: Unexpected token : (if you need whole string i can PM you)

Re: New Dashboard Design v2, with custom positioning

Posted: Thursday 06 April 2017 17:46
by robgeerts
Yes, please :)

Re: New Dashboard Design v2, with custom positioning

Posted: Thursday 06 April 2017 18:16
by SwordFish
robgeerts wrote:No, I set my port to 8080 in Kodi, so used that port in Domoticz too.
My port in domoticz is 9090 not 8080.
Is it correct that the s for scene isn't working right now? I dont get any scene to display.
This is the view on my tablet, the text is not right :mrgreen: