Sun, 10 Aug 2014 17:42:02 +0200
Removed debugging output
51
a03b6dac5398
Removed library, bumped to version 0.0.7
Michiel Broek <mbroek@mbse.eu>
parents:
48
diff
changeset
|
1 | #ifndef _MBSELIB_H |
a03b6dac5398
Removed library, bumped to version 0.0.7
Michiel Broek <mbroek@mbse.eu>
parents:
48
diff
changeset
|
2 | #define _MBSELIB_H |
26
9322c619c525
Added coolers program, first draft
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
3 | |
9322c619c525
Added coolers program, first draft
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
4 | |
9322c619c525
Added coolers program, first draft
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
5 | #define TRUE 1 |
9322c619c525
Added coolers program, first draft
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
6 | #define FALSE 0 |
9322c619c525
Added coolers program, first draft
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
7 | |
51
a03b6dac5398
Removed library, bumped to version 0.0.7
Michiel Broek <mbroek@mbse.eu>
parents:
48
diff
changeset
|
8 | #include "../config.h" |
a03b6dac5398
Removed library, bumped to version 0.0.7
Michiel Broek <mbroek@mbse.eu>
parents:
48
diff
changeset
|
9 | |
a03b6dac5398
Removed library, bumped to version 0.0.7
Michiel Broek <mbroek@mbse.eu>
parents:
48
diff
changeset
|
10 | #include <stdlib.h> |
a03b6dac5398
Removed library, bumped to version 0.0.7
Michiel Broek <mbroek@mbse.eu>
parents:
48
diff
changeset
|
11 | #include <stdio.h> |
a03b6dac5398
Removed library, bumped to version 0.0.7
Michiel Broek <mbroek@mbse.eu>
parents:
48
diff
changeset
|
12 | #include <stdint.h> |
a03b6dac5398
Removed library, bumped to version 0.0.7
Michiel Broek <mbroek@mbse.eu>
parents:
48
diff
changeset
|
13 | #include <stdarg.h> |
a03b6dac5398
Removed library, bumped to version 0.0.7
Michiel Broek <mbroek@mbse.eu>
parents:
48
diff
changeset
|
14 | #include <string.h> |
a03b6dac5398
Removed library, bumped to version 0.0.7
Michiel Broek <mbroek@mbse.eu>
parents:
48
diff
changeset
|
15 | #include <ctype.h> |
a03b6dac5398
Removed library, bumped to version 0.0.7
Michiel Broek <mbroek@mbse.eu>
parents:
48
diff
changeset
|
16 | #include <sys/types.h> |
a03b6dac5398
Removed library, bumped to version 0.0.7
Michiel Broek <mbroek@mbse.eu>
parents:
48
diff
changeset
|
17 | #include <sys/stat.h> |
a03b6dac5398
Removed library, bumped to version 0.0.7
Michiel Broek <mbroek@mbse.eu>
parents:
48
diff
changeset
|
18 | #include <sys/time.h> |
a03b6dac5398
Removed library, bumped to version 0.0.7
Michiel Broek <mbroek@mbse.eu>
parents:
48
diff
changeset
|
19 | #include <time.h> |
a03b6dac5398
Removed library, bumped to version 0.0.7
Michiel Broek <mbroek@mbse.eu>
parents:
48
diff
changeset
|
20 | #include <fcntl.h> |
a03b6dac5398
Removed library, bumped to version 0.0.7
Michiel Broek <mbroek@mbse.eu>
parents:
48
diff
changeset
|
21 | #include <syslog.h> |
a03b6dac5398
Removed library, bumped to version 0.0.7
Michiel Broek <mbroek@mbse.eu>
parents:
48
diff
changeset
|
22 | #include <unistd.h> |
a03b6dac5398
Removed library, bumped to version 0.0.7
Michiel Broek <mbroek@mbse.eu>
parents:
48
diff
changeset
|
23 | #include <errno.h> |
a03b6dac5398
Removed library, bumped to version 0.0.7
Michiel Broek <mbroek@mbse.eu>
parents:
48
diff
changeset
|
24 | #include <signal.h> |
a03b6dac5398
Removed library, bumped to version 0.0.7
Michiel Broek <mbroek@mbse.eu>
parents:
48
diff
changeset
|
25 | #include <getopt.h> |
a03b6dac5398
Removed library, bumped to version 0.0.7
Michiel Broek <mbroek@mbse.eu>
parents:
48
diff
changeset
|
26 | #include <limits.h> |
a03b6dac5398
Removed library, bumped to version 0.0.7
Michiel Broek <mbroek@mbse.eu>
parents:
48
diff
changeset
|
27 | #include <sys/socket.h> |
a03b6dac5398
Removed library, bumped to version 0.0.7
Michiel Broek <mbroek@mbse.eu>
parents:
48
diff
changeset
|
28 | #include <arpa/inet.h> |
a03b6dac5398
Removed library, bumped to version 0.0.7
Michiel Broek <mbroek@mbse.eu>
parents:
48
diff
changeset
|
29 | #include <netdb.h> |
a03b6dac5398
Removed library, bumped to version 0.0.7
Michiel Broek <mbroek@mbse.eu>
parents:
48
diff
changeset
|
30 | #include <poll.h> |
84 | 31 | #include <dirent.h> |
79 | 32 | #include <uuid/uuid.h> |
74 | 33 | #ifndef HAVE_WIRINGPI_H |
34 | #include <pthread.h> | |
35 | #endif | |
73 | 36 | #include <libxml/xmlmemory.h> |
37 | #include <libxml/parser.h> | |
75
4b976601737d
Writes a basic xml configuration next to the plain ascii config file
Michiel Broek <mbroek@mbse.eu>
parents:
74
diff
changeset
|
38 | #include <libxml/encoding.h> |
4b976601737d
Writes a basic xml configuration next to the plain ascii config file
Michiel Broek <mbroek@mbse.eu>
parents:
74
diff
changeset
|
39 | #include <libxml/xmlwriter.h> |
51
a03b6dac5398
Removed library, bumped to version 0.0.7
Michiel Broek <mbroek@mbse.eu>
parents:
48
diff
changeset
|
40 | |
a03b6dac5398
Removed library, bumped to version 0.0.7
Michiel Broek <mbroek@mbse.eu>
parents:
48
diff
changeset
|
41 | #ifdef HAVE_WIRINGPI_H |
a03b6dac5398
Removed library, bumped to version 0.0.7
Michiel Broek <mbroek@mbse.eu>
parents:
48
diff
changeset
|
42 | /* wiringPi */ |
a03b6dac5398
Removed library, bumped to version 0.0.7
Michiel Broek <mbroek@mbse.eu>
parents:
48
diff
changeset
|
43 | #include <wiringPi.h> |
a03b6dac5398
Removed library, bumped to version 0.0.7
Michiel Broek <mbroek@mbse.eu>
parents:
48
diff
changeset
|
44 | #include <pcf8574.h> |
a03b6dac5398
Removed library, bumped to version 0.0.7
Michiel Broek <mbroek@mbse.eu>
parents:
48
diff
changeset
|
45 | #include <lcd.h> |
a03b6dac5398
Removed library, bumped to version 0.0.7
Michiel Broek <mbroek@mbse.eu>
parents:
48
diff
changeset
|
46 | |
205 | 47 | #define MENU_NONE 0 |
48 | #define MENU_TOP 1 | |
49 | ||
50 | ||
51
a03b6dac5398
Removed library, bumped to version 0.0.7
Michiel Broek <mbroek@mbse.eu>
parents:
48
diff
changeset
|
51 | #endif |
a03b6dac5398
Removed library, bumped to version 0.0.7
Michiel Broek <mbroek@mbse.eu>
parents:
48
diff
changeset
|
52 | |
a03b6dac5398
Removed library, bumped to version 0.0.7
Michiel Broek <mbroek@mbse.eu>
parents:
48
diff
changeset
|
53 | #define TRUE 1 |
a03b6dac5398
Removed library, bumped to version 0.0.7
Michiel Broek <mbroek@mbse.eu>
parents:
48
diff
changeset
|
54 | #define FALSE 0 |
a03b6dac5398
Removed library, bumped to version 0.0.7
Michiel Broek <mbroek@mbse.eu>
parents:
48
diff
changeset
|
55 | |
a03b6dac5398
Removed library, bumped to version 0.0.7
Michiel Broek <mbroek@mbse.eu>
parents:
48
diff
changeset
|
56 | #define MBSE_SS(x) (x)?(x):"(null)" |
a03b6dac5398
Removed library, bumped to version 0.0.7
Michiel Broek <mbroek@mbse.eu>
parents:
48
diff
changeset
|
57 | |
a03b6dac5398
Removed library, bumped to version 0.0.7
Michiel Broek <mbroek@mbse.eu>
parents:
48
diff
changeset
|
58 | |
71 | 59 | /* |
60 | * Fermenter units. These units are connected via the 1-wire bus. | |
61 | * Each unit can have: | |
62 | * a DS18B20 sensor to measure the air temperature inside the unit. | |
63 | * a DS18B20 sensor to measure the beer temperature. | |
76
d2c7b32f27d6
Can now write the fermenter units configurations
Michiel Broek <mbroek@mbse.eu>
parents:
75
diff
changeset
|
64 | * a DS2413 to turn the cooler and heater on or off. |
d2c7b32f27d6
Can now write the fermenter units configurations
Michiel Broek <mbroek@mbse.eu>
parents:
75
diff
changeset
|
65 | * a DS2413 to switch the fan and sense the door. |
71 | 66 | */ |
67 | typedef struct _units_list { | |
68 | struct _units_list *next; | |
89 | 69 | int version; /* Record version */ |
76
d2c7b32f27d6
Can now write the fermenter units configurations
Michiel Broek <mbroek@mbse.eu>
parents:
75
diff
changeset
|
70 | char *uuid; /* uid code */ |
71 | 71 | char *name; /* friendly name */ |
72 | float volume; /* Volume of this unit */ | |
73 | char *air_address; /* DS18B20 address */ | |
101
1302abe92eb1
Made temperature sensors working in the units
Michiel Broek <mbroek@mbse.eu>
parents:
95
diff
changeset
|
74 | int air_state; /* 0=ok, 1=missing, 2=error */ |
1302abe92eb1
Made temperature sensors working in the units
Michiel Broek <mbroek@mbse.eu>
parents:
95
diff
changeset
|
75 | int air_temperature; /* Air temperature in C * 1000 */ |
71 | 76 | char *beer_address; /* DS18B20 address */ |
101
1302abe92eb1
Made temperature sensors working in the units
Michiel Broek <mbroek@mbse.eu>
parents:
95
diff
changeset
|
77 | int beer_state; /* 0=ok, 1=missing, 2=error */ |
1302abe92eb1
Made temperature sensors working in the units
Michiel Broek <mbroek@mbse.eu>
parents:
95
diff
changeset
|
78 | int beer_temperature; /* Beer temperature in C * 1000 */ |
175
b73490398368
Units editing is more or less complete. Changed structures for heating, cooling, fan and door. Updated the web interface to confuigure all these things.
Michiel Broek <mbroek@mbse.eu>
parents:
165
diff
changeset
|
79 | char *heater_address; /* Heater relay or PWM */ |
71 | 80 | int heater_state; /* Heater status */ |
175
b73490398368
Units editing is more or less complete. Changed structures for heating, cooling, fan and door. Updated the web interface to confuigure all these things.
Michiel Broek <mbroek@mbse.eu>
parents:
165
diff
changeset
|
81 | char *cooler_address; /* Cooler relay or PWM */ |
71 | 82 | int cooler_state; /* Cooler status */ |
175
b73490398368
Units editing is more or less complete. Changed structures for heating, cooling, fan and door. Updated the web interface to confuigure all these things.
Michiel Broek <mbroek@mbse.eu>
parents:
165
diff
changeset
|
83 | char *fan_address; /* Fan relay or PWM */ |
71 | 84 | int fan_state; /* Fan status */ |
175
b73490398368
Units editing is more or less complete. Changed structures for heating, cooling, fan and door. Updated the web interface to confuigure all these things.
Michiel Broek <mbroek@mbse.eu>
parents:
165
diff
changeset
|
85 | char *door_address; /* Door input address */ |
76
d2c7b32f27d6
Can now write the fermenter units configurations
Michiel Broek <mbroek@mbse.eu>
parents:
75
diff
changeset
|
86 | int door_state; /* Door and light status */ |
71 | 87 | int mode; /* Unit mode */ |
76
d2c7b32f27d6
Can now write the fermenter units configurations
Michiel Broek <mbroek@mbse.eu>
parents:
75
diff
changeset
|
88 | float beer_set; /* Beer temperature setting */ |
d2c7b32f27d6
Can now write the fermenter units configurations
Michiel Broek <mbroek@mbse.eu>
parents:
75
diff
changeset
|
89 | float fridge_set; /* Fridge temperature setting */ |
d2c7b32f27d6
Can now write the fermenter units configurations
Michiel Broek <mbroek@mbse.eu>
parents:
75
diff
changeset
|
90 | float temp_set_min; /* Minimum temperature */ |
d2c7b32f27d6
Can now write the fermenter units configurations
Michiel Broek <mbroek@mbse.eu>
parents:
75
diff
changeset
|
91 | float temp_set_max; /* Maximum temperature */ |
d2c7b32f27d6
Can now write the fermenter units configurations
Michiel Broek <mbroek@mbse.eu>
parents:
75
diff
changeset
|
92 | float idle_rangeL; /* Idle temperature low */ |
d2c7b32f27d6
Can now write the fermenter units configurations
Michiel Broek <mbroek@mbse.eu>
parents:
75
diff
changeset
|
93 | float idle_rangeH; /* Idle range high */ |
132
8bd209d1c020
Added some profile commands to the server. Profile names can be changed from the web interface. Removed obsolete commands.
Michiel Broek <mbroek@mbse.eu>
parents:
106
diff
changeset
|
94 | char *profile; /* Active profile uuid */ |
71 | 95 | time_t prof_started; /* Profile start time */ |
89 | 96 | int prof_state; /* Profile OFF|PAUSE|RUN|DONE */ |
157
259a018758f9
Added GET AIR, GET BEER, GET TARGET commands
Michiel Broek <mbroek@mbse.eu>
parents:
136
diff
changeset
|
97 | float prof_target; /* Profile current target temp */ |
194
9eaaba49450f
Added some ideas about profiles.
Michiel Broek <mbroek@mbse.eu>
parents:
191
diff
changeset
|
98 | time_t prof_paused; /* Profile total pause time */ |
185 | 99 | float PID_I_err; /* PID Intergal error */ |
176
8c7d87a2c094
Initial code for a simple PID controller.
Michiel Broek <mbroek@mbse.eu>
parents:
175
diff
changeset
|
100 | float PID_err_old; /* PID old error value */ |
71 | 101 | } units_list; |
102 | ||
76
d2c7b32f27d6
Can now write the fermenter units configurations
Michiel Broek <mbroek@mbse.eu>
parents:
75
diff
changeset
|
103 | #define UNITMODE_OFF 0 /* Unit turned off */ |
d2c7b32f27d6
Can now write the fermenter units configurations
Michiel Broek <mbroek@mbse.eu>
parents:
75
diff
changeset
|
104 | #define UNITMODE_NONE 1 /* Unit on but does nothing */ |
d2c7b32f27d6
Can now write the fermenter units configurations
Michiel Broek <mbroek@mbse.eu>
parents:
75
diff
changeset
|
105 | #define UNITMODE_FRIDGE 2 /* Unit acts as a fridge */ |
d2c7b32f27d6
Can now write the fermenter units configurations
Michiel Broek <mbroek@mbse.eu>
parents:
75
diff
changeset
|
106 | #define UNITMODE_BEER 3 /* Unit acts as beer cooler */ |
d2c7b32f27d6
Can now write the fermenter units configurations
Michiel Broek <mbroek@mbse.eu>
parents:
75
diff
changeset
|
107 | #define UNITMODE_PROFILE 4 /* Unit runs in profile mode */ |
71 | 108 | |
91
901ca9858a7a
Added fermenting profiles to the configuration
Michiel Broek <mbroek@mbse.eu>
parents:
89
diff
changeset
|
109 | |
901ca9858a7a
Added fermenting profiles to the configuration
Michiel Broek <mbroek@mbse.eu>
parents:
89
diff
changeset
|
110 | /* |
901ca9858a7a
Added fermenting profiles to the configuration
Michiel Broek <mbroek@mbse.eu>
parents:
89
diff
changeset
|
111 | * Fermenting steps |
901ca9858a7a
Added fermenting profiles to the configuration
Michiel Broek <mbroek@mbse.eu>
parents:
89
diff
changeset
|
112 | */ |
901ca9858a7a
Added fermenting profiles to the configuration
Michiel Broek <mbroek@mbse.eu>
parents:
89
diff
changeset
|
113 | typedef struct _prof_step { |
901ca9858a7a
Added fermenting profiles to the configuration
Michiel Broek <mbroek@mbse.eu>
parents:
89
diff
changeset
|
114 | struct _prof_step *next; |
901ca9858a7a
Added fermenting profiles to the configuration
Michiel Broek <mbroek@mbse.eu>
parents:
89
diff
changeset
|
115 | int version; /* Version 1 */ |
92 | 116 | int steptime; /* Step time to target in hours */ |
117 | int resttime; /* Rest time on target in hours */ | |
91
901ca9858a7a
Added fermenting profiles to the configuration
Michiel Broek <mbroek@mbse.eu>
parents:
89
diff
changeset
|
118 | float target; /* Target temperature */ |
901ca9858a7a
Added fermenting profiles to the configuration
Michiel Broek <mbroek@mbse.eu>
parents:
89
diff
changeset
|
119 | } prof_step; |
901ca9858a7a
Added fermenting profiles to the configuration
Michiel Broek <mbroek@mbse.eu>
parents:
89
diff
changeset
|
120 | |
901ca9858a7a
Added fermenting profiles to the configuration
Michiel Broek <mbroek@mbse.eu>
parents:
89
diff
changeset
|
121 | /* |
901ca9858a7a
Added fermenting profiles to the configuration
Michiel Broek <mbroek@mbse.eu>
parents:
89
diff
changeset
|
122 | * Fermenting profiles |
901ca9858a7a
Added fermenting profiles to the configuration
Michiel Broek <mbroek@mbse.eu>
parents:
89
diff
changeset
|
123 | */ |
901ca9858a7a
Added fermenting profiles to the configuration
Michiel Broek <mbroek@mbse.eu>
parents:
89
diff
changeset
|
124 | typedef struct _prof_list { |
901ca9858a7a
Added fermenting profiles to the configuration
Michiel Broek <mbroek@mbse.eu>
parents:
89
diff
changeset
|
125 | struct _prof_list *next; |
901ca9858a7a
Added fermenting profiles to the configuration
Michiel Broek <mbroek@mbse.eu>
parents:
89
diff
changeset
|
126 | int version; /* Version 1 */ |
901ca9858a7a
Added fermenting profiles to the configuration
Michiel Broek <mbroek@mbse.eu>
parents:
89
diff
changeset
|
127 | char *uuid; /* Profile uuid */ |
901ca9858a7a
Added fermenting profiles to the configuration
Michiel Broek <mbroek@mbse.eu>
parents:
89
diff
changeset
|
128 | char *name; /* Profile name */ |
136
264e5ee5abfc
Profiles now have a busy state
Michiel Broek <mbroek@mbse.eu>
parents:
132
diff
changeset
|
129 | int busy; /* Profile busy == 1, free == 0 */ |
191
c74bbc24a1c8
Client/Server communication is now almost final
Michiel Broek <mbroek@mbse.eu>
parents:
185
diff
changeset
|
130 | float inittemp; /* Temp target before start */ |
91
901ca9858a7a
Added fermenting profiles to the configuration
Michiel Broek <mbroek@mbse.eu>
parents:
89
diff
changeset
|
131 | prof_step *steps; /* Profile steps */ |
901ca9858a7a
Added fermenting profiles to the configuration
Michiel Broek <mbroek@mbse.eu>
parents:
89
diff
changeset
|
132 | } profiles_list; |
901ca9858a7a
Added fermenting profiles to the configuration
Michiel Broek <mbroek@mbse.eu>
parents:
89
diff
changeset
|
133 | |
89 | 134 | #define PROFILE_OFF 0 /* Profile not active */ |
135 | #define PROFILE_PAUSE 1 /* Profile pause */ | |
136 | #define PROFILE_RUN 2 /* Profile is running */ | |
137 | #define PROFILE_DONE 3 /* Profile is finished */ | |
138 | ||
158 | 139 | /* |
140 | * External devices like sensors, relays. | |
141 | */ | |
142 | typedef struct _dev_list { | |
143 | struct _dev_list *next; | |
144 | int version; /* Version 1 */ | |
145 | char *uuid; /* UUID of this device */ | |
146 | int type; /* Device type */ | |
147 | int direction; /* Device direction */ | |
148 | int value; /* Device value */ | |
209
c5b1dfd83e81
Added offset value for sensor that need it
Michiel Broek <mbroek@mbse.eu>
parents:
206
diff
changeset
|
149 | int offset; /* Device offset value */ |
158 | 150 | int present; /* Device present */ |
151 | char *address; /* Device address */ | |
152 | int subdevice; /* Device sub address */ | |
153 | int gpiopin; /* Device GPIO pin or -1 */ | |
154 | char *description; /* Device description */ | |
155 | int inuse; /* In use counter */ | |
156 | char *comment; /* What we think it is */ | |
157 | time_t timestamp; /* Last updated */ | |
158 | } devices_list; | |
159 | ||
160 | #define DEVTYPE_NA 0 /* Unknown device type */ | |
161 | #define DEVTYPE_W1 1 /* 1-Wire bus */ | |
162 | #define DEVTYPE_GPIO 2 /* GPIO I/O device */ | |
163 | #define DEVTYPE_RC433 3 /* 433 MHz device */ | |
164 | #define DEVTYPE_DHT 4 /* DHT type device on GPIO */ | |
165 | #define DEVTYPE_I2C 5 /* I2C bus device */ | |
166 | #define DEVTYPE_SPI 6 /* SPI bus device */ | |
167 | ||
168 | #define DEVPRESENT_UNDEF 0 /* Precence not testable */ | |
169 | #define DEVPRESENT_NO 1 /* Device is missing */ | |
170 | #define DEVPRESENT_YES 2 /* Device is detected */ | |
171 | #define DEVPRESENT_ERROR 3 /* Device is in error */ | |
172 | ||
173 | #define DEVDIR_UNDEF 0 /* Undefined */ | |
174 | #define DEVDIR_IN_BIN 1 /* Binary input */ | |
175 | #define DEVDIR_OUT_BIN 2 /* Binary output */ | |
176 | #define DEVDIR_IN_ANALOG 3 /* Temperature input etc. */ | |
177 | #define DEVDIR_OUT_ANALOG 4 /* Analog steering */ | |
178 | #define DEVDIR_OUT_PWM 5 /* PWM outout */ | |
162
6fc9e3f7962f
Added Raspberry GPIO devices
Michiel Broek <mbroek@mbse.eu>
parents:
158
diff
changeset
|
179 | #define DEVDIR_INTERN 6 /* Internal function */ |
71 | 180 | |
51
a03b6dac5398
Removed library, bumped to version 0.0.7
Michiel Broek <mbroek@mbse.eu>
parents:
48
diff
changeset
|
181 | |
a03b6dac5398
Removed library, bumped to version 0.0.7
Michiel Broek <mbroek@mbse.eu>
parents:
48
diff
changeset
|
182 | typedef struct _sys_config { |
a03b6dac5398
Removed library, bumped to version 0.0.7
Michiel Broek <mbroek@mbse.eu>
parents:
48
diff
changeset
|
183 | char *name; /* Configuration name */ |
a03b6dac5398
Removed library, bumped to version 0.0.7
Michiel Broek <mbroek@mbse.eu>
parents:
48
diff
changeset
|
184 | int my_port; /* my client/server port */ |
77
143077e54255
Added old configuration to write xml config
Michiel Broek <mbroek@mbse.eu>
parents:
76
diff
changeset
|
185 | unsigned char tempFormat; /* Temperature format, C or F */ |
206
78fb6f99e473
Added GLOBAL GET and GLOBAL PUT commands.
Michiel Broek <mbroek@mbse.eu>
parents:
205
diff
changeset
|
186 | char *temp_address; /* Environment temperature */ |
78fb6f99e473
Added GLOBAL GET and GLOBAL PUT commands.
Michiel Broek <mbroek@mbse.eu>
parents:
205
diff
changeset
|
187 | int temp_state; /* 0=ok, 1=missing, 2=error */ |
78fb6f99e473
Added GLOBAL GET and GLOBAL PUT commands.
Michiel Broek <mbroek@mbse.eu>
parents:
205
diff
changeset
|
188 | int temp_value; /* Air temperature in C * 1000 */ |
78fb6f99e473
Added GLOBAL GET and GLOBAL PUT commands.
Michiel Broek <mbroek@mbse.eu>
parents:
205
diff
changeset
|
189 | char *hum_address; /* Environment huminity */ |
78fb6f99e473
Added GLOBAL GET and GLOBAL PUT commands.
Michiel Broek <mbroek@mbse.eu>
parents:
205
diff
changeset
|
190 | int hum_state; /* 0=ok, 1=missing, 2=error */ |
78fb6f99e473
Added GLOBAL GET and GLOBAL PUT commands.
Michiel Broek <mbroek@mbse.eu>
parents:
205
diff
changeset
|
191 | int hum_value; /* Huminity in % * 1000 */ |
66
805f1d285acd
Compiles with 1-wire bus on PC hardware
Michiel Broek <mbroek@mbse.eu>
parents:
54
diff
changeset
|
192 | #ifdef HAVE_WIRINGPI_H |
51
a03b6dac5398
Removed library, bumped to version 0.0.7
Michiel Broek <mbroek@mbse.eu>
parents:
48
diff
changeset
|
193 | int lcd_cols; /* LCD display columns */ |
a03b6dac5398
Removed library, bumped to version 0.0.7
Michiel Broek <mbroek@mbse.eu>
parents:
48
diff
changeset
|
194 | int lcd_rows; /* LCD display rows */ |
78
c49ab5179bf3
Added lcd i2c address to xml configuration
Michiel Broek <mbroek@mbse.eu>
parents:
77
diff
changeset
|
195 | int lcd_address; /* LCD display i2c address */ |
66
805f1d285acd
Compiles with 1-wire bus on PC hardware
Michiel Broek <mbroek@mbse.eu>
parents:
54
diff
changeset
|
196 | #endif |
71 | 197 | units_list *units; /* Fermenter units */ |
91
901ca9858a7a
Added fermenting profiles to the configuration
Michiel Broek <mbroek@mbse.eu>
parents:
89
diff
changeset
|
198 | profiles_list *profiles; /* Ferment profiles */ |
158 | 199 | devices_list *devices; /* Sensors and switches */ |
51
a03b6dac5398
Removed library, bumped to version 0.0.7
Michiel Broek <mbroek@mbse.eu>
parents:
48
diff
changeset
|
200 | } sys_config; |
a03b6dac5398
Removed library, bumped to version 0.0.7
Michiel Broek <mbroek@mbse.eu>
parents:
48
diff
changeset
|
201 | |
a03b6dac5398
Removed library, bumped to version 0.0.7
Michiel Broek <mbroek@mbse.eu>
parents:
48
diff
changeset
|
202 | |
a03b6dac5398
Removed library, bumped to version 0.0.7
Michiel Broek <mbroek@mbse.eu>
parents:
48
diff
changeset
|
203 | |
66
805f1d285acd
Compiles with 1-wire bus on PC hardware
Michiel Broek <mbroek@mbse.eu>
parents:
54
diff
changeset
|
204 | #endif |