Dashticz - Function - Layout per device

Dashticz, alternative dashboard based on HTML, CSS, jQuery

Moderators: leecollings, htilburgs, robgeerts

robgeerts
Posts: 1273
Joined: Saturday 24 January 2015 22:12
Target OS: NAS (Synology & others)
Domoticz version: 3.7067
Location: NL
Contact:

Dashticz - Function - Layout per device

Post 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.
garethhowell
Posts: 115
Joined: Tuesday 17 November 2015 21:19
Target OS: Raspberry Pi / ODroid
Domoticz version: 3.9317
Location: St Neots, UK
Contact:

Re: Dashticz - [BETA]Function - Layout per device

Post 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
robgeerts
Posts: 1273
Joined: Saturday 24 January 2015 22:12
Target OS: NAS (Synology & others)
Domoticz version: 3.7067
Location: NL
Contact:

Re: Dashticz - [BETA]Function - Layout per device

Post by robgeerts »

The settings screen is also new. Do you see a setting-icon on the top right?
garethhowell
Posts: 115
Joined: Tuesday 17 November 2015 21:19
Target OS: Raspberry Pi / ODroid
Domoticz version: 3.9317
Location: St Neots, UK
Contact:

Re: Dashticz - [BETA]Function - Layout per device

Post 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
garethhowell
Posts: 115
Joined: Tuesday 17 November 2015 21:19
Target OS: Raspberry Pi / ODroid
Domoticz version: 3.9317
Location: St Neots, UK
Contact:

Re: Dashticz - [BETA]Function - Layout per device

Post 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")
garethhowell
Posts: 115
Joined: Tuesday 17 November 2015 21:19
Target OS: Raspberry Pi / ODroid
Domoticz version: 3.9317
Location: St Neots, UK
Contact:

Re: Dashticz - [BETA]Function - Layout per device

Post 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.
garethhowell
Posts: 115
Joined: Tuesday 17 November 2015 21:19
Target OS: Raspberry Pi / ODroid
Domoticz version: 3.9317
Location: St Neots, UK
Contact:

Re: Dashticz - [BETA]Function - Layout per device

Post 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.
robgeerts
Posts: 1273
Joined: Saturday 24 January 2015 22:12
Target OS: NAS (Synology & others)
Domoticz version: 3.7067
Location: NL
Contact:

Re: Dashticz - [BETA]Function - Layout per device

Post 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)
garethhowell
Posts: 115
Joined: Tuesday 17 November 2015 21:19
Target OS: Raspberry Pi / ODroid
Domoticz version: 3.9317
Location: St Neots, UK
Contact:

Re: Dashticz - [BETA]Function - Layout per device

Post by garethhowell »

Time I bought you a beer, I think.
robgeerts
Posts: 1273
Joined: Saturday 24 January 2015 22:12
Target OS: NAS (Synology & others)
Domoticz version: 3.7067
Location: NL
Contact:

Re: Dashticz - [BETA]Function - Layout per device

Post by robgeerts »

Thank you, appreciate it. It will keep me motivated!
Mozart
Posts: 39
Joined: Monday 19 January 2015 14:35
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: The Netherlands
Contact:

Re: Dashticz - [BETA]Function - Layout per device

Post 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?
Raspberry 3
Aeon Labs Z-Wave Stick Series 2 - RFLink USB Gateway
Z-Wave switches
433 MHz Temperature + Humidity sensors
Philips Hue Lights
Mi-Light WiFi Bridge + RGBW Controllers
ztorm
Posts: 20
Joined: Thursday 16 February 2017 10:15
Target OS: Raspberry Pi / ODroid
Domoticz version: 3.8153
Contact:

Re: Dashticz - [BETA]Function - Layout per device

Post 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?
robgeerts
Posts: 1273
Joined: Saturday 24 January 2015 22:12
Target OS: NAS (Synology & others)
Domoticz version: 3.7067
Location: NL
Contact:

Re: Dashticz - [BETA]Function - Layout per device

Post by robgeerts »

Could you test latest beta?
ztorm
Posts: 20
Joined: Thursday 16 February 2017 10:15
Target OS: Raspberry Pi / ODroid
Domoticz version: 3.8153
Contact:

Re: Dashticz - [BETA]Function - Layout per device

Post by ztorm »

Now I get the same behaviour in Firefox as wel. On my desktop there are no problems in Firefox and Chrome.
ztorm
Posts: 20
Joined: Thursday 16 February 2017 10:15
Target OS: Raspberry Pi / ODroid
Domoticz version: 3.8153
Contact:

Re: Dashticz - Function - Layout per device

Post by ztorm »

This problem now occurs also in Safari.


Verzonden vanaf mijn iPhone met Tapatalk
robgeerts
Posts: 1273
Joined: Saturday 24 January 2015 22:12
Target OS: NAS (Synology & others)
Domoticz version: 3.7067
Location: NL
Contact:

Re: Dashticz - Function - Layout per device

Post 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)
ztorm
Posts: 20
Joined: Thursday 16 February 2017 10:15
Target OS: Raspberry Pi / ODroid
Domoticz version: 3.8153
Contact:

Re: Dashticz - Function - Layout per device

Post 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
FuTuReD
Posts: 12
Joined: Monday 19 September 2016 12:26
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

last update

Post 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.
robgeerts
Posts: 1273
Joined: Saturday 24 January 2015 22:12
Target OS: NAS (Synology & others)
Domoticz version: 3.7067
Location: NL
Contact:

Re: Dashticz - Function - Layout per device

Post by robgeerts »

try:

Code: Select all

blocks[44]['hide_lastupdate'] = true;
FuTuReD
Posts: 12
Joined: Monday 19 September 2016 12:26
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Dashticz - Function - Layout per device

Post by FuTuReD »

Thanks @robgeerts it's working!
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests