def setTime(self, day, hour, min, sec):
        """setTime(day, hour, min, sec)
		sets clock time (day = 0(Sunday) .. 6 (Saturday)) """
        self.querier.setMsgHandler(MsgHandler("set time return msg:"))
        self.ext2(0x2e, 0x02, [0x02, day, hour, min, 0, sec])
    def setCoolPoint(self, temp):
        """setCoolPoint(temp)
		sets cooling temperature"""
        self.querier.setMsgHandler(MsgHandler("set cool point"))
        self.ext(0x6c, temp * 2, [0x0, 0x0, 0x0])
	def __init__(self, name = "ExtMsgHandler"):
		MsgHandler.__init__(self, name)
示例#4
0
    def enterLinkingModeExtended(self, group):
        """enterLinkingModeExtended(group)
		causes the device to enter linking mode (for i2CS devices)"""
        self.querier.setMsgHandler(MsgHandler("enter linking mode extended"))
        self.querier.queryext(0x09, group, [])
 def goToSleep(self):  # go to sleep after 3 seconds
     self.querier.setMsgHandler(MsgHandler("got go to sleep msg:"))
     self.ext(0x20, 0x07, [0x0, 0x0, 0x0])
示例#6
0
    def programmingLockOff(self):
        """programmingLockOff()
		unlocks programming mode"""
        self.querier.setMsgHandler(MsgHandler("got lock off return msg:"))
        self.querier.queryext(0x20, 0x01, [0x0, 0x0, 0x0])
    def ping(self):
        """ping()
		pings the device"""
        self.querier.setMsgHandler(MsgHandler("ping"))
        self.__sd(0x0f, 0)
    def setHumidityLowPoint(self, point):
        """setHumidityLowPoint(point)
		sets low point for humidification"""
        self.querier.setMsgHandler(MsgHandler("set humidity low pt"))
        self.ext(0x2e, 0, [0x01, 0x0c, point])
示例#9
0
 def __init__(self, name):
     MsgHandler.__init__(self, name)
 def __setMode(self, mode):
     self.querier.setMsgHandler(MsgHandler("got mode set return msg"))
     self.ext(0x6b, mode, [0x0, 0x0, 0x0])
示例#11
0
 def __init__(self, name="ExtMsgHandler"):
     MsgHandler.__init__(self, name)
示例#12
0
    def enterUnlinkingMode(self, group):
        """enterUnlinkingMode(group)
		causes the device to enter unlinking mode"""
        self.querier.setMsgHandler(MsgHandler("enter unlinking mode"))
        self.querier.querysd(0x0A, group)
示例#13
0
    def exitLinkingMode(self):
        """exitLinkingMode()
		causes the device to exit linking mode"""
        self.querier.setMsgHandler(MsgHandler("exit linking mode"))
        self.querier.querysd(0x08, 0x01)
    def setHeatPoint(self, temp):
        """setHeatPoint(temp)
		sets heating temperature"""
        self.querier.setMsgHandler(MsgHandler("set heat point"))
        self.ext(0x6d, temp * 2, [0x0, 0x0, 0x0])
    def setTemperatureOffset(self, offset):
        """setTemperatureOffset(offset)
		set temperature offset(for calibration, use with care!)"""
        self.querier.setMsgHandler(MsgHandler("set temp offset return msg:"))
        self.ext(0x2e, 0, [0x01, 0x02, offset])
    def setHumidityHighPoint(self, point):
        """setHumidityHighPoint(point)
		sets high point for dehumidification"""
        self.querier.setMsgHandler(MsgHandler("set humidity high pt"))
        self.ext(0x2e, 0, [0x01, 0x0b, point])
    def setHumidityOffset(self, offset):
        """setHumidityOffset(offset)
		set humidity offset(for calibration, use with care!)"""
        self.querier.setMsgHandler(
            MsgHandler("set humidity offset return msg:"))
        self.ext(0x2e, 0, [0x01, 0x03, offset])
 def stayAwake(self):  # stay awake for 4mins
     self.querier.setMsgHandler(MsgHandler("got stay awake return msg:"))
     self.ext(0x20, 0x06, [0x0, 0x0, 0x0])
    def setBacklightSeconds(self, time):
        """setBacklightSeconds(time)
		set backlight time in seconds"""
        self.querier.setMsgHandler(
            MsgHandler("set backlight secs return msg:"))
        self.ext(0x2e, 0, [0x01, 0x05, time])
示例#20
0
    def programmingLockOn(self):
        """programmingLockOn()
		locks programming mode"""
        self.querier.setMsgHandler(MsgHandler("got lock on return msg:"))
        self.querier.queryext(0x20, 0x00, [0x0, 0x0, 0x0])
    def setStage1Minutes(self, time):
        """setStage1Minutes(time)
		set number of minutes to try stage 1 before going into stage2"""
        self.querier.setMsgHandler(MsgHandler("set stage 1 mins return msg:"))
        self.ext(0x2e, 0, [0x01, 0x0A, time])
示例#22
0
    def heartbeatOn(self):
        """heartbeatOn()
		switch on heartbeats"""
        self.querier.setMsgHandler(MsgHandler("heartbeat on return msg:"))
        self.querier.queryext(0x20, 0x06, [0x0, 0x0, 0x0])
    def setACHysteresis(self, mins):
        """setACHysteresis(minutes)
		set A/C hysteresis (in minutes)"""
        self.querier.setMsgHandler(
            MsgHandler("set a/c hysteresis return msg:"))
        self.ext(0x2e, 0, [0x01, 0x06, mins])
	def __init__(self, name):
		MsgHandler.__init__(self, name)
示例#25
0
 def setRecord(self, offset, laddr, group, linkType, data):
     msg = self.makeMsg(offset, laddr, group, linkType, data)
     self.querier.setMsgHandler(MsgHandler("got set record"))
     self.querier.sendMsg(msg)