Пример #1
0
    def __init__(self):

        self.control_point = ControlPointSonos(self.ws_port)
        self.control_point.subscribe("new_device_event", self.on_new_device)
        self.control_point.subscribe("removed_device_event", self.on_del_device)
        self.control_point.subscribe('device_event_seq', self.on_device_event_seq)
        self.control_point.start()

        # start MSEARCH
        run_async_function(self.control_point.start_search, (600.0, "ssdp:all"), 0.001)