Skip to content

Commit

Permalink
Merge branch 'rc-stable7-7.1.013' into zigpy-upstream-08-11-24
Browse files Browse the repository at this point in the history
  • Loading branch information
pipiche38 authored Nov 10, 2024
2 parents 3b71cc7 + e34edc3 commit 12079a2
Show file tree
Hide file tree
Showing 61 changed files with 2,203 additions and 635 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
*/*/.DS_store
Conf/PluginConf-*
OTAFirmware/*/*
certs/*
!OTAFirmware/*/README.me
!OTAFirmware/*/.PRECIOUS
Conf/ZigateGroupsConfig-*
Expand Down
3 changes: 2 additions & 1 deletion Classes/AdminWidgets.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,14 +39,15 @@ def _get_switch_selector_options(self, ):
}

class AdminWidgets:
def __init__(self, log, PluginConf, pluginParameters, ListOfDomoticzWidget, Devices, ListOfDevices, HardwareID):
def __init__(self, log, PluginConf, pluginParameters, ListOfDomoticzWidget, Devices, ListOfDevices, HardwareID, IEEE2NWK):

self.pluginconf = PluginConf
self.pluginParameters = pluginParameters
self.ListOfDomoticzWidget = ListOfDomoticzWidget
self.Devices = Devices # Point to the List of Domoticz Devices
self.ListOfDevices = ListOfDevices # Point to the Global ListOfDevices
self.HardwareID = HardwareID
self.IEEE2NWK = IEEE2NWK
self.log = log
self.createStatusWidget(Devices)
self.createNotificationWidget(Devices)
Expand Down
4 changes: 2 additions & 2 deletions Classes/LoggingManagement.py
Original file line number Diff line number Diff line change
Expand Up @@ -511,12 +511,12 @@ def process_logging_event( self, logging_tuple):
_catch_error_event(self, context,logging_tuple, err )
return

thread_name = f"{thread_name} {thread_id}"

if logType == "Error":
thread_name=thread_name + " " + thread_id
loggingError(self, thread_name, module, message, nwkid, context)

elif logType == "Debug" and _should_log_debug(self, thread_name) and _is_to_be_logged(self, logType, module):
thread_name=thread_name + " " + thread_id
_logginfilter(self, thread_name, message, nwkid)

else:
Expand Down
1 change: 1 addition & 0 deletions Classes/OTA.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@
"Ledvance": {"Folder": "LEDVANCE", "ManufCode": 0x1189, "ManufName": "LEDVANCE", "Enabled": True},
"Legrand": {"Folder": "LEGRAND", "ManufCode": 0x1021, "ManufName": "Legrand", "Enabled": True},
"Lixee": {"Folder": "LIXEE", "ManufCode": 0x1037, "ManufName": "LiXee", "Enabled": True},
"Nodon": {"Folder": "NODON", "ManufCode": 0x128b, "ManufName": "NodOn", "Enabled": True},
"Osram1": {"Folder": "OSRAM", "ManufCode": 0xBBAA, "ManufName": "OSRAM", "Enabled": True},
"Osram2": {"Folder": "LEDVANCE", "ManufCode": 0x110C, "ManufName": "OSRAM", "Enabled": True},
"Philips": {"Folder": "PHILIPS", "ManufCode": 0x100B, "ManufName": "Philips", "Enabled": True},
Expand Down
11 changes: 10 additions & 1 deletion Classes/PluginConf.py
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,8 @@
"pluginReports": {"type": "path","default": "","current": None,"restart": 1,"hidden": False,"Advanced": True,},
"pluginWWW": {"type": "path","default": "","current": None,"restart": 1,"hidden": False,"Advanced": True,},
"pluginLogs": {"type": "path","default": "","current": None,"restart": 1,"hidden": False,"Advanced": True,},
"SSLCertificate": {"type": "path","default": "","current": None,"restart": 1,"hidden": False,"Advanced": True,},
"SSLPrivateKey": {"type": "path","default": "","current": None,"restart": 1,"hidden": False,"Advanced": True,},
},
},
# Verbose
Expand All @@ -218,6 +220,7 @@
"param": {
"AbstractDz": { "type": "bool", "default": 0, "current": None, "restart": 0, "hidden": False, "Advanced": True },
"Barometer": { "type": "bool", "default": 0, "current": None, "restart": 0, "hidden": False, "Advanced": True },
"BatteryManagement": { "type": "bool", "default": 0, "current": None, "restart": 0, "hidden": False, "Advanced": True },
"BasicOutput": { "type": "bool", "default": 0, "current": None, "restart": 0, "hidden": False, "Advanced": True },
"Binding": { "type": "bool", "default": 0, "current": None, "restart": 0, "hidden": False, "Advanced": True },
"CasaIA": { "type": "bool", "default": 0, "current": None, "restart": 0, "hidden": False, "Advanced": True },
Expand Down Expand Up @@ -285,6 +288,8 @@
"ReadAttributes": { "type": "bool", "default": 0, "current": None, "restart": 0, "hidden": False, "Advanced": True },
"Schneider": { "type": "bool", "default": 0, "current": None, "restart": 0, "hidden": False, "Advanced": True },
"Sonoff": { "type": "bool", "default": 0, "current": None, "restart": 0, "hidden": False, "Advanced": True },
"Sunricher": { "type": "bool", "default": 0, "current": None, "restart": 0, "hidden": False, "Advanced": True },

"Temperature": { "type": "bool", "default": 0, "current": None, "restart": 0, "hidden": False, "Advanced": True },
"Thermostats": { "type": "bool", "default": 0, "current": None, "restart": 0, "hidden": False, "Advanced": True },
"ThreadCommunication": { "type": "bool", "default": 0, "current": None, "restart": 0, "hidden": False, "Advanced": True },
Expand Down Expand Up @@ -653,7 +658,7 @@ def _path_check(self):
# this is a url
continue
_path_name = Path( self.pluginConf[param] )
if not os.path.exists(_path_name):
if param not in ( "SSLCertificate", "SSLPrivateKey") and not os.path.exists(_path_name):
Domoticz.Error("Cannot access path: %s" % _path_name)
if self.pluginConf[param] != str( _path_name ):
if self.pluginConf["PosixPathUpdate"]:
Expand Down Expand Up @@ -716,5 +721,9 @@ def setup_folder_parameters(self, homedir):
self.pluginConf[param] = str( Path(self.pluginConf["pluginHome"]) / "Reports")
elif param == "pluginWWW":
self.pluginConf[param] = str( Path(self.pluginConf["pluginHome"]) / "www")
elif param == "SSLCertificate":
self.pluginConf[param] = str( Path(self.pluginConf["pluginHome"]) / "certs" / "server.crt")
elif param == "SSLPrivateKey":
self.pluginConf[param] = str( Path(self.pluginConf["pluginHome"]) / "certs" / "server.key")
else:
self.pluginConf[param] = SETTINGS[theme]["param"][param]["default"]
11 changes: 8 additions & 3 deletions Classes/WebServer/WebServer.py
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,12 @@ def __init__(

self.DomoticzMajor = DomoticzMajor
self.DomoticzMinor = DomoticzMinor

self.server_thread = None
self.client_threads = []
self.running = None
self.clients = {}


# httpPort could have 2 formats. port number only or IP:port
if ':' in httpPort:
Expand Down Expand Up @@ -854,10 +860,9 @@ def rest_zDevice_name(self, verb, data, parameters):
del self.IEEE2NWK[ieee]

# for a remove in case device didn't send the leave
if "IEEE" in self.ControllerData and ieee:
if ieee and "IEEE" in self.ControllerData and self.zigbee_communication == "native":
# uParrentAddress + uChildAddress (uint64)
if self.zigbee_communication == "native":
sendZigateCmd(self, "0026", self.ControllerData["IEEE"] + ieee)
sendZigateCmd(self, "0026", self.ControllerData["IEEE"] + ieee)

action = {"Name": "Device %s/%s removed" % (nwkid, ieee)}
_response["Data"] = json.dumps(action, sort_keys=True)
Expand Down
Loading

0 comments on commit 12079a2

Please sign in to comment.