Esempio n. 1
0
    def setup(self):
        # We expect to receive a list of host names here.
        self._hosts = self.adapter_json.get('hosts')

        self.status.set(self.url, {})

        # Start refreshing SNMP information every 10 seconds.
        timing_helper = repeat.interval_helper(datetime.timedelta(seconds=15))
        repeat.call_repeating(timing_helper, self.update_hosts)
Esempio n. 2
0
  def setup(self):
    # We expect to receive a list of host names here.
    self._hosts = self.adapter_json.get('hosts')

    self.status.set(self.url, {})

    # Start refreshing SNMP information every 10 seconds.
    timing_helper = repeat.interval_helper(datetime.timedelta(seconds=15))
    repeat.call_repeating(timing_helper, self.update_hosts)
Esempio n. 3
0
  def setup(self):
    # Read our file, and attach it to the status.
    self.root = self.adapter_json.get('root_player')
    self.root_soco = SoCo(self.root)

    logging.info('Sonos with root_player %s', self.root)

    # Start refreshing Sonos information every 10 seconds.
    timing_helper = repeat.interval_helper(datetime.timedelta(seconds=10))
    repeat.call_repeating(timing_helper, self.refresh_players)
Esempio n. 4
0
    def setup(self):
        # Read our file, and attach it to the status.
        self.root = self.adapter_json.get('root_player')
        self.root_soco = SoCo(self.root)

        logging.info('Sonos with root_player %s', self.root)

        # Start refreshing Sonos information every 10 seconds.
        timing_helper = repeat.interval_helper(datetime.timedelta(seconds=10))
        repeat.call_repeating(timing_helper, self.refresh_players)