diff --git a/Classes/PluginConf.py b/Classes/PluginConf.py index 4460b5aad..1f200138d 100644 --- a/Classes/PluginConf.py +++ b/Classes/PluginConf.py @@ -547,8 +547,8 @@ def _load_Settings(self): if is_domoticz_db_available(self): _domoticz_pluginConf = getConfigItem(Key="PluginConf") if "TimeStamp" in _domoticz_pluginConf: - dz_timestamp = _domoticz_pluginConf["TimeStamp"] - _domoticz_pluginConf = _domoticz_pluginConf["b64Settings"] + dz_timestamp = _domoticz_pluginConf.get("TimeStamp",0) + _domoticz_pluginConf = _domoticz_pluginConf.get("b64Settings",{}) Domoticz.Log( "Plugin data loaded where saved on %s" % (time.strftime("%A, %Y-%m-%d %H:%M:%S", time.localtime(dz_timestamp))) diff --git a/Modules/database.py b/Modules/database.py index 7e6c71889..2c3b561dc 100644 --- a/Modules/database.py +++ b/Modules/database.py @@ -284,8 +284,8 @@ def _read_DeviceList_Domoticz(self): ListOfDevices_from_Domoticz = getConfigItem(Key="ListOfDevices", Attribute="Devices") time_stamp = 0 if "TimeStamp" in ListOfDevices_from_Domoticz: - time_stamp = ListOfDevices_from_Domoticz["TimeStamp"] - ListOfDevices_from_Domoticz = ListOfDevices_from_Domoticz["Devices"] + time_stamp = ListOfDevices_from_Domoticz.get("TimeStamp",0) + ListOfDevices_from_Domoticz = ListOfDevices_from_Domoticz.get("Devices",{}) self.log.logging( "Database", "Log", diff --git a/plugin.py b/plugin.py index ddcc61886..3a78a9991 100644 --- a/plugin.py +++ b/plugin.py @@ -402,6 +402,9 @@ def onStart(self): self.zigbee_communication, self.VersionNewFashion, self.DomoticzMajor, self.DomoticzMinor, Parameters["HomeFolder"], self.HardwareID ) + self.pluginconf.pluginConf["useDomoticzDatabase"] = False + self.pluginconf.pluginConf["storeDomoticzDatabase"] = False + if self.internet_available is None: self.internet_available = is_internet_available()