2017-12-30 20:12:01 +00:00
|
|
|
|
|
|
|
#ifndef CONFIG_H_
|
|
|
|
#define CONFIG_H_
|
|
|
|
|
|
|
|
#include "utils.h"
|
|
|
|
#include "aq_serial.h"
|
|
|
|
#include "aqualink.h"
|
|
|
|
|
|
|
|
|
|
|
|
#define DEFAULT_LOG_LEVEL 10
|
|
|
|
#define DEFAULT_WEBPORT "6580"
|
|
|
|
#define DEFAULT_WEBROOT "./"
|
|
|
|
#define DEFAULT_SERIALPORT "/dev/ttyUSB0"
|
|
|
|
#define DEFAULT_DEVICE_ID "0x0a"
|
2018-03-05 23:52:42 +00:00
|
|
|
#define DEFAULT_MQTT_DZ_IN NULL
|
|
|
|
#define DEFAULT_MQTT_DZ_OUT NULL
|
|
|
|
#define DEFAULT_MQTT_AQ_TP NULL
|
|
|
|
#define DEFAULT_MQTT_SERVER NULL
|
2017-12-30 20:12:01 +00:00
|
|
|
#define DEFAULT_MQTT_USER NULL
|
|
|
|
#define DEFAULT_MQTT_PASSWD NULL
|
|
|
|
|
|
|
|
#define MQTT_ID_LEN 20
|
|
|
|
|
|
|
|
struct aqconfig
|
|
|
|
{
|
|
|
|
char *serial_port;
|
|
|
|
unsigned int log_level;
|
|
|
|
char *socket_port;
|
|
|
|
char *web_directory;
|
|
|
|
unsigned char device_id;
|
|
|
|
bool deamonize;
|
|
|
|
char *log_file;
|
|
|
|
char *mqtt_dz_sub_topic;
|
|
|
|
char *mqtt_dz_pub_topic;
|
|
|
|
char *mqtt_aq_topic;
|
|
|
|
char *mqtt_server;
|
|
|
|
char *mqtt_user;
|
|
|
|
char *mqtt_passwd;
|
|
|
|
char mqtt_ID[MQTT_ID_LEN];
|
|
|
|
int dzidx_air_temp;
|
|
|
|
int dzidx_pool_water_temp;
|
|
|
|
int dzidx_spa_water_temp;
|
2018-03-12 20:49:21 +00:00
|
|
|
int dzidx_swg_percent;
|
|
|
|
int dzidx_swg_ppm;
|
2018-06-06 00:18:44 +00:00
|
|
|
int dzidx_swg_status;
|
2017-12-30 20:12:01 +00:00
|
|
|
float light_programming_mode;
|
2018-07-15 19:36:19 +00:00
|
|
|
int light_programming_initial_on;
|
|
|
|
int light_programming_initial_off;
|
|
|
|
int light_programming_button;
|
2018-03-13 14:14:21 +00:00
|
|
|
bool override_freeze_protect;
|
2018-03-15 20:03:57 +00:00
|
|
|
bool pda_mode;
|
2018-07-15 19:36:19 +00:00
|
|
|
bool convert_mqtt_temp;
|
|
|
|
bool convert_dz_temp;
|
|
|
|
bool flash_mqtt_buttons;
|
|
|
|
bool report_zero_spa_temp;
|
2017-12-30 20:12:01 +00:00
|
|
|
//int dzidx_pool_thermostat; // Domoticz virtual thermostats are crap removed until better
|
|
|
|
//int dzidx_spa_thermostat; // Domoticz virtual thermostats are crap removed until better
|
|
|
|
//char mqtt_pub_topic[250];
|
|
|
|
//char *mqtt_pub_tp_ptr = mqtt_pub_topic[];
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
void init_parameters (struct aqconfig * parms);
|
|
|
|
//bool parse_config (struct aqconfig * parms, char *cfgfile);
|
|
|
|
//void readCfg (struct aqconfig *config_parameters, char *cfgFile);
|
|
|
|
void readCfg (struct aqconfig *config_parameters, struct aqualinkdata *aqualink_data, char *cfgFile);
|
|
|
|
|
|
|
|
#endif
|