Skip to content

Commit

Permalink
Release 6.3.010
Browse files Browse the repository at this point in the history
  • Loading branch information
pipiche38 committed Feb 1, 2023
2 parents 8784804 + 7cd9e27 commit e73dbf5
Show file tree
Hide file tree
Showing 32 changed files with 840 additions and 560 deletions.
2 changes: 1 addition & 1 deletion .hidden/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"branch": "stable6", "version": "6.3.009"}
{"branch": "stable6", "version": "6.3.010"}
23 changes: 20 additions & 3 deletions Classes/DomoticzDB.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
import socket
import time
import urllib.request

import ssl
import Domoticz

from Modules.restartPlugin import restartPluginViaDomoticzJsonApi
Expand Down Expand Up @@ -71,12 +71,21 @@ def extract_username_password( self, url_base_api ):


def open_and_read( self, url ):
self.logging("Log", f'opening url {url}')

myssl_context = None
if "https" in url.lower() and not self.plugin.pluginConf["CheckSSLCertificateValidity"]:
myssl_context = ssl.create_default_context()
myssl_context.check_hostname=False
myssl_context.verify_mode=ssl.CERT_NONE

retry = 3
while retry:
try:
with urllib.request.urlopen(url) as response:
self.logging("Debug", f'opening url {url} with context {myssl_context}')
with urllib.request.urlopen(url, context=myssl_context) as response:
return response.read()

except urllib.error.HTTPError as e:
if e.code in [429,504]: # 429=too many requests, 504=gateway timeout
reason = f'{e.code} {str(e.reason)}'
Expand Down Expand Up @@ -109,8 +118,16 @@ def domoticz_request( self, url):
self.logging("Debug",'domoticz request Authorization: %s' %request)
request.add_header("Authorization", "Basic %s" % self.authentication_str)
self.logging("Debug",'domoticz request open url')

myssl_context = None
if "https" in url.lower() and not self.plugin.pluginConf["CheckSSLCertificateValidity"]:
myssl_context = ssl.create_default_context()
myssl_context.check_hostname=False
myssl_context.verify_mode=ssl.CERT_NONE

