def do_NOTIFY(self):
global needs_to_reload_zone_config
global raumfeld_handler
uuid = "uuid:"+self.path[1:]
friendly_name = RfCmd.map_udn_to_friendly_name(uuid)
content_length = int(self.headers['content-length'])
notification = self.rfile.read(content_length)
result = minidom.parseString(notification.decode('UTF-8'))
#print("\n\n#NOTIFY:\n" + result.toprettyxml())
notification_content = XmlHelper.xml_extract_dict(result,
['LastChange',
'Revision',
'SystemUpdateID',
'BufferFilled'])
if len(notification_content['LastChange']):
if '/Preferences/ZoneConfig/Rooms' in notification_content['LastChange']:
needs_to_reload_zone_config = True
last_change = minidom.parseString(notification_content['LastChange'])
uuid_store.set(uuid, friendly_name[0], friendly_name[1], last_change)
raumfeld_handler.set_subscription_values("uuid:" + self.path[1:], last_change)
#print("\n\n#NOTIFY LastChange: "+self.path+"\n"+last_change.toprettyxml())
self.send_response(200)
self.end_headers()
评论列表
文章目录