コード例 #1
0
 def setup(self):
     """Subscribe to set topics"""
     self.bulk_config()
     self.logger.debug('Subscribing.')
     self.client.subscribe("openWB/set/#", 2)
     self.client.subscribe("openWB/config/set/#", 2)
     scheduler = Scheduler()
     scheduler.registerData(["*"], self)
     scheduler.registerTimer(
         10, self.publishLiveData
     )  # TODO: React on Chargepoint  end-of-loop event
     scheduler.registerEvent(EventType.configupdate, self.newconfig)
     scheduler.registerEvent(EventType.resetDaily, self.cut_live)
コード例 #2
0
 def setup(self):
     scheduler = Scheduler()
     scheduler.registerData(['*'], self)