try:
response = urllib.request.urlopen(request)
self.logging("Debug", f'opening url {request} with context {myssl_context}')
response = urllib.request.urlopen(request, context=myssl_context)
except urllib.error.URLError as e:
self.logging("Error", "Urlopen to %s rejected. Error: %s" %(url, e))
return None
Expand Down
3 changes: 2 additions & 1 deletion Classes/PluginConf.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
"enablegroupmanagement": { "type": "bool", "default": 0, "current": None, "restart": 1, "hidden": False, "Advanced": False, },
"enableReadAttributes": { "type": "bool", "default": 0, "current": None, "restart": 1, "hidden": True, "Advanced": True, },
"internetAccess": { "type": "bool", "default": 1, "current": None, "restart": 1, "hidden": False, "Advanced": False, },
"CheckSSLCertificateValidity": { "type": "bool", "default": 0, "current": None, "restart": 1, "hidden": False, "Advanced": False, },
"allowOTA": { "type": "bool", "default": 1, "current": None, "restart": 1, "hidden": True, "Advanced": False, },
"pingDevices": { "type": "bool", "default": 1, "current": None, "restart": 1, "hidden": False, "Advanced": True, },
"PluginAnalytics": { "type": "bool", "default": -1, "current": None, "restart": 0, "hidden": False, "Advanced": False, },
Expand Down Expand Up @@ -156,7 +157,7 @@
"default": "0",
"current": None,
"restart": 2,
"hidden": False,
"hidden": True,
"Advanced": False,
},
"TXpower_set": { "type": "list", "list": {"0dbM": 0, "-9 dbM": 1, "-20dbM": 2, "-32dbM": 3}, "default": 0, "current": None, "restart": 1, "hidden": False, "Advanced": True, },
Expand Down
48 changes: 48 additions & 0 deletions Conf/Certified/IKEA_TRADFRI/TRADFRI bulb E27 CWS 806lm.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
{
"_source": "https://github.com/zigbeefordomoticz/Domoticz-Zigbee/issues/1481",
"_blakadder": "https://zigbee.blakadder.com/Ikea_LED1924G9.html",
"_description": "Tradfri bulb E26/E27 CWS 800/806 lumen, dimmable, color, opal white",
"Ep":{
"01":{
"0000":"",
"0003":"",
"0004":"",
"0005":"",
"0006":"",
"0008":"",
"0300": "",
"0b05":"",
"0019":"",
"fc7c": "",
"1000":"",
"Type":"ColorControlRGBWW"
},
"f2": {
"0021": "",
"Type": ""
}
},
"Type":"",
"ClusterToBind": [ "0006", "0008", "0300" ],
"ConfigureReporting": {
"0006": {"Attributes": { "0000": {"DataType": "10", "MinInterval":"0001", "MaxInterval":"012C", "TimeOut":"0000","Change":"01"}}},
"0008": {"Attributes": { "0000": {"DataType": "20", "MinInterval":"0005", "MaxInterval":"012C", "TimeOut":"0000","Change":"05"}}}
},
"ReadAttributes": {
"0000": [ "0000", "0001", "0002", "0003", "0004", "0005", "0007", "000a", "4000" ],
"0004": [],
"0005": [],
"0006": [ "0000", "4000", "4001", "4002", "4003" ],
"0008": [ "0000" ],
"0300": [ "0000", "0001", "0003", "0004", "0007", "0008", "400a" ],
"0019": []
},
"Param": {
"PowerOnAfterOffOn": 255,
"fadingOff": 0,
"moveToHueSatu": 0,
"moveToColourTemp": 0,
"moveToColourRGB": 0,
"moveToLevel": 0
}
}
128 changes: 65 additions & 63 deletions Conf/Certified/Lixee/ZLinky_TIC-historique-mono.json
Original file line number Diff line number Diff line change
@@ -1,65 +1,67 @@
{
"_comment": "Linky module Configuration for Mode: Historique Monophasé",
"Ep": {
"01": {
"0000": "",
"0003": "",
"0004": "",
"0005": "",
"0019": "",
"0702": "",
"0b01": "",
"0b04": "",
"ff66": "",
"Type": "Meter/Power/P1Meter_ZL/Ampere3/Alarm_ZL/Alarm_ZL2/Alarm_ZL3"
},
"f2": { "Type": "P1Meter_ZL/Alarm_ZL" },
"f3": { "Type": "P1Meter_ZL/Alarm_ZL" }
},
"FakeEp": [ "f2", "f3" ],
"Type": "",
"bindEp": [ "01" ],
"ClusterToBind": [ "0702", "0b04", "ff66" ],
"ConfigureReporting": {
"0702": {
"Attributes": {
"0100": { "DataType": "25", "MinInterval": "003C", "MaxInterval": "0E10", "TimeOut": "0000", "Change": "000000000001" },
"0102": { "DataType": "25", "MinInterval": "003C", "MaxInterval": "0E10", "TimeOut": "0000", "Change": "000000000001" },
"0104": { "DataType": "25", "MinInterval": "003C", "MaxInterval": "0E10", "TimeOut": "0000", "Change": "000000000001" },
"0106": { "DataType": "25", "MinInterval": "003C", "MaxInterval": "0E10", "TimeOut": "0000", "Change": "000000000001" },
"0108": { "DataType": "25", "MinInterval": "003C", "MaxInterval": "0E10", "TimeOut": "0000", "Change": "000000000001" },
"010a": { "DataType": "25", "MinInterval": "003C", "MaxInterval": "0E10", "TimeOut": "0000", "Change": "000000000001" }
}
},
"0b04": {
"Attributes": {
"0508": { "DataType": "21", "MinInterval": "0046", "MaxInterval": "0E10", "TimeOut": "0000", "Change": "0001" },
"050f": { "DataType": "21", "MinInterval": "000E", "MaxInterval": "0E10", "TimeOut": "0000", "Change": "0001" }
}
},
"ff66": {
"Attributes": {
"0004": { "DataType": "20", "MinInterval": "0708", "MaxInterval": "0708", "TimeOut": "0000", "Change": "01" },
"0005": { "DataType": "21", "MinInterval": "000A", "MaxInterval": "0E10", "TimeOut": "0000", "Change": "0001" },
"0001": { "DataType": "42", "MinInterval": "0300", "MaxInterval": "0E10", "TimeOut": "0000", "Change": "" }
}
}
},
"ReadAttributes": {
"0000": [ "0000", "0001", "0002", "0003", "0004", "0005", "0006", "0007", "4000" ],
"0003": [],
"0702": [ "0000", "0001", "0020", "0100", "0102", "0104", "0106", "0108", "010a", "0308" ],
"0b01": [ "000d" ],
"0b04": [ "0505" ],
"ff66": [ "0300", "0100", "0000", "0002" ],
"0019": []
},
"PollingEnabled": 1,
"Param": {
"ConfigurationReportChunk": 1,
"ReadAttributesChunk": 2,
"PollingCusterff66": 86400,
"ZLinkyPollingGlobal": 86400,
"ZLinkyPollingPTEC": 900
}
"_comment": "Linky module Configuration for Mode: Historique Monophasé",
"Ep": {
"01": {
"0000": "",
"0001": "",
"0003": "",
"0004": "",
"0005": "",
"0019": "",
"0702": "",
"0b01": "",
"0b04": "",
"ff66": "",
"Type": "Meter/Power/P1Meter_ZL/Ampere3/Alarm_ZL/Alarm_ZL2/Alarm_ZL3"
},
"f2": { "Type": "P1Meter_ZL/Alarm_ZL" },
"f3": { "Type": "P1Meter_ZL/Alarm_ZL" }
},
"FakeEp": [ "f2", "f3" ],
"Type": "",
"bindEp": [ "01" ],
"ClusterToBind": [ "0702", "0b04", "ff66" ],
"ConfigureReporting": {
"0702": {
"Attributes": {
"0100": { "DataType": "25", "MinInterval": "003C", "MaxInterval": "0E10", "TimeOut": "0000", "Change": "000000000001" },
"0102": { "DataType": "25", "MinInterval": "003C", "MaxInterval": "0E10", "TimeOut": "0000", "Change": "000000000001" },
"0104": { "DataType": "25", "MinInterval": "003C", "MaxInterval": "0E10", "TimeOut": "0000", "Change": "000000000001" },
"0106": { "DataType": "25", "MinInterval": "003C", "MaxInterval": "0E10", "TimeOut": "0000", "Change": "000000000001" },
"0108": { "DataType": "25", "MinInterval": "003C", "MaxInterval": "0E10", "TimeOut": "0000", "Change": "000000000001" },
"010a": { "DataType": "25", "MinInterval": "003C", "MaxInterval": "0E10", "TimeOut": "0000", "Change": "000000000001" }
}
},
"0b04": {
"Attributes": {
"0508": { "DataType": "21", "MinInterval": "0046", "MaxInterval": "0E10", "TimeOut": "0000", "Change": "0001" },
"050f": { "DataType": "21", "MinInterval": "000E", "MaxInterval": "0E10", "TimeOut": "0000", "Change": "0001" }
}
},
"ff66": {
"Attributes": {
"0004": { "DataType": "20", "MinInterval": "0708", "MaxInterval": "0708", "TimeOut": "0000", "Change": "01" },
"0005": { "DataType": "21", "MinInterval": "000A", "MaxInterval": "0E10", "TimeOut": "0000", "Change": "0001" },
"0001": { "DataType": "42", "MinInterval": "0300", "MaxInterval": "0E10", "TimeOut": "0000", "Change": "" }
}
}
},
"ReadAttributes": {
"0000": [ "0000", "0001", "0002", "0003", "0004", "0005", "0006", "0007", "4000" ],
"0001": [ "0000", "0011", "0012" ],
"0003": [],
"0702": [ "0000", "0001", "0020", "0100", "0102", "0104", "0106", "0108", "010a", "0308" ],
"0b01": [ "000d" ],
"0b04": [ "0505" ],
"ff66": [ "0300", "0100", "0000", "0002" ],
"0019": []
},
"PollingEnabled": 1,
"Param": {
"ConfigurationReportChunk": 1,
"ReadAttributesChunk": 2,
"PollingCusterff66": 86400,
"ZLinkyPollingGlobal": 86400,
"ZLinkyPollingPTEC": 900
}
}
138 changes: 70 additions & 68 deletions Conf/Certified/Lixee/ZLinky_TIC-historique-tri.json
Original file line number Diff line number Diff line change
@@ -1,70 +1,72 @@
{
"_comment": "Linky module Configuration for Mode: Historique Triphasé",
"Ep": {
"01": {
"0000": "",
"0003": "",
"0004": "",
"0005": "",
"0019": "",
"0702": "",
"0b01": "",
"0b04": "",
"ff66": "",
"Type": "Meter/Power/P1Meter_ZL/Ampere3/Alarm_ZL/Alarm_ZL2/Alarm_ZL3"
},
"f2": { "Type": "P1Meter_ZL/Alarm_ZL" },
"f3": { "Type": "P1Meter_ZL/Alarm_ZL" }
},
"FakeEp": [ "f2", "f3" ],
"Type": "",
"bindEp": [ "01" ],
"ClusterToBind": [ "0702", "0b04", "ff66" ],
"ConfigureReporting": {
"0702": {
"Attributes": {
"0100": { "DataType": "25", "MinInterval": "003C", "MaxInterval": "0E10", "TimeOut": "0000", "Change": "000000000001" },
"0102": { "DataType": "25", "MinInterval": "003C", "MaxInterval": "0E10", "TimeOut": "0000", "Change": "000000000001" },
"0104": { "DataType": "25", "MinInterval": "003C", "MaxInterval": "0E10", "TimeOut": "0000", "Change": "000000000001" },
"0106": { "DataType": "25", "MinInterval": "003C", "MaxInterval": "0E10", "TimeOut": "0000", "Change": "000000000001" },
"0108": { "DataType": "25", "MinInterval": "003C", "MaxInterval": "0E10", "TimeOut": "0000", "Change": "000000000001" },
"010a": { "DataType": "25", "MinInterval": "003C", "MaxInterval": "0E10", "TimeOut": "0000", "Change": "000000000001" }
}
},
"0b04": {
"Attributes": {
"0508": { "DataType": "21", "MinInterval": "0046", "MaxInterval": "0E10", "TimeOut": "0000", "Change": "0001" },
"0908": { "DataType": "21", "MinInterval": "0046", "MaxInterval": "0E10", "TimeOut": "0000", "Change": "0001" },
"0a08": { "DataType": "21", "MinInterval": "0046", "MaxInterval": "0E10", "TimeOut": "0000", "Change": "0001" },
"050f": { "DataType": "21", "MinInterval": "000E", "MaxInterval": "0E10", "TimeOut": "0000", "Change": "0001" }
}
},
"ff66": {
"Attributes": {
"0004": { "DataType": "20", "MinInterval": "0708", "MaxInterval": "0708", "TimeOut": "0000", "Change": "01" },
"0005": { "DataType": "21", "MinInterval": "000A", "MaxInterval": "fffe", "TimeOut": "0000", "Change": "0001" },
"0006": { "DataType": "21", "MinInterval": "000A", "MaxInterval": "fffe", "TimeOut": "0000", "Change": "0001" },
"0007": { "DataType": "21", "MinInterval": "000A", "MaxInterval": "fffe", "TimeOut": "0000", "Change": "0001" },
"0008": { "DataType": "21", "MinInterval": "000A", "MaxInterval": "fffe", "TimeOut": "0000", "Change": "0001" },
"0001": { "DataType": "42", "MinInterval": "0300", "MaxInterval": "0E10", "TimeOut": "0000", "Change": "" }
}
}
},
"ReadAttributes": {
"0000": [ "0000", "0001", "0002", "0003", "0004", "0005", "0006", "0007", "4000" ],
"0003": [],
"0702": [ "0020", "0308" ],
"0b01": [ "000d" ],
"0b04": [ "050a", "050d", "090a", "0a0a" ],
"ff66": [ "0300", "0100", "0000", "0002", "0003" ],
"0019": []
},
"PollingEnabled": 1,
"Param": {
"ConfigurationReportChunk": 1,
"ReadAttributesChunk": 2,
"PollingCusterff66": 86400,
"ZLinkyPollingGlobal": 86400,
"ZLinkyPollingPTEC": 900
}
"_comment": "Linky module Configuration for Mode: Historique Triphasé",
"Ep": {
"01": {
"0000": "",
"0001": "",
"0003": "",
"0004": "",
"0005": "",
"0019": "",
"0702": "",
"0b01": "",
"0b04": "",
"ff66": "",
"Type": "Meter/Power/P1Meter_ZL/Ampere3/Alarm_ZL/Alarm_ZL2/Alarm_ZL3"
},
"f2": { "Type": "P1Meter_ZL/Alarm_ZL" },
"f3": { "Type": "P1Meter_ZL/Alarm_ZL" }
},
"FakeEp": [ "f2", "f3" ],
"Type": "",
"bindEp": [ "01" ],
"ClusterToBind": [ "0702", "0b04", "ff66" ],
"ConfigureReporting": {
"0702": {
"Attributes": {
"0100": { "DataType": "25", "MinInterval": "003C", "MaxInterval": "0E10", "TimeOut": "0000", "Change": "000000000001" },
"0102": { "DataType": "25", "MinInterval": "003C", "MaxInterval": "0E10", "TimeOut": "0000", "Change": "000000000001" },
"0104": { "DataType": "25", "MinInterval": "003C", "MaxInterval": "0E10", "TimeOut": "0000", "Change": "000000000001" },
"0106": { "DataType": "25", "MinInterval": "003C", "MaxInterval": "0E10", "TimeOut": "0000", "Change": "000000000001" },
"0108": { "DataType": "25", "MinInterval": "003C", "MaxInterval": "0E10", "TimeOut": "0000", "Change": "000000000001" },
"010a": { "DataType": "25", "MinInterval": "003C", "MaxInterval": "0E10", "TimeOut": "0000", "Change": "000000000001" }
}
},
"0b04": {
"Attributes": {
"0508": { "DataType": "21", "MinInterval": "0046", "MaxInterval": "0E10", "TimeOut": "0000", "Change": "0001" },
"0908": { "DataType": "21", "MinInterval": "0046", "MaxInterval": "0E10", "TimeOut": "0000", "Change": "0001" },
"0a08": { "DataType": "21", "MinInterval": "0046", "MaxInterval": "0E10", "TimeOut": "0000", "Change": "0001" },
"050f": { "DataType": "21", "MinInterval": "000E", "MaxInterval": "0E10", "TimeOut": "0000", "Change": "0001" }
}
},
"ff66": {
"Attributes": {
"0004": { "DataType": "20", "MinInterval": "0708", "MaxInterval": "0708", "TimeOut": "0000", "Change": "01" },
"0005": { "DataType": "21", "MinInterval": "000A", "MaxInterval": "fffe", "TimeOut": "0000", "Change": "0001" },
"0006": { "DataType": "21", "MinInterval": "000A", "MaxInterval": "fffe", "TimeOut": "0000", "Change": "0001" },
"0007": { "DataType": "21", "MinInterval": "000A", "MaxInterval": "fffe", "TimeOut": "0000", "Change": "0001" },
"0008": { "DataType": "21", "MinInterval": "000A", "MaxInterval": "fffe", "TimeOut": "0000", "Change": "0001" },
"0001": { "DataType": "42", "MinInterval": "0300", "MaxInterval": "0E10", "TimeOut": "0000", "Change": "" }
}
}
},
"ReadAttributes": {
"0000": [ "0000", "0001", "0002", "0003", "0004", "0005", "0006", "0007", "4000" ],
"0001": [ "0000", "0011", "0012" ],
"0003": [],
"0702": [ "0020", "0308" ],
"0b01": [ "000d" ],
"0b04": [ "050a", "050d", "090a", "0a0a" ],
"ff66": [ "0300", "0100", "0000", "0002", "0003" ],
"0019": []
},
"PollingEnabled": 1,
"Param": {
"ConfigurationReportChunk": 1,
"ReadAttributesChunk": 2,
"PollingCusterff66": 86400,
"ZLinkyPollingGlobal": 86400,
"ZLinkyPollingPTEC": 900
}
}
Loading

0 comments on commit e73dbf5

Please sign in to comment.