Wed, 18 Oct 2023 10:06:11 +0200
Version 0.3.45. Removed all writing to ascii logfiles in the webserver environment, only log to MySQL.
0 | 1 | /** |
2 | * @file fermenters.h | |
3 | */ | |
4 | ||
5 | #ifndef _FERMENTERS_H | |
6 | #define _FERMENTERS_H | |
7 | ||
8 | void fermenter_dump(sys_fermenter_list *fermenter); | |
9 | ||
10 | /** | |
679
48f8f3fce7c0
Added reconnecting-websocket.js to automatic reconnect the websocket if the connection is lost. Usefull for mobile devices that go to sleep after a while. Changed mon_fermenters to use websockets instead of polling. Fixed wrong temperature color ranges on the fermenter monior. Increased the websocket receive buffer to 2048. In cannot overflow, but larger messages are chunked and the application does not handle these split messages. Needs termferm 0.9.9 or newer.
Michiel Broek <mbroek@mbse.eu>
parents:
0
diff
changeset
|
11 | * @brief Process received command from a websocket. |
48f8f3fce7c0
Added reconnecting-websocket.js to automatic reconnect the websocket if the connection is lost. Usefull for mobile devices that go to sleep after a while. Changed mon_fermenters to use websockets instead of polling. Fixed wrong temperature color ranges on the fermenter monior. Increased the websocket receive buffer to 2048. In cannot overflow, but larger messages are chunked and the application does not handle these split messages. Needs termferm 0.9.9 or newer.
Michiel Broek <mbroek@mbse.eu>
parents:
0
diff
changeset
|
12 | * @param payload The received data in JSON format. |
48f8f3fce7c0
Added reconnecting-websocket.js to automatic reconnect the websocket if the connection is lost. Usefull for mobile devices that go to sleep after a while. Changed mon_fermenters to use websockets instead of polling. Fixed wrong temperature color ranges on the fermenter monior. Increased the websocket receive buffer to 2048. In cannot overflow, but larger messages are chunked and the application does not handle these split messages. Needs termferm 0.9.9 or newer.
Michiel Broek <mbroek@mbse.eu>
parents:
0
diff
changeset
|
13 | */ |
48f8f3fce7c0
Added reconnecting-websocket.js to automatic reconnect the websocket if the connection is lost. Usefull for mobile devices that go to sleep after a while. Changed mon_fermenters to use websockets instead of polling. Fixed wrong temperature color ranges on the fermenter monior. Increased the websocket receive buffer to 2048. In cannot overflow, but larger messages are chunked and the application does not handle these split messages. Needs termferm 0.9.9 or newer.
Michiel Broek <mbroek@mbse.eu>
parents:
0
diff
changeset
|
14 | void fermenter_ws_receive(char *payload); |
48f8f3fce7c0
Added reconnecting-websocket.js to automatic reconnect the websocket if the connection is lost. Usefull for mobile devices that go to sleep after a while. Changed mon_fermenters to use websockets instead of polling. Fixed wrong temperature color ranges on the fermenter monior. Increased the websocket receive buffer to 2048. In cannot overflow, but larger messages are chunked and the application does not handle these split messages. Needs termferm 0.9.9 or newer.
Michiel Broek <mbroek@mbse.eu>
parents:
0
diff
changeset
|
15 | |
48f8f3fce7c0
Added reconnecting-websocket.js to automatic reconnect the websocket if the connection is lost. Usefull for mobile devices that go to sleep after a while. Changed mon_fermenters to use websockets instead of polling. Fixed wrong temperature color ranges on the fermenter monior. Increased the websocket receive buffer to 2048. In cannot overflow, but larger messages are chunked and the application does not handle these split messages. Needs termferm 0.9.9 or newer.
Michiel Broek <mbroek@mbse.eu>
parents:
0
diff
changeset
|
16 | /** |
0 | 17 | * @brief Birth of a fermenter or data update. Create it in the database if |
18 | * never seen before, else just update the database entry. | |
19 | * @param topic The MQTT topic string, contains the fermenter type and name. | |
20 | * @param payload The JSON formatted payload with the fermenter details. | |
21 | */ | |
22 | void fermenter_birth_data(char *topic, char *payload); | |
23 | ||
24 | /** | |
25 | * @brief Death of a fermenter. Mark it offline in the database. | |
26 | * @param topic The MQTT topic string, contains the fermenter type and name. | |
27 | */ | |
28 | void fermenter_death(char *topic); | |
29 | ||
30 | /** | |
31 | * @brief Data logging from fermenters. | |
32 | * @param topic The MQTT topic string, contains the fermenter type and name. | |
33 | * @param payload The JSON formatted payload with the fermenter details. | |
34 | */ | |
35 | void fermenter_log(char *topic, char *payload); | |
36 | ||
37 | ||
38 | #endif |