Page 1 of 2
Dashticz - Save CONFIG.js automatically with PHP
Posted: Sunday 01 October 2017 13:31
by robgeerts
In latest BETA-version, the config will be saved automatically to CONFIG.js with PHP.
Please backup your config.js
Make sure your CONFIG.js is writable.
If it doesnt save the file, you will still get the screen where you can copy the config!
Re: Dashticz - Save CONFIG.js automatically with PHP
Posted: Sunday 01 October 2017 13:48
by dutchdevil83
Wow, nice work. Going to try it in a moment. You had a good vacation?
Just tested:
1) When clicking the settings icon and clicking save it saves so this is good
2) When going into EDIT mode my changes aren`t save to the config file and still have to this manually
Re: Dashticz - Save CONFIG.js automatically with PHP
Posted: Sunday 01 October 2017 19:43
by EdwinK
It doesn't seem to save. If I change anything in settings and click 'save', the page refreshes, but no changes visible. I do believe I have PHP enabled on the webserver.
Re: Dashticz - Save CONFIG.js automatically with PHP
Posted: Sunday 01 October 2017 22:10
by robgeerts
You do believe or are you sure?
And is the file writable (chmod)
Re: Dashticz - Save CONFIG.js automatically with PHP
Posted: Tuesday 03 October 2017 15:08
by pvm
Nice job, did a quick test by changing the dashboard title, that works.
Changing contents of the dashboard by f.e. adding a clock is not saved (beta version downloaded today ("Latest commit 957b89e 2 days ago"))
I started from default installation with only the correct IP set. After the first test I also tried to change config['auto_positioning'] to 0 (was on 1 before), but that also did not solve the issue. Will it be possible to switch auto_positioning from the web-config-interface in the future?
(for users with issues, I'm running Dashticz on my Synology nas, made the file write-able for the 'http' user by right clicking on the file in 'File Station')
Re: Dashticz - Save CONFIG.js automatically with PHP
Posted: Tuesday 03 October 2017 17:43
by EdwinK
pvm wrote: ↑Tuesday 03 October 2017 15:08
(for users with issues, I'm running Dashticz on my Synology nas, made the file write-able for the 'http' user by right clicking on the file in 'File Station')
You mean, like this?
- Screen Shot 2017-10-03 at 17.42.20.png (46.44 KiB) Viewed 5282 times
Re: Dashticz - Save CONFIG.js automatically with PHP
Posted: Tuesday 03 October 2017 18:18
by pvm
Yes, hope it helps you. Can you change the dashboard title now?
Re: Dashticz - Save CONFIG.js automatically with PHP
Posted: Tuesday 03 October 2017 18:26
by EdwinK
Nope. Tried, but nothing changes.
Maybe it's the PHP version I'm using. It's 5.6 (if I'm not mistaken) on Synology.
Re: Dashticz - Save CONFIG.js automatically with PHP
Posted: Tuesday 03 October 2017 19:05
by EdwinK
It does seem to change the config.js file, but doesn't show when page is reloaded. Something to figure out next time.
Reading through the config.js file, it looks like all config blocks are there at least twice (last count 5 times, because I tried it several times), one with the new settings, and below that are the old settings. So, first the title is defined as Control-Center, but... in the second (old) part the title is defined as ControlCenter. I think the latest read by the browser is what it is going to use for the page.
Re: Dashticz - Save CONFIG.js automatically with PHP
Posted: Tuesday 03 October 2017 19:17
by EdwinK
Code: Select all
//var _EDIT_MODE = true;
var config = {}
config['domoticz_ip'] = 'http://192.168.0.10:8084';
config['app_title'] = 'ControlCenter';
config['domoticz_refresh'] = '15';
config['dashticz_refresh'] = '60';
config['default_news_url'] = 'http://www.nu.nl/rss/algemeen';
config['news_scroll_after'] = 7;
config['standby_after'] = 'false';
config['auto_swipe_back_to'] = 1;
config['auto_swipe_back_after'] = 0;
config['auto_slide_pages'] = 0;
config['slide_effect'] = 'slide';
config['standard_graph'] = 'day';
config['language'] = 'nl_NL';
config['timeformat'] = 'YY-MM-DD HH:mm';
config['calendarformat'] = 'dd DD.MM HH:mm';
config['calendarlanguage'] = 'nl_NL';
config['calendarurl'] = 0;
config['boss_stationclock'] = 'RedBoss';
config['gm_api'] = 'SECRET';
config['gm_zoomlevel'] = '11';
config['gm_latitude'] = '51.860067';
config['gm_longitude'] = '4.412692';
config['wu_api'] = '17318c1fc1678195';
config['wu_city'] = 'Rhoon';
config['wu_name'] = 0;
config['wu_country'] = 'NL';
config['idx_moonpicture'] = 1;
config['switch_horizon'] = 0;
config['host_nzbget'] = 0;
config['spot_clientid'] = 'More Secret–';
config['sonarr_url'] = 0;
config['sonarr_apikey'] = 0;
config['sonarr_maxitems'] = 0;
config['garbage_company'] = 'recyclemanager';
config['garbage_icalurl'] = 0;
config['garbage_zipcode'] = '3161LH';
config['garbage_street'] = 'Jonkerhof';
config['garbage_housenumber'] = '27';
config['garbage_maxitems'] = 1;
config['garbage_width'] = '12';
config['selector_instead_of_buttons'] = 1;
config['auto_positioning'] = 0;
config['use_favorites'] = 0;
config['last_update'] = 0;
config['hide_off_button'] = 1;
config['hide_topbar'] = 0;
config['edit_mode'] = 0;
config['hide_seconds'] = 0;
config['hide_seconds_stationclock'] = 0;
config['use_fahrenheit'] = 0;
config['use_beaufort'] = 1;
config['translate_windspeed'] = 0;
config['static_weathericons'] = 0;
config['hide_mediaplayer'] = 0;
config['garbage_hideicon'] = 0;
config['domoticz_ip'] = 'http://192.168.0.10:8084';
config['app_title'] = 'Control-Center';
config['domoticz_refresh'] = '15';
config['dashticz_refresh'] = '60';
config['default_news_url'] = 'http://www.nu.nl/rss/algemeen';
config['news_scroll_after'] = 7;
config['standby_after'] = 'false';
config['auto_swipe_back_to'] = 1;
config['auto_swipe_back_after'] = 0;
config['auto_slide_pages'] = 0;
config['slide_effect'] = 'slide';
config['standard_graph'] = 'day';
config['language'] = 'nl_NL';
config['timeformat'] = 'YY-MM-DD HH:mm';
config['calendarformat'] = 'dd DD.MM HH:mm';
config['calendarlanguage'] = 'nl_NL';
config['calendarurl'] = 0;
config['boss_stationclock'] = 'RedBoss';
config['gm_api'] = 'TOP SECRET';
config['gm_zoomlevel'] = '11';
config['gm_latitude'] = '51.860067';
config['gm_longitude'] = '4.412692';
config['wu_api'] = '17318c1fc1678195';
config['wu_city'] = 'Rhoon';
config['wu_name'] = 0;
config['wu_country'] = 'NL';
config['idx_moonpicture'] = 1;
config['switch_horizon'] = 0;
config['host_nzbget'] = 0;
config['spot_clientid'] = 'MY EYES ONLY';
config['sonarr_url'] = 0;
config['sonarr_apikey'] = 0;
config['sonarr_maxitems'] = 0;
config['garbage_company'] = 'recyclemanager';
config['garbage_icalurl'] = 0;
config['garbage_zipcode'] = '3161LH';
config['garbage_street'] = 'Jonkerhof';
config['garbage_housenumber'] = '27';
config['garbage_maxitems'] = 1;
config['garbage_width'] = '12';
config['selector_instead_of_buttons'] = 1;
config['auto_positioning'] = 0;
config['use_favorites'] = 0;
config['last_update'] = 0;
config['hide_off_button'] = 1;
config['hide_topbar'] = 0;
config['edit_mode'] = 0;
config['hide_seconds'] = 0;
config['hide_seconds_stationclock'] = 0;
config['use_fahrenheit'] = 0;
config['use_beaufort'] = 1;
config['translate_windspeed'] = 0;
config['static_weathericons'] = 0;
config['hide_mediaplayer'] = 0;
config['garbage_hideicon'] = 0;
And everytime I save the from the webbrowser a new block like this is added
Re: Dashticz - Save CONFIG.js automatically with PHP
Posted: Friday 06 October 2017 12:25
by robgeerts
Could you send me your complete config.js?
Re: Dashticz - Save CONFIG.js automatically with PHP
Posted: Friday 06 October 2017 16:42
by pvm
I do not see the effect of continuous adding of blocks. I'm not able to add any blocks however.
Do I need to specify columns or should everything be possible from within the web-interface?
(when setting auto positioning to 1 i see my favorites)
When I use the chrome web-interface nothing happens when pressing save after adding some blocks. The save button in the settings screen does generate a lot of calls and a refresh op the page.
Is there any more info I can provide?
My config (changed app_title, / coordinates
- Spoiler: show
-
var config = {}
config['domoticz_ip'] = 'http://192.168.1.2:8084';
config['app_title'] = 'ABCD';
config['domoticz_refresh'] = 5;
config['dashticz_refresh'] = '60';
config['default_news_url'] = 'http://www.nu.nl/rss/algemeen';
config['news_scroll_after'] = 7;
config['standby_after'] = 0;
config['auto_swipe_back_to'] = 1;
config['auto_swipe_back_after'] = '10';
config['auto_slide_pages'] = '';
config['slide_effect'] = 'slide';
config['standard_graph'] = 'hours';
config['language'] = 'nl_NL';
config['timeformat'] = 'DD-MM-YY HH:mm';
config['calendarformat'] = 'dd DD.MM HH:mm';
config['calendarlanguage'] = 'nl_NL';
config['calendarurl'] = '';
config['boss_stationclock'] = 'RedBoss';
config['gm_api'] = '';
config['gm_zoomlevel'] = '';
config['gm_latitude'] = '11';
config['gm_longitude'] = '22';
config['wu_api'] = '';
config['wu_city'] = 'Amsterdam';
config['wu_name'] = '';
config['wu_country'] = 'NL';
config['idx_moonpicture'] = '';
config['switch_horizon'] = '';
config['host_nzbget'] = '';
config['spot_clientid'] = '';
config['sonarr_url'] = '';
config['sonarr_apikey'] = '';
config['sonarr_maxitems'] = '';
config['garbage_company'] = '';
config['garbage_icalurl'] = '';
config['garbage_zipcode'] = '';
config['garbage_street'] = '';
config['garbage_housenumber'] = '';
config['garbage_maxitems'] = '';
config['garbage_width'] = '';
config['selector_instead_of_buttons'] = 0;
config['auto_positioning'] = 0;
config['use_favorites'] = 1;
config['last_update'] = 1;
config['hide_off_button'] = 0;
config['hide_topbar'] = 0;
config['edit_mode'] = 1;
config['hide_seconds'] = 0;
config['hide_seconds_stationclock'] = 0;
config['use_fahrenheit'] = 0;
config['use_beaufort'] = 0;
config['translate_windspeed'] = 1;
config['static_weathericons'] = 0;
config['hide_mediaplayer'] = 0;
config['garbage_hideicon'] = 0;
Re: Dashticz - Save CONFIG.js automatically with PHP
Posted: Friday 06 October 2017 19:00
by EdwinK
robgeerts wrote: ↑Friday 06 October 2017 12:25
Could you send me your complete config.js?
Will do.
Re: Dashticz - Save CONFIG.js automatically with PHP
Posted: Thursday 12 October 2017 9:56
by Blueone
Does someknow know what chmod I have to use to make sure the config.js is writable for the webuser?
Re: Dashticz - Save CONFIG.js automatically with PHP
Posted: Thursday 26 October 2017 11:14
by Blueone
I tried a lot to write the config automatically to the config.js, it doesn't work om my end. Does anyone have an idea about how to fix this?
Re: Dashticz - Save CONFIG.js automatically with PHP
Posted: Thursday 16 November 2017 16:10
by Blueone
anyone knows how to do this?
Re: Dashticz - Save CONFIG.js automatically with PHP
Posted: Friday 09 February 2018 16:26
by gielie
in my system the save option doesn't work, before, when i pushed save, i got an page with the settings which i had to copy to the config.js but i don't get this anymore how can i get this back?
Re: Dashticz - Save CONFIG.js automatically with PHP
Posted: Monday 12 February 2018 10:04
by michaelm86
Hi Guys,
i have installed the beta of dashticz on my ubuntu server. But when i lauch it the first time. the changed are not saved to config.js.
i did the following :
- installed ubuntu and comfiguratio
- installed php 7
- installed and configured domoticz (working adn using it)
- git clone
https://github.com/robgeerts/dashticz_v2 --branch beta
- sudo chmod 777 -R domoticz/
- sudo cp CONFIG_DEFAULT.js CONFIG.js
- lauched the web browser and accessed the ip of my server
http://192.168.116.80:8080/dashticz_v2/
can anyone help me ou?
Re: Dashticz - Save CONFIG.js automatically with PHP
Posted: Monday 12 February 2018 10:34
by DewGew
michaelm86 wrote: ↑Monday 12 February 2018 10:04
Hi Guys,
i have installed the beta of dashticz on my ubuntu server. But when i lauch it the first time. the changed are not saved to config.js.
i did the following :
- installed ubuntu and comfiguratio
- installed php 7
- installed and configured domoticz (working adn using it)
- git clone
https://github.com/robgeerts/dashticz_v2 --branch beta
- sudo chmod 777 -R domoticz/
- sudo cp CONFIG_DEFAULT.js CONFIG.js
- lauched the web browser and accessed the ip of my server
http://192.168.116.80:8080/dashticz_v2/
can anyone help me ou?
Edit CONFIG.js and put only this and try again:
Code: Select all
var config = {}
config['domoticz_ip'] = 'http://ipnumber:port';
config['app_title'] = 'Dashticz';
config['domoticz_refresh'] = '5';
config['dashticz_refresh'] = '60';
Re: Dashticz - Save CONFIG.js automatically with PHP
Posted: Monday 12 February 2018 10:36
by michaelm86
Hi DewGew,
I tried this. but is does not work ...
when i add the ip and port is does not see it in the config. but when i add the user and ww it sees it.
any other options?