2020-10-16 16:10:36 +02:00
|
|
|
/**
|
|
|
|
* @file HomieTypes.h
|
|
|
|
* @author your name (you@domain.com)
|
|
|
|
* @brief
|
|
|
|
* @version 0.1
|
|
|
|
* @date 2020-10-16
|
|
|
|
*
|
|
|
|
* @copyright Copyright (c) 2020
|
|
|
|
* All Settings, configurable in Homie
|
|
|
|
*/
|
|
|
|
#ifndef HOMIE_PLANT_CFG_CONFIG_H
|
|
|
|
#define HOMIE_PLANT_CFG_CONFIG_H
|
|
|
|
|
|
|
|
#include <Homie.h>
|
|
|
|
|
2021-10-22 19:39:42 +02:00
|
|
|
//plant pump is deactivated, but sensor values are still recorded and published
|
2021-07-09 21:50:51 +02:00
|
|
|
#define DEACTIVATED_PLANT -1
|
2021-10-22 19:39:42 +02:00
|
|
|
//special value to indicate a missing sensor when the plant is not deactivated but no valid sensor value was read
|
2021-07-09 21:50:51 +02:00
|
|
|
#define MISSING_SENSOR -2
|
2021-10-22 19:39:42 +02:00
|
|
|
//plant uses only cooldown and duration, moisture is measured but ignored, allowedHours is ignored (eg. make a 30min on 30min off cycle)
|
|
|
|
#define HYDROPONIC_MODE -3
|
2020-10-16 21:12:25 +02:00
|
|
|
|
2020-11-04 21:57:40 +01:00
|
|
|
typedef struct PlantSettings_t
|
|
|
|
{
|
2021-07-09 21:50:51 +02:00
|
|
|
HomieSetting<double> *pSensorDry;
|
2020-11-04 21:57:40 +01:00
|
|
|
HomieSetting<long> *pPumpAllowedHourRangeStart;
|
|
|
|
HomieSetting<long> *pPumpAllowedHourRangeEnd;
|
|
|
|
HomieSetting<bool> *pPumpOnlyWhenLowLight;
|
2021-10-22 19:39:42 +02:00
|
|
|
HomieSetting<long> *pPumpCooldownInMinutes;
|
2021-10-01 23:46:37 +02:00
|
|
|
HomieSetting<long> *pPumpDuration;
|
2021-10-26 21:50:55 +02:00
|
|
|
HomieSetting<long> *pPumpPowerLevel;
|
2020-10-16 16:10:36 +02:00
|
|
|
} PlantSettings_t;
|
|
|
|
|
|
|
|
#endif
|