コード例 #1
0
def writeTempHumid(hwTemp,hwHumidity):
    try:
        rtwQuery = ThermoData.getRealtimeData()
        rtwQuery.rt_currenttemp = hwTemp
        #print(hwTemp)
        rtwQuery.rt_humidity = hwHumidity
        
        #print(hwHumidity)
        #logging.info('300: writeTempHumid - T:{0} H{1}'.format(hwTemp,hwHumidity))
        ThermoData.updateRealTimeData(rtwQuery)
        #logging.info('300: writeTempHumid - db updated - H:{0} T{1}'.format(hwHumidity,hwTemp))
    except:
        ThermoHardwareLogger.exception('Exception Occurred in ThermoHardware writeTempHumid')
コード例 #2
0
def writeTempHumid(hwTemp, hwHumidity):
    try:
        rtwQuery = ThermoData.getRealtimeData()
        rtwQuery.rt_currenttemp = hwTemp
        #print(hwTemp)
        rtwQuery.rt_humidity = hwHumidity

        #print(hwHumidity)
        #logging.info('300: writeTempHumid - T:{0} H{1}'.format(hwTemp,hwHumidity))
        ThermoData.updateRealTimeData(rtwQuery)
        #logging.info('300: writeTempHumid - db updated - H:{0} T{1}'.format(hwHumidity,hwTemp))
    except:
        ThermoHardwareLogger.exception(
            'Exception Occurred in ThermoHardware writeTempHumid')
コード例 #3
0
ファイル: ThermoGui.py プロジェクト: tinkerjs/Pi-Thermostat
def setAirMode():
    #print airSelectionVal.get()
    rtgQuery = ThermoData.getRealtimeData()
    if airSelectionVal.get() == 0:
        rtgQuery.rt_fanmode ='H'
        radio_airSelectionCool.configure(state='disabled')
        radio_airSelectionFan.configure(state='disabled')
    if airSelectionVal.get() == 1:
        rtgQuery.rt_fanmode = 'C'
        radio_airSelectionHeat.configure(state='disabled')
        radio_airSelectionFan.configure(state='disabled')
    if airSelectionVal.get() == 2:
        rtgQuery.rt_fanmode = 'F'
        radio_airSelectionHeat.configure(state='disabled')
        radio_airSelectionCool.configure(state='disabled')
    if airSelectionVal.get() == 3:
        rtgQuery.rt_fanmode = 'O'
        radio_airSelectionHeat.configure(state='normal')
        radio_airSelectionCool.configure(state='normal')
        radio_airSelectionFan.configure(state='normal')
    if airSelectionVal.get() == 4:
        rtGQuery.rt_fanmode = 'A'
    ThermoData.updateRealTimeData(rtgQuery)
コード例 #4
0
ファイル: ThermoGui.py プロジェクト: tinkerjs/Pi-Thermostat
def setAirMode():
    #print airSelectionVal.get()
    rtgQuery = ThermoData.getRealtimeData()
    if airSelectionVal.get() == 0:
        rtgQuery.rt_fanmode = 'H'
        radio_airSelectionCool.configure(state='disabled')
        radio_airSelectionFan.configure(state='disabled')
    if airSelectionVal.get() == 1:
        rtgQuery.rt_fanmode = 'C'
        radio_airSelectionHeat.configure(state='disabled')
        radio_airSelectionFan.configure(state='disabled')
    if airSelectionVal.get() == 2:
        rtgQuery.rt_fanmode = 'F'
        radio_airSelectionHeat.configure(state='disabled')
        radio_airSelectionCool.configure(state='disabled')
    if airSelectionVal.get() == 3:
        rtgQuery.rt_fanmode = 'O'
        radio_airSelectionHeat.configure(state='normal')
        radio_airSelectionCool.configure(state='normal')
        radio_airSelectionFan.configure(state='normal')
    if airSelectionVal.get() == 4:
        rtGQuery.rt_fanmode = 'A'
    ThermoData.updateRealTimeData(rtgQuery)
コード例 #5
0
ファイル: ThermoGui.py プロジェクト: tinkerjs/Pi-Thermostat
def updateDesTemp():
    rtuQuery = ThermoData.getRealtimeData()
    rtuQuery.rt_destemp = desTempVal.get()
    ThermoData.updateRealTimeData(rtuQuery)
コード例 #6
0
ファイル: ThermoGui.py プロジェクト: tinkerjs/Pi-Thermostat
def updateDesTemp():
    rtuQuery = ThermoData.getRealtimeData()
    rtuQuery.rt_destemp = desTempVal.get()
    ThermoData.updateRealTimeData(rtuQuery)