Page 1 of 2
Dashticz - Function - Layout per device
Posted: Tuesday 25 July 2017 11:22
by robgeerts
It is now possible to use another column/block setup per resolution.
To setup, use this code in config.js, change according your own needs..
Change the maxwidth, maxheight and numbers of your columns.
Code: Select all
var screens = {}
screens['default'] = {}
screens['default']['maxwidth'] = 1920;
screens['default']['maxheight'] = 1080;
screens['default'][1] = {}
screens['default'][1]['background'] = 'bg9.jpg';
screens['default'][1]['columns'] = [1,2,4]
screens['default'][2] = {}
screens['default'][2]['background'] = 'bg9.jpg';
screens['default'][2]['columns'] = [5,6,7]
screens['tablet'] = {}
screens['tablet']['maxwidth'] = 1024;
screens['tablet']['maxheight'] = 768;
screens['tablet'][1] = {}
screens['tablet'][1]['background'] = 'bg9.jpg';
screens['tablet'][1]['columns'] = [3,1]
screens['tablet'][2] = {}
screens['tablet'][2]['background'] = 'bg9.jpg';
screens['tablet'][2]['columns'] = [2,4]
Remember, if you are testing this on your laptop with resizing your browser window, refresh to rebuild the columns/blocks.
Re: Dashticz - [BETA]Function - Layout per device
Posted: Tuesday 25 July 2017 17:03
by garethhowell
I've only just started using the beta branch, but it looks like there is a hard-coded ip address somewhere. I'm getting an error:
Code: Select all
jquery.min.js:4 GET http://192.168.1.10:8080/json.htm?type=devices&filter=all&used=true&order=Name&jsoncallback=jQuery22404060364299380137_1500994730621&_=1500994730622 net::ERR_CONNECTION_TIMED_OUT
VM963:804 Domoticz error!
Please, double check the path in settings['domoticz_ip']-variable!
There's no reference to this IP address in my CONFIG.js
Re: Dashticz - [BETA]Function - Layout per device
Posted: Tuesday 25 July 2017 17:08
by robgeerts
The settings screen is also new. Do you see a setting-icon on the top right?
Re: Dashticz - [BETA]Function - Layout per device
Posted: Tuesday 25 July 2017 17:12
by garethhowell
I'm not seeing anything at the moment. Just a blank screen.
Looks like CONFIG_DEFAULT.js has been zapped as well. It now looks like it should really be custom.js
Re: Dashticz - [BETA]Function - Layout per device
Posted: Tuesday 25 July 2017 17:18
by garethhowell
OK, no worries. Sussed it now. Managed to get a blank screen with the settings cog.
Minor comments. Might be worth labelling the API keys with the fullname (i.e. "Google Maps API key" and "Wunderground API Key")
Re: Dashticz - [BETA]Function - Layout per device
Posted: Tuesday 25 July 2017 17:24
by garethhowell
Hmmm, this is odd. or am I missing something.
I looked at the dashboard through Chrome and adjusted the settings to get it function.
When i then look at it from an iPhone, the settings are back on their defaults.
Are the settings stored in the browser?
[EDIT] Just seen elsewhere that this is using localStorage.
Re: Dashticz - [BETA]Function - Layout per device
Posted: Tuesday 25 July 2017 17:43
by garethhowell
In view of the settings malarky, I'm afraid I'll have to revert to the master branch. I have several devices around the house that are intended to access Dashticz, one of which is in a tamper-proof housing to prevent kids messing with it. Having an unprotected "settings" cog is asking for trouble.
If I get a chance, I'll install a second copy of dashticz just for my use and have the beta on that. Won't be for a while though as I'm about to go on holiday.
Thanks for your efforts though, Rob.
Re: Dashticz - [BETA]Function - Layout per device
Posted: Tuesday 25 July 2017 17:47
by robgeerts
Thanks for testing.
I have added Wunderground and GoogleMaps titles to the settings.
According to the settings-cog, I will password-protect this (if this is set in config.js)
Re: Dashticz - [BETA]Function - Layout per device
Posted: Tuesday 25 July 2017 21:57
by garethhowell
Time I bought you a beer, I think.
Re: Dashticz - [BETA]Function - Layout per device
Posted: Tuesday 25 July 2017 22:22
by robgeerts
Thank you, appreciate it. It will keep me motivated!
Re: Dashticz - [BETA]Function - Layout per device
Posted: Tuesday 01 August 2017 7:40
by Mozart
I have the following CONFIG.js (only the relevant part):
Code: Select all
var screens = {}
screens['default'] = {}
screens['default']['maxwidth'] = 1920;
screens['default']['maxheight'] = 1080;
screens['pi'] = {}
screens['pi']['maxwidth'] = 800;
screens['pi']['maxheight'] = 480;
screens['default'][10] = {}
//screens['default'][10]['background'] = 'day_y.jpg';
//screens['default'][10]['background_morning'] = 'day_y.jpg';
//screens['default'][10]['background_noon'] = 'day_y.jpg';
//screens['default'][10]['background_afternoon'] = 'day_y.jpg';
//screens['default'][10]['background_night'] = 'night_y.jpg';
screens['default'][10]['columns'] = [2, 3];
screens['default'][20] = {}
//screens['default'][20]['background'] = 'day_y.jpg';
//screens['default'][20]['background_morning'] = 'day_y.jpg';
//screens['default'][20]['background_noon'] = 'day_y.jpg';
//screens['default'][20]['background_afternoon'] = 'day_y.jpg';
//screens['default'][20]['background_night'] = 'night_y.jpg';
screens['default'][20]['columns'] = [10, 20];
screens['default'][30] = {}
//screens['default'][30]['background'] = 'day_y.jpg';
//screens['default'][30]['background_morning'] = 'day_y.jpg';
//screens['default'][30]['background_noon'] = 'day_y.jpg';
//screens['default'][30]['background_afternoon'] = 'day_y.jpg';
//screens['default'][30]['background_night'] = 'night_y.jpg';
screens['default'][30]['columns'] = [30, 20];
screens['pi'][10] = {}
screens['pi'][10]['background'] = 'day_y.jpg';
screens['pi'][10]['background_morning'] = 'day_y.jpg';
screens['pi'][10]['background_noon'] = 'day_y.jpg';
screens['pi'][10]['background_afternoon'] = 'day_y.jpg';
screens['pi'][10]['background_night'] = 'night_y.jpg';
screens['pi'][10]['columns'] = [2, 3];
screens['pi'][20] = {}
screens['pi'][20]['background'] = 'day_y.jpg';
screens['pi'][20]['background_morning'] = 'day_y.jpg';
screens['pi'][20]['background_noon'] = 'day_y.jpg';
screens['pi'][20]['background_afternoon'] = 'day_y.jpg';
screens['pi'][20]['background_night'] = 'night_y.jpg';
screens['pi'][20]['columns'] = [10, 20];
screens['pi'][30] = {}
screens['pi'][30]['background'] = 'day_y.jpg';
screens['pi'][30]['background_morning'] = 'day_y.jpg';
screens['pi'][30]['background_noon'] = 'day_y.jpg';
screens['pi'][30]['background_afternoon'] = 'day_y.jpg';
screens['pi'][30]['background_night'] = 'night_y.jpg';
screens['pi'][30]['columns'] = [30, 20];
So no background when I'm opening the page on my laptop and when I use my Pi with touchscreen I should get a background. This does not work for me. The Pi does not show a background image. How does the selection work? Is your code looking at the screen resolution to decide which screens to show?
Re: Dashticz - [BETA]Function - Layout per device
Posted: Friday 04 August 2017 11:47
by ztorm
I have a problem with multiple screens on my tablet when using Chrome (Firefox is working fine). When I open Dashticz on my tablet in Chrome it loads just one scrollable page (all screens on one page), no multiple screens.
This is my code for the screens.
Code: Select all
var screens = {}
screens['default'] = {}
screens['default']['maxwidth'] = 1920;
screens['default']['maxheight'] = 1080;
screens['default'][1] = {}
screens['default'][1]['background'] = 'bg9.jpg';
screens['default'][1]['columns'] = [5,6]
screens['default'][2] = {}
screens['default'][2]['background'] = 'bg9.jpg';
screens['default'][2]['columns'] = [1,2,7]
screens['default'][3] = {}
screens['default'][3]['background'] = 'bg9.jpg';
screens['default'][3]['columns'] = [3,4]
screens['tablet'] = {}
screens['tablet']['maxwidth'] = 1280;
screens['tablet']['maxheight'] = 720;
screens['tablet'][1] = {}
screens['tablet'][1]['background'] = 'bg9.jpg';
screens['tablet'][1]['columns'] = [5,6]
screens['tablet'][2] = {}
screens['tablet'][2]['background'] = 'bg9.jpg';
screens['tablet'][2]['columns'] = [1,2,7]
screens['tablet'][3] = {}
screens['tablet'][3]['background'] = 'bg9.jpg';
screens['tablet'][3]['columns'] = [3,4]
Anyone else got this problem? What could be a fix to this?
Re: Dashticz - [BETA]Function - Layout per device
Posted: Friday 04 August 2017 12:25
by robgeerts
Could you test latest beta?
Re: Dashticz - [BETA]Function - Layout per device
Posted: Friday 04 August 2017 13:43
by ztorm
Now I get the same behaviour in Firefox as wel. On my desktop there are no problems in Firefox and Chrome.
Re: Dashticz - Function - Layout per device
Posted: Tuesday 08 August 2017 17:55
by ztorm
This problem now occurs also in Safari.
Verzonden vanaf mijn iPhone met Tapatalk
Re: Dashticz - Function - Layout per device
Posted: Tuesday 08 August 2017 20:44
by robgeerts
Could you try latest beta?
It should fix the issue in firefox and safari on mobile..
Maybe we could have a Teamviewer-session on your tablet so I can fix it?
(Send me details via PM)
Re: Dashticz - Function - Layout per device
Posted: Wednesday 09 August 2017 9:25
by ztorm
Yes, thanks! The issue is fixed in Firefox and safari. It would be nice though if this would work in Chrome
On my tablet chrome generates the nice full screen app, Firefox unfortunately doesn't
Verzonden vanaf mijn iPhone met Tapatalk
last update
Posted: Tuesday 22 August 2017 22:31
by FuTuReD
Hi guys,
How can I disable the last update information at the sensors.
I found this rule: "blocks[44]['show_lastupdate'] = false; " but this is not working for me. The last update information still remains.
Can someone help me?
Thanks a lot.
Re: Dashticz - Function - Layout per device
Posted: Wednesday 23 August 2017 10:17
by robgeerts
try:
Code: Select all
blocks[44]['hide_lastupdate'] = true;
Re: Dashticz - Function - Layout per device
Posted: Wednesday 23 August 2017 14:56
by FuTuReD
Thanks @robgeerts it's working!