def processMsg(self, msg):
     tmp = msg.getByte("command1") & 0xFF
     if tmp != 0x2E:
         out(self.name + " got unexpected msg: " + msg.toString())
         return 0
     if msg.isExtended():
         out(self.name + " existing schedule:")
         printScheduleMsg(msg)
         idx = 3 * self.period
         data = message.getMsgData(msg)
         data = [(data[k] & 0xFF) for k in range(len(data))]
         data[idx] = self.time & 0xFF
         data[idx + 1] = self.cool & 0xFF
         data[idx + 2] = self.heat & 0xFF
         nmsg = message.createExtendedMsg2(
             InsteonAddress(self.thermostat.address), 0x2E, (0x03 + self.day) & 0xFF, data
         )
         out(self.name + " new schedule:")
         printScheduleMsg(nmsg)
         iofun.writeMsg(nmsg)
         out(self.name + " sent new schedule: " + nmsg.toString())
         return 1
     else:
         out(self.name + " got ack, waiting for ext msg!")
         return 0
 def processMsg(self, msg):
     tmp = msg.getByte("command1") & 0xFF
     if (tmp != 0x2e):
         out(self.name + " got unexpected msg: " + msg.toString())
         return 0
     if msg.isExtended():
         out(self.name + " existing schedule:")
         printScheduleMsg(msg)
         idx = 3 * self.period
         data = message.getMsgData(msg)
         data = [(data[k] & 0xFF) for k in range(len(data))]
         data[idx] = self.time & 0xFF
         data[idx + 1] = self.cool & 0xFF
         data[idx + 2] = self.heat & 0xFF
         nmsg = message.createExtendedMsg2(
             InsteonAddress(self.thermostat.address), 0x2e,
             (0x03 + self.day) & 0xFF, data)
         out(self.name + " new schedule:")
         printScheduleMsg(nmsg)
         iofun.writeMsg(nmsg)
         out(self.name + " sent new schedule: " + nmsg.toString())
         return 1
     else:
         out(self.name + " got ack, waiting for ext msg!")
         return 0
 def sendext2(self, cmd1, cmd2, data):
     msg = message.createExtendedMsg2(InsteonAddress(self.address), cmd1, cmd2, data)
     self.__sendMsg(msg)
     return msg
 def sendext2(self, cmd1, cmd2, data):
     msg = message.createExtendedMsg2(InsteonAddress(self.address), cmd1,
                                      cmd2, data)
     self.__sendMsg(msg)
     return msg
	def queryext2(self, cmd1, cmd2, data):
		msg = message.createExtendedMsg2(InsteonAddress(self.addr),
										  cmd1, cmd2, data)
		self.sendMsg(msg);
		return msg;