Dashticz - Function - Layout per device

Dashticz, alternative dashboard based on HTML, CSS, jQuery

Moderators: htilburgs, robgeerts

Post Reply
User avatar
robgeerts
Posts: 1140
Joined: Saturday 24 January 2015 23:12
Target OS: NAS (Synology & others)
Domoticz version: 3.7067
Location: Son, NL
Contact:

Dashticz - Function - Layout per device

Post by robgeerts » Tuesday 25 July 2017 11:22

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.
Creator of Dashticz, Do you appreciate my work and want to buy me a beer? You can send Bitcoins to 17Qy4bsLM9J238fCZt5kaRc2bD5S1Aw6og or donate via PayPal: https://www.paypal.me/robgeerts

garethhowell
Posts: 107
Joined: Tuesday 17 November 2015 22:19
Target OS: Raspberry Pi
Domoticz version:
Contact:

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

Post by garethhowell » Tuesday 25 July 2017 17:03

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

User avatar
robgeerts
Posts: 1140
Joined: Saturday 24 January 2015 23:12
Target OS: NAS (Synology & others)
Domoticz version: 3.7067
Location: Son, NL
Contact:

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

Post by robgeerts » Tuesday 25 July 2017 17:08

The settings screen is also new. Do you see a setting-icon on the top right?
Creator of Dashticz, Do you appreciate my work and want to buy me a beer? You can send Bitcoins to 17Qy4bsLM9J238fCZt5kaRc2bD5S1Aw6og or donate via PayPal: https://www.paypal.me/robgeerts

garethhowell
Posts: 107
Joined: Tuesday 17 November 2015 22:19
Target OS: Raspberry Pi
Domoticz version:
Contact:

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

Post by garethhowell » Tuesday 25 July 2017 17:12

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: 107
Joined: Tuesday 17 November 2015 22:19
Target OS: Raspberry Pi
Domoticz version:
Contact:

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

Post by garethhowell » Tuesday 25 July 2017 17:18

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: 107
Joined: Tuesday 17 November 2015 22:19
Target OS: Raspberry Pi
Domoticz version:
Contact:

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

Post by garethhowell » Tuesday 25 July 2017 17:24

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: 107
Joined: Tuesday 17 November 2015 22:19
Target OS: Raspberry Pi
Domoticz version:
Contact:

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

Post by garethhowell » Tuesday 25 July 2017 17:43

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.

User avatar
robgeerts
Posts: 1140
Joined: Saturday 24 January 2015 23:12
Target OS: NAS (Synology & others)
Domoticz version: 3.7067
Location: Son, NL
Contact:

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

Post by robgeerts » Tuesday 25 July 2017 17:47

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)
Creator of Dashticz, Do you appreciate my work and want to buy me a beer? You can send Bitcoins to 17Qy4bsLM9J238fCZt5kaRc2bD5S1Aw6og or donate via PayPal: https://www.paypal.me/robgeerts

garethhowell
Posts: 107
Joined: Tuesday 17 November 2015 22:19
Target OS: Raspberry Pi
Domoticz version:
Contact:

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

Post by garethhowell » Tuesday 25 July 2017 21:57

Time I bought you a beer, I think.

User avatar
robgeerts
Posts: 1140
Joined: Saturday 24 January 2015 23:12
Target OS: NAS (Synology & others)
Domoticz version: 3.7067
Location: Son, NL
Contact:

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

Post by robgeerts » Tuesday 25 July 2017 22:22

Thank you, appreciate it. It will keep me motivated!
Creator of Dashticz, Do you appreciate my work and want to buy me a beer? You can send Bitcoins to 17Qy4bsLM9J238fCZt5kaRc2bD5S1Aw6og or donate via PayPal: https://www.paypal.me/robgeerts

Mozart
Posts: 75
Joined: Monday 19 January 2015 15:35
Target OS: Raspberry Pi
Domoticz version: Beta
Location: The Netherlands
Contact:

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

Post by Mozart » Tuesday 01 August 2017 7:40

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 11:15
Target OS: Raspberry Pi
Domoticz version: 3.8153
Contact:

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

Post by ztorm » Friday 04 August 2017 11:47

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?

User avatar
robgeerts
Posts: 1140
Joined: Saturday 24 January 2015 23:12
Target OS: NAS (Synology & others)
Domoticz version: 3.7067
Location: Son, NL
Contact:

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

Post by robgeerts » Friday 04 August 2017 12:25

Could you test latest beta?
Creator of Dashticz, Do you appreciate my work and want to buy me a beer? You can send Bitcoins to 17Qy4bsLM9J238fCZt5kaRc2bD5S1Aw6og or donate via PayPal: https://www.paypal.me/robgeerts

ztorm
Posts: 20
Joined: Thursday 16 February 2017 11:15
Target OS: Raspberry Pi
Domoticz version: 3.8153
Contact:

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

Post by ztorm » Friday 04 August 2017 13:43

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 11:15
Target OS: Raspberry Pi
Domoticz version: 3.8153
Contact:

Re: Dashticz - Function - Layout per device

Post by ztorm » Tuesday 08 August 2017 17:55

This problem now occurs also in Safari.


Verzonden vanaf mijn iPhone met Tapatalk

User avatar
robgeerts
Posts: 1140
Joined: Saturday 24 January 2015 23:12
Target OS: NAS (Synology & others)
Domoticz version: 3.7067
Location: Son, NL
Contact:

Re: Dashticz - Function - Layout per device

Post by robgeerts » Tuesday 08 August 2017 20:44

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)
Creator of Dashticz, Do you appreciate my work and want to buy me a beer? You can send Bitcoins to 17Qy4bsLM9J238fCZt5kaRc2bD5S1Aw6og or donate via PayPal: https://www.paypal.me/robgeerts

ztorm
Posts: 20
Joined: Thursday 16 February 2017 11:15
Target OS: Raspberry Pi
Domoticz version: 3.8153
Contact:

Re: Dashticz - Function - Layout per device

Post by ztorm » Wednesday 09 August 2017 9:25

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: 13
Joined: Monday 19 September 2016 12:26
Target OS: Raspberry Pi
Domoticz version:
Contact:

last update

Post by FuTuReD » Tuesday 22 August 2017 22:31

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.

User avatar
robgeerts
Posts: 1140
Joined: Saturday 24 January 2015 23:12
Target OS: NAS (Synology & others)
Domoticz version: 3.7067
Location: Son, NL
Contact:

Re: Dashticz - Function - Layout per device

Post by robgeerts » Wednesday 23 August 2017 10:17

try:

Code: Select all

blocks[44]['hide_lastupdate'] = true;
Creator of Dashticz, Do you appreciate my work and want to buy me a beer? You can send Bitcoins to 17Qy4bsLM9J238fCZt5kaRc2bD5S1Aw6og or donate via PayPal: https://www.paypal.me/robgeerts

FuTuReD
Posts: 13
Joined: Monday 19 September 2016 12:26
Target OS: Raspberry Pi
Domoticz version:
Contact:

Re: Dashticz - Function - Layout per device

Post by FuTuReD » Wednesday 23 August 2017 14:56

Thanks @robgeerts it's working!

Post Reply

Who is online

Users browsing this forum: No registered users and 6 guests