Fri, 20 Sep 2019 20:12:36 +0200
Reworked the splitted batches, the data is now in a separate table and there is only one product record.
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:
diff
changeset
|
1 | /***************************************************************************** |
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:
diff
changeset
|
2 | * Copyright (C) 2019 |
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:
diff
changeset
|
3 | * |
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:
diff
changeset
|
4 | * Michiel Broek <mbroek at mbse dot eu> |
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:
diff
changeset
|
5 | * |
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:
diff
changeset
|
6 | * This file is part of BMS |
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:
diff
changeset
|
7 | * |
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:
diff
changeset
|
8 | * This is free software; you can redistribute it and/or modify it |
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:
diff
changeset
|
9 | * under the terms of the GNU General Public License as published by the |
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:
diff
changeset
|
10 | * Free Software Foundation; either version 2, or (at your option) any |
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:
diff
changeset
|
11 | * later version. |
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:
diff
changeset
|
12 | * |
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:
diff
changeset
|
13 | * Brewery Management System istributed in the hope that it will be useful, but |
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:
diff
changeset
|
14 | * WITHOUT ANY WARRANTY; without even the implied warranty of |
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:
diff
changeset
|
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
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:
diff
changeset
|
16 | * General Public License for more details. |
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:
diff
changeset
|
17 | * |
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:
diff
changeset
|
18 | * You should have received a copy of the GNU General Public License |
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:
diff
changeset
|
19 | * along with ThermFerm; see the file COPYING. If not, write to the Free |
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:
diff
changeset
|
20 | * Software Foundation, 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. |
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:
diff
changeset
|
21 | *****************************************************************************/ |
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:
diff
changeset
|
22 | |
191
fd1d7225ca6e
Version 0.0.4. Added confirm popup window to abort a running profile. Translated the toggle buttons.
Michiel Broek <mbroek@mbse.eu>
parents:
189
diff
changeset
|
23 | function createAbortElements() { |
fd1d7225ca6e
Version 0.0.4. Added confirm popup window to abort a running profile. Translated the toggle buttons.
Michiel Broek <mbroek@mbse.eu>
parents:
189
diff
changeset
|
24 | $('#eventWindow').jqxWindow({ |
fd1d7225ca6e
Version 0.0.4. Added confirm popup window to abort a running profile. Translated the toggle buttons.
Michiel Broek <mbroek@mbse.eu>
parents:
189
diff
changeset
|
25 | theme: theme, |
fd1d7225ca6e
Version 0.0.4. Added confirm popup window to abort a running profile. Translated the toggle buttons.
Michiel Broek <mbroek@mbse.eu>
parents:
189
diff
changeset
|
26 | position: { x: 440, y: 210 }, |
fd1d7225ca6e
Version 0.0.4. Added confirm popup window to abort a running profile. Translated the toggle buttons.
Michiel Broek <mbroek@mbse.eu>
parents:
189
diff
changeset
|
27 | width: 400, |
fd1d7225ca6e
Version 0.0.4. Added confirm popup window to abort a running profile. Translated the toggle buttons.
Michiel Broek <mbroek@mbse.eu>
parents:
189
diff
changeset
|
28 | height: 200, |
fd1d7225ca6e
Version 0.0.4. Added confirm popup window to abort a running profile. Translated the toggle buttons.
Michiel Broek <mbroek@mbse.eu>
parents:
189
diff
changeset
|
29 | resizable: false, |
fd1d7225ca6e
Version 0.0.4. Added confirm popup window to abort a running profile. Translated the toggle buttons.
Michiel Broek <mbroek@mbse.eu>
parents:
189
diff
changeset
|
30 | isModal: true, |
fd1d7225ca6e
Version 0.0.4. Added confirm popup window to abort a running profile. Translated the toggle buttons.
Michiel Broek <mbroek@mbse.eu>
parents:
189
diff
changeset
|
31 | modalOpacity: 0.4, |
fd1d7225ca6e
Version 0.0.4. Added confirm popup window to abort a running profile. Translated the toggle buttons.
Michiel Broek <mbroek@mbse.eu>
parents:
189
diff
changeset
|
32 | okButton: $('#delOk'), |
fd1d7225ca6e
Version 0.0.4. Added confirm popup window to abort a running profile. Translated the toggle buttons.
Michiel Broek <mbroek@mbse.eu>
parents:
189
diff
changeset
|
33 | cancelButton: $('#delCancel'), |
fd1d7225ca6e
Version 0.0.4. Added confirm popup window to abort a running profile. Translated the toggle buttons.
Michiel Broek <mbroek@mbse.eu>
parents:
189
diff
changeset
|
34 | initContent: function () { |
fd1d7225ca6e
Version 0.0.4. Added confirm popup window to abort a running profile. Translated the toggle buttons.
Michiel Broek <mbroek@mbse.eu>
parents:
189
diff
changeset
|
35 | $('#delOk').jqxButton({ template: "danger", width: '65px', theme: theme }); |
fd1d7225ca6e
Version 0.0.4. Added confirm popup window to abort a running profile. Translated the toggle buttons.
Michiel Broek <mbroek@mbse.eu>
parents:
189
diff
changeset
|
36 | $('#delCancel').jqxButton({ template: "success", width: '65px', theme: theme }); |
fd1d7225ca6e
Version 0.0.4. Added confirm popup window to abort a running profile. Translated the toggle buttons.
Michiel Broek <mbroek@mbse.eu>
parents:
189
diff
changeset
|
37 | $('#delCancel').focus(); |
fd1d7225ca6e
Version 0.0.4. Added confirm popup window to abort a running profile. Translated the toggle buttons.
Michiel Broek <mbroek@mbse.eu>
parents:
189
diff
changeset
|
38 | } |
fd1d7225ca6e
Version 0.0.4. Added confirm popup window to abort a running profile. Translated the toggle buttons.
Michiel Broek <mbroek@mbse.eu>
parents:
189
diff
changeset
|
39 | }); |
fd1d7225ca6e
Version 0.0.4. Added confirm popup window to abort a running profile. Translated the toggle buttons.
Michiel Broek <mbroek@mbse.eu>
parents:
189
diff
changeset
|
40 | $('#eventWindow').jqxWindow('hide'); |
fd1d7225ca6e
Version 0.0.4. Added confirm popup window to abort a running profile. Translated the toggle buttons.
Michiel Broek <mbroek@mbse.eu>
parents:
189
diff
changeset
|
41 | } |
fd1d7225ca6e
Version 0.0.4. Added confirm popup window to abort a running profile. Translated the toggle buttons.
Michiel Broek <mbroek@mbse.eu>
parents:
189
diff
changeset
|
42 | |
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:
diff
changeset
|
43 | |
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:
diff
changeset
|
44 | $(document).ready(function () { |
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:
diff
changeset
|
45 | |
494
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
46 | var record = {}, |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
47 | blank = {}, |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
48 | ppayload = '', |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
49 | newBase = false, |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
50 | newProduct = false, |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
51 | newSwitch = false, |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
52 | newProfile = false, |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
53 | schedule = 0, |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
54 | yl = 12, // Normal yeast temp range |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
55 | yh = 24, |
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:
diff
changeset
|
56 | |
494
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
57 | productSource = { |
185
4c25db9e8102
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.
Michiel Broek <mbroek@mbse.eu>
parents:
184
diff
changeset
|
58 | datatype: "json", |
4c25db9e8102
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.
Michiel Broek <mbroek@mbse.eu>
parents:
184
diff
changeset
|
59 | cache: false, |
4c25db9e8102
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.
Michiel Broek <mbroek@mbse.eu>
parents:
184
diff
changeset
|
60 | datafields: [ |
4c25db9e8102
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.
Michiel Broek <mbroek@mbse.eu>
parents:
184
diff
changeset
|
61 | { name: 'code', type: 'string' }, |
4c25db9e8102
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.
Michiel Broek <mbroek@mbse.eu>
parents:
184
diff
changeset
|
62 | { name: 'name', type: 'string' }, |
192
7f69b43e6084
Implemented beer uuid product in monitor fermenters.
Michiel Broek <mbroek@mbse.eu>
parents:
191
diff
changeset
|
63 | { name: 'uuid', type: 'string' }, |
299
047ead629d4a
Accept yeast temperature limits from thermferm via MQTT. Send yeat temperature ranges to thermferm together with the beer parameters. Store yeast temperature limits in the mon_fermenters database table. The monitor fermenters screen adjusts the temperature color ranges.
Michiel Broek <mbroek@mbse.eu>
parents:
251
diff
changeset
|
64 | { name: 'stage', type: 'int' }, |
047ead629d4a
Accept yeast temperature limits from thermferm via MQTT. Send yeat temperature ranges to thermferm together with the beer parameters. Store yeast temperature limits in the mon_fermenters database table. The monitor fermenters screen adjusts the temperature color ranges.
Michiel Broek <mbroek@mbse.eu>
parents:
251
diff
changeset
|
65 | { name: 'yeast_lo', type: 'float' }, |
047ead629d4a
Accept yeast temperature limits from thermferm via MQTT. Send yeat temperature ranges to thermferm together with the beer parameters. Store yeast temperature limits in the mon_fermenters database table. The monitor fermenters screen adjusts the temperature color ranges.
Michiel Broek <mbroek@mbse.eu>
parents:
251
diff
changeset
|
66 | { name: 'yeast_hi', type: 'float' } |
185
4c25db9e8102
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.
Michiel Broek <mbroek@mbse.eu>
parents:
184
diff
changeset
|
67 | ], |
4c25db9e8102
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.
Michiel Broek <mbroek@mbse.eu>
parents:
184
diff
changeset
|
68 | id: 'code', |
4c25db9e8102
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.
Michiel Broek <mbroek@mbse.eu>
parents:
184
diff
changeset
|
69 | url: "includes/db_product.php?select=ferment" |
494
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
70 | }, |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
71 | productlist = new $.jqx.dataAdapter(productSource, { |
187
77e00fcca24e
Added dummy beer product for empty fermenters.
Michiel Broek <mbroek@mbse.eu>
parents:
185
diff
changeset
|
72 | beforeLoadComplete: function (records) { |
494
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
73 | var row, i, data = new Array(); |
187
77e00fcca24e
Added dummy beer product for empty fermenters.
Michiel Broek <mbroek@mbse.eu>
parents:
185
diff
changeset
|
74 | // Create a dummy beer on top to store in idle fermenters. |
77e00fcca24e
Added dummy beer product for empty fermenters.
Michiel Broek <mbroek@mbse.eu>
parents:
185
diff
changeset
|
75 | blank['code'] = "Free"; // Will override this later. |
77e00fcca24e
Added dummy beer product for empty fermenters.
Michiel Broek <mbroek@mbse.eu>
parents:
185
diff
changeset
|
76 | blank['name'] = 'Dummy'; |
192
7f69b43e6084
Implemented beer uuid product in monitor fermenters.
Michiel Broek <mbroek@mbse.eu>
parents:
191
diff
changeset
|
77 | blank['uuid'] = '66ecccbf-e942-4a35-af49-8b02314561a5'; |
299
047ead629d4a
Accept yeast temperature limits from thermferm via MQTT. Send yeat temperature ranges to thermferm together with the beer parameters. Store yeast temperature limits in the mon_fermenters database table. The monitor fermenters screen adjusts the temperature color ranges.
Michiel Broek <mbroek@mbse.eu>
parents:
251
diff
changeset
|
78 | blank['stage'] = 10; |
047ead629d4a
Accept yeast temperature limits from thermferm via MQTT. Send yeat temperature ranges to thermferm together with the beer parameters. Store yeast temperature limits in the mon_fermenters database table. The monitor fermenters screen adjusts the temperature color ranges.
Michiel Broek <mbroek@mbse.eu>
parents:
251
diff
changeset
|
79 | blank['yeast_lo'] = 12.0; |
047ead629d4a
Accept yeast temperature limits from thermferm via MQTT. Send yeat temperature ranges to thermferm together with the beer parameters. Store yeast temperature limits in the mon_fermenters database table. The monitor fermenters screen adjusts the temperature color ranges.
Michiel Broek <mbroek@mbse.eu>
parents:
251
diff
changeset
|
80 | blank['yeast_hi'] = 24.0; |
187
77e00fcca24e
Added dummy beer product for empty fermenters.
Michiel Broek <mbroek@mbse.eu>
parents:
185
diff
changeset
|
81 | data.push(blank); |
494
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
82 | for (i = 0; i < records.length; i++) { |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
83 | row = records[i]; |
189
6470e5c6a001
In bmsd added missing json percent. The Makefile didn't install the fpdf library. Added profile commands. Small changes to the monitor fermenters screen. The monitor fermenters scheduler is now more responsive. Profiles selection and commands in the remote thermferm.
Michiel Broek <mbroek@mbse.eu>
parents:
188
diff
changeset
|
84 | data.push(row); |
187
77e00fcca24e
Added dummy beer product for empty fermenters.
Michiel Broek <mbroek@mbse.eu>
parents:
185
diff
changeset
|
85 | } |
77e00fcca24e
Added dummy beer product for empty fermenters.
Michiel Broek <mbroek@mbse.eu>
parents:
185
diff
changeset
|
86 | return data; |
77e00fcca24e
Added dummy beer product for empty fermenters.
Michiel Broek <mbroek@mbse.eu>
parents:
185
diff
changeset
|
87 | }, |
77e00fcca24e
Added dummy beer product for empty fermenters.
Michiel Broek <mbroek@mbse.eu>
parents:
185
diff
changeset
|
88 | loadError: function(jqXHR, status, error) { |
77e00fcca24e
Added dummy beer product for empty fermenters.
Michiel Broek <mbroek@mbse.eu>
parents:
185
diff
changeset
|
89 | $('#err').text(status + ' ' + error); |
77e00fcca24e
Added dummy beer product for empty fermenters.
Michiel Broek <mbroek@mbse.eu>
parents:
185
diff
changeset
|
90 | }, |
494
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
91 | }), |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
92 | profileSource = { |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
93 | datatype: "json", |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
94 | cache: false, |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
95 | datafields: [ |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
96 | { name: 'record', type: 'int' }, |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
97 | { name: 'uuid', type: 'string' }, |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
98 | { name: 'name', type: 'string' }, |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
99 | { name: 'inittemp_lo', type: 'float' }, |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
100 | { name: 'inittemp_hi', type: 'float' }, |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
101 | { name: 'fridgemode', type: 'int' }, |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
102 | { name: 'totalsteps', type: 'int' }, |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
103 | { name: 'duration', type: 'int' }, |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
104 | { name: 'steps', type: 'array' } |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
105 | ], |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
106 | id: 'record', |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
107 | url: "includes/db_profile_fermentation.php" |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
108 | }, |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
109 | profilelist = new $.jqx.dataAdapter(profileSource, { |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
110 | beforeLoadComplete: function (records) { |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
111 | var data = new Array(), |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
112 | empty = {}, i, row; |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
113 | // Create a dummy profile on top of the list. |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
114 | empty['record'] = -1; |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
115 | empty['uuid'] = ''; |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
116 | empty['name'] = 'Wis profiel'; |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
117 | empty['inittemp_lo'] = 20; |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
118 | empty['inittemp_hi'] = 20; |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
119 | empty['fridgemode'] = 0; |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
120 | empty['totalsteps'] = 0; |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
121 | empty['duration'] = 0; |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
122 | empty['steps'] = '[]'; |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
123 | data.push(empty); |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
124 | for (i = 0; i < records.length; i++) { |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
125 | row = records[i]; |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
126 | data.push(row); |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
127 | } |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
128 | return data; |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
129 | }, |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
130 | loadError: function(jqXHR, status, error) { |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
131 | $('#err').text(status + ' ' + error); |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
132 | }, |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
133 | }), |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
134 | gaugeoptions = { |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
135 | min: 0, max: 40, width: 375, height: 375, |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
136 | ranges: [{ startValue: 0, endValue: yl, style: { fill: '#3399FF', stroke: '#3399FF' }, endWidth: 10, startWidth: 10 }, |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
137 | { startValue: yl, endValue: yh, style: { fill: '#00CC33', stroke: '#00CC33' }, endWidth: 10, startWidth: 10 }, |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
138 | { startValue: yh, endValue: 40, style: { fill: '#FC6A6A', stroke: '#FC6A6A' }, endWidth: 10, startWidth: 10 }], |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
139 | ticksMinor: { interval: 1, size: '5%' }, |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
140 | ticksMajor: { interval: 5, size: '9%' }, |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
141 | labels: { interval: 5 }, |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
142 | style: { fill: '#eeeeee', stroke: '#666666' }, |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
143 | value: 0, |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
144 | colorScheme: 'scheme05' |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
145 | }, |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
146 | gaugeSmalloptions = { |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
147 | min: -15, max: 25, width: 190, height: 190, |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
148 | ranges: [{ startValue: -15, endValue: 0, startWidth: 5, endWidth: 5, style: { fill: '#3399FF', stroke: '#3399FF' }}, |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
149 | { startValue: 0, endValue: 10, startWidth: 5, endWidth: 5, style: { fill: '#00CC33', stroke: '#00CC33' }}, |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
150 | { startValue: 10, endValue: 25, startWidth: 5, endWidth: 5, style: { fill: '#FC6A6A', stroke: '#FC6A6A' }}], |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
151 | ticksMinor: { interval: 1, size: '5%' }, |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
152 | ticksMajor: { interval: 5, size: '9%' }, |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
153 | labels: { interval: 5 }, |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
154 | style: { fill: '#eeeeee', stroke: '#666666' }, |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
155 | value: 0, |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
156 | colorScheme: 'scheme05', |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
157 | caption: { value: 'Chiller', position: 'bottom', offset: [0, 10] } |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
158 | }, |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
159 | switchoptions = { |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
160 | height: 68, |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
161 | width: 35, |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
162 | onLabel:'AAN', |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
163 | offLabel:'UIT', |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
164 | theme: theme, |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
165 | thumbSize:'50%', |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
166 | orientation: 'vertical' |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
167 | }, |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
168 | targetoptions = { inputMode: 'simple', theme: theme, width: 70, min: 0, max: 40, decimalDigits: 1, spinButtons: true }, |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
169 | url = "getfermenter.php?uuid='" + my_uuid + "'", |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
170 | source = { |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
171 | datatype: "json", |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
172 | datafields: [ |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
173 | { name: 'record', type: 'int' }, |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
174 | { name: 'uuid', type: 'string' }, |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
175 | { name: 'alias', type: 'string' }, |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
176 | { name: 'node', type: 'string' }, |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
177 | { name: 'online', type: 'int' }, |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
178 | { name: 'beercode', type: 'string' }, |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
179 | { name: 'beername', type: 'string' }, |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
180 | { name: 'air_state', type: 'string' }, |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
181 | { name: 'air_temperature', type: 'float' }, |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
182 | { name: 'beer_state', type: 'string' }, |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
183 | { name: 'beer_temperature', type: 'float' }, |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
184 | { name: 'chiller_state', type: 'string' }, |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
185 | { name: 'chiller_temperature', type: 'float' }, |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
186 | { name: 'heater_state', type: 'int' }, |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
187 | { name: 'heater_usage', type: 'int' }, |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
188 | { name: 'cooler_state', type: 'int' }, |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
189 | { name: 'cooler_usage', type: 'int' }, |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
190 | { name: 'fan_state', type: 'int' }, |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
191 | { name: 'fan_usage', type: 'int' }, |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
192 | { name: 'light_address', type: 'string' }, |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
193 | { name: 'light_state', type: 'int' }, |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
194 | { name: 'light_usage', type: 'int' }, |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
195 | { name: 'door_address', type: 'string' }, |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
196 | { name: 'door_state', type: 'int' }, |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
197 | { name: 'psu_address', type: 'string' }, |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
198 | { name: 'psu_state', type: 'int' }, |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
199 | { name: 'mode', type: 'string' }, |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
200 | { name: 'alarm', type: 'int' }, |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
201 | { name: 'setpoint_high', type: 'float' }, |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
202 | { name: 'setpoint_low', type: 'float' }, |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
203 | { name: 'profile_uuid', type: 'string' }, |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
204 | { name: 'profile_name', type: 'string' }, |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
205 | { name: 'profile_state', type: 'string' }, |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
206 | { name: 'profile_percent', type: 'int' }, |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
207 | { name: 'profile_inittemp_high', type: 'float' }, |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
208 | { name: 'profile_inittemp_low', type: 'float' }, |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
209 | { name: 'profile_steps', type: 'string' }, |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
210 | { name: 'stage', type: 'string' }, |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
211 | { name: 'beeruuid', type: 'string' }, |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
212 | { name: 'yeast_lo', type: 'float' }, |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
213 | { name: 'yeast_hi', type: 'float' }, |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
214 | { name: 'webcam_url', type: 'string' }, |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
215 | { name: 'webcam_light', type: 'int' } |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
216 | ], |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
217 | id: 'record', |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
218 | url: url |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
219 | }, |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
220 | dataAdapter = new $.jqx.dataAdapter(source, { |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
221 | loadComplete: function (records) { |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
222 | record = dataAdapter.records[0]; |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
223 | var range, oline = (record.online) ? "On-line" : "Off-line"; |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
224 | $("#info_uuid").html(record.uuid); |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
225 | $("#info_system").html(record.node + "/" + record.alias); |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
226 | $("#info_online").html(oline); |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
227 | $("#info_beer").html(record.beercode + " - " + record.beername); |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
228 | $("#info_mode").jqxDropDownList('selectItem', record.mode); |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
229 | $("#info_stage").jqxDropDownList('selectItem', record.stage); |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
230 | $("#info_profile").html(record.profile_name); |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
231 | blank['name'] = record.alias; |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
232 | blank['code'] = record.alias.toUpperCase(); |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
233 | blank['uuid'] = record.uuid; |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
234 | if (record.profile_name == "") |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
235 | $("#info_mode").jqxDropDownList('disableItem', "PROFILE"); |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
236 | else |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
237 | $("#info_mode").jqxDropDownList('enableItem', "PROFILE"); |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
238 | $("#target_lo").val(record.setpoint_low); |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
239 | $("#target_hi").val(record.setpoint_high); |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
240 | if (record.online && ((record.mode == "FRIDGE") || (record.mode == "BEER"))) { |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
241 | $("#target_lo").jqxNumberInput({ readOnly: false, Width: 70, spinButtons: true }); |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
242 | $("#target_hi").jqxNumberInput({ readOnly: false, Width: 70, spinButtons: true }); |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
243 | } else { |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
244 | $("#target_lo").jqxNumberInput({ readOnly: true, Width: 50, spinButtons: false }); |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
245 | $("#target_hi").jqxNumberInput({ readOnly: true, Width: 50, spinButtons: false }); |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
246 | } |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
247 | |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
248 | if (record.online && record.door_address && (record.door_state != "0")) { |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
249 | $("#fermenter_doorled").html('<div class="LEDyellow_on"></div>Door'); |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
250 | } else { |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
251 | $("#fermenter_doorled").html('<div class="LEDyellow_off"></div>Door'); |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
252 | } |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
253 | if (record.online && record.light_address && (record.light_state != "0")) { |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
254 | $("#fermenter_lightled").html('<div class="LEDyellow_on"></div>Light'); |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
255 | } else { |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
256 | $("#fermenter_lightled").html('<div class="LEDyellow_off"></div>Light'); |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
257 | } |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
258 | |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
259 | if (record.online && (record.mode != "OFF")) { |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
260 | $("#fermenter_powerled").html('<div class="LEDblue_on"></div>Power'); |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
261 | $("#select_beer").jqxDropDownList({ disabled: true }); |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
262 | $("#select_beer").jqxDropDownList('clearSelection'); |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
263 | $("#select_beer").hide(); |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
264 | } else { |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
265 | $("#fermenter_powerled").html('<div class="LEDblue_off"></div>Power'); |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
266 | $("#select_beer").show(); |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
267 | $("#select_beer").jqxDropDownList({ disabled: false }); |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
268 | } |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
269 | if (record.online && (record.alarm != "0")) { |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
270 | $("#fermenter_alarmled").html('<div class="LEDred_on"></div>Alarm'); |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
271 | } else { |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
272 | $("#fermenter_alarmled").html('<div class="LEDred_off"></div>Alarm'); |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
273 | } |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
274 | |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
275 | if (record.online && (record.heater_state != "0")) { |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
276 | $("#fermenter_led1").html('<div class="LEDgreen_on"></div>Heat'); |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
277 | } else { |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
278 | $("#fermenter_led1").html('<div class="LEDgreen_off"></div>Heat'); |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
279 | } |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
280 | if (record.online && (record.cooler_state != "0")) { |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
281 | $("#fermenter_led2").html('<div class="LEDgreen_on"></div>Cool'); |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
282 | } else { |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
283 | $("#fermenter_led2").html('<div class="LEDgreen_off"></div>Cool'); |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
284 | } |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
285 | if (record.online && (record.fan_state != "0")) { |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
286 | $("#fermenter_led3").html('<div class="LEDgreen_on"></div>Fan'); |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
287 | } else { |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
288 | $("#fermenter_led3").html('<div class="LEDgreen_off"></div>Fan'); |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
289 | } |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
290 | if (record.online && (record.mode == "NONE")) { |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
291 | $("#fermenter_toggle1").jqxSwitchButton( 'enable' ); |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
292 | $("#fermenter_toggle2").jqxSwitchButton( 'enable' ); |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
293 | $("#fermenter_toggle3").jqxSwitchButton( 'enable' ); |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
294 | } else { |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
295 | $("#fermenter_toggle1").jqxSwitchButton( 'disable' ); |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
296 | $("#fermenter_toggle2").jqxSwitchButton( 'disable' ); |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
297 | $("#fermenter_toggle3").jqxSwitchButton( 'disable' ); |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
298 | $("#fermenter_toggle1").val( (record.heater_state != "0") ); |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
299 | $("#fermenter_toggle2").val( (record.cooler_state != "0") ); |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
300 | $("#fermenter_toggle3").val( (record.fan_state != "0") ); |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
301 | } |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
302 | |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
303 | if (record.online && (record.mode == "PROFILE")) { |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
304 | if (record.profile_state == "OFF") { |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
305 | $("#select_profile").show(); |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
306 | $("#select_profile").jqxDropDownList({ disabled: false }); |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
307 | $("#info_mode").jqxDropDownList({ disabled: false }); |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
308 | $('#Profile1').jqxButton({ template: "success", value: "Starten" }); |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
309 | $("#Profile1").show(); |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
310 | $("#Profile2").hide(); |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
311 | $("#status_profile").html(''); |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
312 | } else if (record.profile_state == "RUN") { |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
313 | $("#select_profile").jqxDropDownList({ disabled: true }); |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
314 | $("#select_profile").hide(); |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
315 | $("#info_mode").jqxDropDownList({ disabled: true }); |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
316 | $('#Profile1').jqxButton({ template: "danger", value: "Afbreken" }); |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
317 | $('#Profile2').jqxButton({ template: "primary", value: "Pauze" }); |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
318 | $("#Profile1").show(); |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
319 | $("#Profile2").show(); |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
320 | $("#status_profile").html('Profiel actief, '+record.profile_percent+'% gereed'); |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
321 | } else if (record.profile_state == "PAUSE") { |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
322 | $("#select_profile").jqxDropDownList({ disabled: true }); |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
323 | $("#select_profile").hide(); |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
324 | $("#info_mode").jqxDropDownList({ disabled: true }); |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
325 | $('#Profile1').jqxButton({ template: "danger", value: "Afbreken" }); |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
326 | $('#Profile2').jqxButton({ template: "success", value: "Doorgaan" }); |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
327 | $("#Profile1").show(); |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
328 | $("#Profile2").show(); |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
329 | $("#status_profile").html('Profiel pauze, '+record.profile_percent+'% gereed'); |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
330 | } else if (record.profile_state == "DONE") { |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
331 | $("#select_profile").jqxDropDownList({ disabled: true }); |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
332 | $("#select_profile").hide(); |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
333 | $("#info_mode").jqxDropDownList({ disabled: true }); |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
334 | $('#Profile1').jqxButton({ template: "primary", value: "Profiel Ok" }); |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
335 | $("#Profile1").show(); |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
336 | $("#Profile2").hide(); |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
337 | $("#status_profile").html('Profiel is gereed'); |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
338 | } |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
339 | } else { |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
340 | $("#select_profile").show(); |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
341 | $("#select_profile").jqxDropDownList({ disabled: false }); |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
342 | $("#info_mode").jqxDropDownList({ disabled: false }); |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
343 | $("#Profile1").hide(); |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
344 | $("#Profile2").hide(); |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
345 | $("#status_profile").html(''); |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
346 | } |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
347 | if (record.online && (record.webcam_url != "")) { |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
348 | $("#Camera").show(); |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
349 | } else { |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
350 | $("#Camera").hide(); |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
351 | } |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
352 | |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
353 | yl = record.yeast_lo; |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
354 | yh = record.yeast_hi; |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
355 | range = { ranges: [{ startValue: 0, endValue: yl, style: { fill: '#3399FF', stroke: '#3399FF' }, endWidth: 10, startWidth: 10 }, |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
356 | { startValue: yl, endValue: yh, style: { fill: '#00CC33', stroke: '#00CC33' }, endWidth: 10, startWidth: 10 }, |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
357 | { startValue: yh, endValue: 40, style: { fill: '#FC6A6A', stroke: '#FC6A6A' }, endWidth: 10, startWidth: 10 }] }; |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
358 | $("#gaugeContainer_air").jqxGauge( range ); |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
359 | $("#gaugeContainer_beer").jqxGauge( range ); |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
360 | |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
361 | $("#gaugeContainer_air").jqxGauge({ caption: { value: 'Air: '+record.air_temperature.toFixed(3) }}); |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
362 | $('#gaugeContainer_air').jqxGauge({ value: record.air_temperature }); |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
363 | if (record.air_state == "OK") { |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
364 | $("#gaugeContainer_air").jqxGauge({ disabled: false }); |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
365 | } else { |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
366 | $("#gaugeContainer_air").jqxGauge({ disabled: true }); |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
367 | } |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
368 | $("#gaugeContainer_beer").jqxGauge({ caption: { value: 'Beer: '+record.beer_temperature.toFixed(3) }}); |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
369 | $('#gaugeContainer_beer').jqxGauge({ value: record.beer_temperature }); |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
370 | if (record.beer_state == "OK") { |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
371 | $("#gaugeContainer_beer").jqxGauge({ disabled: false }); |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
372 | } else { |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
373 | $("#gaugeContainer_beer").jqxGauge({ disabled: true }); |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
374 | } |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
375 | $("#gaugeContainer_chiller").jqxGauge({ value: record.chiller_temperature }); |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
376 | if (record.chiller_state == "OK") { |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
377 | $("#gaugeContainer_chiller").jqxGauge({ disabled: false }); |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
378 | } else { |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
379 | $("#gaugeContainer_chiller").jqxGauge({ disabled: true }); |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
380 | } |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
381 | } |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
382 | }); |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
383 | |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
384 | |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
385 | |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
386 | |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
387 | |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
388 | |
185
4c25db9e8102
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.
Michiel Broek <mbroek@mbse.eu>
parents:
184
diff
changeset
|
389 | $("#select_beer").jqxDropDownList({ |
4c25db9e8102
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.
Michiel Broek <mbroek@mbse.eu>
parents:
184
diff
changeset
|
390 | placeHolder: "Kies bier:", |
4c25db9e8102
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.
Michiel Broek <mbroek@mbse.eu>
parents:
184
diff
changeset
|
391 | theme: theme, |
4c25db9e8102
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.
Michiel Broek <mbroek@mbse.eu>
parents:
184
diff
changeset
|
392 | source: productlist, |
4c25db9e8102
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.
Michiel Broek <mbroek@mbse.eu>
parents:
184
diff
changeset
|
393 | displayMember: "code", |
4c25db9e8102
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.
Michiel Broek <mbroek@mbse.eu>
parents:
184
diff
changeset
|
394 | width: 150, |
189
6470e5c6a001
In bmsd added missing json percent. The Makefile didn't install the fpdf library. Added profile commands. Small changes to the monitor fermenters screen. The monitor fermenters scheduler is now more responsive. Profiles selection and commands in the remote thermferm.
Michiel Broek <mbroek@mbse.eu>
parents:
188
diff
changeset
|
395 | height: 24, |
185
4c25db9e8102
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.
Michiel Broek <mbroek@mbse.eu>
parents:
184
diff
changeset
|
396 | dropDownWidth: 500, |
4c25db9e8102
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.
Michiel Broek <mbroek@mbse.eu>
parents:
184
diff
changeset
|
397 | autoDropDownHeight: true, |
4c25db9e8102
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.
Michiel Broek <mbroek@mbse.eu>
parents:
184
diff
changeset
|
398 | renderer: function (index, label, value) { |
4c25db9e8102
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.
Michiel Broek <mbroek@mbse.eu>
parents:
184
diff
changeset
|
399 | var datarecord = productlist.records[index]; |
4c25db9e8102
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.
Michiel Broek <mbroek@mbse.eu>
parents:
184
diff
changeset
|
400 | return datarecord.code + " - " + datarecord.name; |
4c25db9e8102
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.
Michiel Broek <mbroek@mbse.eu>
parents:
184
diff
changeset
|
401 | } |
4c25db9e8102
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.
Michiel Broek <mbroek@mbse.eu>
parents:
184
diff
changeset
|
402 | }); |
189
6470e5c6a001
In bmsd added missing json percent. The Makefile didn't install the fpdf library. Added profile commands. Small changes to the monitor fermenters screen. The monitor fermenters scheduler is now more responsive. Profiles selection and commands in the remote thermferm.
Michiel Broek <mbroek@mbse.eu>
parents:
188
diff
changeset
|
403 | $("#select_profile").jqxDropDownList({ |
6470e5c6a001
In bmsd added missing json percent. The Makefile didn't install the fpdf library. Added profile commands. Small changes to the monitor fermenters screen. The monitor fermenters scheduler is now more responsive. Profiles selection and commands in the remote thermferm.
Michiel Broek <mbroek@mbse.eu>
parents:
188
diff
changeset
|
404 | placeHolder: "Kies profiel:", |
6470e5c6a001
In bmsd added missing json percent. The Makefile didn't install the fpdf library. Added profile commands. Small changes to the monitor fermenters screen. The monitor fermenters scheduler is now more responsive. Profiles selection and commands in the remote thermferm.
Michiel Broek <mbroek@mbse.eu>
parents:
188
diff
changeset
|
405 | theme: theme, |
6470e5c6a001
In bmsd added missing json percent. The Makefile didn't install the fpdf library. Added profile commands. Small changes to the monitor fermenters screen. The monitor fermenters scheduler is now more responsive. Profiles selection and commands in the remote thermferm.
Michiel Broek <mbroek@mbse.eu>
parents:
188
diff
changeset
|
406 | source: profilelist, |
6470e5c6a001
In bmsd added missing json percent. The Makefile didn't install the fpdf library. Added profile commands. Small changes to the monitor fermenters screen. The monitor fermenters scheduler is now more responsive. Profiles selection and commands in the remote thermferm.
Michiel Broek <mbroek@mbse.eu>
parents:
188
diff
changeset
|
407 | displayMember: "name", |
6470e5c6a001
In bmsd added missing json percent. The Makefile didn't install the fpdf library. Added profile commands. Small changes to the monitor fermenters screen. The monitor fermenters scheduler is now more responsive. Profiles selection and commands in the remote thermferm.
Michiel Broek <mbroek@mbse.eu>
parents:
188
diff
changeset
|
408 | width: 150, |
6470e5c6a001
In bmsd added missing json percent. The Makefile didn't install the fpdf library. Added profile commands. Small changes to the monitor fermenters screen. The monitor fermenters scheduler is now more responsive. Profiles selection and commands in the remote thermferm.
Michiel Broek <mbroek@mbse.eu>
parents:
188
diff
changeset
|
409 | height: 24, |
6470e5c6a001
In bmsd added missing json percent. The Makefile didn't install the fpdf library. Added profile commands. Small changes to the monitor fermenters screen. The monitor fermenters scheduler is now more responsive. Profiles selection and commands in the remote thermferm.
Michiel Broek <mbroek@mbse.eu>
parents:
188
diff
changeset
|
410 | dropDownWidth: 500, |
6470e5c6a001
In bmsd added missing json percent. The Makefile didn't install the fpdf library. Added profile commands. Small changes to the monitor fermenters screen. The monitor fermenters scheduler is now more responsive. Profiles selection and commands in the remote thermferm.
Michiel Broek <mbroek@mbse.eu>
parents:
188
diff
changeset
|
411 | autoDropDownHeight: true, |
6470e5c6a001
In bmsd added missing json percent. The Makefile didn't install the fpdf library. Added profile commands. Small changes to the monitor fermenters screen. The monitor fermenters scheduler is now more responsive. Profiles selection and commands in the remote thermferm.
Michiel Broek <mbroek@mbse.eu>
parents:
188
diff
changeset
|
412 | }); |
6470e5c6a001
In bmsd added missing json percent. The Makefile didn't install the fpdf library. Added profile commands. Small changes to the monitor fermenters screen. The monitor fermenters scheduler is now more responsive. Profiles selection and commands in the remote thermferm.
Michiel Broek <mbroek@mbse.eu>
parents:
188
diff
changeset
|
413 | |
184
3dbe1d2265ed
Removed the setpoints and temperatures from the right display panel. Added the current temperatures in text to the gauges as caption. Adjusted the gauge caption font display. Only send commands to the mqtt server just before we fetch fresh data. Added new target temperature settings in the right display box.
Michiel Broek <mbroek@mbse.eu>
parents:
183
diff
changeset
|
414 | $("#gaugeContainer_air").jqxGauge( gaugeoptions ); |
3dbe1d2265ed
Removed the setpoints and temperatures from the right display panel. Added the current temperatures in text to the gauges as caption. Adjusted the gauge caption font display. Only send commands to the mqtt server just before we fetch fresh data. Added new target temperature settings in the right display box.
Michiel Broek <mbroek@mbse.eu>
parents:
183
diff
changeset
|
415 | $("#gaugeContainer_air").jqxGauge( { caption: { value: 'Air: 00.000' }} ); |
3dbe1d2265ed
Removed the setpoints and temperatures from the right display panel. Added the current temperatures in text to the gauges as caption. Adjusted the gauge caption font display. Only send commands to the mqtt server just before we fetch fresh data. Added new target temperature settings in the right display box.
Michiel Broek <mbroek@mbse.eu>
parents:
183
diff
changeset
|
416 | $("#gaugeContainer_beer").jqxGauge( gaugeoptions ); |
3dbe1d2265ed
Removed the setpoints and temperatures from the right display panel. Added the current temperatures in text to the gauges as caption. Adjusted the gauge caption font display. Only send commands to the mqtt server just before we fetch fresh data. Added new target temperature settings in the right display box.
Michiel Broek <mbroek@mbse.eu>
parents:
183
diff
changeset
|
417 | $("#gaugeContainer_beer").jqxGauge( { caption: { value: 'Beer: 00.000' }} ); |
3dbe1d2265ed
Removed the setpoints and temperatures from the right display panel. Added the current temperatures in text to the gauges as caption. Adjusted the gauge caption font display. Only send commands to the mqtt server just before we fetch fresh data. Added new target temperature settings in the right display box.
Michiel Broek <mbroek@mbse.eu>
parents:
183
diff
changeset
|
418 | $("#gaugeContainer_chiller").jqxGauge( gaugeSmalloptions ); |
3dbe1d2265ed
Removed the setpoints and temperatures from the right display panel. Added the current temperatures in text to the gauges as caption. Adjusted the gauge caption font display. Only send commands to the mqtt server just before we fetch fresh data. Added new target temperature settings in the right display box.
Michiel Broek <mbroek@mbse.eu>
parents:
183
diff
changeset
|
419 | |
183
a810539dc218
Added cmd_fermenter.php which interfaces http POST commands to MQTT using mosquitto_pub in a shell. Several chnges to the monitor fermenter screen.
Michiel Broek <mbroek@mbse.eu>
parents:
182
diff
changeset
|
420 | $("#fermenter_toggle1").jqxSwitchButton( switchoptions ); |
a810539dc218
Added cmd_fermenter.php which interfaces http POST commands to MQTT using mosquitto_pub in a shell. Several chnges to the monitor fermenter screen.
Michiel Broek <mbroek@mbse.eu>
parents:
182
diff
changeset
|
421 | $("#fermenter_toggle2").jqxSwitchButton( switchoptions ); |
a810539dc218
Added cmd_fermenter.php which interfaces http POST commands to MQTT using mosquitto_pub in a shell. Several chnges to the monitor fermenter screen.
Michiel Broek <mbroek@mbse.eu>
parents:
182
diff
changeset
|
422 | $("#fermenter_toggle3").jqxSwitchButton( switchoptions ); |
a810539dc218
Added cmd_fermenter.php which interfaces http POST commands to MQTT using mosquitto_pub in a shell. Several chnges to the monitor fermenter screen.
Michiel Broek <mbroek@mbse.eu>
parents:
182
diff
changeset
|
423 | |
184
3dbe1d2265ed
Removed the setpoints and temperatures from the right display panel. Added the current temperatures in text to the gauges as caption. Adjusted the gauge caption font display. Only send commands to the mqtt server just before we fetch fresh data. Added new target temperature settings in the right display box.
Michiel Broek <mbroek@mbse.eu>
parents:
183
diff
changeset
|
424 | srcMode = [ "OFF", "NONE", "FRIDGE", "BEER", "PROFILE" ]; |
3dbe1d2265ed
Removed the setpoints and temperatures from the right display panel. Added the current temperatures in text to the gauges as caption. Adjusted the gauge caption font display. Only send commands to the mqtt server just before we fetch fresh data. Added new target temperature settings in the right display box.
Michiel Broek <mbroek@mbse.eu>
parents:
183
diff
changeset
|
425 | srcStage = [ "PRIMARY", "SECONDARY", "TERTIARY", "CARBONATION" ]; |
189
6470e5c6a001
In bmsd added missing json percent. The Makefile didn't install the fpdf library. Added profile commands. Small changes to the monitor fermenters screen. The monitor fermenters scheduler is now more responsive. Profiles selection and commands in the remote thermferm.
Michiel Broek <mbroek@mbse.eu>
parents:
188
diff
changeset
|
426 | $("#info_mode").jqxDropDownList({ theme: theme, source: srcMode, width: 100, height: 24, dropDownHeight: 156 }); |
6470e5c6a001
In bmsd added missing json percent. The Makefile didn't install the fpdf library. Added profile commands. Small changes to the monitor fermenters screen. The monitor fermenters scheduler is now more responsive. Profiles selection and commands in the remote thermferm.
Michiel Broek <mbroek@mbse.eu>
parents:
188
diff
changeset
|
427 | $("#info_stage").jqxDropDownList({ theme: theme, source: srcStage, width: 150, height: 24, dropDownHeight: 125 }); |
183
a810539dc218
Added cmd_fermenter.php which interfaces http POST commands to MQTT using mosquitto_pub in a shell. Several chnges to the monitor fermenter screen.
Michiel Broek <mbroek@mbse.eu>
parents:
182
diff
changeset
|
428 | |
184
3dbe1d2265ed
Removed the setpoints and temperatures from the right display panel. Added the current temperatures in text to the gauges as caption. Adjusted the gauge caption font display. Only send commands to the mqtt server just before we fetch fresh data. Added new target temperature settings in the right display box.
Michiel Broek <mbroek@mbse.eu>
parents:
183
diff
changeset
|
429 | $("#target_lo").jqxNumberInput( targetoptions ); |
3dbe1d2265ed
Removed the setpoints and temperatures from the right display panel. Added the current temperatures in text to the gauges as caption. Adjusted the gauge caption font display. Only send commands to the mqtt server just before we fetch fresh data. Added new target temperature settings in the right display box.
Michiel Broek <mbroek@mbse.eu>
parents:
183
diff
changeset
|
430 | $("#target_hi").jqxNumberInput( targetoptions ); |
183
a810539dc218
Added cmd_fermenter.php which interfaces http POST commands to MQTT using mosquitto_pub in a shell. Several chnges to the monitor fermenter screen.
Michiel Broek <mbroek@mbse.eu>
parents:
182
diff
changeset
|
431 | |
189
6470e5c6a001
In bmsd added missing json percent. The Makefile didn't install the fpdf library. Added profile commands. Small changes to the monitor fermenters screen. The monitor fermenters scheduler is now more responsive. Profiles selection and commands in the remote thermferm.
Michiel Broek <mbroek@mbse.eu>
parents:
188
diff
changeset
|
432 | $("#Profile1").jqxButton({ template: "info", width: '150px', height: 24, theme: theme }); |
6470e5c6a001
In bmsd added missing json percent. The Makefile didn't install the fpdf library. Added profile commands. Small changes to the monitor fermenters screen. The monitor fermenters scheduler is now more responsive. Profiles selection and commands in the remote thermferm.
Michiel Broek <mbroek@mbse.eu>
parents:
188
diff
changeset
|
433 | $("#Profile2").jqxButton({ template: "info", width: '150px', height: 24, theme: theme }); |
6470e5c6a001
In bmsd added missing json percent. The Makefile didn't install the fpdf library. Added profile commands. Small changes to the monitor fermenters screen. The monitor fermenters scheduler is now more responsive. Profiles selection and commands in the remote thermferm.
Michiel Broek <mbroek@mbse.eu>
parents:
188
diff
changeset
|
434 | $("#Profile1").hide(); // Hide these until they are needed. |
6470e5c6a001
In bmsd added missing json percent. The Makefile didn't install the fpdf library. Added profile commands. Small changes to the monitor fermenters screen. The monitor fermenters scheduler is now more responsive. Profiles selection and commands in the remote thermferm.
Michiel Broek <mbroek@mbse.eu>
parents:
188
diff
changeset
|
435 | $("#Profile2").hide(); |
6470e5c6a001
In bmsd added missing json percent. The Makefile didn't install the fpdf library. Added profile commands. Small changes to the monitor fermenters screen. The monitor fermenters scheduler is now more responsive. Profiles selection and commands in the remote thermferm.
Michiel Broek <mbroek@mbse.eu>
parents:
188
diff
changeset
|
436 | |
184
3dbe1d2265ed
Removed the setpoints and temperatures from the right display panel. Added the current temperatures in text to the gauges as caption. Adjusted the gauge caption font display. Only send commands to the mqtt server just before we fetch fresh data. Added new target temperature settings in the right display box.
Michiel Broek <mbroek@mbse.eu>
parents:
183
diff
changeset
|
437 | function sendBase(stage, mode, tlo, thi) { |
3dbe1d2265ed
Removed the setpoints and temperatures from the right display panel. Added the current temperatures in text to the gauges as caption. Adjusted the gauge caption font display. Only send commands to the mqtt server just before we fetch fresh data. Added new target temperature settings in the right display box.
Michiel Broek <mbroek@mbse.eu>
parents:
183
diff
changeset
|
438 | |
3dbe1d2265ed
Removed the setpoints and temperatures from the right display panel. Added the current temperatures in text to the gauges as caption. Adjusted the gauge caption font display. Only send commands to the mqtt server just before we fetch fresh data. Added new target temperature settings in the right display box.
Michiel Broek <mbroek@mbse.eu>
parents:
183
diff
changeset
|
439 | console.log("sendBase("+stage+", "+mode+", "+tlo+", "+thi+")"); |
494
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
440 | var data = 'node=' + record.node + '&alias=' + record.alias + '&payload={"stage":"' + stage; |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
441 | data += '","mode":"' + mode + '","setpoint":{"low":' + tlo + ',"high":' + thi + '}}'; |
183
a810539dc218
Added cmd_fermenter.php which interfaces http POST commands to MQTT using mosquitto_pub in a shell. Several chnges to the monitor fermenter screen.
Michiel Broek <mbroek@mbse.eu>
parents:
182
diff
changeset
|
442 | $.ajax({ |
a810539dc218
Added cmd_fermenter.php which interfaces http POST commands to MQTT using mosquitto_pub in a shell. Several chnges to the monitor fermenter screen.
Michiel Broek <mbroek@mbse.eu>
parents:
182
diff
changeset
|
443 | url: "cmd_fermenter.php", |
a810539dc218
Added cmd_fermenter.php which interfaces http POST commands to MQTT using mosquitto_pub in a shell. Several chnges to the monitor fermenter screen.
Michiel Broek <mbroek@mbse.eu>
parents:
182
diff
changeset
|
444 | data: data, |
a810539dc218
Added cmd_fermenter.php which interfaces http POST commands to MQTT using mosquitto_pub in a shell. Several chnges to the monitor fermenter screen.
Michiel Broek <mbroek@mbse.eu>
parents:
182
diff
changeset
|
445 | type: "POST", |
390
1c52a6875960
The gauges in monitor fermentors have default animation speed and behaviour again. Some code cleanup.
Michiel Broek <mbroek@mbse.eu>
parents:
385
diff
changeset
|
446 | success: function(data) {}, |
1c52a6875960
The gauges in monitor fermentors have default animation speed and behaviour again. Some code cleanup.
Michiel Broek <mbroek@mbse.eu>
parents:
385
diff
changeset
|
447 | error: function(jqXHR, textStatus, errorThrown) { console.log("sendBase() error"); } |
185
4c25db9e8102
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.
Michiel Broek <mbroek@mbse.eu>
parents:
184
diff
changeset
|
448 | }); |
4c25db9e8102
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.
Michiel Broek <mbroek@mbse.eu>
parents:
184
diff
changeset
|
449 | } |
4c25db9e8102
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.
Michiel Broek <mbroek@mbse.eu>
parents:
184
diff
changeset
|
450 | |
4c25db9e8102
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.
Michiel Broek <mbroek@mbse.eu>
parents:
184
diff
changeset
|
451 | function sendSwitch(sw1, sw2, sw3, sw4) { |
4c25db9e8102
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.
Michiel Broek <mbroek@mbse.eu>
parents:
184
diff
changeset
|
452 | |
4c25db9e8102
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.
Michiel Broek <mbroek@mbse.eu>
parents:
184
diff
changeset
|
453 | console.log("sendSwitch("+sw1+", "+sw2+", "+sw3+", "+sw4+")"); |
4c25db9e8102
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.
Michiel Broek <mbroek@mbse.eu>
parents:
184
diff
changeset
|
454 | var data = 'node='+record.node+'&alias='+record.alias+'&payload='; |
4c25db9e8102
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.
Michiel Broek <mbroek@mbse.eu>
parents:
184
diff
changeset
|
455 | data += '{"heater":{"state":'+sw1+'},"cooler":{"state":'+sw2+'},"fan":{"state":'+sw3+'},"light":{"state":'+sw4+'}}'; |
4c25db9e8102
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.
Michiel Broek <mbroek@mbse.eu>
parents:
184
diff
changeset
|
456 | $.ajax({ |
4c25db9e8102
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.
Michiel Broek <mbroek@mbse.eu>
parents:
184
diff
changeset
|
457 | url: "cmd_fermenter.php", |
4c25db9e8102
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.
Michiel Broek <mbroek@mbse.eu>
parents:
184
diff
changeset
|
458 | data: data, |
4c25db9e8102
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.
Michiel Broek <mbroek@mbse.eu>
parents:
184
diff
changeset
|
459 | type: "POST", |
390
1c52a6875960
The gauges in monitor fermentors have default animation speed and behaviour again. Some code cleanup.
Michiel Broek <mbroek@mbse.eu>
parents:
385
diff
changeset
|
460 | success: function(data) {}, |
1c52a6875960
The gauges in monitor fermentors have default animation speed and behaviour again. Some code cleanup.
Michiel Broek <mbroek@mbse.eu>
parents:
385
diff
changeset
|
461 | error: function(jqXHR, textStatus, errorThrown) { console.log("sendSwitch() error"); } |
185
4c25db9e8102
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.
Michiel Broek <mbroek@mbse.eu>
parents:
184
diff
changeset
|
462 | }); |
4c25db9e8102
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.
Michiel Broek <mbroek@mbse.eu>
parents:
184
diff
changeset
|
463 | } |
4c25db9e8102
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.
Michiel Broek <mbroek@mbse.eu>
parents:
184
diff
changeset
|
464 | |
299
047ead629d4a
Accept yeast temperature limits from thermferm via MQTT. Send yeat temperature ranges to thermferm together with the beer parameters. Store yeast temperature limits in the mon_fermenters database table. The monitor fermenters screen adjusts the temperature color ranges.
Michiel Broek <mbroek@mbse.eu>
parents:
251
diff
changeset
|
465 | function sendProduct(code, name, uuid, yeast_lo, yeast_hi) { |
185
4c25db9e8102
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.
Michiel Broek <mbroek@mbse.eu>
parents:
184
diff
changeset
|
466 | |
299
047ead629d4a
Accept yeast temperature limits from thermferm via MQTT. Send yeat temperature ranges to thermferm together with the beer parameters. Store yeast temperature limits in the mon_fermenters database table. The monitor fermenters screen adjusts the temperature color ranges.
Michiel Broek <mbroek@mbse.eu>
parents:
251
diff
changeset
|
467 | console.log("sendProduct("+code+", "+name+", "+uuid+", "+yeast_lo+", "+yeast_hi+")"); |
185
4c25db9e8102
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.
Michiel Broek <mbroek@mbse.eu>
parents:
184
diff
changeset
|
468 | var data = 'node='+record.node+'&alias='+record.alias+'&payload='; |
299
047ead629d4a
Accept yeast temperature limits from thermferm via MQTT. Send yeat temperature ranges to thermferm together with the beer parameters. Store yeast temperature limits in the mon_fermenters database table. The monitor fermenters screen adjusts the temperature color ranges.
Michiel Broek <mbroek@mbse.eu>
parents:
251
diff
changeset
|
469 | data += '{"product":{"code":"'+code+'","name":"'+name+'","uuid":"'+uuid+'","yeast_lo":'+yeast_lo+',"yeast_hi":'+yeast_hi+'}}'; |
185
4c25db9e8102
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.
Michiel Broek <mbroek@mbse.eu>
parents:
184
diff
changeset
|
470 | $.ajax({ |
4c25db9e8102
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.
Michiel Broek <mbroek@mbse.eu>
parents:
184
diff
changeset
|
471 | url: "cmd_fermenter.php", |
4c25db9e8102
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.
Michiel Broek <mbroek@mbse.eu>
parents:
184
diff
changeset
|
472 | data: data, |
4c25db9e8102
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.
Michiel Broek <mbroek@mbse.eu>
parents:
184
diff
changeset
|
473 | type: "POST", |
390
1c52a6875960
The gauges in monitor fermentors have default animation speed and behaviour again. Some code cleanup.
Michiel Broek <mbroek@mbse.eu>
parents:
385
diff
changeset
|
474 | success: function(data) {}, |
1c52a6875960
The gauges in monitor fermentors have default animation speed and behaviour again. Some code cleanup.
Michiel Broek <mbroek@mbse.eu>
parents:
385
diff
changeset
|
475 | error: function(jqXHR, textStatus, errorThrown) { console.log("sendProduct() error"); } |
183
a810539dc218
Added cmd_fermenter.php which interfaces http POST commands to MQTT using mosquitto_pub in a shell. Several chnges to the monitor fermenter screen.
Michiel Broek <mbroek@mbse.eu>
parents:
182
diff
changeset
|
476 | }); |
a810539dc218
Added cmd_fermenter.php which interfaces http POST commands to MQTT using mosquitto_pub in a shell. Several chnges to the monitor fermenter screen.
Michiel Broek <mbroek@mbse.eu>
parents:
182
diff
changeset
|
477 | } |
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:
diff
changeset
|
478 | |
189
6470e5c6a001
In bmsd added missing json percent. The Makefile didn't install the fpdf library. Added profile commands. Small changes to the monitor fermenters screen. The monitor fermenters scheduler is now more responsive. Profiles selection and commands in the remote thermferm.
Michiel Broek <mbroek@mbse.eu>
parents:
188
diff
changeset
|
479 | function sendProfile(payload) { |
6470e5c6a001
In bmsd added missing json percent. The Makefile didn't install the fpdf library. Added profile commands. Small changes to the monitor fermenters screen. The monitor fermenters scheduler is now more responsive. Profiles selection and commands in the remote thermferm.
Michiel Broek <mbroek@mbse.eu>
parents:
188
diff
changeset
|
480 | |
6470e5c6a001
In bmsd added missing json percent. The Makefile didn't install the fpdf library. Added profile commands. Small changes to the monitor fermenters screen. The monitor fermenters scheduler is now more responsive. Profiles selection and commands in the remote thermferm.
Michiel Broek <mbroek@mbse.eu>
parents:
188
diff
changeset
|
481 | console.log("sendProfile("+payload+")"); |
6470e5c6a001
In bmsd added missing json percent. The Makefile didn't install the fpdf library. Added profile commands. Small changes to the monitor fermenters screen. The monitor fermenters scheduler is now more responsive. Profiles selection and commands in the remote thermferm.
Michiel Broek <mbroek@mbse.eu>
parents:
188
diff
changeset
|
482 | var data = 'node='+record.node+'&alias='+record.alias+'&payload='+payload; |
6470e5c6a001
In bmsd added missing json percent. The Makefile didn't install the fpdf library. Added profile commands. Small changes to the monitor fermenters screen. The monitor fermenters scheduler is now more responsive. Profiles selection and commands in the remote thermferm.
Michiel Broek <mbroek@mbse.eu>
parents:
188
diff
changeset
|
483 | $.ajax({ |
6470e5c6a001
In bmsd added missing json percent. The Makefile didn't install the fpdf library. Added profile commands. Small changes to the monitor fermenters screen. The monitor fermenters scheduler is now more responsive. Profiles selection and commands in the remote thermferm.
Michiel Broek <mbroek@mbse.eu>
parents:
188
diff
changeset
|
484 | url: "cmd_fermenter.php", |
6470e5c6a001
In bmsd added missing json percent. The Makefile didn't install the fpdf library. Added profile commands. Small changes to the monitor fermenters screen. The monitor fermenters scheduler is now more responsive. Profiles selection and commands in the remote thermferm.
Michiel Broek <mbroek@mbse.eu>
parents:
188
diff
changeset
|
485 | data: data, |
6470e5c6a001
In bmsd added missing json percent. The Makefile didn't install the fpdf library. Added profile commands. Small changes to the monitor fermenters screen. The monitor fermenters scheduler is now more responsive. Profiles selection and commands in the remote thermferm.
Michiel Broek <mbroek@mbse.eu>
parents:
188
diff
changeset
|
486 | type: "POST", |
390
1c52a6875960
The gauges in monitor fermentors have default animation speed and behaviour again. Some code cleanup.
Michiel Broek <mbroek@mbse.eu>
parents:
385
diff
changeset
|
487 | success: function(data) {}, |
1c52a6875960
The gauges in monitor fermentors have default animation speed and behaviour again. Some code cleanup.
Michiel Broek <mbroek@mbse.eu>
parents:
385
diff
changeset
|
488 | error: function(jqXHR, textStatus, errorThrown) { console.log("sendProfile() error"); } |
189
6470e5c6a001
In bmsd added missing json percent. The Makefile didn't install the fpdf library. Added profile commands. Small changes to the monitor fermenters screen. The monitor fermenters scheduler is now more responsive. Profiles selection and commands in the remote thermferm.
Michiel Broek <mbroek@mbse.eu>
parents:
188
diff
changeset
|
489 | }); |
6470e5c6a001
In bmsd added missing json percent. The Makefile didn't install the fpdf library. Added profile commands. Small changes to the monitor fermenters screen. The monitor fermenters scheduler is now more responsive. Profiles selection and commands in the remote thermferm.
Michiel Broek <mbroek@mbse.eu>
parents:
188
diff
changeset
|
490 | } |
6470e5c6a001
In bmsd added missing json percent. The Makefile didn't install the fpdf library. Added profile commands. Small changes to the monitor fermenters screen. The monitor fermenters scheduler is now more responsive. Profiles selection and commands in the remote thermferm.
Michiel Broek <mbroek@mbse.eu>
parents:
188
diff
changeset
|
491 | |
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:
diff
changeset
|
492 | |
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:
diff
changeset
|
493 | // Get the data immediatly and then at regular intervals to refresh. |
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:
diff
changeset
|
494 | dataAdapter.dataBind(); |
184
3dbe1d2265ed
Removed the setpoints and temperatures from the right display panel. Added the current temperatures in text to the gauges as caption. Adjusted the gauge caption font display. Only send commands to the mqtt server just before we fetch fresh data. Added new target temperature settings in the right display box.
Michiel Broek <mbroek@mbse.eu>
parents:
183
diff
changeset
|
495 | setInterval(function() { |
185
4c25db9e8102
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.
Michiel Broek <mbroek@mbse.eu>
parents:
184
diff
changeset
|
496 | var skip = false; |
184
3dbe1d2265ed
Removed the setpoints and temperatures from the right display panel. Added the current temperatures in text to the gauges as caption. Adjusted the gauge caption font display. Only send commands to the mqtt server just before we fetch fresh data. Added new target temperature settings in the right display box.
Michiel Broek <mbroek@mbse.eu>
parents:
183
diff
changeset
|
497 | if (newBase) { |
3dbe1d2265ed
Removed the setpoints and temperatures from the right display panel. Added the current temperatures in text to the gauges as caption. Adjusted the gauge caption font display. Only send commands to the mqtt server just before we fetch fresh data. Added new target temperature settings in the right display box.
Michiel Broek <mbroek@mbse.eu>
parents:
183
diff
changeset
|
498 | sendBase(record.stage, record.mode, record.setpoint_low, record.setpoint_high); |
3dbe1d2265ed
Removed the setpoints and temperatures from the right display panel. Added the current temperatures in text to the gauges as caption. Adjusted the gauge caption font display. Only send commands to the mqtt server just before we fetch fresh data. Added new target temperature settings in the right display box.
Michiel Broek <mbroek@mbse.eu>
parents:
183
diff
changeset
|
499 | newBase = false; |
185
4c25db9e8102
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.
Michiel Broek <mbroek@mbse.eu>
parents:
184
diff
changeset
|
500 | skip = true; |
184
3dbe1d2265ed
Removed the setpoints and temperatures from the right display panel. Added the current temperatures in text to the gauges as caption. Adjusted the gauge caption font display. Only send commands to the mqtt server just before we fetch fresh data. Added new target temperature settings in the right display box.
Michiel Broek <mbroek@mbse.eu>
parents:
183
diff
changeset
|
501 | } |
185
4c25db9e8102
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.
Michiel Broek <mbroek@mbse.eu>
parents:
184
diff
changeset
|
502 | if (newSwitch) { |
4c25db9e8102
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.
Michiel Broek <mbroek@mbse.eu>
parents:
184
diff
changeset
|
503 | sendSwitch(record.heater_state, record.cooler_state, record.fan_state, record.light_state); |
4c25db9e8102
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.
Michiel Broek <mbroek@mbse.eu>
parents:
184
diff
changeset
|
504 | newSwitch = false; |
4c25db9e8102
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.
Michiel Broek <mbroek@mbse.eu>
parents:
184
diff
changeset
|
505 | skip = true; |
4c25db9e8102
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.
Michiel Broek <mbroek@mbse.eu>
parents:
184
diff
changeset
|
506 | } |
4c25db9e8102
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.
Michiel Broek <mbroek@mbse.eu>
parents:
184
diff
changeset
|
507 | if (newProduct) { |
299
047ead629d4a
Accept yeast temperature limits from thermferm via MQTT. Send yeat temperature ranges to thermferm together with the beer parameters. Store yeast temperature limits in the mon_fermenters database table. The monitor fermenters screen adjusts the temperature color ranges.
Michiel Broek <mbroek@mbse.eu>
parents:
251
diff
changeset
|
508 | sendProduct(record.beercode, record.beername, record.beeruuid, record.yeast_lo, record.yeast_hi); |
185
4c25db9e8102
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.
Michiel Broek <mbroek@mbse.eu>
parents:
184
diff
changeset
|
509 | newProduct = false; |
4c25db9e8102
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.
Michiel Broek <mbroek@mbse.eu>
parents:
184
diff
changeset
|
510 | skip = true; |
4c25db9e8102
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.
Michiel Broek <mbroek@mbse.eu>
parents:
184
diff
changeset
|
511 | } |
189
6470e5c6a001
In bmsd added missing json percent. The Makefile didn't install the fpdf library. Added profile commands. Small changes to the monitor fermenters screen. The monitor fermenters scheduler is now more responsive. Profiles selection and commands in the remote thermferm.
Michiel Broek <mbroek@mbse.eu>
parents:
188
diff
changeset
|
512 | if (newProfile) { |
6470e5c6a001
In bmsd added missing json percent. The Makefile didn't install the fpdf library. Added profile commands. Small changes to the monitor fermenters screen. The monitor fermenters scheduler is now more responsive. Profiles selection and commands in the remote thermferm.
Michiel Broek <mbroek@mbse.eu>
parents:
188
diff
changeset
|
513 | sendProfile(ppayload); |
6470e5c6a001
In bmsd added missing json percent. The Makefile didn't install the fpdf library. Added profile commands. Small changes to the monitor fermenters screen. The monitor fermenters scheduler is now more responsive. Profiles selection and commands in the remote thermferm.
Michiel Broek <mbroek@mbse.eu>
parents:
188
diff
changeset
|
514 | newProfile = false; |
6470e5c6a001
In bmsd added missing json percent. The Makefile didn't install the fpdf library. Added profile commands. Small changes to the monitor fermenters screen. The monitor fermenters scheduler is now more responsive. Profiles selection and commands in the remote thermferm.
Michiel Broek <mbroek@mbse.eu>
parents:
188
diff
changeset
|
515 | skip = true; |
6470e5c6a001
In bmsd added missing json percent. The Makefile didn't install the fpdf library. Added profile commands. Small changes to the monitor fermenters screen. The monitor fermenters scheduler is now more responsive. Profiles selection and commands in the remote thermferm.
Michiel Broek <mbroek@mbse.eu>
parents:
188
diff
changeset
|
516 | } |
6470e5c6a001
In bmsd added missing json percent. The Makefile didn't install the fpdf library. Added profile commands. Small changes to the monitor fermenters screen. The monitor fermenters scheduler is now more responsive. Profiles selection and commands in the remote thermferm.
Michiel Broek <mbroek@mbse.eu>
parents:
188
diff
changeset
|
517 | if (skip) { |
6470e5c6a001
In bmsd added missing json percent. The Makefile didn't install the fpdf library. Added profile commands. Small changes to the monitor fermenters screen. The monitor fermenters scheduler is now more responsive. Profiles selection and commands in the remote thermferm.
Michiel Broek <mbroek@mbse.eu>
parents:
188
diff
changeset
|
518 | schedule = 4; // 2 seconds wait to get the results |
6470e5c6a001
In bmsd added missing json percent. The Makefile didn't install the fpdf library. Added profile commands. Small changes to the monitor fermenters screen. The monitor fermenters scheduler is now more responsive. Profiles selection and commands in the remote thermferm.
Michiel Broek <mbroek@mbse.eu>
parents:
188
diff
changeset
|
519 | } else { |
6470e5c6a001
In bmsd added missing json percent. The Makefile didn't install the fpdf library. Added profile commands. Small changes to the monitor fermenters screen. The monitor fermenters scheduler is now more responsive. Profiles selection and commands in the remote thermferm.
Michiel Broek <mbroek@mbse.eu>
parents:
188
diff
changeset
|
520 | if (schedule > 0) |
6470e5c6a001
In bmsd added missing json percent. The Makefile didn't install the fpdf library. Added profile commands. Small changes to the monitor fermenters screen. The monitor fermenters scheduler is now more responsive. Profiles selection and commands in the remote thermferm.
Michiel Broek <mbroek@mbse.eu>
parents:
188
diff
changeset
|
521 | schedule--; |
6470e5c6a001
In bmsd added missing json percent. The Makefile didn't install the fpdf library. Added profile commands. Small changes to the monitor fermenters screen. The monitor fermenters scheduler is now more responsive. Profiles selection and commands in the remote thermferm.
Michiel Broek <mbroek@mbse.eu>
parents:
188
diff
changeset
|
522 | } |
185
4c25db9e8102
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.
Michiel Broek <mbroek@mbse.eu>
parents:
184
diff
changeset
|
523 | |
189
6470e5c6a001
In bmsd added missing json percent. The Makefile didn't install the fpdf library. Added profile commands. Small changes to the monitor fermenters screen. The monitor fermenters scheduler is now more responsive. Profiles selection and commands in the remote thermferm.
Michiel Broek <mbroek@mbse.eu>
parents:
188
diff
changeset
|
524 | if (schedule <= 0) { |
185
4c25db9e8102
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.
Michiel Broek <mbroek@mbse.eu>
parents:
184
diff
changeset
|
525 | dataAdapter.dataBind(); |
189
6470e5c6a001
In bmsd added missing json percent. The Makefile didn't install the fpdf library. Added profile commands. Small changes to the monitor fermenters screen. The monitor fermenters scheduler is now more responsive. Profiles selection and commands in the remote thermferm.
Michiel Broek <mbroek@mbse.eu>
parents:
188
diff
changeset
|
526 | schedule = 20; |
185
4c25db9e8102
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.
Michiel Broek <mbroek@mbse.eu>
parents:
184
diff
changeset
|
527 | } |
189
6470e5c6a001
In bmsd added missing json percent. The Makefile didn't install the fpdf library. Added profile commands. Small changes to the monitor fermenters screen. The monitor fermenters scheduler is now more responsive. Profiles selection and commands in the remote thermferm.
Michiel Broek <mbroek@mbse.eu>
parents:
188
diff
changeset
|
528 | }, 500); |
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:
diff
changeset
|
529 | |
183
a810539dc218
Added cmd_fermenter.php which interfaces http POST commands to MQTT using mosquitto_pub in a shell. Several chnges to the monitor fermenter screen.
Michiel Broek <mbroek@mbse.eu>
parents:
182
diff
changeset
|
530 | $('#info_mode').on('change', function (event) { |
455
f319a8ab931a
Fixed mysterious disappeared function arguments. Or it was an old bug that is now detected by the upgraded jqwidgets.
Michiel Broek <mbroek@mbse.eu>
parents:
390
diff
changeset
|
531 | var args = event.args; |
f319a8ab931a
Fixed mysterious disappeared function arguments. Or it was an old bug that is now detected by the upgraded jqwidgets.
Michiel Broek <mbroek@mbse.eu>
parents:
390
diff
changeset
|
532 | if (args) { |
f319a8ab931a
Fixed mysterious disappeared function arguments. Or it was an old bug that is now detected by the upgraded jqwidgets.
Michiel Broek <mbroek@mbse.eu>
parents:
390
diff
changeset
|
533 | record.mode = args.item.value; |
f319a8ab931a
Fixed mysterious disappeared function arguments. Or it was an old bug that is now detected by the upgraded jqwidgets.
Michiel Broek <mbroek@mbse.eu>
parents:
390
diff
changeset
|
534 | $("#fermenter_toggle1").val(0); |
f319a8ab931a
Fixed mysterious disappeared function arguments. Or it was an old bug that is now detected by the upgraded jqwidgets.
Michiel Broek <mbroek@mbse.eu>
parents:
390
diff
changeset
|
535 | $("#fermenter_toggle2").val(0); |
f319a8ab931a
Fixed mysterious disappeared function arguments. Or it was an old bug that is now detected by the upgraded jqwidgets.
Michiel Broek <mbroek@mbse.eu>
parents:
390
diff
changeset
|
536 | $("#fermenter_toggle3").val(0); |
f319a8ab931a
Fixed mysterious disappeared function arguments. Or it was an old bug that is now detected by the upgraded jqwidgets.
Michiel Broek <mbroek@mbse.eu>
parents:
390
diff
changeset
|
537 | } |
184
3dbe1d2265ed
Removed the setpoints and temperatures from the right display panel. Added the current temperatures in text to the gauges as caption. Adjusted the gauge caption font display. Only send commands to the mqtt server just before we fetch fresh data. Added new target temperature settings in the right display box.
Michiel Broek <mbroek@mbse.eu>
parents:
183
diff
changeset
|
538 | newBase = true; |
183
a810539dc218
Added cmd_fermenter.php which interfaces http POST commands to MQTT using mosquitto_pub in a shell. Several chnges to the monitor fermenter screen.
Michiel Broek <mbroek@mbse.eu>
parents:
182
diff
changeset
|
539 | }); |
185
4c25db9e8102
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.
Michiel Broek <mbroek@mbse.eu>
parents:
184
diff
changeset
|
540 | $('#info_stage').on('select', function (event) { |
455
f319a8ab931a
Fixed mysterious disappeared function arguments. Or it was an old bug that is now detected by the upgraded jqwidgets.
Michiel Broek <mbroek@mbse.eu>
parents:
390
diff
changeset
|
541 | var args = event.args; |
f319a8ab931a
Fixed mysterious disappeared function arguments. Or it was an old bug that is now detected by the upgraded jqwidgets.
Michiel Broek <mbroek@mbse.eu>
parents:
390
diff
changeset
|
542 | if (args) |
f319a8ab931a
Fixed mysterious disappeared function arguments. Or it was an old bug that is now detected by the upgraded jqwidgets.
Michiel Broek <mbroek@mbse.eu>
parents:
390
diff
changeset
|
543 | record.stage = args.item.value; |
184
3dbe1d2265ed
Removed the setpoints and temperatures from the right display panel. Added the current temperatures in text to the gauges as caption. Adjusted the gauge caption font display. Only send commands to the mqtt server just before we fetch fresh data. Added new target temperature settings in the right display box.
Michiel Broek <mbroek@mbse.eu>
parents:
183
diff
changeset
|
544 | newBase = true; |
3dbe1d2265ed
Removed the setpoints and temperatures from the right display panel. Added the current temperatures in text to the gauges as caption. Adjusted the gauge caption font display. Only send commands to the mqtt server just before we fetch fresh data. Added new target temperature settings in the right display box.
Michiel Broek <mbroek@mbse.eu>
parents:
183
diff
changeset
|
545 | }); |
185
4c25db9e8102
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.
Michiel Broek <mbroek@mbse.eu>
parents:
184
diff
changeset
|
546 | $("#select_beer").on('select', function (event) { |
4c25db9e8102
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.
Michiel Broek <mbroek@mbse.eu>
parents:
184
diff
changeset
|
547 | if (event.args) { |
494
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
548 | var index = event.args.index, |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
549 | datarecord = productlist.records[index]; |
192
7f69b43e6084
Implemented beer uuid product in monitor fermenters.
Michiel Broek <mbroek@mbse.eu>
parents:
191
diff
changeset
|
550 | record.beercode = datarecord.code; |
7f69b43e6084
Implemented beer uuid product in monitor fermenters.
Michiel Broek <mbroek@mbse.eu>
parents:
191
diff
changeset
|
551 | record.beername = datarecord.name; |
7f69b43e6084
Implemented beer uuid product in monitor fermenters.
Michiel Broek <mbroek@mbse.eu>
parents:
191
diff
changeset
|
552 | record.beeruuid = datarecord.uuid; |
299
047ead629d4a
Accept yeast temperature limits from thermferm via MQTT. Send yeat temperature ranges to thermferm together with the beer parameters. Store yeast temperature limits in the mon_fermenters database table. The monitor fermenters screen adjusts the temperature color ranges.
Michiel Broek <mbroek@mbse.eu>
parents:
251
diff
changeset
|
553 | record.yeast_lo = datarecord.yeast_lo; |
047ead629d4a
Accept yeast temperature limits from thermferm via MQTT. Send yeat temperature ranges to thermferm together with the beer parameters. Store yeast temperature limits in the mon_fermenters database table. The monitor fermenters screen adjusts the temperature color ranges.
Michiel Broek <mbroek@mbse.eu>
parents:
251
diff
changeset
|
554 | record.yeast_hi = datarecord.yeast_hi; |
185
4c25db9e8102
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.
Michiel Broek <mbroek@mbse.eu>
parents:
184
diff
changeset
|
555 | newProduct = true; |
4c25db9e8102
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.
Michiel Broek <mbroek@mbse.eu>
parents:
184
diff
changeset
|
556 | } |
4c25db9e8102
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.
Michiel Broek <mbroek@mbse.eu>
parents:
184
diff
changeset
|
557 | }); |
189
6470e5c6a001
In bmsd added missing json percent. The Makefile didn't install the fpdf library. Added profile commands. Small changes to the monitor fermenters screen. The monitor fermenters scheduler is now more responsive. Profiles selection and commands in the remote thermferm.
Michiel Broek <mbroek@mbse.eu>
parents:
188
diff
changeset
|
558 | $("#select_profile").on('select', function (event) { |
6470e5c6a001
In bmsd added missing json percent. The Makefile didn't install the fpdf library. Added profile commands. Small changes to the monitor fermenters screen. The monitor fermenters scheduler is now more responsive. Profiles selection and commands in the remote thermferm.
Michiel Broek <mbroek@mbse.eu>
parents:
188
diff
changeset
|
559 | if (event.args) { |
494
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
560 | var index = event.args.index, |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
561 | datarecord = profilelist.records[index], |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
562 | row, i; |
189
6470e5c6a001
In bmsd added missing json percent. The Makefile didn't install the fpdf library. Added profile commands. Small changes to the monitor fermenters screen. The monitor fermenters scheduler is now more responsive. Profiles selection and commands in the remote thermferm.
Michiel Broek <mbroek@mbse.eu>
parents:
188
diff
changeset
|
563 | if (datarecord.record == -1) { |
6470e5c6a001
In bmsd added missing json percent. The Makefile didn't install the fpdf library. Added profile commands. Small changes to the monitor fermenters screen. The monitor fermenters scheduler is now more responsive. Profiles selection and commands in the remote thermferm.
Michiel Broek <mbroek@mbse.eu>
parents:
188
diff
changeset
|
564 | ppayload = '{"profile":null}'; |
6470e5c6a001
In bmsd added missing json percent. The Makefile didn't install the fpdf library. Added profile commands. Small changes to the monitor fermenters screen. The monitor fermenters scheduler is now more responsive. Profiles selection and commands in the remote thermferm.
Michiel Broek <mbroek@mbse.eu>
parents:
188
diff
changeset
|
565 | } else { |
6470e5c6a001
In bmsd added missing json percent. The Makefile didn't install the fpdf library. Added profile commands. Small changes to the monitor fermenters screen. The monitor fermenters scheduler is now more responsive. Profiles selection and commands in the remote thermferm.
Michiel Broek <mbroek@mbse.eu>
parents:
188
diff
changeset
|
566 | ppayload = '{"profile":{"uuid":"'+datarecord.uuid+'","name":"'+datarecord.name+'",'; |
6470e5c6a001
In bmsd added missing json percent. The Makefile didn't install the fpdf library. Added profile commands. Small changes to the monitor fermenters screen. The monitor fermenters scheduler is now more responsive. Profiles selection and commands in the remote thermferm.
Michiel Broek <mbroek@mbse.eu>
parents:
188
diff
changeset
|
567 | ppayload += '"inittemp":{"low":'+datarecord.inittemp_lo+',"high":'+datarecord.inittemp_hi+'},'; |
6470e5c6a001
In bmsd added missing json percent. The Makefile didn't install the fpdf library. Added profile commands. Small changes to the monitor fermenters screen. The monitor fermenters scheduler is now more responsive. Profiles selection and commands in the remote thermferm.
Michiel Broek <mbroek@mbse.eu>
parents:
188
diff
changeset
|
568 | ppayload += '"fridgemode":'+datarecord.fridgemode+',"steps":['; |
494
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
569 | for (i = 0; i < datarecord.steps.length; i++) { |
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
570 | row = datarecord.steps[i]; |
189
6470e5c6a001
In bmsd added missing json percent. The Makefile didn't install the fpdf library. Added profile commands. Small changes to the monitor fermenters screen. The monitor fermenters scheduler is now more responsive. Profiles selection and commands in the remote thermferm.
Michiel Broek <mbroek@mbse.eu>
parents:
188
diff
changeset
|
571 | if (i > 0) |
6470e5c6a001
In bmsd added missing json percent. The Makefile didn't install the fpdf library. Added profile commands. Small changes to the monitor fermenters screen. The monitor fermenters scheduler is now more responsive. Profiles selection and commands in the remote thermferm.
Michiel Broek <mbroek@mbse.eu>
parents:
188
diff
changeset
|
572 | ppayload += ','; |
6470e5c6a001
In bmsd added missing json percent. The Makefile didn't install the fpdf library. Added profile commands. Small changes to the monitor fermenters screen. The monitor fermenters scheduler is now more responsive. Profiles selection and commands in the remote thermferm.
Michiel Broek <mbroek@mbse.eu>
parents:
188
diff
changeset
|
573 | ppayload += '{"steptime":'+row['steptime']+',"resttime":'+row['resttime']; |
6470e5c6a001
In bmsd added missing json percent. The Makefile didn't install the fpdf library. Added profile commands. Small changes to the monitor fermenters screen. The monitor fermenters scheduler is now more responsive. Profiles selection and commands in the remote thermferm.
Michiel Broek <mbroek@mbse.eu>
parents:
188
diff
changeset
|
574 | ppayload += ',"target_lo":'+row['target_lo']+',"target_hi":'+row['target_hi']; |
6470e5c6a001
In bmsd added missing json percent. The Makefile didn't install the fpdf library. Added profile commands. Small changes to the monitor fermenters screen. The monitor fermenters scheduler is now more responsive. Profiles selection and commands in the remote thermferm.
Michiel Broek <mbroek@mbse.eu>
parents:
188
diff
changeset
|
575 | ppayload += ',"fridgemode":'+row['fridgemode']+',"name":"'+row['name']+'"}'; |
6470e5c6a001
In bmsd added missing json percent. The Makefile didn't install the fpdf library. Added profile commands. Small changes to the monitor fermenters screen. The monitor fermenters scheduler is now more responsive. Profiles selection and commands in the remote thermferm.
Michiel Broek <mbroek@mbse.eu>
parents:
188
diff
changeset
|
576 | } |
6470e5c6a001
In bmsd added missing json percent. The Makefile didn't install the fpdf library. Added profile commands. Small changes to the monitor fermenters screen. The monitor fermenters scheduler is now more responsive. Profiles selection and commands in the remote thermferm.
Michiel Broek <mbroek@mbse.eu>
parents:
188
diff
changeset
|
577 | ppayload += ']}}'; |
6470e5c6a001
In bmsd added missing json percent. The Makefile didn't install the fpdf library. Added profile commands. Small changes to the monitor fermenters screen. The monitor fermenters scheduler is now more responsive. Profiles selection and commands in the remote thermferm.
Michiel Broek <mbroek@mbse.eu>
parents:
188
diff
changeset
|
578 | } |
6470e5c6a001
In bmsd added missing json percent. The Makefile didn't install the fpdf library. Added profile commands. Small changes to the monitor fermenters screen. The monitor fermenters scheduler is now more responsive. Profiles selection and commands in the remote thermferm.
Michiel Broek <mbroek@mbse.eu>
parents:
188
diff
changeset
|
579 | newProfile = true; |
6470e5c6a001
In bmsd added missing json percent. The Makefile didn't install the fpdf library. Added profile commands. Small changes to the monitor fermenters screen. The monitor fermenters scheduler is now more responsive. Profiles selection and commands in the remote thermferm.
Michiel Broek <mbroek@mbse.eu>
parents:
188
diff
changeset
|
580 | } |
6470e5c6a001
In bmsd added missing json percent. The Makefile didn't install the fpdf library. Added profile commands. Small changes to the monitor fermenters screen. The monitor fermenters scheduler is now more responsive. Profiles selection and commands in the remote thermferm.
Michiel Broek <mbroek@mbse.eu>
parents:
188
diff
changeset
|
581 | }); |
185
4c25db9e8102
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.
Michiel Broek <mbroek@mbse.eu>
parents:
184
diff
changeset
|
582 | |
184
3dbe1d2265ed
Removed the setpoints and temperatures from the right display panel. Added the current temperatures in text to the gauges as caption. Adjusted the gauge caption font display. Only send commands to the mqtt server just before we fetch fresh data. Added new target temperature settings in the right display box.
Michiel Broek <mbroek@mbse.eu>
parents:
183
diff
changeset
|
583 | $('#target_lo').on('change', function (event) { |
3dbe1d2265ed
Removed the setpoints and temperatures from the right display panel. Added the current temperatures in text to the gauges as caption. Adjusted the gauge caption font display. Only send commands to the mqtt server just before we fetch fresh data. Added new target temperature settings in the right display box.
Michiel Broek <mbroek@mbse.eu>
parents:
183
diff
changeset
|
584 | record.setpoint_low = parseFloat(event.args.value); |
3dbe1d2265ed
Removed the setpoints and temperatures from the right display panel. Added the current temperatures in text to the gauges as caption. Adjusted the gauge caption font display. Only send commands to the mqtt server just before we fetch fresh data. Added new target temperature settings in the right display box.
Michiel Broek <mbroek@mbse.eu>
parents:
183
diff
changeset
|
585 | // Keep the high target above the low. |
185
4c25db9e8102
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.
Michiel Broek <mbroek@mbse.eu>
parents:
184
diff
changeset
|
586 | if (record.setpoint_low > record.setpoint_high) { |
4c25db9e8102
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.
Michiel Broek <mbroek@mbse.eu>
parents:
184
diff
changeset
|
587 | record.setpoint_high = record.setpoint_low; |
184
3dbe1d2265ed
Removed the setpoints and temperatures from the right display panel. Added the current temperatures in text to the gauges as caption. Adjusted the gauge caption font display. Only send commands to the mqtt server just before we fetch fresh data. Added new target temperature settings in the right display box.
Michiel Broek <mbroek@mbse.eu>
parents:
183
diff
changeset
|
588 | $("#target_hi").val(record.setpoint_high); |
3dbe1d2265ed
Removed the setpoints and temperatures from the right display panel. Added the current temperatures in text to the gauges as caption. Adjusted the gauge caption font display. Only send commands to the mqtt server just before we fetch fresh data. Added new target temperature settings in the right display box.
Michiel Broek <mbroek@mbse.eu>
parents:
183
diff
changeset
|
589 | } |
3dbe1d2265ed
Removed the setpoints and temperatures from the right display panel. Added the current temperatures in text to the gauges as caption. Adjusted the gauge caption font display. Only send commands to the mqtt server just before we fetch fresh data. Added new target temperature settings in the right display box.
Michiel Broek <mbroek@mbse.eu>
parents:
183
diff
changeset
|
590 | newBase = true; |
3dbe1d2265ed
Removed the setpoints and temperatures from the right display panel. Added the current temperatures in text to the gauges as caption. Adjusted the gauge caption font display. Only send commands to the mqtt server just before we fetch fresh data. Added new target temperature settings in the right display box.
Michiel Broek <mbroek@mbse.eu>
parents:
183
diff
changeset
|
591 | }); |
3dbe1d2265ed
Removed the setpoints and temperatures from the right display panel. Added the current temperatures in text to the gauges as caption. Adjusted the gauge caption font display. Only send commands to the mqtt server just before we fetch fresh data. Added new target temperature settings in the right display box.
Michiel Broek <mbroek@mbse.eu>
parents:
183
diff
changeset
|
592 | $('#target_hi').on('change', function (event) { |
3dbe1d2265ed
Removed the setpoints and temperatures from the right display panel. Added the current temperatures in text to the gauges as caption. Adjusted the gauge caption font display. Only send commands to the mqtt server just before we fetch fresh data. Added new target temperature settings in the right display box.
Michiel Broek <mbroek@mbse.eu>
parents:
183
diff
changeset
|
593 | record.setpoint_high = parseFloat(event.args.value); |
3dbe1d2265ed
Removed the setpoints and temperatures from the right display panel. Added the current temperatures in text to the gauges as caption. Adjusted the gauge caption font display. Only send commands to the mqtt server just before we fetch fresh data. Added new target temperature settings in the right display box.
Michiel Broek <mbroek@mbse.eu>
parents:
183
diff
changeset
|
594 | // Keep the low target below the high. |
185
4c25db9e8102
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.
Michiel Broek <mbroek@mbse.eu>
parents:
184
diff
changeset
|
595 | if (record.setpoint_high < record.setpoint_low) { |
4c25db9e8102
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.
Michiel Broek <mbroek@mbse.eu>
parents:
184
diff
changeset
|
596 | record.setpoint_low = record.setpoint_high; |
184
3dbe1d2265ed
Removed the setpoints and temperatures from the right display panel. Added the current temperatures in text to the gauges as caption. Adjusted the gauge caption font display. Only send commands to the mqtt server just before we fetch fresh data. Added new target temperature settings in the right display box.
Michiel Broek <mbroek@mbse.eu>
parents:
183
diff
changeset
|
597 | $("#target_lo").val(record.setpoint_low); |
3dbe1d2265ed
Removed the setpoints and temperatures from the right display panel. Added the current temperatures in text to the gauges as caption. Adjusted the gauge caption font display. Only send commands to the mqtt server just before we fetch fresh data. Added new target temperature settings in the right display box.
Michiel Broek <mbroek@mbse.eu>
parents:
183
diff
changeset
|
598 | } |
3dbe1d2265ed
Removed the setpoints and temperatures from the right display panel. Added the current temperatures in text to the gauges as caption. Adjusted the gauge caption font display. Only send commands to the mqtt server just before we fetch fresh data. Added new target temperature settings in the right display box.
Michiel Broek <mbroek@mbse.eu>
parents:
183
diff
changeset
|
599 | newBase = true; |
183
a810539dc218
Added cmd_fermenter.php which interfaces http POST commands to MQTT using mosquitto_pub in a shell. Several chnges to the monitor fermenter screen.
Michiel Broek <mbroek@mbse.eu>
parents:
182
diff
changeset
|
600 | }); |
a810539dc218
Added cmd_fermenter.php which interfaces http POST commands to MQTT using mosquitto_pub in a shell. Several chnges to the monitor fermenter screen.
Michiel Broek <mbroek@mbse.eu>
parents:
182
diff
changeset
|
601 | |
185
4c25db9e8102
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.
Michiel Broek <mbroek@mbse.eu>
parents:
184
diff
changeset
|
602 | $("#fermenter_toggle1").on('checked', function (event) { |
4c25db9e8102
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.
Michiel Broek <mbroek@mbse.eu>
parents:
184
diff
changeset
|
603 | if (record.mode == "NONE") { |
4c25db9e8102
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.
Michiel Broek <mbroek@mbse.eu>
parents:
184
diff
changeset
|
604 | record.heater_state = 0; |
4c25db9e8102
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.
Michiel Broek <mbroek@mbse.eu>
parents:
184
diff
changeset
|
605 | newSwitch = true; |
4c25db9e8102
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.
Michiel Broek <mbroek@mbse.eu>
parents:
184
diff
changeset
|
606 | } |
4c25db9e8102
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.
Michiel Broek <mbroek@mbse.eu>
parents:
184
diff
changeset
|
607 | }); |
4c25db9e8102
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.
Michiel Broek <mbroek@mbse.eu>
parents:
184
diff
changeset
|
608 | $("#fermenter_toggle1").on('unchecked', function (event) { |
4c25db9e8102
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.
Michiel Broek <mbroek@mbse.eu>
parents:
184
diff
changeset
|
609 | if (record.mode == "NONE") { |
4c25db9e8102
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.
Michiel Broek <mbroek@mbse.eu>
parents:
184
diff
changeset
|
610 | record.heater_state = 100; |
4c25db9e8102
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.
Michiel Broek <mbroek@mbse.eu>
parents:
184
diff
changeset
|
611 | record.cooler_state = 0; |
4c25db9e8102
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.
Michiel Broek <mbroek@mbse.eu>
parents:
184
diff
changeset
|
612 | $("#fermenter_toggle2").val(0); |
4c25db9e8102
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.
Michiel Broek <mbroek@mbse.eu>
parents:
184
diff
changeset
|
613 | newSwitch = true; |
4c25db9e8102
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.
Michiel Broek <mbroek@mbse.eu>
parents:
184
diff
changeset
|
614 | } |
4c25db9e8102
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.
Michiel Broek <mbroek@mbse.eu>
parents:
184
diff
changeset
|
615 | }); |
4c25db9e8102
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.
Michiel Broek <mbroek@mbse.eu>
parents:
184
diff
changeset
|
616 | $("#fermenter_toggle2").on('checked', function (event) { |
4c25db9e8102
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.
Michiel Broek <mbroek@mbse.eu>
parents:
184
diff
changeset
|
617 | if (record.mode == "NONE") { |
4c25db9e8102
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.
Michiel Broek <mbroek@mbse.eu>
parents:
184
diff
changeset
|
618 | record.cooler_state = 0; |
4c25db9e8102
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.
Michiel Broek <mbroek@mbse.eu>
parents:
184
diff
changeset
|
619 | newSwitch = true; |
4c25db9e8102
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.
Michiel Broek <mbroek@mbse.eu>
parents:
184
diff
changeset
|
620 | } |
4c25db9e8102
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.
Michiel Broek <mbroek@mbse.eu>
parents:
184
diff
changeset
|
621 | }); |
4c25db9e8102
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.
Michiel Broek <mbroek@mbse.eu>
parents:
184
diff
changeset
|
622 | $("#fermenter_toggle2").on('unchecked', function (event) { |
4c25db9e8102
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.
Michiel Broek <mbroek@mbse.eu>
parents:
184
diff
changeset
|
623 | if (record.mode == "NONE") { |
4c25db9e8102
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.
Michiel Broek <mbroek@mbse.eu>
parents:
184
diff
changeset
|
624 | record.cooler_state = 100; |
4c25db9e8102
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.
Michiel Broek <mbroek@mbse.eu>
parents:
184
diff
changeset
|
625 | record.heater_state = 0; |
4c25db9e8102
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.
Michiel Broek <mbroek@mbse.eu>
parents:
184
diff
changeset
|
626 | $("#fermenter_toggle1").val(0); |
4c25db9e8102
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.
Michiel Broek <mbroek@mbse.eu>
parents:
184
diff
changeset
|
627 | newSwitch = true; |
4c25db9e8102
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.
Michiel Broek <mbroek@mbse.eu>
parents:
184
diff
changeset
|
628 | } |
4c25db9e8102
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.
Michiel Broek <mbroek@mbse.eu>
parents:
184
diff
changeset
|
629 | }); |
4c25db9e8102
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.
Michiel Broek <mbroek@mbse.eu>
parents:
184
diff
changeset
|
630 | $("#fermenter_toggle3").on('checked', function (event) { |
4c25db9e8102
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.
Michiel Broek <mbroek@mbse.eu>
parents:
184
diff
changeset
|
631 | if (record.mode == "NONE") { |
4c25db9e8102
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.
Michiel Broek <mbroek@mbse.eu>
parents:
184
diff
changeset
|
632 | record.fan_state = 0; |
4c25db9e8102
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.
Michiel Broek <mbroek@mbse.eu>
parents:
184
diff
changeset
|
633 | newSwitch = true; |
4c25db9e8102
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.
Michiel Broek <mbroek@mbse.eu>
parents:
184
diff
changeset
|
634 | } |
4c25db9e8102
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.
Michiel Broek <mbroek@mbse.eu>
parents:
184
diff
changeset
|
635 | }); |
4c25db9e8102
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.
Michiel Broek <mbroek@mbse.eu>
parents:
184
diff
changeset
|
636 | $("#fermenter_toggle3").on('unchecked', function (event) { |
4c25db9e8102
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.
Michiel Broek <mbroek@mbse.eu>
parents:
184
diff
changeset
|
637 | if (record.mode == "NONE") { |
4c25db9e8102
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.
Michiel Broek <mbroek@mbse.eu>
parents:
184
diff
changeset
|
638 | record.fan_state = 100; |
4c25db9e8102
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.
Michiel Broek <mbroek@mbse.eu>
parents:
184
diff
changeset
|
639 | newSwitch = true; |
4c25db9e8102
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.
Michiel Broek <mbroek@mbse.eu>
parents:
184
diff
changeset
|
640 | } |
4c25db9e8102
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.
Michiel Broek <mbroek@mbse.eu>
parents:
184
diff
changeset
|
641 | }); |
189
6470e5c6a001
In bmsd added missing json percent. The Makefile didn't install the fpdf library. Added profile commands. Small changes to the monitor fermenters screen. The monitor fermenters scheduler is now more responsive. Profiles selection and commands in the remote thermferm.
Michiel Broek <mbroek@mbse.eu>
parents:
188
diff
changeset
|
642 | $("#Profile1").click(function () { |
6470e5c6a001
In bmsd added missing json percent. The Makefile didn't install the fpdf library. Added profile commands. Small changes to the monitor fermenters screen. The monitor fermenters scheduler is now more responsive. Profiles selection and commands in the remote thermferm.
Michiel Broek <mbroek@mbse.eu>
parents:
188
diff
changeset
|
643 | if (record.mode == "PROFILE") { |
6470e5c6a001
In bmsd added missing json percent. The Makefile didn't install the fpdf library. Added profile commands. Small changes to the monitor fermenters screen. The monitor fermenters scheduler is now more responsive. Profiles selection and commands in the remote thermferm.
Michiel Broek <mbroek@mbse.eu>
parents:
188
diff
changeset
|
644 | if (record.profile_state == "OFF") { |
6470e5c6a001
In bmsd added missing json percent. The Makefile didn't install the fpdf library. Added profile commands. Small changes to the monitor fermenters screen. The monitor fermenters scheduler is now more responsive. Profiles selection and commands in the remote thermferm.
Michiel Broek <mbroek@mbse.eu>
parents:
188
diff
changeset
|
645 | ppayload = '{"profile":{"command":"start"}}'; |
6470e5c6a001
In bmsd added missing json percent. The Makefile didn't install the fpdf library. Added profile commands. Small changes to the monitor fermenters screen. The monitor fermenters scheduler is now more responsive. Profiles selection and commands in the remote thermferm.
Michiel Broek <mbroek@mbse.eu>
parents:
188
diff
changeset
|
646 | newProfile = true; |
6470e5c6a001
In bmsd added missing json percent. The Makefile didn't install the fpdf library. Added profile commands. Small changes to the monitor fermenters screen. The monitor fermenters scheduler is now more responsive. Profiles selection and commands in the remote thermferm.
Michiel Broek <mbroek@mbse.eu>
parents:
188
diff
changeset
|
647 | } else if ((record.profile_state == "RUN") || (record.profile_state == "PAUSE")) { |
191
fd1d7225ca6e
Version 0.0.4. Added confirm popup window to abort a running profile. Translated the toggle buttons.
Michiel Broek <mbroek@mbse.eu>
parents:
189
diff
changeset
|
648 | // Open a popup to confirm this action. |
fd1d7225ca6e
Version 0.0.4. Added confirm popup window to abort a running profile. Translated the toggle buttons.
Michiel Broek <mbroek@mbse.eu>
parents:
189
diff
changeset
|
649 | $('#eventWindow').jqxWindow('open'); |
fd1d7225ca6e
Version 0.0.4. Added confirm popup window to abort a running profile. Translated the toggle buttons.
Michiel Broek <mbroek@mbse.eu>
parents:
189
diff
changeset
|
650 | $("#delOk").click(function () { |
fd1d7225ca6e
Version 0.0.4. Added confirm popup window to abort a running profile. Translated the toggle buttons.
Michiel Broek <mbroek@mbse.eu>
parents:
189
diff
changeset
|
651 | ppayload = '{"profile":{"command":"abort"}}'; |
fd1d7225ca6e
Version 0.0.4. Added confirm popup window to abort a running profile. Translated the toggle buttons.
Michiel Broek <mbroek@mbse.eu>
parents:
189
diff
changeset
|
652 | newProfile = true; |
fd1d7225ca6e
Version 0.0.4. Added confirm popup window to abort a running profile. Translated the toggle buttons.
Michiel Broek <mbroek@mbse.eu>
parents:
189
diff
changeset
|
653 | }); |
189
6470e5c6a001
In bmsd added missing json percent. The Makefile didn't install the fpdf library. Added profile commands. Small changes to the monitor fermenters screen. The monitor fermenters scheduler is now more responsive. Profiles selection and commands in the remote thermferm.
Michiel Broek <mbroek@mbse.eu>
parents:
188
diff
changeset
|
654 | } else if (record.profile_state == "DONE") { |
6470e5c6a001
In bmsd added missing json percent. The Makefile didn't install the fpdf library. Added profile commands. Small changes to the monitor fermenters screen. The monitor fermenters scheduler is now more responsive. Profiles selection and commands in the remote thermferm.
Michiel Broek <mbroek@mbse.eu>
parents:
188
diff
changeset
|
655 | ppayload = '{"profile":{"command":"done"}}'; |
6470e5c6a001
In bmsd added missing json percent. The Makefile didn't install the fpdf library. Added profile commands. Small changes to the monitor fermenters screen. The monitor fermenters scheduler is now more responsive. Profiles selection and commands in the remote thermferm.
Michiel Broek <mbroek@mbse.eu>
parents:
188
diff
changeset
|
656 | newProfile = true; |
6470e5c6a001
In bmsd added missing json percent. The Makefile didn't install the fpdf library. Added profile commands. Small changes to the monitor fermenters screen. The monitor fermenters scheduler is now more responsive. Profiles selection and commands in the remote thermferm.
Michiel Broek <mbroek@mbse.eu>
parents:
188
diff
changeset
|
657 | } |
6470e5c6a001
In bmsd added missing json percent. The Makefile didn't install the fpdf library. Added profile commands. Small changes to the monitor fermenters screen. The monitor fermenters scheduler is now more responsive. Profiles selection and commands in the remote thermferm.
Michiel Broek <mbroek@mbse.eu>
parents:
188
diff
changeset
|
658 | } |
6470e5c6a001
In bmsd added missing json percent. The Makefile didn't install the fpdf library. Added profile commands. Small changes to the monitor fermenters screen. The monitor fermenters scheduler is now more responsive. Profiles selection and commands in the remote thermferm.
Michiel Broek <mbroek@mbse.eu>
parents:
188
diff
changeset
|
659 | }); |
6470e5c6a001
In bmsd added missing json percent. The Makefile didn't install the fpdf library. Added profile commands. Small changes to the monitor fermenters screen. The monitor fermenters scheduler is now more responsive. Profiles selection and commands in the remote thermferm.
Michiel Broek <mbroek@mbse.eu>
parents:
188
diff
changeset
|
660 | $("#Profile2").click(function () { |
6470e5c6a001
In bmsd added missing json percent. The Makefile didn't install the fpdf library. Added profile commands. Small changes to the monitor fermenters screen. The monitor fermenters scheduler is now more responsive. Profiles selection and commands in the remote thermferm.
Michiel Broek <mbroek@mbse.eu>
parents:
188
diff
changeset
|
661 | if (record.mode == "PROFILE") { |
6470e5c6a001
In bmsd added missing json percent. The Makefile didn't install the fpdf library. Added profile commands. Small changes to the monitor fermenters screen. The monitor fermenters scheduler is now more responsive. Profiles selection and commands in the remote thermferm.
Michiel Broek <mbroek@mbse.eu>
parents:
188
diff
changeset
|
662 | if ((record.profile_state == "RUN") || (record.profile_state == "PAUSE")) { |
6470e5c6a001
In bmsd added missing json percent. The Makefile didn't install the fpdf library. Added profile commands. Small changes to the monitor fermenters screen. The monitor fermenters scheduler is now more responsive. Profiles selection and commands in the remote thermferm.
Michiel Broek <mbroek@mbse.eu>
parents:
188
diff
changeset
|
663 | ppayload = '{"profile":{"command":"pause"}}'; |
6470e5c6a001
In bmsd added missing json percent. The Makefile didn't install the fpdf library. Added profile commands. Small changes to the monitor fermenters screen. The monitor fermenters scheduler is now more responsive. Profiles selection and commands in the remote thermferm.
Michiel Broek <mbroek@mbse.eu>
parents:
188
diff
changeset
|
664 | newProfile = true; |
6470e5c6a001
In bmsd added missing json percent. The Makefile didn't install the fpdf library. Added profile commands. Small changes to the monitor fermenters screen. The monitor fermenters scheduler is now more responsive. Profiles selection and commands in the remote thermferm.
Michiel Broek <mbroek@mbse.eu>
parents:
188
diff
changeset
|
665 | } |
6470e5c6a001
In bmsd added missing json percent. The Makefile didn't install the fpdf library. Added profile commands. Small changes to the monitor fermenters screen. The monitor fermenters scheduler is now more responsive. Profiles selection and commands in the remote thermferm.
Michiel Broek <mbroek@mbse.eu>
parents:
188
diff
changeset
|
666 | } |
6470e5c6a001
In bmsd added missing json percent. The Makefile didn't install the fpdf library. Added profile commands. Small changes to the monitor fermenters screen. The monitor fermenters scheduler is now more responsive. Profiles selection and commands in the remote thermferm.
Michiel Broek <mbroek@mbse.eu>
parents:
188
diff
changeset
|
667 | }); |
183
a810539dc218
Added cmd_fermenter.php which interfaces http POST commands to MQTT using mosquitto_pub in a shell. Several chnges to the monitor fermenter screen.
Michiel Broek <mbroek@mbse.eu>
parents:
182
diff
changeset
|
668 | |
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:
diff
changeset
|
669 | // The chart button. |
189
6470e5c6a001
In bmsd added missing json percent. The Makefile didn't install the fpdf library. Added profile commands. Small changes to the monitor fermenters screen. The monitor fermenters scheduler is now more responsive. Profiles selection and commands in the remote thermferm.
Michiel Broek <mbroek@mbse.eu>
parents:
188
diff
changeset
|
670 | $("#FLog").jqxButton({ template: "primary", width: '150px', theme: theme }); |
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:
diff
changeset
|
671 | $("#FLog").click(function () { |
494
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
672 | window.open('log_fermentation.php?code=' + record.beercode + '&name=' + record.beername); |
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:
diff
changeset
|
673 | }); |
334
26c6f8e5d58e
Added webcam_url and webcam_light fields to the mon_fermenters database table. Currently these fields need to be set using phpMyAdmin or another tool. If the webcam_url field is set, then on the mon_fermenter webpage a button is added to show a webcam page.
Michiel Broek <mbroek@mbse.eu>
parents:
325
diff
changeset
|
674 | $("#Camera").jqxButton({ template: "primary", width: '150px', theme: theme }); |
26c6f8e5d58e
Added webcam_url and webcam_light fields to the mon_fermenters database table. Currently these fields need to be set using phpMyAdmin or another tool. If the webcam_url field is set, then on the mon_fermenter webpage a button is added to show a webcam page.
Michiel Broek <mbroek@mbse.eu>
parents:
325
diff
changeset
|
675 | $("#Camera").click(function () { |
337
faedcfa0610f
Added command to turn lights on in monitor fermenter when a camera is started. Added the missing tolerance field when selecting a new yeast in a product or recipe.
Michiel Broek <mbroek@mbse.eu>
parents:
334
diff
changeset
|
676 | record.light_state = 100; |
faedcfa0610f
Added command to turn lights on in monitor fermenter when a camera is started. Added the missing tolerance field when selecting a new yeast in a product or recipe.
Michiel Broek <mbroek@mbse.eu>
parents:
334
diff
changeset
|
677 | newSwitch = true; |
494
af28ebe4a779
Fixed as much as possible warnings from the yui-compressor.
Michiel Broek <mbroek@mbse.eu>
parents:
455
diff
changeset
|
678 | window.open(record.webcam_url); |
334
26c6f8e5d58e
Added webcam_url and webcam_light fields to the mon_fermenters database table. Currently these fields need to be set using phpMyAdmin or another tool. If the webcam_url field is set, then on the mon_fermenter webpage a button is added to show a webcam page.
Michiel Broek <mbroek@mbse.eu>
parents:
325
diff
changeset
|
679 | }); |
191
fd1d7225ca6e
Version 0.0.4. Added confirm popup window to abort a running profile. Translated the toggle buttons.
Michiel Broek <mbroek@mbse.eu>
parents:
189
diff
changeset
|
680 | createAbortElements(); |
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:
diff
changeset
|
681 | }); |