Login

Dashticz, alternative dashboard based on HTML, CSS, jQuery

Moderators: leecollings, htilburgs, robgeerts

Post Reply
Dave47
Posts: 136
Joined: Thursday 19 July 2018 14:36
Target OS: -
Domoticz version: 2023.1
Contact:

Login

Post by Dave47 »

I have a login page for Dashticz.

Is it possible to make the login time longer than 1 hour?

Where can I change these settings?
I am currently saving the password in the browser.

I prefer a longer login time
User avatar
HansieNL
Posts: 969
Joined: Monday 28 September 2015 15:13
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Login

Post by HansieNL »

Dashticz configuration settings are stored in CONFIG.js.
For overview of all configuration options see: https://dashticz.readthedocs.io/en/bet ... ation.html
There’s an option dashticz_refresh. Number of minutes to refresh the Dashticz dashboard.
Blah blah blah
Dave47
Posts: 136
Joined: Thursday 19 July 2018 14:36
Target OS: -
Domoticz version: 2023.1
Contact:

Re: Login

Post by Dave47 »

I tried that.
For example: dasticz_refresh = 15 minutes,
Nothing changes. I don't have to log in again after 15 minutes
After 1 hour i must login again.

is there maybe another solution?
Lokonli
Posts: 2292
Joined: Monday 29 August 2016 22:40
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Login

Post by Lokonli »

Dave47 wrote: Wednesday 09 October 2019 19:07 I tried that.
For example: dasticz_refresh = 15 minutes,
Nothing changes. I don't have to log in again after 15 minutes
After 1 hour i must login again.

is there maybe another solution?
It's set on line 9 in the file js/login.js
We could make it a configuration setting.
Dave47
Posts: 136
Joined: Thursday 19 July 2018 14:36
Target OS: -
Domoticz version: 2023.1
Contact:

Re: Login

Post by Dave47 »

that is nice

Do I have to use dashticz V3 then?

Can I adjust it myself at this time?
What exactly should I do in the file?
User avatar
HansieNL
Posts: 969
Joined: Monday 28 September 2015 15:13
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Login

Post by HansieNL »

Do I have to use dashticz V3 then? No
Can I adjust it myself at this time? If you know how to edit a text file ;-)
What exactly should I do in the file? ...
Change in login.js the following lines:

Code: Select all

var sessionTimeout = 1; //session timeout after x hour(s)
var loginDuration = new Date();
loginDuration.setTime(loginDuration.getTime() + (sessionTimeout * 60 * 60 * 1000));
to:

Code: Select all

var sessionTimeout = 15; //session timeout after x minute(s)
var loginDuration = new Date();
loginDuration.setTime(loginDuration.getTime() + (sessionTimeout * 60 * 1000));
Blah blah blah
Dave47
Posts: 136
Joined: Thursday 19 July 2018 14:36
Target OS: -
Domoticz version: 2023.1
Contact:

Re: Login

Post by Dave47 »

Ok i change only sesionTimeout.
I want more jours :D
User avatar
HansieNL
Posts: 969
Joined: Monday 28 September 2015 15:13
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Login

Post by HansieNL »

You can now set the session timeout in the latest Dashticz beta.
https://github.com/Dashticz/dashticz/tree/beta
Blah blah blah
Dave47
Posts: 136
Joined: Thursday 19 July 2018 14:36
Target OS: -
Domoticz version: 2023.1
Contact:

Re: Login

Post by Dave47 »

i cant change settings in Dashticz_v3.

When I save, nothing changes for all settings
User avatar
HansieNL
Posts: 969
Joined: Monday 28 September 2015 15:13
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Login

Post by HansieNL »

Dave47 wrote: Tuesday 15 October 2019 11:24 i cant change settings in Dashticz_v3.

When I save, nothing changes for all settings
Can you give us some more information how and where you installed Dashticz?
Looks like your problem is related to the following part(s) of the installation:

Since Beta 2.4.6 (October 2018) the installation instruction changed. Main reason is that for most functionality PHP support in the web server is needed. The Domoticz web server doesn’t support PHP. That means that Dashticz needs to be installed under a different web server with PHP enabled.

If you want to be able to save the settings via Dashticz to CONFIG.js then you have to give write permission to CONFIG.js for root:

Code: Select all

 chmod a+w /home/pi/dashticz/custom/CONFIG.js
For complete manual see: https://dashticz.readthedocs.io/en/beta/
Blah blah blah
Dave47
Posts: 136
Joined: Thursday 19 July 2018 14:36
Target OS: -
Domoticz version: 2023.1
Contact:

Re: Login

Post by Dave47 »

I have install Dashticz_v3 in /home/pi/www/dashticz_v3/ next to /home/pi/www/dashticz_v2/
v2 is going well

And then i do sudo ln -s $(pwd)/dashticz_v3/ /var/www/html

Above works

then i do

chmod a+w /home/pi/dashticz_v3/custom/CONFIG.js

That gives me the following: cannot acces


i have the sollution:


chmod -R a+rX $(pwd)/dashticz_v3


chmod a+w $(pwd)/dashticz_v3/custom/CONFIG.js


Not: chmod a+w /home/pi/dashticz_v3/custom/CONFIG.js
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest