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')
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')
Exemple #3
0
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)
Exemple #4
0
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)
Exemple #5
0
def updateDesTemp():
    rtuQuery = ThermoData.getRealtimeData()
    rtuQuery.rt_destemp = desTempVal.get()
    ThermoData.updateRealTimeData(rtuQuery)
Exemple #6
0
def updateDesTemp():
    rtuQuery = ThermoData.getRealtimeData()
    rtuQuery.rt_destemp = desTempVal.get()
    ThermoData.updateRealTimeData(rtuQuery)