diff --git a/fhem/configDB.pm b/fhem/configDB.pm index 7b1b4d3e1..98d7a2cee 100644 --- a/fhem/configDB.pm +++ b/fhem/configDB.pm @@ -254,6 +254,8 @@ $configDB{attr}{nostate} = defined($dbconfig{nostate}) ? $dbconfig{nosta $configDB{attr}{rescue} = defined($dbconfig{rescue}) ? $dbconfig{rescue} : 0; $configDB{attr}{loadversion} = defined($dbconfig{loadversion}) ? $dbconfig{loadversion} : 0; +#$configDB{attr}{rescue} = 1; + ################################################## # Basic functions needed for DB configuration # directly called from fhem.pl @@ -286,13 +288,14 @@ sub cfgDB_Init() { $fhem_dbh->do("INSERT INTO fhemversions values (0, '$uuid')"); _cfgDB_InsertLine($fhem_dbh, $uuid, '#created by cfgDB_Init',0); _cfgDB_InsertLine($fhem_dbh, $uuid, 'attr global logdir ./log',1); - _cfgDB_InsertLine($fhem_dbh, $uuid, 'attr global logfile %L/fhem-%Y-%m-%d.log',1); - _cfgDB_InsertLine($fhem_dbh, $uuid, 'attr global modpath .',2); - _cfgDB_InsertLine($fhem_dbh, $uuid, 'attr global userattr devStateIcon devStateStyle icon sortby webCmd',3); - _cfgDB_InsertLine($fhem_dbh, $uuid, 'attr global verbose 3',4); - _cfgDB_InsertLine($fhem_dbh, $uuid, 'define telnetPort telnet 7072 global',5); - _cfgDB_InsertLine($fhem_dbh, $uuid, 'define web FHEMWEB 8083 global',6); - _cfgDB_InsertLine($fhem_dbh, $uuid, 'define Logfile FileLog %L/fhem-%Y-%m-%d.log fakelog',7); + _cfgDB_InsertLine($fhem_dbh, $uuid, 'attr global logfile %L/fhem-%Y-%m-%d.log',2); + _cfgDB_InsertLine($fhem_dbh, $uuid, 'attr global modpath .',3); + _cfgDB_InsertLine($fhem_dbh, $uuid, 'attr global userattr devStateIcon devStateStyle icon sortby webCmd',4); + _cfgDB_InsertLine($fhem_dbh, $uuid, 'attr global verbose 3',5); + _cfgDB_InsertLine($fhem_dbh, $uuid, 'define telnetPort telnet 7072 global',6); + _cfgDB_InsertLine($fhem_dbh, $uuid, 'define web FHEMWEB 8083 global',7); + _cfgDB_InsertLine($fhem_dbh, $uuid, 'attr web allowfrom .*',8); + _cfgDB_InsertLine($fhem_dbh, $uuid, 'define Logfile FileLog %L/fhem-%Y-%m-%d.log fakelog',9); } # create TABLE fhemstate if nonexistent @@ -470,7 +473,8 @@ sub cfgDB_ReadAll($) { push (@dbconfig, 'attr global modpath .'); push (@dbconfig, 'attr global verbose 3'); push (@dbconfig, 'define telnetPort telnet 7072 global'); - push (@dbconfig, 'define WEB FHEMWEB 8083 global'); + push (@dbconfig, 'define web FHEMWEB 8083 global'); + push (@dbconfig, 'attr web allowfrom .*'); push (@dbconfig, 'define Logfile FileLog ./log/fhem-%Y-%m-%d.log fakelog'); } else { # add Config Rows to commandfile