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.")
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.")
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.")
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.")
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.")
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)