Example #1
0
def turnOFF():
    global IRRIGATION_ON
    RCTransmitter.sendCommand(RCTransmitter.IRRIGATION_OFF)
    IRRIGATION_ON = False
    logging.info("Irrigation turned off.")
    if Configuration.ELASTIC:
        Elastic.saveEvent("Irrigation", "Off", "Irrigation turned off.")
Example #2
0
def turnON():
    global IRRIGATION_ON
    RCTransmitter.sendCommand(RCTransmitter.IRRIGATION_ON)
    IRRIGATION_ON = True
    logging.info("Irrigation turned on.")
    if Configuration.ELASTIC:
        Elastic.saveEvent("Irrigation", "On", "Irrgigation turned on.")
Example #3
0
def turnOFF():
    global EXTRACTION_ON
    RCTransmitter.sendCommand(RCTransmitter.EXTRACTION_OFF)
    EXTRACTION_ON = False
    logging.info("Extraction turned off.")
    if Configuration.ELASTIC:
        Elastic.saveEvent("Extraction", "Off", "Extraction turned off.")
Example #4
0
def turnOFF():
    global VENTILATION_ON
    RCTransmitter.sendCommand(RCTransmitter.VENTILATION_OFF)
    VENTILATION_ON = False
    logging.info("Ventilation turned off.")
    if Configuration.ELASTIC:
        Elastic.saveEvent("Ventilation", "Off", "Ventilation turned off.")
Example #5
0
def turnON():
    global VENTILATION_ON
    RCTransmitter.sendCommand(RCTransmitter.VENTILATION_ON)
    VENTILATION_ON = True
    logging.info("Ventilation turned on.")
    if Configuration.ELASTIC:
        Elastic.saveEvent("Ventilation", "On", "Ventilation turned on.")
Example #6
0
def turnON():
    try:
        RCTransmitter.sendCommand(RCTransmitter.ILLUMINATION_ON)
        Configuration.DAY = True
        logging.info("Illumination turned on.")
        if Configuration.ELASTIC:
            Elastic.saveEvent("Illumination", "On", "Illumination turned on.")
    except Exception as e:
        logging.error(e)