forked from sfeakes/AqualinkD
-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.h
68 lines (59 loc) · 1.81 KB
/
config.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
#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"
#define DEFAULT_MQTT_DZ_IN NULL
#define DEFAULT_MQTT_DZ_OUT NULL
#define DEFAULT_MQTT_AQ_TP NULL
#define DEFAULT_MQTT_SERVER NULL
#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;
int dzidx_swg_percent;
int dzidx_swg_ppm;
int dzidx_swg_status;
float light_programming_mode;
int light_programming_initial_on;
int light_programming_initial_off;
int light_programming_button;
bool override_freeze_protect;
bool pda_mode;
bool convert_mqtt_temp;
bool convert_dz_temp;
bool flash_mqtt_buttons;
bool report_zero_spa_temp;
//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