Fri, 01 May 2020 16:23:25 +0200
Updated README
0 | 1 | /** |
2 | * @file nodes.c | |
3 | * @brief Handle nodes status | |
4 | * @author Michiel Broek <mbroek at mbse dot eu> | |
5 | * | |
578
e75ce5bbda73
Changed the interface from the iSpindels to be the same as other devices. A webpage converts each call to two standard MQTT messages. The nodes MQTT message extended with an interval parameter. iSpindels now have a generated uuid made up from the chipid.
Michiel Broek <mbroek@mbse.eu>
parents:
572
diff
changeset
|
6 | * Copyright (C) 2018-2020 |
0 | 7 | * |
8 | * This file is part of the bms (Brewery Management System) | |
9 | * | |
10 | * This is free software; you can redistribute it and/or modify it | |
11 | * under the terms of the GNU General Public License as published by the | |
12 | * Free Software Foundation; either version 2, or (at your option) any | |
13 | * later version. | |
14 | * | |
15 | * bms is distributed in the hope that it will be useful, but | |
16 | * WITHOUT ANY WARRANTY; without even the implied warranty of | |
17 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
18 | * General Public License for more details. | |
19 | * | |
20 | * You should have received a copy of the GNU General Public License | |
21 | * along with ThermFerm; see the file COPYING. If not, write to the Free | |
22 | * Software Foundation, 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. | |
23 | */ | |
24 | ||
25 | ||
26 | #include "bms.h" | |
27 | #include "xutil.h" | |
28 | #include "nodes.h" | |
29 | #include "mysql.h" | |
30 | ||
31 | ||
384
442d23455ae4
The bms daemon now checks if a node went away of no data is received for 10 minutes.
Michiel Broek <mbroek@mbse.eu>
parents:
0
diff
changeset
|
32 | sys_node_list *nodes = NULL; |
0 | 33 | |
384
442d23455ae4
The bms daemon now checks if a node went away of no data is received for 10 minutes.
Michiel Broek <mbroek@mbse.eu>
parents:
0
diff
changeset
|
34 | extern int debug; |
442d23455ae4
The bms daemon now checks if a node went away of no data is received for 10 minutes.
Michiel Broek <mbroek@mbse.eu>
parents:
0
diff
changeset
|
35 | extern sys_fermenter_list *fermenters; |
502
a8a6901b5a99
Added CO2 meter units to the daemon.
Michiel Broek <mbroek@mbse.eu>
parents:
384
diff
changeset
|
36 | extern sys_co2meter_list *co2meters; |
572
7a03181d29a3
Version 0.3.27 More code for iSpindels. All online/offline data in the database is now handles as integers. Nodes timeout use the configured interval time from the nodes.
Michiel Broek <mbroek@mbse.eu>
parents:
502
diff
changeset
|
37 | extern sys_ispindel_list *ispindels; |
0 | 38 | |
39 | ||
40 | void node_birth_data(char *topic, char *payload) | |
41 | { | |
42 | struct json_object *jobj, *val, *metric, *metric2; | |
43 | sys_node_list *node, *tmpp; | |
44 | char *group_id, *message_type, *edge_node; | |
45 | bool new_node = true; | |
46 | ||
47 | // fprintf(stdout, "node_birth: %s %s\n", topic, payload); | |
48 | ||
49 | strtok(topic, "/"); // ignore namespace | |
50 | group_id = strtok(NULL, "/"); | |
51 | message_type = strtok(NULL, "/"); | |
52 | edge_node = strtok(NULL, "/\0"); | |
53 | ||
54 | /* | |
55 | * Search node record in the memory array and use it if found. | |
56 | */ | |
57 | if (nodes) { | |
58 | for (tmpp = nodes; tmpp; tmpp = tmpp->next) { | |
59 | if ((strcmp(tmpp->group_id, group_id) == 0) && (strcmp(tmpp->node, edge_node) == 0)) { | |
60 | new_node = false; | |
61 | node = tmpp; | |
62 | node->lastseen = time(NULL); | |
63 | node->online = true; | |
64 | break; | |
65 | } | |
66 | } | |
67 | } | |
68 | ||
69 | /* | |
70 | * Allocate new node if not yet known. | |
71 | */ | |
72 | if (new_node) { | |
73 | node = (sys_node_list *)malloc(sizeof(sys_node_list)); | |
74 | node->uuid = NULL; | |
75 | node->next = NULL; | |
76 | node->group_id = xstrcpy(group_id); | |
77 | node->node = xstrcpy(edge_node); | |
78 | node->online = true; | |
79 | node->hardwaremake = node->hardwaremodel = node->os = node->os_version = node->firmware = NULL; | |
80 | node->firstseen = node->lastseen = time(NULL); | |
81 | node->temperature = node->humidity = node->barometer = 0.0; | |
82 | node->gps_latitude = node->gps_longitude = node->gps_altitude = 0.0; | |
83 | node->net_address = node->net_ifname = NULL; | |
84 | node->net_rssi = 0; | |
578
e75ce5bbda73
Changed the interface from the iSpindels to be the same as other devices. A webpage converts each call to two standard MQTT messages. The nodes MQTT message extended with an interval parameter. iSpindels now have a generated uuid made up from the chipid.
Michiel Broek <mbroek@mbse.eu>
parents:
572
diff
changeset
|
85 | node->interval = 300; |
0 | 86 | } |
87 | ||
88 | /* | |
89 | * Process the JSON formatted payload. | |
90 | * Update only the fields that are found in the payload. | |
91 | */ | |
92 | jobj = json_tokener_parse(payload); | |
93 | ||
94 | if (json_object_object_get_ex(jobj, "timestamp", &val)) { | |
95 | if (strcmp((char *)"NDATA", message_type)) { | |
96 | node->firstseen = json_object_get_int(val); | |
97 | syslog(LOG_NOTICE, "Online node `%s/%s'", node->group_id, node->node); | |
98 | } else { | |
99 | node->lastseen = json_object_get_int(val); | |
100 | } | |
101 | } | |
102 | ||
103 | /* | |
104 | if (json_object_object_get_ex(jobj, "seq", &val)) { | |
105 | printf("seq: %s\n", json_object_to_json_string_ext(val, 0)); // Do we need it? | |
106 | } | |
107 | */ | |
108 | ||
109 | if (json_object_object_get_ex(jobj, "metric", &metric)) { | |
110 | if (json_object_object_get_ex(metric, "uuid", &val)) { | |
111 | if (node->uuid) | |
112 | free(node->uuid); | |
113 | node->uuid = xstrcpy((char *)json_object_get_string(val)); | |
114 | } | |
578
e75ce5bbda73
Changed the interface from the iSpindels to be the same as other devices. A webpage converts each call to two standard MQTT messages. The nodes MQTT message extended with an interval parameter. iSpindels now have a generated uuid made up from the chipid.
Michiel Broek <mbroek@mbse.eu>
parents:
572
diff
changeset
|
115 | if (json_object_object_get_ex(metric, "interval", &val)) { |
e75ce5bbda73
Changed the interface from the iSpindels to be the same as other devices. A webpage converts each call to two standard MQTT messages. The nodes MQTT message extended with an interval parameter. iSpindels now have a generated uuid made up from the chipid.
Michiel Broek <mbroek@mbse.eu>
parents:
572
diff
changeset
|
116 | node->interval = json_object_get_int(val); |
e75ce5bbda73
Changed the interface from the iSpindels to be the same as other devices. A webpage converts each call to two standard MQTT messages. The nodes MQTT message extended with an interval parameter. iSpindels now have a generated uuid made up from the chipid.
Michiel Broek <mbroek@mbse.eu>
parents:
572
diff
changeset
|
117 | } |
0 | 118 | if (json_object_object_get_ex(metric, "properties", &metric2)) { |
119 | if (json_object_object_get_ex(metric2, "hardwaremake", &val)) { | |
120 | if (node->hardwaremake) | |
121 | free(node->hardwaremake); | |
122 | node->hardwaremake = xstrcpy((char *)json_object_get_string(val)); | |
123 | } | |
124 | if (json_object_object_get_ex(metric2, "hardwaremodel", &val)) { | |
125 | if (node->hardwaremodel) | |
126 | free(node->hardwaremodel); | |
127 | node->hardwaremodel = xstrcpy((char *)json_object_get_string(val)); | |
128 | } | |
129 | if (json_object_object_get_ex(metric2, "os", &val)) { | |
130 | if (node->os) | |
131 | free(node->os); | |
132 | node->os = xstrcpy((char *)json_object_get_string(val)); | |
133 | } | |
134 | if (json_object_object_get_ex(metric2, "os_version", &val)) { | |
135 | if (node->os_version) | |
136 | free(node->os_version); | |
137 | node->os_version = xstrcpy((char *)json_object_get_string(val)); | |
138 | } | |
139 | if (json_object_object_get_ex(metric2, "FW", &val)) { | |
140 | if (node->firmware) | |
141 | free(node->firmware); | |
142 | node->firmware = xstrcpy((char *)json_object_get_string(val)); | |
143 | } | |
144 | } | |
145 | if (json_object_object_get_ex(metric, "THB", &metric2)) { | |
146 | if (json_object_object_get_ex(metric2, "temperature", &val)) { | |
147 | node->temperature = json_object_get_double(val); | |
148 | } | |
149 | if (json_object_object_get_ex(metric2, "humidity", &val)) { | |
150 | node->humidity= json_object_get_double(val); | |
151 | } | |
152 | if (json_object_object_get_ex(metric2, "barometer", &val)) { | |
153 | node->barometer = json_object_get_double(val); | |
154 | } | |
155 | } | |
156 | if (json_object_object_get_ex(metric, "GPS", &metric2)) { | |
157 | if (json_object_object_get_ex(metric2, "latitude", &val)) { | |
158 | node->gps_latitude = json_object_get_double(val); | |
159 | } | |
160 | if (json_object_object_get_ex(metric2, "longitude", &val)) { | |
161 | node->gps_longitude = json_object_get_double(val); | |
162 | } | |
163 | if (json_object_object_get_ex(metric2, "altitude", &val)) { | |
164 | node->gps_altitude = json_object_get_double(val); | |
165 | } | |
166 | } | |
167 | if (json_object_object_get_ex(metric, "net", &metric2)) { | |
168 | if (json_object_object_get_ex(metric2, "address", &val)) { | |
169 | if (node->net_address) | |
170 | free(node->net_address); | |
171 | node->net_address = xstrcpy((char *)json_object_get_string(val)); | |
172 | } | |
173 | if (json_object_object_get_ex(metric2, "ifname", &val)) { | |
174 | if (node->net_ifname) | |
175 | free(node->net_ifname); | |
176 | node->net_ifname = xstrcpy((char *)json_object_get_string(val)); | |
177 | } | |
178 | if (json_object_object_get_ex(metric2, "rssi", &val)) { | |
179 | node->net_rssi = json_object_get_int(val); | |
180 | } | |
181 | } | |
182 | } | |
183 | json_object_put(jobj); | |
184 | ||
185 | // node_dump(node); | |
186 | ||
187 | if (new_node) { | |
188 | if (nodes == NULL) { | |
189 | nodes = node; | |
190 | } else { | |
191 | for (tmpp = nodes; tmpp; tmpp = tmpp->next) { | |
192 | if (tmpp->next == NULL) { | |
193 | tmpp->next = node; | |
194 | break; | |
195 | } | |
196 | } | |
197 | } | |
198 | node_mysql_insert(node); | |
199 | } else { | |
200 | node_mysql_update(node); | |
201 | } | |
202 | } | |
203 | ||
204 | ||
205 | ||
206 | void node_dump(sys_node_list *node) | |
207 | { | |
208 | if (debug) { | |
209 | printf("online %s\n", node->online ? "yes":"no"); | |
210 | printf("uuid %s\n", node->uuid); | |
211 | printf("node %s\n", node->node); | |
212 | printf("group %s\n", node->group_id); | |
213 | printf("hw make %s model %s\n", node->hardwaremake, node->hardwaremodel); | |
214 | printf("os %s version %s\n", node->os, node->os_version); | |
215 | printf("firmware %s\n", node->firmware); | |
216 | printf("first %ld last %ld\n", node->firstseen, node->lastseen); | |
217 | printf("THB %.2f %.2f %.2f\n", node->temperature, node->humidity, node->barometer); | |
218 | printf("GPS %.5f %.5f %.5f\n", node->gps_latitude, node->gps_longitude, node->gps_altitude); | |
219 | printf("net %s:%s\n", node->net_ifname, node->net_address); | |
220 | printf("rssi %d\n", node->net_rssi); | |
578
e75ce5bbda73
Changed the interface from the iSpindels to be the same as other devices. A webpage converts each call to two standard MQTT messages. The nodes MQTT message extended with an interval parameter. iSpindels now have a generated uuid made up from the chipid.
Michiel Broek <mbroek@mbse.eu>
parents:
572
diff
changeset
|
221 | printf("interval %d\n", node->interval); |
0 | 222 | } |
223 | } | |
224 | ||
225 | ||
226 | ||
227 | void node_death(char *topic) | |
228 | { | |
229 | char *group_id, *edge_node; | |
230 | sys_node_list *tmpp; | |
231 | ||
232 | strtok(topic, "/"); // ignore namespace | |
233 | group_id = strtok(NULL, "/"); | |
234 | strtok(NULL, "/"); // ignore message_type | |
235 | edge_node = strtok(NULL, "/\0"); | |
236 | ||
237 | syslog(LOG_NOTICE, "Offline node `%s/%s'", group_id, edge_node); | |
238 | node_mysql_death(edge_node); | |
239 | ||
240 | for (tmpp = nodes; tmpp; tmpp = tmpp->next) { | |
241 | if (strcmp(tmpp->node, edge_node) == 0) { | |
242 | tmpp->online = false; | |
243 | break; | |
244 | } | |
245 | } | |
246 | } | |
247 | ||
248 | ||
384
442d23455ae4
The bms daemon now checks if a node went away of no data is received for 10 minutes.
Michiel Broek <mbroek@mbse.eu>
parents:
0
diff
changeset
|
249 | |
442d23455ae4
The bms daemon now checks if a node went away of no data is received for 10 minutes.
Michiel Broek <mbroek@mbse.eu>
parents:
0
diff
changeset
|
250 | void nodes_check_online() |
442d23455ae4
The bms daemon now checks if a node went away of no data is received for 10 minutes.
Michiel Broek <mbroek@mbse.eu>
parents:
0
diff
changeset
|
251 | { |
442d23455ae4
The bms daemon now checks if a node went away of no data is received for 10 minutes.
Michiel Broek <mbroek@mbse.eu>
parents:
0
diff
changeset
|
252 | sys_node_list *tmpn; |
442d23455ae4
The bms daemon now checks if a node went away of no data is received for 10 minutes.
Michiel Broek <mbroek@mbse.eu>
parents:
0
diff
changeset
|
253 | sys_fermenter_list *tmpf; |
502
a8a6901b5a99
Added CO2 meter units to the daemon.
Michiel Broek <mbroek@mbse.eu>
parents:
384
diff
changeset
|
254 | sys_co2meter_list *tmpc; |
572
7a03181d29a3
Version 0.3.27 More code for iSpindels. All online/offline data in the database is now handles as integers. Nodes timeout use the configured interval time from the nodes.
Michiel Broek <mbroek@mbse.eu>
parents:
502
diff
changeset
|
255 | sys_ispindel_list *tmpi; |
384
442d23455ae4
The bms daemon now checks if a node went away of no data is received for 10 minutes.
Michiel Broek <mbroek@mbse.eu>
parents:
0
diff
changeset
|
256 | time_t now = time(NULL); |
442d23455ae4
The bms daemon now checks if a node went away of no data is received for 10 minutes.
Michiel Broek <mbroek@mbse.eu>
parents:
0
diff
changeset
|
257 | |
442d23455ae4
The bms daemon now checks if a node went away of no data is received for 10 minutes.
Michiel Broek <mbroek@mbse.eu>
parents:
0
diff
changeset
|
258 | for (tmpn = nodes; tmpn; tmpn = tmpn->next) { |
578
e75ce5bbda73
Changed the interface from the iSpindels to be the same as other devices. A webpage converts each call to two standard MQTT messages. The nodes MQTT message extended with an interval parameter. iSpindels now have a generated uuid made up from the chipid.
Michiel Broek <mbroek@mbse.eu>
parents:
572
diff
changeset
|
259 | // if (debug) |
e75ce5bbda73
Changed the interface from the iSpindels to be the same as other devices. A webpage converts each call to two standard MQTT messages. The nodes MQTT message extended with an interval parameter. iSpindels now have a generated uuid made up from the chipid.
Michiel Broek <mbroek@mbse.eu>
parents:
572
diff
changeset
|
260 | // printf("%-20s online %s %ld %d\n", tmpn->node, tmpn->online ? "yes":"no ", tmpn->lastseen, tmpn->interval); |
572
7a03181d29a3
Version 0.3.27 More code for iSpindels. All online/offline data in the database is now handles as integers. Nodes timeout use the configured interval time from the nodes.
Michiel Broek <mbroek@mbse.eu>
parents:
502
diff
changeset
|
261 | if (tmpn->online && ((now - tmpn->lastseen) > (tmpn->interval * 2 + 5))) { // 2 times interval + 5 seconds |
7a03181d29a3
Version 0.3.27 More code for iSpindels. All online/offline data in the database is now handles as integers. Nodes timeout use the configured interval time from the nodes.
Michiel Broek <mbroek@mbse.eu>
parents:
502
diff
changeset
|
262 | syslog(LOG_NOTICE, "Timeout node `%s/%s' after %ld seconds", tmpn->group_id, tmpn->node, (now - tmpn->lastseen)); |
384
442d23455ae4
The bms daemon now checks if a node went away of no data is received for 10 minutes.
Michiel Broek <mbroek@mbse.eu>
parents:
0
diff
changeset
|
263 | tmpn->online = false; |
442d23455ae4
The bms daemon now checks if a node went away of no data is received for 10 minutes.
Michiel Broek <mbroek@mbse.eu>
parents:
0
diff
changeset
|
264 | node_mysql_death(tmpn->node); |
442d23455ae4
The bms daemon now checks if a node went away of no data is received for 10 minutes.
Michiel Broek <mbroek@mbse.eu>
parents:
0
diff
changeset
|
265 | |
442d23455ae4
The bms daemon now checks if a node went away of no data is received for 10 minutes.
Michiel Broek <mbroek@mbse.eu>
parents:
0
diff
changeset
|
266 | for (tmpf = fermenters; tmpf; tmpf = tmpf->next) { |
442d23455ae4
The bms daemon now checks if a node went away of no data is received for 10 minutes.
Michiel Broek <mbroek@mbse.eu>
parents:
0
diff
changeset
|
267 | if (strcmp(tmpf->node, tmpn->node) == 0) { |
442d23455ae4
The bms daemon now checks if a node went away of no data is received for 10 minutes.
Michiel Broek <mbroek@mbse.eu>
parents:
0
diff
changeset
|
268 | if (tmpf->online) { |
442d23455ae4
The bms daemon now checks if a node went away of no data is received for 10 minutes.
Michiel Broek <mbroek@mbse.eu>
parents:
0
diff
changeset
|
269 | syslog(LOG_NOTICE, "Timeout fermenter %s/%s", tmpf->node, tmpf->alias); |
442d23455ae4
The bms daemon now checks if a node went away of no data is received for 10 minutes.
Michiel Broek <mbroek@mbse.eu>
parents:
0
diff
changeset
|
270 | tmpf->online = false; |
442d23455ae4
The bms daemon now checks if a node went away of no data is received for 10 minutes.
Michiel Broek <mbroek@mbse.eu>
parents:
0
diff
changeset
|
271 | fermenter_mysql_death(tmpf->node, tmpf->alias); |
442d23455ae4
The bms daemon now checks if a node went away of no data is received for 10 minutes.
Michiel Broek <mbroek@mbse.eu>
parents:
0
diff
changeset
|
272 | } |
442d23455ae4
The bms daemon now checks if a node went away of no data is received for 10 minutes.
Michiel Broek <mbroek@mbse.eu>
parents:
0
diff
changeset
|
273 | } |
442d23455ae4
The bms daemon now checks if a node went away of no data is received for 10 minutes.
Michiel Broek <mbroek@mbse.eu>
parents:
0
diff
changeset
|
274 | } |
502
a8a6901b5a99
Added CO2 meter units to the daemon.
Michiel Broek <mbroek@mbse.eu>
parents:
384
diff
changeset
|
275 | |
a8a6901b5a99
Added CO2 meter units to the daemon.
Michiel Broek <mbroek@mbse.eu>
parents:
384
diff
changeset
|
276 | for (tmpc = co2meters; tmpc; tmpc = tmpc->next) { |
a8a6901b5a99
Added CO2 meter units to the daemon.
Michiel Broek <mbroek@mbse.eu>
parents:
384
diff
changeset
|
277 | if (strcmp(tmpc->node, tmpn->node) == 0) { |
a8a6901b5a99
Added CO2 meter units to the daemon.
Michiel Broek <mbroek@mbse.eu>
parents:
384
diff
changeset
|
278 | if (tmpc->online) { |
a8a6901b5a99
Added CO2 meter units to the daemon.
Michiel Broek <mbroek@mbse.eu>
parents:
384
diff
changeset
|
279 | syslog(LOG_NOTICE, "Timeout co2meter %s/%s", tmpc->node, tmpc->alias); |
a8a6901b5a99
Added CO2 meter units to the daemon.
Michiel Broek <mbroek@mbse.eu>
parents:
384
diff
changeset
|
280 | tmpc->online = false; |
a8a6901b5a99
Added CO2 meter units to the daemon.
Michiel Broek <mbroek@mbse.eu>
parents:
384
diff
changeset
|
281 | co2meter_mysql_death(tmpc->node, tmpc->alias); |
a8a6901b5a99
Added CO2 meter units to the daemon.
Michiel Broek <mbroek@mbse.eu>
parents:
384
diff
changeset
|
282 | } |
a8a6901b5a99
Added CO2 meter units to the daemon.
Michiel Broek <mbroek@mbse.eu>
parents:
384
diff
changeset
|
283 | } |
a8a6901b5a99
Added CO2 meter units to the daemon.
Michiel Broek <mbroek@mbse.eu>
parents:
384
diff
changeset
|
284 | } |
572
7a03181d29a3
Version 0.3.27 More code for iSpindels. All online/offline data in the database is now handles as integers. Nodes timeout use the configured interval time from the nodes.
Michiel Broek <mbroek@mbse.eu>
parents:
502
diff
changeset
|
285 | |
7a03181d29a3
Version 0.3.27 More code for iSpindels. All online/offline data in the database is now handles as integers. Nodes timeout use the configured interval time from the nodes.
Michiel Broek <mbroek@mbse.eu>
parents:
502
diff
changeset
|
286 | for (tmpi = ispindels; tmpi; tmpi = tmpi->next) { |
7a03181d29a3
Version 0.3.27 More code for iSpindels. All online/offline data in the database is now handles as integers. Nodes timeout use the configured interval time from the nodes.
Michiel Broek <mbroek@mbse.eu>
parents:
502
diff
changeset
|
287 | if (strcmp(tmpi->node, tmpn->node) == 0) { |
7a03181d29a3
Version 0.3.27 More code for iSpindels. All online/offline data in the database is now handles as integers. Nodes timeout use the configured interval time from the nodes.
Michiel Broek <mbroek@mbse.eu>
parents:
502
diff
changeset
|
288 | if (tmpi->online) { |
7a03181d29a3
Version 0.3.27 More code for iSpindels. All online/offline data in the database is now handles as integers. Nodes timeout use the configured interval time from the nodes.
Michiel Broek <mbroek@mbse.eu>
parents:
502
diff
changeset
|
289 | syslog(LOG_NOTICE, "Timeout ispindel %s", tmpi->node); |
7a03181d29a3
Version 0.3.27 More code for iSpindels. All online/offline data in the database is now handles as integers. Nodes timeout use the configured interval time from the nodes.
Michiel Broek <mbroek@mbse.eu>
parents:
502
diff
changeset
|
290 | tmpi->online = false; |
7a03181d29a3
Version 0.3.27 More code for iSpindels. All online/offline data in the database is now handles as integers. Nodes timeout use the configured interval time from the nodes.
Michiel Broek <mbroek@mbse.eu>
parents:
502
diff
changeset
|
291 | ispindel_mysql_death(tmpi->node); |
7a03181d29a3
Version 0.3.27 More code for iSpindels. All online/offline data in the database is now handles as integers. Nodes timeout use the configured interval time from the nodes.
Michiel Broek <mbroek@mbse.eu>
parents:
502
diff
changeset
|
292 | } |
7a03181d29a3
Version 0.3.27 More code for iSpindels. All online/offline data in the database is now handles as integers. Nodes timeout use the configured interval time from the nodes.
Michiel Broek <mbroek@mbse.eu>
parents:
502
diff
changeset
|
293 | } |
7a03181d29a3
Version 0.3.27 More code for iSpindels. All online/offline data in the database is now handles as integers. Nodes timeout use the configured interval time from the nodes.
Michiel Broek <mbroek@mbse.eu>
parents:
502
diff
changeset
|
294 | } |
384
442d23455ae4
The bms daemon now checks if a node went away of no data is received for 10 minutes.
Michiel Broek <mbroek@mbse.eu>
parents:
0
diff
changeset
|
295 | } |
442d23455ae4
The bms daemon now checks if a node went away of no data is received for 10 minutes.
Michiel Broek <mbroek@mbse.eu>
parents:
0
diff
changeset
|
296 | } |
442d23455ae4
The bms daemon now checks if a node went away of no data is received for 10 minutes.
Michiel Broek <mbroek@mbse.eu>
parents:
0
diff
changeset
|
297 | } |
442d23455ae4
The bms daemon now checks if a node went away of no data is received for 10 minutes.
Michiel Broek <mbroek@mbse.eu>
parents:
0
diff
changeset
|
298 | |
442d23455ae4
The bms daemon now checks if a node went away of no data is received for 10 minutes.
Michiel Broek <mbroek@mbse.eu>
parents:
0
diff
changeset
|
299 |