Thu, 10 Jan 2019 20:22:06 +0100
Added configuration settings for MQTT in config.php. Finished screen box sizes for the fermenters monitor. Select beername and code from the current brew products and send it to the fermenter. Added switch commands to the fermenter. Delay data get from the fermenter after sending any command so there is time to process the commands. Turn switches off when the mode changes. Removed 0.2 degrees setpoint diffs for low and high, the fermenter must deal with it. Prevent turning the heater and cooler together on.
4 | 1 | <?php |
2 | ||
3 | require_once('config.php'); | |
4 | ||
5 | if (isset($_GET["uuid"])) | |
6 | $uuid = $_GET["uuid"]; | |
7 | else | |
8 | $uuid = "'ef166f25-1bb4-4bef-b112-a867af77f766'"; | |
9 | ||
10 | ||
11 | $mysqli = new mysqli(DBASE_HOST,DBASE_USER,DBASE_PASS,DBASE_NAME); | |
43
dcb9ff8846fa
Renamed monitor database tables
Michiel Broek <mbroek@mbse.eu>
parents:
7
diff
changeset
|
12 | $query = "SELECT * FROM mon_fermenters WHERE uuid=".$uuid.""; |
4 | 13 | $result = $mysqli->query($query); |
14 | $resultArray = $result->fetch_array(MYSQLI_ASSOC); | |
7
59048cd5f00d
Fixes boolean values and only display valid fields in node view.
Michiel Broek <mbroek@mbse.eu>
parents:
4
diff
changeset
|
15 | if ($resultArray['online'] == 'Y') { |
180
a5aa3502310c
Updated README. Getfermenter and getnode scripts return 0 and 1 instead of false and true for boolean values. Global variable my_uuid added. Moved the javascript out of mon_fermenter.php. Added log chart view button in the fermenter monitor.
Michiel Broek <mbroek@mbse.eu>
parents:
43
diff
changeset
|
16 | $resultArray['online'] = 1; |
7
59048cd5f00d
Fixes boolean values and only display valid fields in node view.
Michiel Broek <mbroek@mbse.eu>
parents:
4
diff
changeset
|
17 | } else { |
180
a5aa3502310c
Updated README. Getfermenter and getnode scripts return 0 and 1 instead of false and true for boolean values. Global variable my_uuid added. Moved the javascript out of mon_fermenter.php. Added log chart view button in the fermenter monitor.
Michiel Broek <mbroek@mbse.eu>
parents:
43
diff
changeset
|
18 | $resultArray['online'] = 0; |
7
59048cd5f00d
Fixes boolean values and only display valid fields in node view.
Michiel Broek <mbroek@mbse.eu>
parents:
4
diff
changeset
|
19 | } |
4 | 20 | echo json_encode($resultArray); |