def get(self, idx):
"""Get the device's data in Domoticz."""
try:
f = urllib.urlopen(self.url + "/json.htm?type=devices&rid=" + str(idx))
response = f.read()
return json.loads(response)
except IOError as e:
LOGGER.error(str(e) + ' : ' + str(e.read()))
评论列表
文章目录