Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error handling dz read #1819

Merged
merged 2 commits into from
Dec 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Classes/PluginConf.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)))
Expand Down
4 changes: 2 additions & 2 deletions Modules/database.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
3 changes: 3 additions & 0 deletions plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -395,6 +395,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()

Expand Down
Loading