Esempio n. 1
0
	def test(self,config):
		
		
		for device in config['devices']:
			
			device_bla = broadlink.gendevice(devtype=0xFFFFFFF, host=(device['ip'],device['port']),mac = bytearray.fromhex(device['mac']), name=device['name'])		
			status = device_bla.set_temperature(32)
Esempio n. 2
0
	def make_device_objects(self,device_list = None):
		device_objects = {}
		
		if  device_list == [] or device_list == None:
			error_msg = " Cannot make device objects, empty list given"
			logger.error(error_msg)			
			sys.exit()
		
		for device in device_list:			
			device_objects[device['mac']] = broadlink.gendevice(devtype=0x4E2a, host=(device['ip'],device['port']),mac = bytearray.fromhex(device['mac']), name=device['name'],update_interval = self.config['update_interval'])		
			
		return device_objects