Page 1 of 1

Login

Posted: Wednesday 09 October 2019 14:46
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

Re: Login

Posted: Wednesday 09 October 2019 17:48
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.

Re: Login

Posted: Wednesday 09 October 2019 19:07
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?

Re: Login

Posted: Sunday 13 October 2019 21:02
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.

Re: Login

Posted: Monday 14 October 2019 12:15
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?

Re: Login

Posted: Monday 14 October 2019 14:39
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));

Re: Login

Posted: Monday 14 October 2019 16:36
by Dave47
Ok i change only sesionTimeout.
I want more jours :D

Re: Login

Posted: Monday 14 October 2019 22:51
by HansieNL
You can now set the session timeout in the latest Dashticz beta.
https://github.com/Dashticz/dashticz/tree/beta

Re: Login

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

When I save, nothing changes for all settings

Re: Login

Posted: Tuesday 15 October 2019 12:25
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/

Re: Login

Posted: Tuesday 15 October 2019 13:05
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