Thu, 14 Mar 2024 19:37:53 +0100
Create installation directories
134
f05601490415
Redesigned the web interface, one single app is too slow. The main dashboard will be a shiny ajax driven page, the setup pages will be simple and php only. Keep It Simple, Stupid.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
1 | <?php |
f05601490415
Redesigned the web interface, one single app is too slow. The main dashboard will be a shiny ajax driven page, the setup pages will be simple and php only. Keep It Simple, Stupid.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
2 | /***************************************************************************** |
604
e2766e538d0e
Version 0.9.7. Increased the maximum fermentation temperature to 45 degrees to allow Kveik fermentations.
Michiel Broek <mbroek@mbse.eu>
parents:
566
diff
changeset
|
3 | * Copyright (C) 2014-2019 |
134
f05601490415
Redesigned the web interface, one single app is too slow. The main dashboard will be a shiny ajax driven page, the setup pages will be simple and php only. Keep It Simple, Stupid.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
4 | * |
f05601490415
Redesigned the web interface, one single app is too slow. The main dashboard will be a shiny ajax driven page, the setup pages will be simple and php only. Keep It Simple, Stupid.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
5 | * Michiel Broek <mbroek at mbse dot eu> |
f05601490415
Redesigned the web interface, one single app is too slow. The main dashboard will be a shiny ajax driven page, the setup pages will be simple and php only. Keep It Simple, Stupid.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
6 | * |
f05601490415
Redesigned the web interface, one single app is too slow. The main dashboard will be a shiny ajax driven page, the setup pages will be simple and php only. Keep It Simple, Stupid.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
7 | * This file is part of ThermFerm |
f05601490415
Redesigned the web interface, one single app is too slow. The main dashboard will be a shiny ajax driven page, the setup pages will be simple and php only. Keep It Simple, Stupid.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
8 | * |
f05601490415
Redesigned the web interface, one single app is too slow. The main dashboard will be a shiny ajax driven page, the setup pages will be simple and php only. Keep It Simple, Stupid.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
9 | * This is free software; you can redistribute it and/or modify it |
f05601490415
Redesigned the web interface, one single app is too slow. The main dashboard will be a shiny ajax driven page, the setup pages will be simple and php only. Keep It Simple, Stupid.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
10 | * under the terms of the GNU General Public License as published by the |
f05601490415
Redesigned the web interface, one single app is too slow. The main dashboard will be a shiny ajax driven page, the setup pages will be simple and php only. Keep It Simple, Stupid.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
11 | * Free Software Foundation; either version 2, or (at your option) any |
f05601490415
Redesigned the web interface, one single app is too slow. The main dashboard will be a shiny ajax driven page, the setup pages will be simple and php only. Keep It Simple, Stupid.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
12 | * later version. |
f05601490415
Redesigned the web interface, one single app is too slow. The main dashboard will be a shiny ajax driven page, the setup pages will be simple and php only. Keep It Simple, Stupid.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
13 | * |
f05601490415
Redesigned the web interface, one single app is too slow. The main dashboard will be a shiny ajax driven page, the setup pages will be simple and php only. Keep It Simple, Stupid.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
14 | * ThermFerm is distributed in the hope that it will be useful, but |
f05601490415
Redesigned the web interface, one single app is too slow. The main dashboard will be a shiny ajax driven page, the setup pages will be simple and php only. Keep It Simple, Stupid.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
15 | * WITHOUT ANY WARRANTY; without even the implied warranty of |
f05601490415
Redesigned the web interface, one single app is too slow. The main dashboard will be a shiny ajax driven page, the setup pages will be simple and php only. Keep It Simple, Stupid.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
f05601490415
Redesigned the web interface, one single app is too slow. The main dashboard will be a shiny ajax driven page, the setup pages will be simple and php only. Keep It Simple, Stupid.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
17 | * General Public License for more details. |
f05601490415
Redesigned the web interface, one single app is too slow. The main dashboard will be a shiny ajax driven page, the setup pages will be simple and php only. Keep It Simple, Stupid.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
18 | * |
f05601490415
Redesigned the web interface, one single app is too slow. The main dashboard will be a shiny ajax driven page, the setup pages will be simple and php only. Keep It Simple, Stupid.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
19 | * You should have received a copy of the GNU General Public License |
f05601490415
Redesigned the web interface, one single app is too slow. The main dashboard will be a shiny ajax driven page, the setup pages will be simple and php only. Keep It Simple, Stupid.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
20 | * along with ThermFerm; see the file COPYING. If not, write to the Free |
f05601490415
Redesigned the web interface, one single app is too slow. The main dashboard will be a shiny ajax driven page, the setup pages will be simple and php only. Keep It Simple, Stupid.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
21 | * Software Foundation, 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. |
f05601490415
Redesigned the web interface, one single app is too slow. The main dashboard will be a shiny ajax driven page, the setup pages will be simple and php only. Keep It Simple, Stupid.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
22 | *****************************************************************************/ |
f05601490415
Redesigned the web interface, one single app is too slow. The main dashboard will be a shiny ajax driven page, the setup pages will be simple and php only. Keep It Simple, Stupid.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
23 | |
f05601490415
Redesigned the web interface, one single app is too slow. The main dashboard will be a shiny ajax driven page, the setup pages will be simple and php only. Keep It Simple, Stupid.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
24 | require_once('utilities.php'); |
f05601490415
Redesigned the web interface, one single app is too slow. The main dashboard will be a shiny ajax driven page, the setup pages will be simple and php only. Keep It Simple, Stupid.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
25 | |
f05601490415
Redesigned the web interface, one single app is too slow. The main dashboard will be a shiny ajax driven page, the setup pages will be simple and php only. Keep It Simple, Stupid.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
26 | |
153
866a947b732a
Added the framework for the units editor. In the dashboard the radio selector buttons are converteed to jqwidgets radiobuttons.
Michiel Broek <mbroek@mbse.eu>
parents:
140
diff
changeset
|
27 | /* |
866a947b732a
Added the framework for the units editor. In the dashboard the radio selector buttons are converteed to jqwidgets radiobuttons.
Michiel Broek <mbroek@mbse.eu>
parents:
140
diff
changeset
|
28 | * $arr contains the complete reply of the LIST command. |
866a947b732a
Added the framework for the units editor. In the dashboard the radio selector buttons are converteed to jqwidgets radiobuttons.
Michiel Broek <mbroek@mbse.eu>
parents:
140
diff
changeset
|
29 | */ |
196 | 30 | $answer = send_cmd("UNIT LIST"); |
134
f05601490415
Redesigned the web interface, one single app is too slow. The main dashboard will be a shiny ajax driven page, the setup pages will be simple and php only. Keep It Simple, Stupid.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
31 | $arr = explode("\r\n", $answer); |
f05601490415
Redesigned the web interface, one single app is too slow. The main dashboard will be a shiny ajax driven page, the setup pages will be simple and php only. Keep It Simple, Stupid.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
32 | |
f05601490415
Redesigned the web interface, one single app is too slow. The main dashboard will be a shiny ajax driven page, the setup pages will be simple and php only. Keep It Simple, Stupid.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
33 | |
153
866a947b732a
Added the framework for the units editor. In the dashboard the radio selector buttons are converteed to jqwidgets radiobuttons.
Michiel Broek <mbroek@mbse.eu>
parents:
140
diff
changeset
|
34 | if (isset($_GET['action'])) { |
866a947b732a
Added the framework for the units editor. In the dashboard the radio selector buttons are converteed to jqwidgets radiobuttons.
Michiel Broek <mbroek@mbse.eu>
parents:
140
diff
changeset
|
35 | switch ($_GET['action']) { |
866a947b732a
Added the framework for the units editor. In the dashboard the radio selector buttons are converteed to jqwidgets radiobuttons.
Michiel Broek <mbroek@mbse.eu>
parents:
140
diff
changeset
|
36 | case 'edit': unit_edit(); |
866a947b732a
Added the framework for the units editor. In the dashboard the radio selector buttons are converteed to jqwidgets radiobuttons.
Michiel Broek <mbroek@mbse.eu>
parents:
140
diff
changeset
|
37 | break; |
866a947b732a
Added the framework for the units editor. In the dashboard the radio selector buttons are converteed to jqwidgets radiobuttons.
Michiel Broek <mbroek@mbse.eu>
parents:
140
diff
changeset
|
38 | default: break; |
866a947b732a
Added the framework for the units editor. In the dashboard the radio selector buttons are converteed to jqwidgets radiobuttons.
Michiel Broek <mbroek@mbse.eu>
parents:
140
diff
changeset
|
39 | } |
866a947b732a
Added the framework for the units editor. In the dashboard the radio selector buttons are converteed to jqwidgets radiobuttons.
Michiel Broek <mbroek@mbse.eu>
parents:
140
diff
changeset
|
40 | } elseif (isset($_POST['action'])) { |
866a947b732a
Added the framework for the units editor. In the dashboard the radio selector buttons are converteed to jqwidgets radiobuttons.
Michiel Broek <mbroek@mbse.eu>
parents:
140
diff
changeset
|
41 | switch ($_POST['action']) { |
866a947b732a
Added the framework for the units editor. In the dashboard the radio selector buttons are converteed to jqwidgets radiobuttons.
Michiel Broek <mbroek@mbse.eu>
parents:
140
diff
changeset
|
42 | case 'testdata': testdata(); |
866a947b732a
Added the framework for the units editor. In the dashboard the radio selector buttons are converteed to jqwidgets radiobuttons.
Michiel Broek <mbroek@mbse.eu>
parents:
140
diff
changeset
|
43 | break; |
866a947b732a
Added the framework for the units editor. In the dashboard the radio selector buttons are converteed to jqwidgets radiobuttons.
Michiel Broek <mbroek@mbse.eu>
parents:
140
diff
changeset
|
44 | default: break; |
866a947b732a
Added the framework for the units editor. In the dashboard the radio selector buttons are converteed to jqwidgets radiobuttons.
Michiel Broek <mbroek@mbse.eu>
parents:
140
diff
changeset
|
45 | } |
866a947b732a
Added the framework for the units editor. In the dashboard the radio selector buttons are converteed to jqwidgets radiobuttons.
Michiel Broek <mbroek@mbse.eu>
parents:
140
diff
changeset
|
46 | } else { |
866a947b732a
Added the framework for the units editor. In the dashboard the radio selector buttons are converteed to jqwidgets radiobuttons.
Michiel Broek <mbroek@mbse.eu>
parents:
140
diff
changeset
|
47 | unit_list(); |
866a947b732a
Added the framework for the units editor. In the dashboard the radio selector buttons are converteed to jqwidgets radiobuttons.
Michiel Broek <mbroek@mbse.eu>
parents:
140
diff
changeset
|
48 | } |
866a947b732a
Added the framework for the units editor. In the dashboard the radio selector buttons are converteed to jqwidgets radiobuttons.
Michiel Broek <mbroek@mbse.eu>
parents:
140
diff
changeset
|
49 | |
866a947b732a
Added the framework for the units editor. In the dashboard the radio selector buttons are converteed to jqwidgets radiobuttons.
Michiel Broek <mbroek@mbse.eu>
parents:
140
diff
changeset
|
50 | exit; |
866a947b732a
Added the framework for the units editor. In the dashboard the radio selector buttons are converteed to jqwidgets radiobuttons.
Michiel Broek <mbroek@mbse.eu>
parents:
140
diff
changeset
|
51 | |
866a947b732a
Added the framework for the units editor. In the dashboard the radio selector buttons are converteed to jqwidgets radiobuttons.
Michiel Broek <mbroek@mbse.eu>
parents:
140
diff
changeset
|
52 | /**************************************************************************** |
866a947b732a
Added the framework for the units editor. In the dashboard the radio selector buttons are converteed to jqwidgets radiobuttons.
Michiel Broek <mbroek@mbse.eu>
parents:
140
diff
changeset
|
53 | * |
866a947b732a
Added the framework for the units editor. In the dashboard the radio selector buttons are converteed to jqwidgets radiobuttons.
Michiel Broek <mbroek@mbse.eu>
parents:
140
diff
changeset
|
54 | */ |
866a947b732a
Added the framework for the units editor. In the dashboard the radio selector buttons are converteed to jqwidgets radiobuttons.
Michiel Broek <mbroek@mbse.eu>
parents:
140
diff
changeset
|
55 | |
866a947b732a
Added the framework for the units editor. In the dashboard the radio selector buttons are converteed to jqwidgets radiobuttons.
Michiel Broek <mbroek@mbse.eu>
parents:
140
diff
changeset
|
56 | /* |
866a947b732a
Added the framework for the units editor. In the dashboard the radio selector buttons are converteed to jqwidgets radiobuttons.
Michiel Broek <mbroek@mbse.eu>
parents:
140
diff
changeset
|
57 | * Unit add |
866a947b732a
Added the framework for the units editor. In the dashboard the radio selector buttons are converteed to jqwidgets radiobuttons.
Michiel Broek <mbroek@mbse.eu>
parents:
140
diff
changeset
|
58 | * |
554
ab9f22ab57b5
Versie 0.8.5. Implementatie product code en product naam. Implementatie DLOG MQTT berichten. Verminderde server rotocol debug berichten.
Michiel Broek <mbroek@mbse.eu>
parents:
518
diff
changeset
|
59 | * @param string $_POST['Name'] The product name |
153
866a947b732a
Added the framework for the units editor. In the dashboard the radio selector buttons are converteed to jqwidgets radiobuttons.
Michiel Broek <mbroek@mbse.eu>
parents:
140
diff
changeset
|
60 | */ |
866a947b732a
Added the framework for the units editor. In the dashboard the radio selector buttons are converteed to jqwidgets radiobuttons.
Michiel Broek <mbroek@mbse.eu>
parents:
140
diff
changeset
|
61 | function unit_add() { |
866a947b732a
Added the framework for the units editor. In the dashboard the radio selector buttons are converteed to jqwidgets radiobuttons.
Michiel Broek <mbroek@mbse.eu>
parents:
140
diff
changeset
|
62 | |
866a947b732a
Added the framework for the units editor. In the dashboard the radio selector buttons are converteed to jqwidgets radiobuttons.
Michiel Broek <mbroek@mbse.eu>
parents:
140
diff
changeset
|
63 | if ($_POST['key'] == 'Add') { |
554
ab9f22ab57b5
Versie 0.8.5. Implementatie product code en product naam. Implementatie DLOG MQTT berichten. Verminderde server rotocol debug berichten.
Michiel Broek <mbroek@mbse.eu>
parents:
518
diff
changeset
|
64 | send_cmd("UNIT ADD ".$_POST['ProductName']); |
153
866a947b732a
Added the framework for the units editor. In the dashboard the radio selector buttons are converteed to jqwidgets radiobuttons.
Michiel Broek <mbroek@mbse.eu>
parents:
140
diff
changeset
|
65 | } |
866a947b732a
Added the framework for the units editor. In the dashboard the radio selector buttons are converteed to jqwidgets radiobuttons.
Michiel Broek <mbroek@mbse.eu>
parents:
140
diff
changeset
|
66 | |
866a947b732a
Added the framework for the units editor. In the dashboard the radio selector buttons are converteed to jqwidgets radiobuttons.
Michiel Broek <mbroek@mbse.eu>
parents:
140
diff
changeset
|
67 | unset($_POST['UUID']); |
614
389097dc665d
Version 0.9.11. Removed lcd debug message after 7 years. Added setup for alternative beer sensor. If the main sensor is gone, the alternative will be used.
Michiel Broek <mbroek@mbse.eu>
parents:
604
diff
changeset
|
68 | unset($_POST['ProductName']); |
153
866a947b732a
Added the framework for the units editor. In the dashboard the radio selector buttons are converteed to jqwidgets radiobuttons.
Michiel Broek <mbroek@mbse.eu>
parents:
140
diff
changeset
|
69 | unset($_POST['key']); |
866a947b732a
Added the framework for the units editor. In the dashboard the radio selector buttons are converteed to jqwidgets radiobuttons.
Michiel Broek <mbroek@mbse.eu>
parents:
140
diff
changeset
|
70 | unset($_POST['command']); |
866a947b732a
Added the framework for the units editor. In the dashboard the radio selector buttons are converteed to jqwidgets radiobuttons.
Michiel Broek <mbroek@mbse.eu>
parents:
140
diff
changeset
|
71 | load('units.php'); |
866a947b732a
Added the framework for the units editor. In the dashboard the radio selector buttons are converteed to jqwidgets radiobuttons.
Michiel Broek <mbroek@mbse.eu>
parents:
140
diff
changeset
|
72 | } |
866a947b732a
Added the framework for the units editor. In the dashboard the radio selector buttons are converteed to jqwidgets radiobuttons.
Michiel Broek <mbroek@mbse.eu>
parents:
140
diff
changeset
|
73 | |
866a947b732a
Added the framework for the units editor. In the dashboard the radio selector buttons are converteed to jqwidgets radiobuttons.
Michiel Broek <mbroek@mbse.eu>
parents:
140
diff
changeset
|
74 | |
866a947b732a
Added the framework for the units editor. In the dashboard the radio selector buttons are converteed to jqwidgets radiobuttons.
Michiel Broek <mbroek@mbse.eu>
parents:
140
diff
changeset
|
75 | |
866a947b732a
Added the framework for the units editor. In the dashboard the radio selector buttons are converteed to jqwidgets radiobuttons.
Michiel Broek <mbroek@mbse.eu>
parents:
140
diff
changeset
|
76 | /* |
866a947b732a
Added the framework for the units editor. In the dashboard the radio selector buttons are converteed to jqwidgets radiobuttons.
Michiel Broek <mbroek@mbse.eu>
parents:
140
diff
changeset
|
77 | * Unit update |
866a947b732a
Added the framework for the units editor. In the dashboard the radio selector buttons are converteed to jqwidgets radiobuttons.
Michiel Broek <mbroek@mbse.eu>
parents:
140
diff
changeset
|
78 | * |
866a947b732a
Added the framework for the units editor. In the dashboard the radio selector buttons are converteed to jqwidgets radiobuttons.
Michiel Broek <mbroek@mbse.eu>
parents:
140
diff
changeset
|
79 | * @param string $_POST['UUID'] The unit UUID |
866a947b732a
Added the framework for the units editor. In the dashboard the radio selector buttons are converteed to jqwidgets radiobuttons.
Michiel Broek <mbroek@mbse.eu>
parents:
140
diff
changeset
|
80 | * @param string $_POST['key'] The button pressed. |
866a947b732a
Added the framework for the units editor. In the dashboard the radio selector buttons are converteed to jqwidgets radiobuttons.
Michiel Broek <mbroek@mbse.eu>
parents:
140
diff
changeset
|
81 | */ |
866a947b732a
Added the framework for the units editor. In the dashboard the radio selector buttons are converteed to jqwidgets radiobuttons.
Michiel Broek <mbroek@mbse.eu>
parents:
140
diff
changeset
|
82 | function unit_update() { |
866a947b732a
Added the framework for the units editor. In the dashboard the radio selector buttons are converteed to jqwidgets radiobuttons.
Michiel Broek <mbroek@mbse.eu>
parents:
140
diff
changeset
|
83 | /* |
866a947b732a
Added the framework for the units editor. In the dashboard the radio selector buttons are converteed to jqwidgets radiobuttons.
Michiel Broek <mbroek@mbse.eu>
parents:
140
diff
changeset
|
84 | * Build the update command |
866a947b732a
Added the framework for the units editor. In the dashboard the radio selector buttons are converteed to jqwidgets radiobuttons.
Michiel Broek <mbroek@mbse.eu>
parents:
140
diff
changeset
|
85 | */ |
175
b73490398368
Units editing is more or less complete. Changed structures for heating, cooling, fan and door. Updated the web interface to confuigure all these things.
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
86 | if ($_POST['key'] == 'Delete') { |
196 | 87 | send_cmd("UNIT DEL ".$_POST['UUID']); |
175
b73490398368
Units editing is more or less complete. Changed structures for heating, cooling, fan and door. Updated the web interface to confuigure all these things.
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
88 | } |
b73490398368
Units editing is more or less complete. Changed structures for heating, cooling, fan and door. Updated the web interface to confuigure all these things.
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
89 | |
b73490398368
Units editing is more or less complete. Changed structures for heating, cooling, fan and door. Updated the web interface to confuigure all these things.
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
90 | if ($_POST['key'] == 'Save') { |
254
b29f80afaeac
Units editor uses array commands
Michiel Broek <mbroek@mbse.eu>
parents:
243
diff
changeset
|
91 | $cmd = array("UNIT PUT ".$_POST['UUID']); |
554
ab9f22ab57b5
Versie 0.8.5. Implementatie product code en product naam. Implementatie DLOG MQTT berichten. Verminderde server rotocol debug berichten.
Michiel Broek <mbroek@mbse.eu>
parents:
518
diff
changeset
|
92 | $cmd[] = "PRODUCT_CODE,".$_POST['ProductCode']; |
ab9f22ab57b5
Versie 0.8.5. Implementatie product code en product naam. Implementatie DLOG MQTT berichten. Verminderde server rotocol debug berichten.
Michiel Broek <mbroek@mbse.eu>
parents:
518
diff
changeset
|
93 | $cmd[] = "PRODUCT_NAME,".$_POST['ProductName']; |
254
b29f80afaeac
Units editor uses array commands
Michiel Broek <mbroek@mbse.eu>
parents:
243
diff
changeset
|
94 | $cmd[] = "VOLUME,".$_POST['Volume']; |
564
3fc61dd28656
Versie 0.8.8 Fermentation stage implemented in units.
Michiel Broek <mbroek@mbse.eu>
parents:
554
diff
changeset
|
95 | $cmd[] = "STAGE,".$_POST['Stage']; |
254
b29f80afaeac
Units editor uses array commands
Michiel Broek <mbroek@mbse.eu>
parents:
243
diff
changeset
|
96 | $cmd[] = "AIR_ADDRESS,".$_POST['AirAddress']; |
513
a2732027afb3
Version 0.6.1 added support for domoticz mqtt sensors.
Michiel Broek <mbroek@mbse.eu>
parents:
397
diff
changeset
|
97 | $cmd[] = "AIR_IDX,".$_POST['AirIdx']; |
254
b29f80afaeac
Units editor uses array commands
Michiel Broek <mbroek@mbse.eu>
parents:
243
diff
changeset
|
98 | $cmd[] = "BEER_ADDRESS,".$_POST['BeerAddress']; |
513
a2732027afb3
Version 0.6.1 added support for domoticz mqtt sensors.
Michiel Broek <mbroek@mbse.eu>
parents:
397
diff
changeset
|
99 | $cmd[] = "BEER_IDX,".$_POST['BeerIdx']; |
614
389097dc665d
Version 0.9.11. Removed lcd debug message after 7 years. Added setup for alternative beer sensor. If the main sensor is gone, the alternative will be used.
Michiel Broek <mbroek@mbse.eu>
parents:
604
diff
changeset
|
100 | $cmd[] = "BEER_ADDRESS2,".$_POST['BeerAddress2']; |
518
fd36bedab944
Added chiller configuration items
Michiel Broek <mbroek@mbse.eu>
parents:
513
diff
changeset
|
101 | $cmd[] = "CHILLER_ADDRESS,".$_POST['ChillerAddress']; |
fd36bedab944
Added chiller configuration items
Michiel Broek <mbroek@mbse.eu>
parents:
513
diff
changeset
|
102 | $cmd[] = "CHILLER_IDX,".$_POST['ChillerIdx']; |
254
b29f80afaeac
Units editor uses array commands
Michiel Broek <mbroek@mbse.eu>
parents:
243
diff
changeset
|
103 | $cmd[] = "HEATER_ADDRESS,".$_POST['HeaterAddress']; |
272
f436d826de4b
Added Heater and Cooler delay edit fields. Added more checks on entered data in the units edit screen.
Michiel Broek <mbroek@mbse.eu>
parents:
254
diff
changeset
|
104 | $cmd[] = "HEATER_DELAY,".$_POST['HeaterDelay']; |
513
a2732027afb3
Version 0.6.1 added support for domoticz mqtt sensors.
Michiel Broek <mbroek@mbse.eu>
parents:
397
diff
changeset
|
105 | $cmd[] = "HEATER_IDX,".$_POST['HeaterIdx']; |
254
b29f80afaeac
Units editor uses array commands
Michiel Broek <mbroek@mbse.eu>
parents:
243
diff
changeset
|
106 | $cmd[] = "COOLER_ADDRESS,".$_POST['CoolerAddress']; |
272
f436d826de4b
Added Heater and Cooler delay edit fields. Added more checks on entered data in the units edit screen.
Michiel Broek <mbroek@mbse.eu>
parents:
254
diff
changeset
|
107 | $cmd[] = "COOLER_DELAY,".$_POST['CoolerDelay']; |
513
a2732027afb3
Version 0.6.1 added support for domoticz mqtt sensors.
Michiel Broek <mbroek@mbse.eu>
parents:
397
diff
changeset
|
108 | $cmd[] = "COOLER_IDX,".$_POST['CoolerIdx']; |
254
b29f80afaeac
Units editor uses array commands
Michiel Broek <mbroek@mbse.eu>
parents:
243
diff
changeset
|
109 | $cmd[] = "FAN_ADDRESS,".$_POST['FanAddress']; |
349 | 110 | $cmd[] = "FAN_DELAY,".$_POST['FanDelay']; |
513
a2732027afb3
Version 0.6.1 added support for domoticz mqtt sensors.
Michiel Broek <mbroek@mbse.eu>
parents:
397
diff
changeset
|
111 | $cmd[] = "FAN_IDX,".$_POST['FanIdx']; |
306
97602274eb58
Updated to add support for lights in a fermenter unit and a Power Supply status.
Michiel Broek <mbroek@mbse.eu>
parents:
291
diff
changeset
|
112 | $cmd[] = "LIGHT_ADDRESS,".$_POST['LightAddress']; |
97602274eb58
Updated to add support for lights in a fermenter unit and a Power Supply status.
Michiel Broek <mbroek@mbse.eu>
parents:
291
diff
changeset
|
113 | $cmd[] = "LIGHT_DELAY,".$_POST['LightDelay']; |
513
a2732027afb3
Version 0.6.1 added support for domoticz mqtt sensors.
Michiel Broek <mbroek@mbse.eu>
parents:
397
diff
changeset
|
114 | $cmd[] = "LIGHT_IDX,".$_POST['LightIdx']; |
254
b29f80afaeac
Units editor uses array commands
Michiel Broek <mbroek@mbse.eu>
parents:
243
diff
changeset
|
115 | $cmd[] = "DOOR_ADDRESS,".$_POST['DoorAddress']; |
513
a2732027afb3
Version 0.6.1 added support for domoticz mqtt sensors.
Michiel Broek <mbroek@mbse.eu>
parents:
397
diff
changeset
|
116 | $cmd[] = "DOOR_IDX,".$_POST['DoorIdx']; |
306
97602274eb58
Updated to add support for lights in a fermenter unit and a Power Supply status.
Michiel Broek <mbroek@mbse.eu>
parents:
291
diff
changeset
|
117 | $cmd[] = "PSU_ADDRESS,".$_POST['PSUAddress']; |
513
a2732027afb3
Version 0.6.1 added support for domoticz mqtt sensors.
Michiel Broek <mbroek@mbse.eu>
parents:
397
diff
changeset
|
118 | $cmd[] = "PSU_IDX,".$_POST['PSUIdx']; |
254
b29f80afaeac
Units editor uses array commands
Michiel Broek <mbroek@mbse.eu>
parents:
243
diff
changeset
|
119 | $cmd[] = "TEMP_SET_MIN,".$_POST['TempSetMin']; |
b29f80afaeac
Units editor uses array commands
Michiel Broek <mbroek@mbse.eu>
parents:
243
diff
changeset
|
120 | $cmd[] = "TEMP_SET_MAX,".$_POST['TempSetMax']; |
362
c92651a54969
Made the client-server protocol more robust. When a change to a unit is made using the web interface, the main process is stopped during the update. Splitted the PID in two PID's, one for heating and one for cooling. Adjusted the web edit scrreen for this, but there are still rough edges. Replaced the PID code, maybe this one works better for our purpose. The simulator air temperature changes on the simulator heater and cooler, but it is not realistic at all. This is a development version, do not use in production. The version is 0.3.0
Michiel Broek <mbroek@mbse.eu>
parents:
349
diff
changeset
|
121 | $cmd[] = "PIDC_IMAX,".$_POST['PIDC_iMax']; |
c92651a54969
Made the client-server protocol more robust. When a change to a unit is made using the web interface, the main process is stopped during the update. Splitted the PID in two PID's, one for heating and one for cooling. Adjusted the web edit scrreen for this, but there are still rough edges. Replaced the PID code, maybe this one works better for our purpose. The simulator air temperature changes on the simulator heater and cooler, but it is not realistic at all. This is a development version, do not use in production. The version is 0.3.0
Michiel Broek <mbroek@mbse.eu>
parents:
349
diff
changeset
|
122 | $cmd[] = "PIDC_PGAIN,".$_POST['PIDC_pGain']; |
c92651a54969
Made the client-server protocol more robust. When a change to a unit is made using the web interface, the main process is stopped during the update. Splitted the PID in two PID's, one for heating and one for cooling. Adjusted the web edit scrreen for this, but there are still rough edges. Replaced the PID code, maybe this one works better for our purpose. The simulator air temperature changes on the simulator heater and cooler, but it is not realistic at all. This is a development version, do not use in production. The version is 0.3.0
Michiel Broek <mbroek@mbse.eu>
parents:
349
diff
changeset
|
123 | $cmd[] = "PIDC_DGAIN,".$_POST['PIDC_dGain']; |
c92651a54969
Made the client-server protocol more robust. When a change to a unit is made using the web interface, the main process is stopped during the update. Splitted the PID in two PID's, one for heating and one for cooling. Adjusted the web edit scrreen for this, but there are still rough edges. Replaced the PID code, maybe this one works better for our purpose. The simulator air temperature changes on the simulator heater and cooler, but it is not realistic at all. This is a development version, do not use in production. The version is 0.3.0
Michiel Broek <mbroek@mbse.eu>
parents:
349
diff
changeset
|
124 | $cmd[] = "PIDC_IGAIN,".$_POST['PIDC_iGain']; |
c92651a54969
Made the client-server protocol more robust. When a change to a unit is made using the web interface, the main process is stopped during the update. Splitted the PID in two PID's, one for heating and one for cooling. Adjusted the web edit scrreen for this, but there are still rough edges. Replaced the PID code, maybe this one works better for our purpose. The simulator air temperature changes on the simulator heater and cooler, but it is not realistic at all. This is a development version, do not use in production. The version is 0.3.0
Michiel Broek <mbroek@mbse.eu>
parents:
349
diff
changeset
|
125 | $cmd[] = "PIDC_IDLERANGE,".$_POST['PIDC_idleRange']; |
c92651a54969
Made the client-server protocol more robust. When a change to a unit is made using the web interface, the main process is stopped during the update. Splitted the PID in two PID's, one for heating and one for cooling. Adjusted the web edit scrreen for this, but there are still rough edges. Replaced the PID code, maybe this one works better for our purpose. The simulator air temperature changes on the simulator heater and cooler, but it is not realistic at all. This is a development version, do not use in production. The version is 0.3.0
Michiel Broek <mbroek@mbse.eu>
parents:
349
diff
changeset
|
126 | $cmd[] = "PIDH_IMAX,".$_POST['PIDC_iMax']; |
c92651a54969
Made the client-server protocol more robust. When a change to a unit is made using the web interface, the main process is stopped during the update. Splitted the PID in two PID's, one for heating and one for cooling. Adjusted the web edit scrreen for this, but there are still rough edges. Replaced the PID code, maybe this one works better for our purpose. The simulator air temperature changes on the simulator heater and cooler, but it is not realistic at all. This is a development version, do not use in production. The version is 0.3.0
Michiel Broek <mbroek@mbse.eu>
parents:
349
diff
changeset
|
127 | $cmd[] = "PIDH_PGAIN,".$_POST['PIDH_pGain']; |
c92651a54969
Made the client-server protocol more robust. When a change to a unit is made using the web interface, the main process is stopped during the update. Splitted the PID in two PID's, one for heating and one for cooling. Adjusted the web edit scrreen for this, but there are still rough edges. Replaced the PID code, maybe this one works better for our purpose. The simulator air temperature changes on the simulator heater and cooler, but it is not realistic at all. This is a development version, do not use in production. The version is 0.3.0
Michiel Broek <mbroek@mbse.eu>
parents:
349
diff
changeset
|
128 | $cmd[] = "PIDH_DGAIN,".$_POST['PIDH_dGain']; |
c92651a54969
Made the client-server protocol more robust. When a change to a unit is made using the web interface, the main process is stopped during the update. Splitted the PID in two PID's, one for heating and one for cooling. Adjusted the web edit scrreen for this, but there are still rough edges. Replaced the PID code, maybe this one works better for our purpose. The simulator air temperature changes on the simulator heater and cooler, but it is not realistic at all. This is a development version, do not use in production. The version is 0.3.0
Michiel Broek <mbroek@mbse.eu>
parents:
349
diff
changeset
|
129 | $cmd[] = "PIDH_IGAIN,".$_POST['PIDH_iGain']; |
c92651a54969
Made the client-server protocol more robust. When a change to a unit is made using the web interface, the main process is stopped during the update. Splitted the PID in two PID's, one for heating and one for cooling. Adjusted the web edit scrreen for this, but there are still rough edges. Replaced the PID code, maybe this one works better for our purpose. The simulator air temperature changes on the simulator heater and cooler, but it is not realistic at all. This is a development version, do not use in production. The version is 0.3.0
Michiel Broek <mbroek@mbse.eu>
parents:
349
diff
changeset
|
130 | $cmd[] = "PIDH_IDLERANGE,".$_POST['PIDH_idleRange']; |
254
b29f80afaeac
Units editor uses array commands
Michiel Broek <mbroek@mbse.eu>
parents:
243
diff
changeset
|
131 | $cmd[] = "."; |
b29f80afaeac
Units editor uses array commands
Michiel Broek <mbroek@mbse.eu>
parents:
243
diff
changeset
|
132 | send_array($cmd); |
175
b73490398368
Units editing is more or less complete. Changed structures for heating, cooling, fan and door. Updated the web interface to confuigure all these things.
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
133 | } |
153
866a947b732a
Added the framework for the units editor. In the dashboard the radio selector buttons are converteed to jqwidgets radiobuttons.
Michiel Broek <mbroek@mbse.eu>
parents:
140
diff
changeset
|
134 | |
866a947b732a
Added the framework for the units editor. In the dashboard the radio selector buttons are converteed to jqwidgets radiobuttons.
Michiel Broek <mbroek@mbse.eu>
parents:
140
diff
changeset
|
135 | unset($_POST['UUID']); |
554
ab9f22ab57b5
Versie 0.8.5. Implementatie product code en product naam. Implementatie DLOG MQTT berichten. Verminderde server rotocol debug berichten.
Michiel Broek <mbroek@mbse.eu>
parents:
518
diff
changeset
|
136 | unset($_POST['ProductName']); |
ab9f22ab57b5
Versie 0.8.5. Implementatie product code en product naam. Implementatie DLOG MQTT berichten. Verminderde server rotocol debug berichten.
Michiel Broek <mbroek@mbse.eu>
parents:
518
diff
changeset
|
137 | unset($_POST['ProductCode']); |
175
b73490398368
Units editing is more or less complete. Changed structures for heating, cooling, fan and door. Updated the web interface to confuigure all these things.
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
138 | unset($_POST['Volume']); |
564
3fc61dd28656
Versie 0.8.8 Fermentation stage implemented in units.
Michiel Broek <mbroek@mbse.eu>
parents:
554
diff
changeset
|
139 | Unset($_POST['Stage']); |
153
866a947b732a
Added the framework for the units editor. In the dashboard the radio selector buttons are converteed to jqwidgets radiobuttons.
Michiel Broek <mbroek@mbse.eu>
parents:
140
diff
changeset
|
140 | unset($_POST['key']); |
866a947b732a
Added the framework for the units editor. In the dashboard the radio selector buttons are converteed to jqwidgets radiobuttons.
Michiel Broek <mbroek@mbse.eu>
parents:
140
diff
changeset
|
141 | unset($_POST['command']); |
254
b29f80afaeac
Units editor uses array commands
Michiel Broek <mbroek@mbse.eu>
parents:
243
diff
changeset
|
142 | unset($_POST['AirAddress']); |
513
a2732027afb3
Version 0.6.1 added support for domoticz mqtt sensors.
Michiel Broek <mbroek@mbse.eu>
parents:
397
diff
changeset
|
143 | unset($_POST['AirIdx']); |
254
b29f80afaeac
Units editor uses array commands
Michiel Broek <mbroek@mbse.eu>
parents:
243
diff
changeset
|
144 | unset($_POST['BeerAddress']); |
513
a2732027afb3
Version 0.6.1 added support for domoticz mqtt sensors.
Michiel Broek <mbroek@mbse.eu>
parents:
397
diff
changeset
|
145 | unset($_POST['BeerIdx']); |
518
fd36bedab944
Added chiller configuration items
Michiel Broek <mbroek@mbse.eu>
parents:
513
diff
changeset
|
146 | unset($_POST['ChillerAddress']); |
fd36bedab944
Added chiller configuration items
Michiel Broek <mbroek@mbse.eu>
parents:
513
diff
changeset
|
147 | unset($_POST['ChillerIdx']); |
254
b29f80afaeac
Units editor uses array commands
Michiel Broek <mbroek@mbse.eu>
parents:
243
diff
changeset
|
148 | unset($_POST['HeaterAddress']); |
272
f436d826de4b
Added Heater and Cooler delay edit fields. Added more checks on entered data in the units edit screen.
Michiel Broek <mbroek@mbse.eu>
parents:
254
diff
changeset
|
149 | unset($_POST['HeaterDelay']); |
513
a2732027afb3
Version 0.6.1 added support for domoticz mqtt sensors.
Michiel Broek <mbroek@mbse.eu>
parents:
397
diff
changeset
|
150 | unset($_POST['HeaterIdx']); |
254
b29f80afaeac
Units editor uses array commands
Michiel Broek <mbroek@mbse.eu>
parents:
243
diff
changeset
|
151 | unset($_POST['CoolerAddress']); |
272
f436d826de4b
Added Heater and Cooler delay edit fields. Added more checks on entered data in the units edit screen.
Michiel Broek <mbroek@mbse.eu>
parents:
254
diff
changeset
|
152 | unset($_POST['CoolerDelay']); |
513
a2732027afb3
Version 0.6.1 added support for domoticz mqtt sensors.
Michiel Broek <mbroek@mbse.eu>
parents:
397
diff
changeset
|
153 | unset($_POST['CoolerIdx']); |
306
97602274eb58
Updated to add support for lights in a fermenter unit and a Power Supply status.
Michiel Broek <mbroek@mbse.eu>
parents:
291
diff
changeset
|
154 | unset($_POST['LightAddress']); |
97602274eb58
Updated to add support for lights in a fermenter unit and a Power Supply status.
Michiel Broek <mbroek@mbse.eu>
parents:
291
diff
changeset
|
155 | unset($_POST['LightDelay']); |
513
a2732027afb3
Version 0.6.1 added support for domoticz mqtt sensors.
Michiel Broek <mbroek@mbse.eu>
parents:
397
diff
changeset
|
156 | unset($_POST['LightIdx']); |
254
b29f80afaeac
Units editor uses array commands
Michiel Broek <mbroek@mbse.eu>
parents:
243
diff
changeset
|
157 | unset($_POST['FanAddress']); |
349 | 158 | unset($_POST['FanDelay']); |
513
a2732027afb3
Version 0.6.1 added support for domoticz mqtt sensors.
Michiel Broek <mbroek@mbse.eu>
parents:
397
diff
changeset
|
159 | unset($_POST['FanIdx']); |
254
b29f80afaeac
Units editor uses array commands
Michiel Broek <mbroek@mbse.eu>
parents:
243
diff
changeset
|
160 | unset($_POST['DoorAddress']); |
513
a2732027afb3
Version 0.6.1 added support for domoticz mqtt sensors.
Michiel Broek <mbroek@mbse.eu>
parents:
397
diff
changeset
|
161 | unset($_POST['DoorIdx']); |
306
97602274eb58
Updated to add support for lights in a fermenter unit and a Power Supply status.
Michiel Broek <mbroek@mbse.eu>
parents:
291
diff
changeset
|
162 | unset($_POST['PSUAddress']); |
513
a2732027afb3
Version 0.6.1 added support for domoticz mqtt sensors.
Michiel Broek <mbroek@mbse.eu>
parents:
397
diff
changeset
|
163 | unset($_POST['PSUIdx']); |
254
b29f80afaeac
Units editor uses array commands
Michiel Broek <mbroek@mbse.eu>
parents:
243
diff
changeset
|
164 | unset($_POST['TempSetMin']); |
b29f80afaeac
Units editor uses array commands
Michiel Broek <mbroek@mbse.eu>
parents:
243
diff
changeset
|
165 | unset($_POST['TempSetMax']); |
362
c92651a54969
Made the client-server protocol more robust. When a change to a unit is made using the web interface, the main process is stopped during the update. Splitted the PID in two PID's, one for heating and one for cooling. Adjusted the web edit scrreen for this, but there are still rough edges. Replaced the PID code, maybe this one works better for our purpose. The simulator air temperature changes on the simulator heater and cooler, but it is not realistic at all. This is a development version, do not use in production. The version is 0.3.0
Michiel Broek <mbroek@mbse.eu>
parents:
349
diff
changeset
|
166 | unset($_POST['PIDC_iMax']); |
c92651a54969
Made the client-server protocol more robust. When a change to a unit is made using the web interface, the main process is stopped during the update. Splitted the PID in two PID's, one for heating and one for cooling. Adjusted the web edit scrreen for this, but there are still rough edges. Replaced the PID code, maybe this one works better for our purpose. The simulator air temperature changes on the simulator heater and cooler, but it is not realistic at all. This is a development version, do not use in production. The version is 0.3.0
Michiel Broek <mbroek@mbse.eu>
parents:
349
diff
changeset
|
167 | unset($_POST['PIDC_pGain']); |
c92651a54969
Made the client-server protocol more robust. When a change to a unit is made using the web interface, the main process is stopped during the update. Splitted the PID in two PID's, one for heating and one for cooling. Adjusted the web edit scrreen for this, but there are still rough edges. Replaced the PID code, maybe this one works better for our purpose. The simulator air temperature changes on the simulator heater and cooler, but it is not realistic at all. This is a development version, do not use in production. The version is 0.3.0
Michiel Broek <mbroek@mbse.eu>
parents:
349
diff
changeset
|
168 | unset($_POST['PIDC_dGain']); |
c92651a54969
Made the client-server protocol more robust. When a change to a unit is made using the web interface, the main process is stopped during the update. Splitted the PID in two PID's, one for heating and one for cooling. Adjusted the web edit scrreen for this, but there are still rough edges. Replaced the PID code, maybe this one works better for our purpose. The simulator air temperature changes on the simulator heater and cooler, but it is not realistic at all. This is a development version, do not use in production. The version is 0.3.0
Michiel Broek <mbroek@mbse.eu>
parents:
349
diff
changeset
|
169 | unset($_POST['PIDC_iGain']); |
c92651a54969
Made the client-server protocol more robust. When a change to a unit is made using the web interface, the main process is stopped during the update. Splitted the PID in two PID's, one for heating and one for cooling. Adjusted the web edit scrreen for this, but there are still rough edges. Replaced the PID code, maybe this one works better for our purpose. The simulator air temperature changes on the simulator heater and cooler, but it is not realistic at all. This is a development version, do not use in production. The version is 0.3.0
Michiel Broek <mbroek@mbse.eu>
parents:
349
diff
changeset
|
170 | unset($_POST['PIDC_idleRange']); |
c92651a54969
Made the client-server protocol more robust. When a change to a unit is made using the web interface, the main process is stopped during the update. Splitted the PID in two PID's, one for heating and one for cooling. Adjusted the web edit scrreen for this, but there are still rough edges. Replaced the PID code, maybe this one works better for our purpose. The simulator air temperature changes on the simulator heater and cooler, but it is not realistic at all. This is a development version, do not use in production. The version is 0.3.0
Michiel Broek <mbroek@mbse.eu>
parents:
349
diff
changeset
|
171 | unset($_POST['PIDH_iMax']); |
c92651a54969
Made the client-server protocol more robust. When a change to a unit is made using the web interface, the main process is stopped during the update. Splitted the PID in two PID's, one for heating and one for cooling. Adjusted the web edit scrreen for this, but there are still rough edges. Replaced the PID code, maybe this one works better for our purpose. The simulator air temperature changes on the simulator heater and cooler, but it is not realistic at all. This is a development version, do not use in production. The version is 0.3.0
Michiel Broek <mbroek@mbse.eu>
parents:
349
diff
changeset
|
172 | unset($_POST['PIDH_pGain']); |
c92651a54969
Made the client-server protocol more robust. When a change to a unit is made using the web interface, the main process is stopped during the update. Splitted the PID in two PID's, one for heating and one for cooling. Adjusted the web edit scrreen for this, but there are still rough edges. Replaced the PID code, maybe this one works better for our purpose. The simulator air temperature changes on the simulator heater and cooler, but it is not realistic at all. This is a development version, do not use in production. The version is 0.3.0
Michiel Broek <mbroek@mbse.eu>
parents:
349
diff
changeset
|
173 | unset($_POST['PIDH_dGain']); |
c92651a54969
Made the client-server protocol more robust. When a change to a unit is made using the web interface, the main process is stopped during the update. Splitted the PID in two PID's, one for heating and one for cooling. Adjusted the web edit scrreen for this, but there are still rough edges. Replaced the PID code, maybe this one works better for our purpose. The simulator air temperature changes on the simulator heater and cooler, but it is not realistic at all. This is a development version, do not use in production. The version is 0.3.0
Michiel Broek <mbroek@mbse.eu>
parents:
349
diff
changeset
|
174 | unset($_POST['PIDH_iGain']); |
c92651a54969
Made the client-server protocol more robust. When a change to a unit is made using the web interface, the main process is stopped during the update. Splitted the PID in two PID's, one for heating and one for cooling. Adjusted the web edit scrreen for this, but there are still rough edges. Replaced the PID code, maybe this one works better for our purpose. The simulator air temperature changes on the simulator heater and cooler, but it is not realistic at all. This is a development version, do not use in production. The version is 0.3.0
Michiel Broek <mbroek@mbse.eu>
parents:
349
diff
changeset
|
175 | unset($_POST['PIDH_idleRange']); |
153
866a947b732a
Added the framework for the units editor. In the dashboard the radio selector buttons are converteed to jqwidgets radiobuttons.
Michiel Broek <mbroek@mbse.eu>
parents:
140
diff
changeset
|
176 | load('units.php'); |
866a947b732a
Added the framework for the units editor. In the dashboard the radio selector buttons are converteed to jqwidgets radiobuttons.
Michiel Broek <mbroek@mbse.eu>
parents:
140
diff
changeset
|
177 | } |
866a947b732a
Added the framework for the units editor. In the dashboard the radio selector buttons are converteed to jqwidgets radiobuttons.
Michiel Broek <mbroek@mbse.eu>
parents:
140
diff
changeset
|
178 | |
866a947b732a
Added the framework for the units editor. In the dashboard the radio selector buttons are converteed to jqwidgets radiobuttons.
Michiel Broek <mbroek@mbse.eu>
parents:
140
diff
changeset
|
179 | |
866a947b732a
Added the framework for the units editor. In the dashboard the radio selector buttons are converteed to jqwidgets radiobuttons.
Michiel Broek <mbroek@mbse.eu>
parents:
140
diff
changeset
|
180 | |
866a947b732a
Added the framework for the units editor. In the dashboard the radio selector buttons are converteed to jqwidgets radiobuttons.
Michiel Broek <mbroek@mbse.eu>
parents:
140
diff
changeset
|
181 | /* |
554
ab9f22ab57b5
Versie 0.8.5. Implementatie product code en product naam. Implementatie DLOG MQTT berichten. Verminderde server rotocol debug berichten.
Michiel Broek <mbroek@mbse.eu>
parents:
518
diff
changeset
|
182 | * Test input of a modified or new fermentation unit. |
153
866a947b732a
Added the framework for the units editor. In the dashboard the radio selector buttons are converteed to jqwidgets radiobuttons.
Michiel Broek <mbroek@mbse.eu>
parents:
140
diff
changeset
|
183 | * |
866a947b732a
Added the framework for the units editor. In the dashboard the radio selector buttons are converteed to jqwidgets radiobuttons.
Michiel Broek <mbroek@mbse.eu>
parents:
140
diff
changeset
|
184 | * @param string $_POST['UUID'] Unique record UUID |
866a947b732a
Added the framework for the units editor. In the dashboard the radio selector buttons are converteed to jqwidgets radiobuttons.
Michiel Broek <mbroek@mbse.eu>
parents:
140
diff
changeset
|
185 | * @param string $_POST['key'] Key choice, Save or Cancel |
866a947b732a
Added the framework for the units editor. In the dashboard the radio selector buttons are converteed to jqwidgets radiobuttons.
Michiel Broek <mbroek@mbse.eu>
parents:
140
diff
changeset
|
186 | * @param string $_POST['command'] Command used, 'add' or 'update' |
866a947b732a
Added the framework for the units editor. In the dashboard the radio selector buttons are converteed to jqwidgets radiobuttons.
Michiel Broek <mbroek@mbse.eu>
parents:
140
diff
changeset
|
187 | * |
866a947b732a
Added the framework for the units editor. In the dashboard the radio selector buttons are converteed to jqwidgets radiobuttons.
Michiel Broek <mbroek@mbse.eu>
parents:
140
diff
changeset
|
188 | * Return: 0 = Ok |
866a947b732a
Added the framework for the units editor. In the dashboard the radio selector buttons are converteed to jqwidgets radiobuttons.
Michiel Broek <mbroek@mbse.eu>
parents:
140
diff
changeset
|
189 | * 1 = Missing data |
554
ab9f22ab57b5
Versie 0.8.5. Implementatie product code en product naam. Implementatie DLOG MQTT berichten. Verminderde server rotocol debug berichten.
Michiel Broek <mbroek@mbse.eu>
parents:
518
diff
changeset
|
190 | * // 2 = Name field too short |
ab9f22ab57b5
Versie 0.8.5. Implementatie product code en product naam. Implementatie DLOG MQTT berichten. Verminderde server rotocol debug berichten.
Michiel Broek <mbroek@mbse.eu>
parents:
518
diff
changeset
|
191 | * // 3 = Name already in use |
272
f436d826de4b
Added Heater and Cooler delay edit fields. Added more checks on entered data in the units edit screen.
Michiel Broek <mbroek@mbse.eu>
parents:
254
diff
changeset
|
192 | * 4 = TempSetMax <= TempSetMin |
f436d826de4b
Added Heater and Cooler delay edit fields. Added more checks on entered data in the units edit screen.
Michiel Broek <mbroek@mbse.eu>
parents:
254
diff
changeset
|
193 | * 5 = TempSetMax < 25 or > 35 |
f436d826de4b
Added Heater and Cooler delay edit fields. Added more checks on entered data in the units edit screen.
Michiel Broek <mbroek@mbse.eu>
parents:
254
diff
changeset
|
194 | * 6 = TempSetMin < -5 or > 15 |
f436d826de4b
Added Heater and Cooler delay edit fields. Added more checks on entered data in the units edit screen.
Michiel Broek <mbroek@mbse.eu>
parents:
254
diff
changeset
|
195 | * 7 = HeaterDelay out of range |
f436d826de4b
Added Heater and Cooler delay edit fields. Added more checks on entered data in the units edit screen.
Michiel Broek <mbroek@mbse.eu>
parents:
254
diff
changeset
|
196 | * 8 = CoolerDelay out of range |
362
c92651a54969
Made the client-server protocol more robust. When a change to a unit is made using the web interface, the main process is stopped during the update. Splitted the PID in two PID's, one for heating and one for cooling. Adjusted the web edit scrreen for this, but there are still rough edges. Replaced the PID code, maybe this one works better for our purpose. The simulator air temperature changes on the simulator heater and cooler, but it is not realistic at all. This is a development version, do not use in production. The version is 0.3.0
Michiel Broek <mbroek@mbse.eu>
parents:
349
diff
changeset
|
197 | * 9 = PIDC idleRange out of range |
c92651a54969
Made the client-server protocol more robust. When a change to a unit is made using the web interface, the main process is stopped during the update. Splitted the PID in two PID's, one for heating and one for cooling. Adjusted the web edit scrreen for this, but there are still rough edges. Replaced the PID code, maybe this one works better for our purpose. The simulator air temperature changes on the simulator heater and cooler, but it is not realistic at all. This is a development version, do not use in production. The version is 0.3.0
Michiel Broek <mbroek@mbse.eu>
parents:
349
diff
changeset
|
198 | * 10 = PIDH idleRange out of range |
306
97602274eb58
Updated to add support for lights in a fermenter unit and a Power Supply status.
Michiel Broek <mbroek@mbse.eu>
parents:
291
diff
changeset
|
199 | * 11 = LightDelay out of range |
349 | 200 | * 12 = FanDelay out of range |
153
866a947b732a
Added the framework for the units editor. In the dashboard the radio selector buttons are converteed to jqwidgets radiobuttons.
Michiel Broek <mbroek@mbse.eu>
parents:
140
diff
changeset
|
201 | * 99 = Cancel key |
866a947b732a
Added the framework for the units editor. In the dashboard the radio selector buttons are converteed to jqwidgets radiobuttons.
Michiel Broek <mbroek@mbse.eu>
parents:
140
diff
changeset
|
202 | */ |
866a947b732a
Added the framework for the units editor. In the dashboard the radio selector buttons are converteed to jqwidgets radiobuttons.
Michiel Broek <mbroek@mbse.eu>
parents:
140
diff
changeset
|
203 | function test_thedata() { |
866a947b732a
Added the framework for the units editor. In the dashboard the radio selector buttons are converteed to jqwidgets radiobuttons.
Michiel Broek <mbroek@mbse.eu>
parents:
140
diff
changeset
|
204 | |
866a947b732a
Added the framework for the units editor. In the dashboard the radio selector buttons are converteed to jqwidgets radiobuttons.
Michiel Broek <mbroek@mbse.eu>
parents:
140
diff
changeset
|
205 | global $arr; |
866a947b732a
Added the framework for the units editor. In the dashboard the radio selector buttons are converteed to jqwidgets radiobuttons.
Michiel Broek <mbroek@mbse.eu>
parents:
140
diff
changeset
|
206 | |
554
ab9f22ab57b5
Versie 0.8.5. Implementatie product code en product naam. Implementatie DLOG MQTT berichten. Verminderde server rotocol debug berichten.
Michiel Broek <mbroek@mbse.eu>
parents:
518
diff
changeset
|
207 | if (isset($_POST['UUID']) && isset($_POST['ProductCode']) && isset($_POST['ProductName']) && isset($_POST['Volume']) && |
ab9f22ab57b5
Versie 0.8.5. Implementatie product code en product naam. Implementatie DLOG MQTT berichten. Verminderde server rotocol debug berichten.
Michiel Broek <mbroek@mbse.eu>
parents:
518
diff
changeset
|
208 | isset($_POST['AirAddress']) && isset($_POST['ChillerAddress']) && |
ab9f22ab57b5
Versie 0.8.5. Implementatie product code en product naam. Implementatie DLOG MQTT berichten. Verminderde server rotocol debug berichten.
Michiel Broek <mbroek@mbse.eu>
parents:
518
diff
changeset
|
209 | isset($_POST['BeerAddress']) && isset($_POST['HeaterAddress']) && |
ab9f22ab57b5
Versie 0.8.5. Implementatie product code en product naam. Implementatie DLOG MQTT berichten. Verminderde server rotocol debug berichten.
Michiel Broek <mbroek@mbse.eu>
parents:
518
diff
changeset
|
210 | isset($_POST['CoolerAddress']) && isset($_POST['LightAddress']) && |
306
97602274eb58
Updated to add support for lights in a fermenter unit and a Power Supply status.
Michiel Broek <mbroek@mbse.eu>
parents:
291
diff
changeset
|
211 | isset($_POST['HeaterDelay']) && isset($_POST['CoolerDelay']) && isset($_POST['LightDelay']) && isset($_POST['PSUAddress']) && |
175
b73490398368
Units editing is more or less complete. Changed structures for heating, cooling, fan and door. Updated the web interface to confuigure all these things.
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
212 | isset($_POST['FanAddress']) && isset($_POST['DoorAddress']) && isset($_POST['TempSetMin']) && isset($_POST['TempSetMax']) && |
362
c92651a54969
Made the client-server protocol more robust. When a change to a unit is made using the web interface, the main process is stopped during the update. Splitted the PID in two PID's, one for heating and one for cooling. Adjusted the web edit scrreen for this, but there are still rough edges. Replaced the PID code, maybe this one works better for our purpose. The simulator air temperature changes on the simulator heater and cooler, but it is not realistic at all. This is a development version, do not use in production. The version is 0.3.0
Michiel Broek <mbroek@mbse.eu>
parents:
349
diff
changeset
|
213 | isset($_POST['PIDC_pGain']) && isset($_POST['PIDC_iGain']) && isset($_POST['PIDC_dGain']) && isset($_POST['PIDC_idleRange']) && |
c92651a54969
Made the client-server protocol more robust. When a change to a unit is made using the web interface, the main process is stopped during the update. Splitted the PID in two PID's, one for heating and one for cooling. Adjusted the web edit scrreen for this, but there are still rough edges. Replaced the PID code, maybe this one works better for our purpose. The simulator air temperature changes on the simulator heater and cooler, but it is not realistic at all. This is a development version, do not use in production. The version is 0.3.0
Michiel Broek <mbroek@mbse.eu>
parents:
349
diff
changeset
|
214 | isset($_POST['PIDH_pGain']) && isset($_POST['PIDH_iGain']) && isset($_POST['PIDH_dGain']) && isset($_POST['PIDH_idleRange']) && |
513
a2732027afb3
Version 0.6.1 added support for domoticz mqtt sensors.
Michiel Broek <mbroek@mbse.eu>
parents:
397
diff
changeset
|
215 | isset($_POST['PIDC_iMax']) && isset($_POST['PIDH_iMax']) && isset($_POST['AirIdx']) && isset($_POST['BeerIdx']) && |
a2732027afb3
Version 0.6.1 added support for domoticz mqtt sensors.
Michiel Broek <mbroek@mbse.eu>
parents:
397
diff
changeset
|
216 | isset($_POST['HeaterIdx']) && isset($_POST['CoolerIdx']) && isset($_POST['LightIdx']) && isset($_POST['DoorIdx']) && |
564
3fc61dd28656
Versie 0.8.8 Fermentation stage implemented in units.
Michiel Broek <mbroek@mbse.eu>
parents:
554
diff
changeset
|
217 | isset($_POST['PSUIdx']) && isset($_POST['FanIdx']) && isset($_POST['ChillerIdx']) && isset($_POST['Stage']) && |
362
c92651a54969
Made the client-server protocol more robust. When a change to a unit is made using the web interface, the main process is stopped during the update. Splitted the PID in two PID's, one for heating and one for cooling. Adjusted the web edit scrreen for this, but there are still rough edges. Replaced the PID code, maybe this one works better for our purpose. The simulator air temperature changes on the simulator heater and cooler, but it is not realistic at all. This is a development version, do not use in production. The version is 0.3.0
Michiel Broek <mbroek@mbse.eu>
parents:
349
diff
changeset
|
218 | isset($_POST['FanDelay']) && isset($_POST['key']) && isset($_POST['command'])) { |
153
866a947b732a
Added the framework for the units editor. In the dashboard the radio selector buttons are converteed to jqwidgets radiobuttons.
Michiel Broek <mbroek@mbse.eu>
parents:
140
diff
changeset
|
219 | |
866a947b732a
Added the framework for the units editor. In the dashboard the radio selector buttons are converteed to jqwidgets radiobuttons.
Michiel Broek <mbroek@mbse.eu>
parents:
140
diff
changeset
|
220 | if ($_POST['key'] == 'Cancel') |
866a947b732a
Added the framework for the units editor. In the dashboard the radio selector buttons are converteed to jqwidgets radiobuttons.
Michiel Broek <mbroek@mbse.eu>
parents:
140
diff
changeset
|
221 | return 99; |
866a947b732a
Added the framework for the units editor. In the dashboard the radio selector buttons are converteed to jqwidgets radiobuttons.
Michiel Broek <mbroek@mbse.eu>
parents:
140
diff
changeset
|
222 | |
554
ab9f22ab57b5
Versie 0.8.5. Implementatie product code en product naam. Implementatie DLOG MQTT berichten. Verminderde server rotocol debug berichten.
Michiel Broek <mbroek@mbse.eu>
parents:
518
diff
changeset
|
223 | // if (strlen($_POST['Name']) < 2) |
ab9f22ab57b5
Versie 0.8.5. Implementatie product code en product naam. Implementatie DLOG MQTT berichten. Verminderde server rotocol debug berichten.
Michiel Broek <mbroek@mbse.eu>
parents:
518
diff
changeset
|
224 | // return 2; |
134
f05601490415
Redesigned the web interface, one single app is too slow. The main dashboard will be a shiny ajax driven page, the setup pages will be simple and php only. Keep It Simple, Stupid.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
225 | |
554
ab9f22ab57b5
Versie 0.8.5. Implementatie product code en product naam. Implementatie DLOG MQTT berichten. Verminderde server rotocol debug berichten.
Michiel Broek <mbroek@mbse.eu>
parents:
518
diff
changeset
|
226 | /* if (startsWith($arr[0], "212")) { |
153
866a947b732a
Added the framework for the units editor. In the dashboard the radio selector buttons are converteed to jqwidgets radiobuttons.
Michiel Broek <mbroek@mbse.eu>
parents:
140
diff
changeset
|
227 | $j = 1; |
866a947b732a
Added the framework for the units editor. In the dashboard the radio selector buttons are converteed to jqwidgets radiobuttons.
Michiel Broek <mbroek@mbse.eu>
parents:
140
diff
changeset
|
228 | while (1) { |
866a947b732a
Added the framework for the units editor. In the dashboard the radio selector buttons are converteed to jqwidgets radiobuttons.
Michiel Broek <mbroek@mbse.eu>
parents:
140
diff
changeset
|
229 | if (strcmp($arr[$j], ".") == 0) |
866a947b732a
Added the framework for the units editor. In the dashboard the radio selector buttons are converteed to jqwidgets radiobuttons.
Michiel Broek <mbroek@mbse.eu>
parents:
140
diff
changeset
|
230 | break; |
866a947b732a
Added the framework for the units editor. In the dashboard the radio selector buttons are converteed to jqwidgets radiobuttons.
Michiel Broek <mbroek@mbse.eu>
parents:
140
diff
changeset
|
231 | $f = explode(",", $arr[$j]); |
866a947b732a
Added the framework for the units editor. In the dashboard the radio selector buttons are converteed to jqwidgets radiobuttons.
Michiel Broek <mbroek@mbse.eu>
parents:
140
diff
changeset
|
232 | if (strcmp($f[0], $_POST['UUID']) && (strcmp($f[1], $_POST['Name']) == 0)) { |
866a947b732a
Added the framework for the units editor. In the dashboard the radio selector buttons are converteed to jqwidgets radiobuttons.
Michiel Broek <mbroek@mbse.eu>
parents:
140
diff
changeset
|
233 | return 3; |
866a947b732a
Added the framework for the units editor. In the dashboard the radio selector buttons are converteed to jqwidgets radiobuttons.
Michiel Broek <mbroek@mbse.eu>
parents:
140
diff
changeset
|
234 | } |
866a947b732a
Added the framework for the units editor. In the dashboard the radio selector buttons are converteed to jqwidgets radiobuttons.
Michiel Broek <mbroek@mbse.eu>
parents:
140
diff
changeset
|
235 | $j++; |
866a947b732a
Added the framework for the units editor. In the dashboard the radio selector buttons are converteed to jqwidgets radiobuttons.
Michiel Broek <mbroek@mbse.eu>
parents:
140
diff
changeset
|
236 | } |
554
ab9f22ab57b5
Versie 0.8.5. Implementatie product code en product naam. Implementatie DLOG MQTT berichten. Verminderde server rotocol debug berichten.
Michiel Broek <mbroek@mbse.eu>
parents:
518
diff
changeset
|
237 | } */ |
272
f436d826de4b
Added Heater and Cooler delay edit fields. Added more checks on entered data in the units edit screen.
Michiel Broek <mbroek@mbse.eu>
parents:
254
diff
changeset
|
238 | |
f436d826de4b
Added Heater and Cooler delay edit fields. Added more checks on entered data in the units edit screen.
Michiel Broek <mbroek@mbse.eu>
parents:
254
diff
changeset
|
239 | if ($_POST['TempSetMax'] <= $_POST['TempSetMin']) |
f436d826de4b
Added Heater and Cooler delay edit fields. Added more checks on entered data in the units edit screen.
Michiel Broek <mbroek@mbse.eu>
parents:
254
diff
changeset
|
240 | return 4; |
f436d826de4b
Added Heater and Cooler delay edit fields. Added more checks on entered data in the units edit screen.
Michiel Broek <mbroek@mbse.eu>
parents:
254
diff
changeset
|
241 | |
604
e2766e538d0e
Version 0.9.7. Increased the maximum fermentation temperature to 45 degrees to allow Kveik fermentations.
Michiel Broek <mbroek@mbse.eu>
parents:
566
diff
changeset
|
242 | if (($_POST['TempSetMax'] < 25) || ($_POST['TempSetMax'] > 45)) |
272
f436d826de4b
Added Heater and Cooler delay edit fields. Added more checks on entered data in the units edit screen.
Michiel Broek <mbroek@mbse.eu>
parents:
254
diff
changeset
|
243 | return 5; |
f436d826de4b
Added Heater and Cooler delay edit fields. Added more checks on entered data in the units edit screen.
Michiel Broek <mbroek@mbse.eu>
parents:
254
diff
changeset
|
244 | |
f436d826de4b
Added Heater and Cooler delay edit fields. Added more checks on entered data in the units edit screen.
Michiel Broek <mbroek@mbse.eu>
parents:
254
diff
changeset
|
245 | if (($_POST['TempSetMin'] < -5) || ($_POST['TempSetMin'] > 15)) |
f436d826de4b
Added Heater and Cooler delay edit fields. Added more checks on entered data in the units edit screen.
Michiel Broek <mbroek@mbse.eu>
parents:
254
diff
changeset
|
246 | return 6; |
f436d826de4b
Added Heater and Cooler delay edit fields. Added more checks on entered data in the units edit screen.
Michiel Broek <mbroek@mbse.eu>
parents:
254
diff
changeset
|
247 | |
312
7b0f819a3805
Added more precision to the unit low and high black window margins. Switched to PID routine from Pid without a PhD. The PID compute routine is now in the one second loop. The switch delay times are now in seconds, 0..720.
Michiel Broek <mbroek@mbse.eu>
parents:
311
diff
changeset
|
248 | if (($_POST['HeaterDelay'] < 0) || ($_POST['HeaterDelay'] > 720)) |
272
f436d826de4b
Added Heater and Cooler delay edit fields. Added more checks on entered data in the units edit screen.
Michiel Broek <mbroek@mbse.eu>
parents:
254
diff
changeset
|
249 | return 7; |
f436d826de4b
Added Heater and Cooler delay edit fields. Added more checks on entered data in the units edit screen.
Michiel Broek <mbroek@mbse.eu>
parents:
254
diff
changeset
|
250 | |
312
7b0f819a3805
Added more precision to the unit low and high black window margins. Switched to PID routine from Pid without a PhD. The PID compute routine is now in the one second loop. The switch delay times are now in seconds, 0..720.
Michiel Broek <mbroek@mbse.eu>
parents:
311
diff
changeset
|
251 | if (($_POST['CoolerDelay'] < 0) || ($_POST['CoolerDelay'] > 720)) |
272
f436d826de4b
Added Heater and Cooler delay edit fields. Added more checks on entered data in the units edit screen.
Michiel Broek <mbroek@mbse.eu>
parents:
254
diff
changeset
|
252 | return 8; |
f436d826de4b
Added Heater and Cooler delay edit fields. Added more checks on entered data in the units edit screen.
Michiel Broek <mbroek@mbse.eu>
parents:
254
diff
changeset
|
253 | |
362
c92651a54969
Made the client-server protocol more robust. When a change to a unit is made using the web interface, the main process is stopped during the update. Splitted the PID in two PID's, one for heating and one for cooling. Adjusted the web edit scrreen for this, but there are still rough edges. Replaced the PID code, maybe this one works better for our purpose. The simulator air temperature changes on the simulator heater and cooler, but it is not realistic at all. This is a development version, do not use in production. The version is 0.3.0
Michiel Broek <mbroek@mbse.eu>
parents:
349
diff
changeset
|
254 | if (($_POST['PIDC_idleRange'] < 0) || ($_POST['PIDC_idleRange'] > 5)) |
272
f436d826de4b
Added Heater and Cooler delay edit fields. Added more checks on entered data in the units edit screen.
Michiel Broek <mbroek@mbse.eu>
parents:
254
diff
changeset
|
255 | return 9; |
f436d826de4b
Added Heater and Cooler delay edit fields. Added more checks on entered data in the units edit screen.
Michiel Broek <mbroek@mbse.eu>
parents:
254
diff
changeset
|
256 | |
362
c92651a54969
Made the client-server protocol more robust. When a change to a unit is made using the web interface, the main process is stopped during the update. Splitted the PID in two PID's, one for heating and one for cooling. Adjusted the web edit scrreen for this, but there are still rough edges. Replaced the PID code, maybe this one works better for our purpose. The simulator air temperature changes on the simulator heater and cooler, but it is not realistic at all. This is a development version, do not use in production. The version is 0.3.0
Michiel Broek <mbroek@mbse.eu>
parents:
349
diff
changeset
|
257 | if (($_POST['PIDH_idleRange'] < 0) || ($_POST['PIDH_idleRange'] > 5)) |
272
f436d826de4b
Added Heater and Cooler delay edit fields. Added more checks on entered data in the units edit screen.
Michiel Broek <mbroek@mbse.eu>
parents:
254
diff
changeset
|
258 | return 10; |
153
866a947b732a
Added the framework for the units editor. In the dashboard the radio selector buttons are converteed to jqwidgets radiobuttons.
Michiel Broek <mbroek@mbse.eu>
parents:
140
diff
changeset
|
259 | |
312
7b0f819a3805
Added more precision to the unit low and high black window margins. Switched to PID routine from Pid without a PhD. The PID compute routine is now in the one second loop. The switch delay times are now in seconds, 0..720.
Michiel Broek <mbroek@mbse.eu>
parents:
311
diff
changeset
|
260 | if (($_POST['LightDelay'] < 0) || ($_POST['LightDelay'] > 720)) |
306
97602274eb58
Updated to add support for lights in a fermenter unit and a Power Supply status.
Michiel Broek <mbroek@mbse.eu>
parents:
291
diff
changeset
|
261 | return 11; |
97602274eb58
Updated to add support for lights in a fermenter unit and a Power Supply status.
Michiel Broek <mbroek@mbse.eu>
parents:
291
diff
changeset
|
262 | |
349 | 263 | if (($_POST['FanDelay'] < 0) || ($_POST['FanDelay'] > 720)) |
264 | return 12; | |
265 | ||
153
866a947b732a
Added the framework for the units editor. In the dashboard the radio selector buttons are converteed to jqwidgets radiobuttons.
Michiel Broek <mbroek@mbse.eu>
parents:
140
diff
changeset
|
266 | } else { |
866a947b732a
Added the framework for the units editor. In the dashboard the radio selector buttons are converteed to jqwidgets radiobuttons.
Michiel Broek <mbroek@mbse.eu>
parents:
140
diff
changeset
|
267 | return 1; |
866a947b732a
Added the framework for the units editor. In the dashboard the radio selector buttons are converteed to jqwidgets radiobuttons.
Michiel Broek <mbroek@mbse.eu>
parents:
140
diff
changeset
|
268 | } |
866a947b732a
Added the framework for the units editor. In the dashboard the radio selector buttons are converteed to jqwidgets radiobuttons.
Michiel Broek <mbroek@mbse.eu>
parents:
140
diff
changeset
|
269 | |
866a947b732a
Added the framework for the units editor. In the dashboard the radio selector buttons are converteed to jqwidgets radiobuttons.
Michiel Broek <mbroek@mbse.eu>
parents:
140
diff
changeset
|
270 | return 0; |
866a947b732a
Added the framework for the units editor. In the dashboard the radio selector buttons are converteed to jqwidgets radiobuttons.
Michiel Broek <mbroek@mbse.eu>
parents:
140
diff
changeset
|
271 | } |
866a947b732a
Added the framework for the units editor. In the dashboard the radio selector buttons are converteed to jqwidgets radiobuttons.
Michiel Broek <mbroek@mbse.eu>
parents:
140
diff
changeset
|
272 | |
866a947b732a
Added the framework for the units editor. In the dashboard the radio selector buttons are converteed to jqwidgets radiobuttons.
Michiel Broek <mbroek@mbse.eu>
parents:
140
diff
changeset
|
273 | |
866a947b732a
Added the framework for the units editor. In the dashboard the radio selector buttons are converteed to jqwidgets radiobuttons.
Michiel Broek <mbroek@mbse.eu>
parents:
140
diff
changeset
|
274 | |
866a947b732a
Added the framework for the units editor. In the dashboard the radio selector buttons are converteed to jqwidgets radiobuttons.
Michiel Broek <mbroek@mbse.eu>
parents:
140
diff
changeset
|
275 | /* |
866a947b732a
Added the framework for the units editor. In the dashboard the radio selector buttons are converteed to jqwidgets radiobuttons.
Michiel Broek <mbroek@mbse.eu>
parents:
140
diff
changeset
|
276 | * Test result from edit screen and do next action |
866a947b732a
Added the framework for the units editor. In the dashboard the radio selector buttons are converteed to jqwidgets radiobuttons.
Michiel Broek <mbroek@mbse.eu>
parents:
140
diff
changeset
|
277 | */ |
866a947b732a
Added the framework for the units editor. In the dashboard the radio selector buttons are converteed to jqwidgets radiobuttons.
Michiel Broek <mbroek@mbse.eu>
parents:
140
diff
changeset
|
278 | function testdata() { |
866a947b732a
Added the framework for the units editor. In the dashboard the radio selector buttons are converteed to jqwidgets radiobuttons.
Michiel Broek <mbroek@mbse.eu>
parents:
140
diff
changeset
|
279 | |
866a947b732a
Added the framework for the units editor. In the dashboard the radio selector buttons are converteed to jqwidgets radiobuttons.
Michiel Broek <mbroek@mbse.eu>
parents:
140
diff
changeset
|
280 | $result = test_thedata(); |
866a947b732a
Added the framework for the units editor. In the dashboard the radio selector buttons are converteed to jqwidgets radiobuttons.
Michiel Broek <mbroek@mbse.eu>
parents:
140
diff
changeset
|
281 | $error = ''; |
866a947b732a
Added the framework for the units editor. In the dashboard the radio selector buttons are converteed to jqwidgets radiobuttons.
Michiel Broek <mbroek@mbse.eu>
parents:
140
diff
changeset
|
282 | |
866a947b732a
Added the framework for the units editor. In the dashboard the radio selector buttons are converteed to jqwidgets radiobuttons.
Michiel Broek <mbroek@mbse.eu>
parents:
140
diff
changeset
|
283 | switch ($result) { |
866a947b732a
Added the framework for the units editor. In the dashboard the radio selector buttons are converteed to jqwidgets radiobuttons.
Michiel Broek <mbroek@mbse.eu>
parents:
140
diff
changeset
|
284 | case 0: if ($_POST['command'] == 'add') { |
866a947b732a
Added the framework for the units editor. In the dashboard the radio selector buttons are converteed to jqwidgets radiobuttons.
Michiel Broek <mbroek@mbse.eu>
parents:
140
diff
changeset
|
285 | unit_add(); |
866a947b732a
Added the framework for the units editor. In the dashboard the radio selector buttons are converteed to jqwidgets radiobuttons.
Michiel Broek <mbroek@mbse.eu>
parents:
140
diff
changeset
|
286 | return; |
866a947b732a
Added the framework for the units editor. In the dashboard the radio selector buttons are converteed to jqwidgets radiobuttons.
Michiel Broek <mbroek@mbse.eu>
parents:
140
diff
changeset
|
287 | } else if ($_POST['command'] == 'update') { |
866a947b732a
Added the framework for the units editor. In the dashboard the radio selector buttons are converteed to jqwidgets radiobuttons.
Michiel Broek <mbroek@mbse.eu>
parents:
140
diff
changeset
|
288 | unit_update(); |
866a947b732a
Added the framework for the units editor. In the dashboard the radio selector buttons are converteed to jqwidgets radiobuttons.
Michiel Broek <mbroek@mbse.eu>
parents:
140
diff
changeset
|
289 | return; |
866a947b732a
Added the framework for the units editor. In the dashboard the radio selector buttons are converteed to jqwidgets radiobuttons.
Michiel Broek <mbroek@mbse.eu>
parents:
140
diff
changeset
|
290 | } |
866a947b732a
Added the framework for the units editor. In the dashboard the radio selector buttons are converteed to jqwidgets radiobuttons.
Michiel Broek <mbroek@mbse.eu>
parents:
140
diff
changeset
|
291 | break; |
866a947b732a
Added the framework for the units editor. In the dashboard the radio selector buttons are converteed to jqwidgets radiobuttons.
Michiel Broek <mbroek@mbse.eu>
parents:
140
diff
changeset
|
292 | case 1: $error = 'Missing data'; |
866a947b732a
Added the framework for the units editor. In the dashboard the radio selector buttons are converteed to jqwidgets radiobuttons.
Michiel Broek <mbroek@mbse.eu>
parents:
140
diff
changeset
|
293 | break; |
866a947b732a
Added the framework for the units editor. In the dashboard the radio selector buttons are converteed to jqwidgets radiobuttons.
Michiel Broek <mbroek@mbse.eu>
parents:
140
diff
changeset
|
294 | case 2: $error = 'The name is too short'; |
866a947b732a
Added the framework for the units editor. In the dashboard the radio selector buttons are converteed to jqwidgets radiobuttons.
Michiel Broek <mbroek@mbse.eu>
parents:
140
diff
changeset
|
295 | break; |
866a947b732a
Added the framework for the units editor. In the dashboard the radio selector buttons are converteed to jqwidgets radiobuttons.
Michiel Broek <mbroek@mbse.eu>
parents:
140
diff
changeset
|
296 | case 3: $error = 'The name is already in use, choose another one'; |
866a947b732a
Added the framework for the units editor. In the dashboard the radio selector buttons are converteed to jqwidgets radiobuttons.
Michiel Broek <mbroek@mbse.eu>
parents:
140
diff
changeset
|
297 | break; |
272
f436d826de4b
Added Heater and Cooler delay edit fields. Added more checks on entered data in the units edit screen.
Michiel Broek <mbroek@mbse.eu>
parents:
254
diff
changeset
|
298 | case 4: $error = 'Temperature Maximum cannot be smaller then Temperature Minimum'; |
f436d826de4b
Added Heater and Cooler delay edit fields. Added more checks on entered data in the units edit screen.
Michiel Broek <mbroek@mbse.eu>
parents:
254
diff
changeset
|
299 | break; |
604
e2766e538d0e
Version 0.9.7. Increased the maximum fermentation temperature to 45 degrees to allow Kveik fermentations.
Michiel Broek <mbroek@mbse.eu>
parents:
566
diff
changeset
|
300 | case 5: $error = 'Temperature Maximum must be between 25 and 45 °C'; |
272
f436d826de4b
Added Heater and Cooler delay edit fields. Added more checks on entered data in the units edit screen.
Michiel Broek <mbroek@mbse.eu>
parents:
254
diff
changeset
|
301 | break; |
f436d826de4b
Added Heater and Cooler delay edit fields. Added more checks on entered data in the units edit screen.
Michiel Broek <mbroek@mbse.eu>
parents:
254
diff
changeset
|
302 | case 6: $error = 'Temperature Minimum must be between -5 and 15 °C'; |
f436d826de4b
Added Heater and Cooler delay edit fields. Added more checks on entered data in the units edit screen.
Michiel Broek <mbroek@mbse.eu>
parents:
254
diff
changeset
|
303 | break; |
312
7b0f819a3805
Added more precision to the unit low and high black window margins. Switched to PID routine from Pid without a PhD. The PID compute routine is now in the one second loop. The switch delay times are now in seconds, 0..720.
Michiel Broek <mbroek@mbse.eu>
parents:
311
diff
changeset
|
304 | case 7: $error = 'Heater Delay must be bewteen 0 and 720 seconds'; |
272
f436d826de4b
Added Heater and Cooler delay edit fields. Added more checks on entered data in the units edit screen.
Michiel Broek <mbroek@mbse.eu>
parents:
254
diff
changeset
|
305 | break; |
312
7b0f819a3805
Added more precision to the unit low and high black window margins. Switched to PID routine from Pid without a PhD. The PID compute routine is now in the one second loop. The switch delay times are now in seconds, 0..720.
Michiel Broek <mbroek@mbse.eu>
parents:
311
diff
changeset
|
306 | case 8: $error = 'Cooler Delay must be bewteen 0 and 720 seconds'; |
272
f436d826de4b
Added Heater and Cooler delay edit fields. Added more checks on entered data in the units edit screen.
Michiel Broek <mbroek@mbse.eu>
parents:
254
diff
changeset
|
307 | break; |
362
c92651a54969
Made the client-server protocol more robust. When a change to a unit is made using the web interface, the main process is stopped during the update. Splitted the PID in two PID's, one for heating and one for cooling. Adjusted the web edit scrreen for this, but there are still rough edges. Replaced the PID code, maybe this one works better for our purpose. The simulator air temperature changes on the simulator heater and cooler, but it is not realistic at all. This is a development version, do not use in production. The version is 0.3.0
Michiel Broek <mbroek@mbse.eu>
parents:
349
diff
changeset
|
308 | case 9: $error = 'PID cool Idle Range must be between 0 en 5'; |
272
f436d826de4b
Added Heater and Cooler delay edit fields. Added more checks on entered data in the units edit screen.
Michiel Broek <mbroek@mbse.eu>
parents:
254
diff
changeset
|
309 | break; |
362
c92651a54969
Made the client-server protocol more robust. When a change to a unit is made using the web interface, the main process is stopped during the update. Splitted the PID in two PID's, one for heating and one for cooling. Adjusted the web edit scrreen for this, but there are still rough edges. Replaced the PID code, maybe this one works better for our purpose. The simulator air temperature changes on the simulator heater and cooler, but it is not realistic at all. This is a development version, do not use in production. The version is 0.3.0
Michiel Broek <mbroek@mbse.eu>
parents:
349
diff
changeset
|
310 | case 10: $error = 'PID heat Idle Range must be between 0 and 5'; |
272
f436d826de4b
Added Heater and Cooler delay edit fields. Added more checks on entered data in the units edit screen.
Michiel Broek <mbroek@mbse.eu>
parents:
254
diff
changeset
|
311 | break; |
312
7b0f819a3805
Added more precision to the unit low and high black window margins. Switched to PID routine from Pid without a PhD. The PID compute routine is now in the one second loop. The switch delay times are now in seconds, 0..720.
Michiel Broek <mbroek@mbse.eu>
parents:
311
diff
changeset
|
312 | case 11: $error = 'Light Delay must be bewteen 0 and 720 seconds'; |
306
97602274eb58
Updated to add support for lights in a fermenter unit and a Power Supply status.
Michiel Broek <mbroek@mbse.eu>
parents:
291
diff
changeset
|
313 | break; |
349 | 314 | case 12: $error = 'Fan Delay must be bewteen 0 and 720 seconds'; |
315 | break; | |
153
866a947b732a
Added the framework for the units editor. In the dashboard the radio selector buttons are converteed to jqwidgets radiobuttons.
Michiel Broek <mbroek@mbse.eu>
parents:
140
diff
changeset
|
316 | case 99: |
866a947b732a
Added the framework for the units editor. In the dashboard the radio selector buttons are converteed to jqwidgets radiobuttons.
Michiel Broek <mbroek@mbse.eu>
parents:
140
diff
changeset
|
317 | load('units.php'); |
866a947b732a
Added the framework for the units editor. In the dashboard the radio selector buttons are converteed to jqwidgets radiobuttons.
Michiel Broek <mbroek@mbse.eu>
parents:
140
diff
changeset
|
318 | break; |
866a947b732a
Added the framework for the units editor. In the dashboard the radio selector buttons are converteed to jqwidgets radiobuttons.
Michiel Broek <mbroek@mbse.eu>
parents:
140
diff
changeset
|
319 | } |
866a947b732a
Added the framework for the units editor. In the dashboard the radio selector buttons are converteed to jqwidgets radiobuttons.
Michiel Broek <mbroek@mbse.eu>
parents:
140
diff
changeset
|
320 | |
866a947b732a
Added the framework for the units editor. In the dashboard the radio selector buttons are converteed to jqwidgets radiobuttons.
Michiel Broek <mbroek@mbse.eu>
parents:
140
diff
changeset
|
321 | if ($_POST['command'] == 'add') { |
866a947b732a
Added the framework for the units editor. In the dashboard the radio selector buttons are converteed to jqwidgets radiobuttons.
Michiel Broek <mbroek@mbse.eu>
parents:
140
diff
changeset
|
322 | $heading = 'ThermFerm - Add Unit'; |
866a947b732a
Added the framework for the units editor. In the dashboard the radio selector buttons are converteed to jqwidgets radiobuttons.
Michiel Broek <mbroek@mbse.eu>
parents:
140
diff
changeset
|
323 | } else { |
866a947b732a
Added the framework for the units editor. In the dashboard the radio selector buttons are converteed to jqwidgets radiobuttons.
Michiel Broek <mbroek@mbse.eu>
parents:
140
diff
changeset
|
324 | $heading = 'ThermFerm - Edit Unit'; |
866a947b732a
Added the framework for the units editor. In the dashboard the radio selector buttons are converteed to jqwidgets radiobuttons.
Michiel Broek <mbroek@mbse.eu>
parents:
140
diff
changeset
|
325 | } |
866a947b732a
Added the framework for the units editor. In the dashboard the radio selector buttons are converteed to jqwidgets radiobuttons.
Michiel Broek <mbroek@mbse.eu>
parents:
140
diff
changeset
|
326 | |
175
b73490398368
Units editing is more or less complete. Changed structures for heating, cooling, fan and door. Updated the web interface to confuigure all these things.
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
327 | edit_screen($_POST['UUID'], $_POST['command'], $heading, $error); |
153
866a947b732a
Added the framework for the units editor. In the dashboard the radio selector buttons are converteed to jqwidgets radiobuttons.
Michiel Broek <mbroek@mbse.eu>
parents:
140
diff
changeset
|
328 | } |
866a947b732a
Added the framework for the units editor. In the dashboard the radio selector buttons are converteed to jqwidgets radiobuttons.
Michiel Broek <mbroek@mbse.eu>
parents:
140
diff
changeset
|
329 | |
866a947b732a
Added the framework for the units editor. In the dashboard the radio selector buttons are converteed to jqwidgets radiobuttons.
Michiel Broek <mbroek@mbse.eu>
parents:
140
diff
changeset
|
330 | |
134
f05601490415
Redesigned the web interface, one single app is too slow. The main dashboard will be a shiny ajax driven page, the setup pages will be simple and php only. Keep It Simple, Stupid.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
331 | |
153
866a947b732a
Added the framework for the units editor. In the dashboard the radio selector buttons are converteed to jqwidgets radiobuttons.
Michiel Broek <mbroek@mbse.eu>
parents:
140
diff
changeset
|
332 | /* |
866a947b732a
Added the framework for the units editor. In the dashboard the radio selector buttons are converteed to jqwidgets radiobuttons.
Michiel Broek <mbroek@mbse.eu>
parents:
140
diff
changeset
|
333 | * Unit edit screen. Used by unit_edit(), unit_add() and testdata() |
866a947b732a
Added the framework for the units editor. In the dashboard the radio selector buttons are converteed to jqwidgets radiobuttons.
Michiel Broek <mbroek@mbse.eu>
parents:
140
diff
changeset
|
334 | * |
866a947b732a
Added the framework for the units editor. In the dashboard the radio selector buttons are converteed to jqwidgets radiobuttons.
Michiel Broek <mbroek@mbse.eu>
parents:
140
diff
changeset
|
335 | * @param string $UUID The record UUID (fixed). |
866a947b732a
Added the framework for the units editor. In the dashboard the radio selector buttons are converteed to jqwidgets radiobuttons.
Michiel Broek <mbroek@mbse.eu>
parents:
140
diff
changeset
|
336 | * @param string $command 'add' or 'update' |
866a947b732a
Added the framework for the units editor. In the dashboard the radio selector buttons are converteed to jqwidgets radiobuttons.
Michiel Broek <mbroek@mbse.eu>
parents:
140
diff
changeset
|
337 | * @param string $heading Page heading title. |
866a947b732a
Added the framework for the units editor. In the dashboard the radio selector buttons are converteed to jqwidgets radiobuttons.
Michiel Broek <mbroek@mbse.eu>
parents:
140
diff
changeset
|
338 | * @Param string $error_message Blank or previous error. |
866a947b732a
Added the framework for the units editor. In the dashboard the radio selector buttons are converteed to jqwidgets radiobuttons.
Michiel Broek <mbroek@mbse.eu>
parents:
140
diff
changeset
|
339 | */ |
175
b73490398368
Units editing is more or less complete. Changed structures for heating, cooling, fan and door. Updated the web interface to confuigure all these things.
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
340 | function edit_screen($UUID, $command, $heading, $error_message) { |
b73490398368
Units editing is more or less complete. Changed structures for heating, cooling, fan and door. Updated the web interface to confuigure all these things.
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
341 | |
b73490398368
Units editing is more or less complete. Changed structures for heating, cooling, fan and door. Updated the web interface to confuigure all these things.
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
342 | /* |
b73490398368
Units editing is more or less complete. Changed structures for heating, cooling, fan and door. Updated the web interface to confuigure all these things.
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
343 | * Get list of devices, we need it later |
b73490398368
Units editing is more or less complete. Changed structures for heating, cooling, fan and door. Updated the web interface to confuigure all these things.
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
344 | */ |
196 | 345 | $answer = send_cmd("DEVICE LIST"); |
175
b73490398368
Units editing is more or less complete. Changed structures for heating, cooling, fan and door. Updated the web interface to confuigure all these things.
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
346 | $devices = explode("\r\n", $answer); |
b73490398368
Units editing is more or less complete. Changed structures for heating, cooling, fan and door. Updated the web interface to confuigure all these things.
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
347 | |
b73490398368
Units editing is more or less complete. Changed structures for heating, cooling, fan and door. Updated the web interface to confuigure all these things.
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
348 | /* |
b73490398368
Units editing is more or less complete. Changed structures for heating, cooling, fan and door. Updated the web interface to confuigure all these things.
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
349 | * Get current unit data |
b73490398368
Units editing is more or less complete. Changed structures for heating, cooling, fan and door. Updated the web interface to confuigure all these things.
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
350 | */ |
196 | 351 | $answer = send_cmd("UNIT GET ".$UUID); |
175
b73490398368
Units editing is more or less complete. Changed structures for heating, cooling, fan and door. Updated the web interface to confuigure all these things.
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
352 | $reply = explode("\r\n", $answer); |
153
866a947b732a
Added the framework for the units editor. In the dashboard the radio selector buttons are converteed to jqwidgets radiobuttons.
Michiel Broek <mbroek@mbse.eu>
parents:
140
diff
changeset
|
353 | |
866a947b732a
Added the framework for the units editor. In the dashboard the radio selector buttons are converteed to jqwidgets radiobuttons.
Michiel Broek <mbroek@mbse.eu>
parents:
140
diff
changeset
|
354 | $outstr = build_header($heading); |
866a947b732a
Added the framework for the units editor. In the dashboard the radio selector buttons are converteed to jqwidgets radiobuttons.
Michiel Broek <mbroek@mbse.eu>
parents:
140
diff
changeset
|
355 | $outstr .= ' <div id="errors">'.PHP_EOL; |
866a947b732a
Added the framework for the units editor. In the dashboard the radio selector buttons are converteed to jqwidgets radiobuttons.
Michiel Broek <mbroek@mbse.eu>
parents:
140
diff
changeset
|
356 | $outstr .= ' '.$error_message.PHP_EOL; |
866a947b732a
Added the framework for the units editor. In the dashboard the radio selector buttons are converteed to jqwidgets radiobuttons.
Michiel Broek <mbroek@mbse.eu>
parents:
140
diff
changeset
|
357 | $outstr .= ' </div> <!-- errors -->'.PHP_EOL; |
866a947b732a
Added the framework for the units editor. In the dashboard the radio selector buttons are converteed to jqwidgets radiobuttons.
Michiel Broek <mbroek@mbse.eu>
parents:
140
diff
changeset
|
358 | $outstr .= ' <div id="etable">'.PHP_EOL; |
866a947b732a
Added the framework for the units editor. In the dashboard the radio selector buttons are converteed to jqwidgets radiobuttons.
Michiel Broek <mbroek@mbse.eu>
parents:
140
diff
changeset
|
359 | $outstr .= ' <form method="POST" action="units.php">'.PHP_EOL; |
866a947b732a
Added the framework for the units editor. In the dashboard the radio selector buttons are converteed to jqwidgets radiobuttons.
Michiel Broek <mbroek@mbse.eu>
parents:
140
diff
changeset
|
360 | $outstr .= ' <table class="editor">'.PHP_EOL; |
175
b73490398368
Units editing is more or less complete. Changed structures for heating, cooling, fan and door. Updated the web interface to confuigure all these things.
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
361 | |
b73490398368
Units editing is more or less complete. Changed structures for heating, cooling, fan and door. Updated the web interface to confuigure all these things.
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
362 | if (startsWith($reply[0], "213")) { |
b73490398368
Units editing is more or less complete. Changed structures for heating, cooling, fan and door. Updated the web interface to confuigure all these things.
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
363 | $i = 1; |
b73490398368
Units editing is more or less complete. Changed structures for heating, cooling, fan and door. Updated the web interface to confuigure all these things.
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
364 | while (1) { |
b73490398368
Units editing is more or less complete. Changed structures for heating, cooling, fan and door. Updated the web interface to confuigure all these things.
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
365 | if (strcmp($reply[$i], ".") == 0) |
b73490398368
Units editing is more or less complete. Changed structures for heating, cooling, fan and door. Updated the web interface to confuigure all these things.
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
366 | break; |
b73490398368
Units editing is more or less complete. Changed structures for heating, cooling, fan and door. Updated the web interface to confuigure all these things.
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
367 | $f = explode(",", $reply[$i]); |
b73490398368
Units editing is more or less complete. Changed structures for heating, cooling, fan and door. Updated the web interface to confuigure all these things.
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
368 | |
554
ab9f22ab57b5
Versie 0.8.5. Implementatie product code en product naam. Implementatie DLOG MQTT berichten. Verminderde server rotocol debug berichten.
Michiel Broek <mbroek@mbse.eu>
parents:
518
diff
changeset
|
369 | if ($f[0] == "PRODUCT_CODE") { |
ab9f22ab57b5
Versie 0.8.5. Implementatie product code en product naam. Implementatie DLOG MQTT berichten. Verminderde server rotocol debug berichten.
Michiel Broek <mbroek@mbse.eu>
parents:
518
diff
changeset
|
370 | $outstr .= ' <tr class="editor">'.PHP_EOL; |
ab9f22ab57b5
Versie 0.8.5. Implementatie product code en product naam. Implementatie DLOG MQTT berichten. Verminderde server rotocol debug berichten.
Michiel Broek <mbroek@mbse.eu>
parents:
518
diff
changeset
|
371 | $outstr .= ' <td class="editname">Product Code</td>'.PHP_EOL; |
ab9f22ab57b5
Versie 0.8.5. Implementatie product code en product naam. Implementatie DLOG MQTT berichten. Verminderde server rotocol debug berichten.
Michiel Broek <mbroek@mbse.eu>
parents:
518
diff
changeset
|
372 | $outstr .= ' <td colspan="3" class="editfield"><input type="text" name="ProductCode" size="32" value="'.$f[1].'"></td>'.PHP_EOL; |
175
b73490398368
Units editing is more or less complete. Changed structures for heating, cooling, fan and door. Updated the web interface to confuigure all these things.
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
373 | $outstr .= ' </tr>'.PHP_EOL; |
b73490398368
Units editing is more or less complete. Changed structures for heating, cooling, fan and door. Updated the web interface to confuigure all these things.
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
374 | } |
554
ab9f22ab57b5
Versie 0.8.5. Implementatie product code en product naam. Implementatie DLOG MQTT berichten. Verminderde server rotocol debug berichten.
Michiel Broek <mbroek@mbse.eu>
parents:
518
diff
changeset
|
375 | |
ab9f22ab57b5
Versie 0.8.5. Implementatie product code en product naam. Implementatie DLOG MQTT berichten. Verminderde server rotocol debug berichten.
Michiel Broek <mbroek@mbse.eu>
parents:
518
diff
changeset
|
376 | if ($f[0] == "PRODUCT_NAME") { |
ab9f22ab57b5
Versie 0.8.5. Implementatie product code en product naam. Implementatie DLOG MQTT berichten. Verminderde server rotocol debug berichten.
Michiel Broek <mbroek@mbse.eu>
parents:
518
diff
changeset
|
377 | $outstr .= ' <tr class="editor">'.PHP_EOL; |
ab9f22ab57b5
Versie 0.8.5. Implementatie product code en product naam. Implementatie DLOG MQTT berichten. Verminderde server rotocol debug berichten.
Michiel Broek <mbroek@mbse.eu>
parents:
518
diff
changeset
|
378 | $outstr .= ' <td class="editname">Product Name</td>'.PHP_EOL; |
ab9f22ab57b5
Versie 0.8.5. Implementatie product code en product naam. Implementatie DLOG MQTT berichten. Verminderde server rotocol debug berichten.
Michiel Broek <mbroek@mbse.eu>
parents:
518
diff
changeset
|
379 | $outstr .= ' <td colspan="3" class="editfield"><input type="text" name="ProductName" size="50" value="'.$f[1].'"></td>'.PHP_EOL; |
ab9f22ab57b5
Versie 0.8.5. Implementatie product code en product naam. Implementatie DLOG MQTT berichten. Verminderde server rotocol debug berichten.
Michiel Broek <mbroek@mbse.eu>
parents:
518
diff
changeset
|
380 | $outstr .= ' </tr>'.PHP_EOL; |
ab9f22ab57b5
Versie 0.8.5. Implementatie product code en product naam. Implementatie DLOG MQTT berichten. Verminderde server rotocol debug berichten.
Michiel Broek <mbroek@mbse.eu>
parents:
518
diff
changeset
|
381 | } |
ab9f22ab57b5
Versie 0.8.5. Implementatie product code en product naam. Implementatie DLOG MQTT berichten. Verminderde server rotocol debug berichten.
Michiel Broek <mbroek@mbse.eu>
parents:
518
diff
changeset
|
382 | |
564
3fc61dd28656
Versie 0.8.8 Fermentation stage implemented in units.
Michiel Broek <mbroek@mbse.eu>
parents:
554
diff
changeset
|
383 | if ($f[0] == "STAGE") { |
3fc61dd28656
Versie 0.8.8 Fermentation stage implemented in units.
Michiel Broek <mbroek@mbse.eu>
parents:
554
diff
changeset
|
384 | $outstr .= ' <tr class="editor">'.PHP_EOL; |
3fc61dd28656
Versie 0.8.8 Fermentation stage implemented in units.
Michiel Broek <mbroek@mbse.eu>
parents:
554
diff
changeset
|
385 | $outstr .= ' <td class="editname">Fermentation</td>'.PHP_EOL; |
3fc61dd28656
Versie 0.8.8 Fermentation stage implemented in units.
Michiel Broek <mbroek@mbse.eu>
parents:
554
diff
changeset
|
386 | $outstr .= ' <td class="editfield"><select name="Stage">'.PHP_EOL; |
3fc61dd28656
Versie 0.8.8 Fermentation stage implemented in units.
Michiel Broek <mbroek@mbse.eu>
parents:
554
diff
changeset
|
387 | ($f[1] == "PRIMARY") ? $se = " selected" : $se = ""; |
3fc61dd28656
Versie 0.8.8 Fermentation stage implemented in units.
Michiel Broek <mbroek@mbse.eu>
parents:
554
diff
changeset
|
388 | $outstr .= ' <option value="PRIMARY"'.$se.'>Primary</option>'.PHP_EOL; |
3fc61dd28656
Versie 0.8.8 Fermentation stage implemented in units.
Michiel Broek <mbroek@mbse.eu>
parents:
554
diff
changeset
|
389 | ($f[1] == "SECONDARY") ? $se = " selected" : $se = ""; |
3fc61dd28656
Versie 0.8.8 Fermentation stage implemented in units.
Michiel Broek <mbroek@mbse.eu>
parents:
554
diff
changeset
|
390 | $outstr .= ' <option value="SECONDARY"'.$se.'>Secondary</option>'.PHP_EOL; |
3fc61dd28656
Versie 0.8.8 Fermentation stage implemented in units.
Michiel Broek <mbroek@mbse.eu>
parents:
554
diff
changeset
|
391 | ($f[1] == "TERTIARY") ? $se = " selected" : $se = ""; |
3fc61dd28656
Versie 0.8.8 Fermentation stage implemented in units.
Michiel Broek <mbroek@mbse.eu>
parents:
554
diff
changeset
|
392 | $outstr .= ' <option value="TERTIARY"'.$se.'>Tertiary</option>'.PHP_EOL; |
566 | 393 | ($f[1] == "CARBONATION") ? $se = " selected" : $se = ""; |
394 | $outstr .= ' <option value="CARBONATION"'.$se.'>Carbonation</option>'.PHP_EOL; | |
564
3fc61dd28656
Versie 0.8.8 Fermentation stage implemented in units.
Michiel Broek <mbroek@mbse.eu>
parents:
554
diff
changeset
|
395 | $outstr .= ' </select></td>'.PHP_EOL; |
3fc61dd28656
Versie 0.8.8 Fermentation stage implemented in units.
Michiel Broek <mbroek@mbse.eu>
parents:
554
diff
changeset
|
396 | } |
3fc61dd28656
Versie 0.8.8 Fermentation stage implemented in units.
Michiel Broek <mbroek@mbse.eu>
parents:
554
diff
changeset
|
397 | |
175
b73490398368
Units editing is more or less complete. Changed structures for heating, cooling, fan and door. Updated the web interface to confuigure all these things.
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
398 | if ($f[0] == "VOLUME") { |
b73490398368
Units editing is more or less complete. Changed structures for heating, cooling, fan and door. Updated the web interface to confuigure all these things.
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
399 | $outstr .= ' <td class="editname">Unit Volume</td>'.PHP_EOL; |
564
3fc61dd28656
Versie 0.8.8 Fermentation stage implemented in units.
Michiel Broek <mbroek@mbse.eu>
parents:
554
diff
changeset
|
400 | $outstr .= ' <td class="editfield"><input type="text" name="Volume" size="5" value="'.$f[1].'"></td>'.PHP_EOL; |
175
b73490398368
Units editing is more or less complete. Changed structures for heating, cooling, fan and door. Updated the web interface to confuigure all these things.
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
401 | $outstr .= ' </tr>'.PHP_EOL; |
b73490398368
Units editing is more or less complete. Changed structures for heating, cooling, fan and door. Updated the web interface to confuigure all these things.
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
402 | } |
554
ab9f22ab57b5
Versie 0.8.5. Implementatie product code en product naam. Implementatie DLOG MQTT berichten. Verminderde server rotocol debug berichten.
Michiel Broek <mbroek@mbse.eu>
parents:
518
diff
changeset
|
403 | |
175
b73490398368
Units editing is more or less complete. Changed structures for heating, cooling, fan and door. Updated the web interface to confuigure all these things.
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
404 | if ($f[0] == "AIR_ADDRESS") { |
b73490398368
Units editing is more or less complete. Changed structures for heating, cooling, fan and door. Updated the web interface to confuigure all these things.
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
405 | $outstr .= ' <tr class="editor">'.PHP_EOL; |
b73490398368
Units editing is more or less complete. Changed structures for heating, cooling, fan and door. Updated the web interface to confuigure all these things.
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
406 | $outstr .= ' <td class="editname">Air Sensor Address</td>'.PHP_EOL; |
b73490398368
Units editing is more or less complete. Changed structures for heating, cooling, fan and door. Updated the web interface to confuigure all these things.
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
407 | $outstr .= ' <td class="editfield"><select name="AirAddress">'.PHP_EOL; |
b73490398368
Units editing is more or less complete. Changed structures for heating, cooling, fan and door. Updated the web interface to confuigure all these things.
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
408 | $outstr .= ' <option value="">Not Assigned</option>'.PHP_EOL; |
b73490398368
Units editing is more or less complete. Changed structures for heating, cooling, fan and door. Updated the web interface to confuigure all these things.
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
409 | if (startsWith($devices[0], "212")) { |
b73490398368
Units editing is more or less complete. Changed structures for heating, cooling, fan and door. Updated the web interface to confuigure all these things.
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
410 | $j = 1; |
b73490398368
Units editing is more or less complete. Changed structures for heating, cooling, fan and door. Updated the web interface to confuigure all these things.
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
411 | while (1) { |
b73490398368
Units editing is more or less complete. Changed structures for heating, cooling, fan and door. Updated the web interface to confuigure all these things.
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
412 | if (strcmp($devices[$j], ".") == 0) |
b73490398368
Units editing is more or less complete. Changed structures for heating, cooling, fan and door. Updated the web interface to confuigure all these things.
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
413 | break; |
b73490398368
Units editing is more or less complete. Changed structures for heating, cooling, fan and door. Updated the web interface to confuigure all these things.
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
414 | $g = explode(",", $devices[$j]); |
b73490398368
Units editing is more or less complete. Changed structures for heating, cooling, fan and door. Updated the web interface to confuigure all these things.
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
415 | if ($g[5] == "IN_ANALOG") { |
b73490398368
Units editing is more or less complete. Changed structures for heating, cooling, fan and door. Updated the web interface to confuigure all these things.
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
416 | ($f[1] == $g[0]) ? $se = " selected" : $se = ""; |
b73490398368
Units editing is more or less complete. Changed structures for heating, cooling, fan and door. Updated the web interface to confuigure all these things.
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
417 | $outstr .= ' <option value="'.$g[0].'"'.$se.'>'.$g[1].' '.$g[4].'</option>'.PHP_EOL; |
b73490398368
Units editing is more or less complete. Changed structures for heating, cooling, fan and door. Updated the web interface to confuigure all these things.
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
418 | } |
b73490398368
Units editing is more or less complete. Changed structures for heating, cooling, fan and door. Updated the web interface to confuigure all these things.
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
419 | $j++; |
b73490398368
Units editing is more or less complete. Changed structures for heating, cooling, fan and door. Updated the web interface to confuigure all these things.
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
420 | } |
b73490398368
Units editing is more or less complete. Changed structures for heating, cooling, fan and door. Updated the web interface to confuigure all these things.
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
421 | } |
b73490398368
Units editing is more or less complete. Changed structures for heating, cooling, fan and door. Updated the web interface to confuigure all these things.
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
422 | $outstr .= ' </select></td>'.PHP_EOL; |
b73490398368
Units editing is more or less complete. Changed structures for heating, cooling, fan and door. Updated the web interface to confuigure all these things.
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
423 | } |
513
a2732027afb3
Version 0.6.1 added support for domoticz mqtt sensors.
Michiel Broek <mbroek@mbse.eu>
parents:
397
diff
changeset
|
424 | if ($f[0] == "AIR_IDX") { |
a2732027afb3
Version 0.6.1 added support for domoticz mqtt sensors.
Michiel Broek <mbroek@mbse.eu>
parents:
397
diff
changeset
|
425 | $outstr .= ' <td class="editname">Air domoticz idx</td>'.PHP_EOL; |
a2732027afb3
Version 0.6.1 added support for domoticz mqtt sensors.
Michiel Broek <mbroek@mbse.eu>
parents:
397
diff
changeset
|
426 | $outstr .= ' <td class="editfield"><input type="text" name="AirIdx" size="5" value="'.$f[1].'"></td>'.PHP_EOL; |
a2732027afb3
Version 0.6.1 added support for domoticz mqtt sensors.
Michiel Broek <mbroek@mbse.eu>
parents:
397
diff
changeset
|
427 | $outstr .= ' </tr>'.PHP_EOL; |
a2732027afb3
Version 0.6.1 added support for domoticz mqtt sensors.
Michiel Broek <mbroek@mbse.eu>
parents:
397
diff
changeset
|
428 | } |
554
ab9f22ab57b5
Versie 0.8.5. Implementatie product code en product naam. Implementatie DLOG MQTT berichten. Verminderde server rotocol debug berichten.
Michiel Broek <mbroek@mbse.eu>
parents:
518
diff
changeset
|
429 | |
175
b73490398368
Units editing is more or less complete. Changed structures for heating, cooling, fan and door. Updated the web interface to confuigure all these things.
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
430 | if ($f[0] == "BEER_ADDRESS") { |
b73490398368
Units editing is more or less complete. Changed structures for heating, cooling, fan and door. Updated the web interface to confuigure all these things.
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
431 | $outstr .= ' <tr class="editor">'.PHP_EOL; |
b73490398368
Units editing is more or less complete. Changed structures for heating, cooling, fan and door. Updated the web interface to confuigure all these things.
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
432 | $outstr .= ' <td class="editname">Beer Sensor Address</td>'.PHP_EOL; |
b73490398368
Units editing is more or less complete. Changed structures for heating, cooling, fan and door. Updated the web interface to confuigure all these things.
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
433 | $outstr .= ' <td class="editfield"><select name="BeerAddress">'.PHP_EOL; |
b73490398368
Units editing is more or less complete. Changed structures for heating, cooling, fan and door. Updated the web interface to confuigure all these things.
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
434 | $outstr .= ' <option value="">Not Assigned</option>'.PHP_EOL; |
b73490398368
Units editing is more or less complete. Changed structures for heating, cooling, fan and door. Updated the web interface to confuigure all these things.
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
435 | if (startsWith($devices[0], "212")) { |
b73490398368
Units editing is more or less complete. Changed structures for heating, cooling, fan and door. Updated the web interface to confuigure all these things.
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
436 | $j = 1; |
b73490398368
Units editing is more or less complete. Changed structures for heating, cooling, fan and door. Updated the web interface to confuigure all these things.
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
437 | while (1) { |
b73490398368
Units editing is more or less complete. Changed structures for heating, cooling, fan and door. Updated the web interface to confuigure all these things.
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
438 | if (strcmp($devices[$j], ".") == 0) |
b73490398368
Units editing is more or less complete. Changed structures for heating, cooling, fan and door. Updated the web interface to confuigure all these things.
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
439 | break; |
b73490398368
Units editing is more or less complete. Changed structures for heating, cooling, fan and door. Updated the web interface to confuigure all these things.
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
440 | $g = explode(",", $devices[$j]); |
b73490398368
Units editing is more or less complete. Changed structures for heating, cooling, fan and door. Updated the web interface to confuigure all these things.
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
441 | if ($g[5] == "IN_ANALOG") { |
b73490398368
Units editing is more or less complete. Changed structures for heating, cooling, fan and door. Updated the web interface to confuigure all these things.
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
442 | ($f[1] == $g[0]) ? $se = " selected" : $se = ""; |
b73490398368
Units editing is more or less complete. Changed structures for heating, cooling, fan and door. Updated the web interface to confuigure all these things.
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
443 | $outstr .= ' <option value="'.$g[0].'"'.$se.'>'.$g[1].' '.$g[4].'</option>'.PHP_EOL; |
b73490398368
Units editing is more or less complete. Changed structures for heating, cooling, fan and door. Updated the web interface to confuigure all these things.
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
444 | } |
b73490398368
Units editing is more or less complete. Changed structures for heating, cooling, fan and door. Updated the web interface to confuigure all these things.
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
445 | $j++; |
b73490398368
Units editing is more or less complete. Changed structures for heating, cooling, fan and door. Updated the web interface to confuigure all these things.
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
446 | } |
b73490398368
Units editing is more or less complete. Changed structures for heating, cooling, fan and door. Updated the web interface to confuigure all these things.
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
447 | } |
b73490398368
Units editing is more or less complete. Changed structures for heating, cooling, fan and door. Updated the web interface to confuigure all these things.
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
448 | $outstr .= ' </select></td>'.PHP_EOL; |
b73490398368
Units editing is more or less complete. Changed structures for heating, cooling, fan and door. Updated the web interface to confuigure all these things.
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
449 | } |
513
a2732027afb3
Version 0.6.1 added support for domoticz mqtt sensors.
Michiel Broek <mbroek@mbse.eu>
parents:
397
diff
changeset
|
450 | if ($f[0] == "BEER_IDX") { |
a2732027afb3
Version 0.6.1 added support for domoticz mqtt sensors.
Michiel Broek <mbroek@mbse.eu>
parents:
397
diff
changeset
|
451 | $outstr .= ' <td class="editname">Beer domoticz idx</td>'.PHP_EOL; |
a2732027afb3
Version 0.6.1 added support for domoticz mqtt sensors.
Michiel Broek <mbroek@mbse.eu>
parents:
397
diff
changeset
|
452 | $outstr .= ' <td class="editfield"><input type="text" name="BeerIdx" size="5" value="'.$f[1].'"></td>'.PHP_EOL; |
a2732027afb3
Version 0.6.1 added support for domoticz mqtt sensors.
Michiel Broek <mbroek@mbse.eu>
parents:
397
diff
changeset
|
453 | $outstr .= ' </tr>'.PHP_EOL; |
a2732027afb3
Version 0.6.1 added support for domoticz mqtt sensors.
Michiel Broek <mbroek@mbse.eu>
parents:
397
diff
changeset
|
454 | } |
614
389097dc665d
Version 0.9.11. Removed lcd debug message after 7 years. Added setup for alternative beer sensor. If the main sensor is gone, the alternative will be used.
Michiel Broek <mbroek@mbse.eu>
parents:
604
diff
changeset
|
455 | if ($f[0] == "BEER_ADDRESS2") { |
389097dc665d
Version 0.9.11. Removed lcd debug message after 7 years. Added setup for alternative beer sensor. If the main sensor is gone, the alternative will be used.
Michiel Broek <mbroek@mbse.eu>
parents:
604
diff
changeset
|
456 | $outstr .= ' <tr class="editor">'.PHP_EOL; |
389097dc665d
Version 0.9.11. Removed lcd debug message after 7 years. Added setup for alternative beer sensor. If the main sensor is gone, the alternative will be used.
Michiel Broek <mbroek@mbse.eu>
parents:
604
diff
changeset
|
457 | $outstr .= ' <td class="editname">Beer Sensor Address (alt)</td>'.PHP_EOL; |
389097dc665d
Version 0.9.11. Removed lcd debug message after 7 years. Added setup for alternative beer sensor. If the main sensor is gone, the alternative will be used.
Michiel Broek <mbroek@mbse.eu>
parents:
604
diff
changeset
|
458 | $outstr .= ' <td colspan="3" class="editfield"><select name="BeerAddress2">'.PHP_EOL; |
389097dc665d
Version 0.9.11. Removed lcd debug message after 7 years. Added setup for alternative beer sensor. If the main sensor is gone, the alternative will be used.
Michiel Broek <mbroek@mbse.eu>
parents:
604
diff
changeset
|
459 | $outstr .= ' <option value="">Not Assigned</option>'.PHP_EOL; |
389097dc665d
Version 0.9.11. Removed lcd debug message after 7 years. Added setup for alternative beer sensor. If the main sensor is gone, the alternative will be used.
Michiel Broek <mbroek@mbse.eu>
parents:
604
diff
changeset
|
460 | if (startsWith($devices[0], "212")) { |
389097dc665d
Version 0.9.11. Removed lcd debug message after 7 years. Added setup for alternative beer sensor. If the main sensor is gone, the alternative will be used.
Michiel Broek <mbroek@mbse.eu>
parents:
604
diff
changeset
|
461 | $j = 1; |
389097dc665d
Version 0.9.11. Removed lcd debug message after 7 years. Added setup for alternative beer sensor. If the main sensor is gone, the alternative will be used.
Michiel Broek <mbroek@mbse.eu>
parents:
604
diff
changeset
|
462 | while (1) { |
389097dc665d
Version 0.9.11. Removed lcd debug message after 7 years. Added setup for alternative beer sensor. If the main sensor is gone, the alternative will be used.
Michiel Broek <mbroek@mbse.eu>
parents:
604
diff
changeset
|
463 | if (strcmp($devices[$j], ".") == 0) |
389097dc665d
Version 0.9.11. Removed lcd debug message after 7 years. Added setup for alternative beer sensor. If the main sensor is gone, the alternative will be used.
Michiel Broek <mbroek@mbse.eu>
parents:
604
diff
changeset
|
464 | break; |
389097dc665d
Version 0.9.11. Removed lcd debug message after 7 years. Added setup for alternative beer sensor. If the main sensor is gone, the alternative will be used.
Michiel Broek <mbroek@mbse.eu>
parents:
604
diff
changeset
|
465 | $g = explode(",", $devices[$j]); |
389097dc665d
Version 0.9.11. Removed lcd debug message after 7 years. Added setup for alternative beer sensor. If the main sensor is gone, the alternative will be used.
Michiel Broek <mbroek@mbse.eu>
parents:
604
diff
changeset
|
466 | if ($g[5] == "IN_ANALOG") { |
389097dc665d
Version 0.9.11. Removed lcd debug message after 7 years. Added setup for alternative beer sensor. If the main sensor is gone, the alternative will be used.
Michiel Broek <mbroek@mbse.eu>
parents:
604
diff
changeset
|
467 | ($f[1] == $g[0]) ? $se = " selected" : $se = ""; |
389097dc665d
Version 0.9.11. Removed lcd debug message after 7 years. Added setup for alternative beer sensor. If the main sensor is gone, the alternative will be used.
Michiel Broek <mbroek@mbse.eu>
parents:
604
diff
changeset
|
468 | $outstr .= ' <option value="'.$g[0].'"'.$se.'>'.$g[1].' '.$g[4].'</option>'.PHP_EOL; |
389097dc665d
Version 0.9.11. Removed lcd debug message after 7 years. Added setup for alternative beer sensor. If the main sensor is gone, the alternative will be used.
Michiel Broek <mbroek@mbse.eu>
parents:
604
diff
changeset
|
469 | } |
389097dc665d
Version 0.9.11. Removed lcd debug message after 7 years. Added setup for alternative beer sensor. If the main sensor is gone, the alternative will be used.
Michiel Broek <mbroek@mbse.eu>
parents:
604
diff
changeset
|
470 | $j++; |
389097dc665d
Version 0.9.11. Removed lcd debug message after 7 years. Added setup for alternative beer sensor. If the main sensor is gone, the alternative will be used.
Michiel Broek <mbroek@mbse.eu>
parents:
604
diff
changeset
|
471 | } |
389097dc665d
Version 0.9.11. Removed lcd debug message after 7 years. Added setup for alternative beer sensor. If the main sensor is gone, the alternative will be used.
Michiel Broek <mbroek@mbse.eu>
parents:
604
diff
changeset
|
472 | } |
389097dc665d
Version 0.9.11. Removed lcd debug message after 7 years. Added setup for alternative beer sensor. If the main sensor is gone, the alternative will be used.
Michiel Broek <mbroek@mbse.eu>
parents:
604
diff
changeset
|
473 | $outstr .= ' </select></td></tr>'.PHP_EOL; |
389097dc665d
Version 0.9.11. Removed lcd debug message after 7 years. Added setup for alternative beer sensor. If the main sensor is gone, the alternative will be used.
Michiel Broek <mbroek@mbse.eu>
parents:
604
diff
changeset
|
474 | } |
554
ab9f22ab57b5
Versie 0.8.5. Implementatie product code en product naam. Implementatie DLOG MQTT berichten. Verminderde server rotocol debug berichten.
Michiel Broek <mbroek@mbse.eu>
parents:
518
diff
changeset
|
475 | |
518
fd36bedab944
Added chiller configuration items
Michiel Broek <mbroek@mbse.eu>
parents:
513
diff
changeset
|
476 | if ($f[0] == "CHILLER_ADDRESS") { |
fd36bedab944
Added chiller configuration items
Michiel Broek <mbroek@mbse.eu>
parents:
513
diff
changeset
|
477 | $outstr .= ' <tr class="editor">'.PHP_EOL; |
fd36bedab944
Added chiller configuration items
Michiel Broek <mbroek@mbse.eu>
parents:
513
diff
changeset
|
478 | $outstr .= ' <td class="editname">Chiller Sensor Address</td>'.PHP_EOL; |
fd36bedab944
Added chiller configuration items
Michiel Broek <mbroek@mbse.eu>
parents:
513
diff
changeset
|
479 | $outstr .= ' <td class="editfield"><select name="ChillerAddress">'.PHP_EOL; |
fd36bedab944
Added chiller configuration items
Michiel Broek <mbroek@mbse.eu>
parents:
513
diff
changeset
|
480 | $outstr .= ' <option value="">Not Assigned</option>'.PHP_EOL; |
fd36bedab944
Added chiller configuration items
Michiel Broek <mbroek@mbse.eu>
parents:
513
diff
changeset
|
481 | if (startsWith($devices[0], "212")) { |
fd36bedab944
Added chiller configuration items
Michiel Broek <mbroek@mbse.eu>
parents:
513
diff
changeset
|
482 | $j = 1; |
fd36bedab944
Added chiller configuration items
Michiel Broek <mbroek@mbse.eu>
parents:
513
diff
changeset
|
483 | while (1) { |
fd36bedab944
Added chiller configuration items
Michiel Broek <mbroek@mbse.eu>
parents:
513
diff
changeset
|
484 | if (strcmp($devices[$j], ".") == 0) |
fd36bedab944
Added chiller configuration items
Michiel Broek <mbroek@mbse.eu>
parents:
513
diff
changeset
|
485 | break; |
fd36bedab944
Added chiller configuration items
Michiel Broek <mbroek@mbse.eu>
parents:
513
diff
changeset
|
486 | $g = explode(",", $devices[$j]); |
fd36bedab944
Added chiller configuration items
Michiel Broek <mbroek@mbse.eu>
parents:
513
diff
changeset
|
487 | if ($g[5] == "IN_ANALOG") { |
fd36bedab944
Added chiller configuration items
Michiel Broek <mbroek@mbse.eu>
parents:
513
diff
changeset
|
488 | ($f[1] == $g[0]) ? $se = " selected" : $se = ""; |
fd36bedab944
Added chiller configuration items
Michiel Broek <mbroek@mbse.eu>
parents:
513
diff
changeset
|
489 | $outstr .= ' <option value="'.$g[0].'"'.$se.'>'.$g[1].' '.$g[4].'</option>'.PHP_EOL; |
fd36bedab944
Added chiller configuration items
Michiel Broek <mbroek@mbse.eu>
parents:
513
diff
changeset
|
490 | } |
fd36bedab944
Added chiller configuration items
Michiel Broek <mbroek@mbse.eu>
parents:
513
diff
changeset
|
491 | $j++; |
fd36bedab944
Added chiller configuration items
Michiel Broek <mbroek@mbse.eu>
parents:
513
diff
changeset
|
492 | } |
fd36bedab944
Added chiller configuration items
Michiel Broek <mbroek@mbse.eu>
parents:
513
diff
changeset
|
493 | } |
fd36bedab944
Added chiller configuration items
Michiel Broek <mbroek@mbse.eu>
parents:
513
diff
changeset
|
494 | $outstr .= ' </select></td>'.PHP_EOL; |
fd36bedab944
Added chiller configuration items
Michiel Broek <mbroek@mbse.eu>
parents:
513
diff
changeset
|
495 | } |
fd36bedab944
Added chiller configuration items
Michiel Broek <mbroek@mbse.eu>
parents:
513
diff
changeset
|
496 | if ($f[0] == "CHILLER_IDX") { |
fd36bedab944
Added chiller configuration items
Michiel Broek <mbroek@mbse.eu>
parents:
513
diff
changeset
|
497 | $outstr .= ' <td class="editname">Chiller domoticz idx</td>'.PHP_EOL; |
fd36bedab944
Added chiller configuration items
Michiel Broek <mbroek@mbse.eu>
parents:
513
diff
changeset
|
498 | $outstr .= ' <td class="editfield"><input type="text" name="ChillerIdx" size="5" value="'.$f[1].'"></td>'.PHP_EOL; |
fd36bedab944
Added chiller configuration items
Michiel Broek <mbroek@mbse.eu>
parents:
513
diff
changeset
|
499 | $outstr .= ' </tr>'.PHP_EOL; |
fd36bedab944
Added chiller configuration items
Michiel Broek <mbroek@mbse.eu>
parents:
513
diff
changeset
|
500 | } |
554
ab9f22ab57b5
Versie 0.8.5. Implementatie product code en product naam. Implementatie DLOG MQTT berichten. Verminderde server rotocol debug berichten.
Michiel Broek <mbroek@mbse.eu>
parents:
518
diff
changeset
|
501 | |
175
b73490398368
Units editing is more or less complete. Changed structures for heating, cooling, fan and door. Updated the web interface to confuigure all these things.
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
502 | if ($f[0] == "HEATER_ADDRESS") { |
b73490398368
Units editing is more or less complete. Changed structures for heating, cooling, fan and door. Updated the web interface to confuigure all these things.
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
503 | $outstr .= ' <tr class="editor">'.PHP_EOL; |
b73490398368
Units editing is more or less complete. Changed structures for heating, cooling, fan and door. Updated the web interface to confuigure all these things.
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
504 | $outstr .= ' <td class="editname">Heater Switch Address</td>'.PHP_EOL; |
b73490398368
Units editing is more or less complete. Changed structures for heating, cooling, fan and door. Updated the web interface to confuigure all these things.
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
505 | $outstr .= ' <td class="editfield"><select name="HeaterAddress">'.PHP_EOL; |
b73490398368
Units editing is more or less complete. Changed structures for heating, cooling, fan and door. Updated the web interface to confuigure all these things.
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
506 | $outstr .= ' <option value="">Not Assigned</option>'.PHP_EOL; |
b73490398368
Units editing is more or less complete. Changed structures for heating, cooling, fan and door. Updated the web interface to confuigure all these things.
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
507 | if (startsWith($devices[0], "212")) { |
b73490398368
Units editing is more or less complete. Changed structures for heating, cooling, fan and door. Updated the web interface to confuigure all these things.
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
508 | $j = 1; |
b73490398368
Units editing is more or less complete. Changed structures for heating, cooling, fan and door. Updated the web interface to confuigure all these things.
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
509 | while (1) { |
b73490398368
Units editing is more or less complete. Changed structures for heating, cooling, fan and door. Updated the web interface to confuigure all these things.
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
510 | if (strcmp($devices[$j], ".") == 0) |
b73490398368
Units editing is more or less complete. Changed structures for heating, cooling, fan and door. Updated the web interface to confuigure all these things.
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
511 | break; |
b73490398368
Units editing is more or less complete. Changed structures for heating, cooling, fan and door. Updated the web interface to confuigure all these things.
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
512 | $g = explode(",", $devices[$j]); |
b73490398368
Units editing is more or less complete. Changed structures for heating, cooling, fan and door. Updated the web interface to confuigure all these things.
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
513 | if (($g[5] == "OUT_ANALOG") || ($g[5] == "OUT_BIN")) { |
b73490398368
Units editing is more or less complete. Changed structures for heating, cooling, fan and door. Updated the web interface to confuigure all these things.
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
514 | ($f[1] == $g[0]) ? $se = " selected" : $se = ""; |
b73490398368
Units editing is more or less complete. Changed structures for heating, cooling, fan and door. Updated the web interface to confuigure all these things.
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
515 | $outstr .= ' <option value="'.$g[0].'"'.$se.'>'.$g[1].' '.$g[4].'</option>'.PHP_EOL; |
b73490398368
Units editing is more or less complete. Changed structures for heating, cooling, fan and door. Updated the web interface to confuigure all these things.
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
516 | } |
b73490398368
Units editing is more or less complete. Changed structures for heating, cooling, fan and door. Updated the web interface to confuigure all these things.
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
517 | $j++; |
b73490398368
Units editing is more or less complete. Changed structures for heating, cooling, fan and door. Updated the web interface to confuigure all these things.
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
518 | } |
b73490398368
Units editing is more or less complete. Changed structures for heating, cooling, fan and door. Updated the web interface to confuigure all these things.
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
519 | } |
b73490398368
Units editing is more or less complete. Changed structures for heating, cooling, fan and door. Updated the web interface to confuigure all these things.
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
520 | $outstr .= ' </select></td>'.PHP_EOL; |
b73490398368
Units editing is more or less complete. Changed structures for heating, cooling, fan and door. Updated the web interface to confuigure all these things.
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
521 | } |
272
f436d826de4b
Added Heater and Cooler delay edit fields. Added more checks on entered data in the units edit screen.
Michiel Broek <mbroek@mbse.eu>
parents:
254
diff
changeset
|
522 | if ($f[0] == "HEATER_DELAY") { |
f436d826de4b
Added Heater and Cooler delay edit fields. Added more checks on entered data in the units edit screen.
Michiel Broek <mbroek@mbse.eu>
parents:
254
diff
changeset
|
523 | $outstr .= ' <td class="editname">Heater Switch Delay</td>'.PHP_EOL; |
312
7b0f819a3805
Added more precision to the unit low and high black window margins. Switched to PID routine from Pid without a PhD. The PID compute routine is now in the one second loop. The switch delay times are now in seconds, 0..720.
Michiel Broek <mbroek@mbse.eu>
parents:
311
diff
changeset
|
524 | $outstr .= ' <td class="editfield"><input type="text" name="HeaterDelay" size="5" value="'.$f[1].'"> seconds (0..720)</td>'.PHP_EOL; |
272
f436d826de4b
Added Heater and Cooler delay edit fields. Added more checks on entered data in the units edit screen.
Michiel Broek <mbroek@mbse.eu>
parents:
254
diff
changeset
|
525 | $outstr .= ' </tr>'.PHP_EOL; |
f436d826de4b
Added Heater and Cooler delay edit fields. Added more checks on entered data in the units edit screen.
Michiel Broek <mbroek@mbse.eu>
parents:
254
diff
changeset
|
526 | } |
554
ab9f22ab57b5
Versie 0.8.5. Implementatie product code en product naam. Implementatie DLOG MQTT berichten. Verminderde server rotocol debug berichten.
Michiel Broek <mbroek@mbse.eu>
parents:
518
diff
changeset
|
527 | |
513
a2732027afb3
Version 0.6.1 added support for domoticz mqtt sensors.
Michiel Broek <mbroek@mbse.eu>
parents:
397
diff
changeset
|
528 | if ($f[0] == "HEATER_IDX") { |
a2732027afb3
Version 0.6.1 added support for domoticz mqtt sensors.
Michiel Broek <mbroek@mbse.eu>
parents:
397
diff
changeset
|
529 | $outstr .= ' <tr class="editor">'.PHP_EOL; |
a2732027afb3
Version 0.6.1 added support for domoticz mqtt sensors.
Michiel Broek <mbroek@mbse.eu>
parents:
397
diff
changeset
|
530 | $outstr .= ' <td class="editname">Heater domoticz idx</td>'.PHP_EOL; |
a2732027afb3
Version 0.6.1 added support for domoticz mqtt sensors.
Michiel Broek <mbroek@mbse.eu>
parents:
397
diff
changeset
|
531 | $outstr .= ' <td class="editfield"><input type="text" name="HeaterIdx" size="5" value="'.$f[1].'"></td>'.PHP_EOL; |
a2732027afb3
Version 0.6.1 added support for domoticz mqtt sensors.
Michiel Broek <mbroek@mbse.eu>
parents:
397
diff
changeset
|
532 | } |
362
c92651a54969
Made the client-server protocol more robust. When a change to a unit is made using the web interface, the main process is stopped during the update. Splitted the PID in two PID's, one for heating and one for cooling. Adjusted the web edit scrreen for this, but there are still rough edges. Replaced the PID code, maybe this one works better for our purpose. The simulator air temperature changes on the simulator heater and cooler, but it is not realistic at all. This is a development version, do not use in production. The version is 0.3.0
Michiel Broek <mbroek@mbse.eu>
parents:
349
diff
changeset
|
533 | if ($f[0] == "PIDH_IMAX") { |
c92651a54969
Made the client-server protocol more robust. When a change to a unit is made using the web interface, the main process is stopped during the update. Splitted the PID in two PID's, one for heating and one for cooling. Adjusted the web edit scrreen for this, but there are still rough edges. Replaced the PID code, maybe this one works better for our purpose. The simulator air temperature changes on the simulator heater and cooler, but it is not realistic at all. This is a development version, do not use in production. The version is 0.3.0
Michiel Broek <mbroek@mbse.eu>
parents:
349
diff
changeset
|
534 | $outstr .= ' <td class="editname">PID Heat Maximum</td>'.PHP_EOL; |
c92651a54969
Made the client-server protocol more robust. When a change to a unit is made using the web interface, the main process is stopped during the update. Splitted the PID in two PID's, one for heating and one for cooling. Adjusted the web edit scrreen for this, but there are still rough edges. Replaced the PID code, maybe this one works better for our purpose. The simulator air temperature changes on the simulator heater and cooler, but it is not realistic at all. This is a development version, do not use in production. The version is 0.3.0
Michiel Broek <mbroek@mbse.eu>
parents:
349
diff
changeset
|
535 | $outstr .= ' <td class="editfield"><input type="text" name="PIDH_iMax" size="6" value="'.$f[1].'"> % (1..100)</td>'.PHP_EOL; |
c92651a54969
Made the client-server protocol more robust. When a change to a unit is made using the web interface, the main process is stopped during the update. Splitted the PID in two PID's, one for heating and one for cooling. Adjusted the web edit scrreen for this, but there are still rough edges. Replaced the PID code, maybe this one works better for our purpose. The simulator air temperature changes on the simulator heater and cooler, but it is not realistic at all. This is a development version, do not use in production. The version is 0.3.0
Michiel Broek <mbroek@mbse.eu>
parents:
349
diff
changeset
|
536 | $outstr .= ' </tr>'.PHP_EOL; |
c92651a54969
Made the client-server protocol more robust. When a change to a unit is made using the web interface, the main process is stopped during the update. Splitted the PID in two PID's, one for heating and one for cooling. Adjusted the web edit scrreen for this, but there are still rough edges. Replaced the PID code, maybe this one works better for our purpose. The simulator air temperature changes on the simulator heater and cooler, but it is not realistic at all. This is a development version, do not use in production. The version is 0.3.0
Michiel Broek <mbroek@mbse.eu>
parents:
349
diff
changeset
|
537 | } |
554
ab9f22ab57b5
Versie 0.8.5. Implementatie product code en product naam. Implementatie DLOG MQTT berichten. Verminderde server rotocol debug berichten.
Michiel Broek <mbroek@mbse.eu>
parents:
518
diff
changeset
|
538 | |
518
fd36bedab944
Added chiller configuration items
Michiel Broek <mbroek@mbse.eu>
parents:
513
diff
changeset
|
539 | if ($f[0] == "PIDH_IDLERANGE") { |
fd36bedab944
Added chiller configuration items
Michiel Broek <mbroek@mbse.eu>
parents:
513
diff
changeset
|
540 | $outstr .= ' <tr class="editor">'.PHP_EOL; |
fd36bedab944
Added chiller configuration items
Michiel Broek <mbroek@mbse.eu>
parents:
513
diff
changeset
|
541 | $outstr .= ' <td class="editname">Heater Idle Range</td>'.PHP_EOL; |
fd36bedab944
Added chiller configuration items
Michiel Broek <mbroek@mbse.eu>
parents:
513
diff
changeset
|
542 | $outstr .= ' <td class="editfield"><input type="text" name="PIDH_idleRange" size="6" value="'.$f[1].'"> °C (Heater margin)</td>'.PHP_EOL; |
fd36bedab944
Added chiller configuration items
Michiel Broek <mbroek@mbse.eu>
parents:
513
diff
changeset
|
543 | } |
362
c92651a54969
Made the client-server protocol more robust. When a change to a unit is made using the web interface, the main process is stopped during the update. Splitted the PID in two PID's, one for heating and one for cooling. Adjusted the web edit scrreen for this, but there are still rough edges. Replaced the PID code, maybe this one works better for our purpose. The simulator air temperature changes on the simulator heater and cooler, but it is not realistic at all. This is a development version, do not use in production. The version is 0.3.0
Michiel Broek <mbroek@mbse.eu>
parents:
349
diff
changeset
|
544 | if ($f[0] == "PIDH_PGAIN") { |
c92651a54969
Made the client-server protocol more robust. When a change to a unit is made using the web interface, the main process is stopped during the update. Splitted the PID in two PID's, one for heating and one for cooling. Adjusted the web edit scrreen for this, but there are still rough edges. Replaced the PID code, maybe this one works better for our purpose. The simulator air temperature changes on the simulator heater and cooler, but it is not realistic at all. This is a development version, do not use in production. The version is 0.3.0
Michiel Broek <mbroek@mbse.eu>
parents:
349
diff
changeset
|
545 | $outstr .= ' <td class="editname">PID Heat pGain</td>'.PHP_EOL; |
c92651a54969
Made the client-server protocol more robust. When a change to a unit is made using the web interface, the main process is stopped during the update. Splitted the PID in two PID's, one for heating and one for cooling. Adjusted the web edit scrreen for this, but there are still rough edges. Replaced the PID code, maybe this one works better for our purpose. The simulator air temperature changes on the simulator heater and cooler, but it is not realistic at all. This is a development version, do not use in production. The version is 0.3.0
Michiel Broek <mbroek@mbse.eu>
parents:
349
diff
changeset
|
546 | $outstr .= ' <td class="editfield"><input type="text" name="PIDH_pGain" size="6" value="'.$f[1].'"> Proportional</td>'.PHP_EOL; |
c92651a54969
Made the client-server protocol more robust. When a change to a unit is made using the web interface, the main process is stopped during the update. Splitted the PID in two PID's, one for heating and one for cooling. Adjusted the web edit scrreen for this, but there are still rough edges. Replaced the PID code, maybe this one works better for our purpose. The simulator air temperature changes on the simulator heater and cooler, but it is not realistic at all. This is a development version, do not use in production. The version is 0.3.0
Michiel Broek <mbroek@mbse.eu>
parents:
349
diff
changeset
|
547 | $outstr .= ' </tr>'.PHP_EOL; |
c92651a54969
Made the client-server protocol more robust. When a change to a unit is made using the web interface, the main process is stopped during the update. Splitted the PID in two PID's, one for heating and one for cooling. Adjusted the web edit scrreen for this, but there are still rough edges. Replaced the PID code, maybe this one works better for our purpose. The simulator air temperature changes on the simulator heater and cooler, but it is not realistic at all. This is a development version, do not use in production. The version is 0.3.0
Michiel Broek <mbroek@mbse.eu>
parents:
349
diff
changeset
|
548 | } |
554
ab9f22ab57b5
Versie 0.8.5. Implementatie product code en product naam. Implementatie DLOG MQTT berichten. Verminderde server rotocol debug berichten.
Michiel Broek <mbroek@mbse.eu>
parents:
518
diff
changeset
|
549 | |
362
c92651a54969
Made the client-server protocol more robust. When a change to a unit is made using the web interface, the main process is stopped during the update. Splitted the PID in two PID's, one for heating and one for cooling. Adjusted the web edit scrreen for this, but there are still rough edges. Replaced the PID code, maybe this one works better for our purpose. The simulator air temperature changes on the simulator heater and cooler, but it is not realistic at all. This is a development version, do not use in production. The version is 0.3.0
Michiel Broek <mbroek@mbse.eu>
parents:
349
diff
changeset
|
550 | if ($f[0] == "PIDH_IGAIN") { |
c92651a54969
Made the client-server protocol more robust. When a change to a unit is made using the web interface, the main process is stopped during the update. Splitted the PID in two PID's, one for heating and one for cooling. Adjusted the web edit scrreen for this, but there are still rough edges. Replaced the PID code, maybe this one works better for our purpose. The simulator air temperature changes on the simulator heater and cooler, but it is not realistic at all. This is a development version, do not use in production. The version is 0.3.0
Michiel Broek <mbroek@mbse.eu>
parents:
349
diff
changeset
|
551 | $outstr .= ' <tr class="editor">'.PHP_EOL; |
c92651a54969
Made the client-server protocol more robust. When a change to a unit is made using the web interface, the main process is stopped during the update. Splitted the PID in two PID's, one for heating and one for cooling. Adjusted the web edit scrreen for this, but there are still rough edges. Replaced the PID code, maybe this one works better for our purpose. The simulator air temperature changes on the simulator heater and cooler, but it is not realistic at all. This is a development version, do not use in production. The version is 0.3.0
Michiel Broek <mbroek@mbse.eu>
parents:
349
diff
changeset
|
552 | $outstr .= ' <td class="editname">PID Heat iGain</td>'.PHP_EOL; |
c92651a54969
Made the client-server protocol more robust. When a change to a unit is made using the web interface, the main process is stopped during the update. Splitted the PID in two PID's, one for heating and one for cooling. Adjusted the web edit scrreen for this, but there are still rough edges. Replaced the PID code, maybe this one works better for our purpose. The simulator air temperature changes on the simulator heater and cooler, but it is not realistic at all. This is a development version, do not use in production. The version is 0.3.0
Michiel Broek <mbroek@mbse.eu>
parents:
349
diff
changeset
|
553 | $outstr .= ' <td class="editfield"><input type="text" name="PIDH_iGain" size="6" value="'.$f[1].'"> Intergral</td>'.PHP_EOL; |
c92651a54969
Made the client-server protocol more robust. When a change to a unit is made using the web interface, the main process is stopped during the update. Splitted the PID in two PID's, one for heating and one for cooling. Adjusted the web edit scrreen for this, but there are still rough edges. Replaced the PID code, maybe this one works better for our purpose. The simulator air temperature changes on the simulator heater and cooler, but it is not realistic at all. This is a development version, do not use in production. The version is 0.3.0
Michiel Broek <mbroek@mbse.eu>
parents:
349
diff
changeset
|
554 | } |
c92651a54969
Made the client-server protocol more robust. When a change to a unit is made using the web interface, the main process is stopped during the update. Splitted the PID in two PID's, one for heating and one for cooling. Adjusted the web edit scrreen for this, but there are still rough edges. Replaced the PID code, maybe this one works better for our purpose. The simulator air temperature changes on the simulator heater and cooler, but it is not realistic at all. This is a development version, do not use in production. The version is 0.3.0
Michiel Broek <mbroek@mbse.eu>
parents:
349
diff
changeset
|
555 | if ($f[0] == "PIDH_DGAIN") { |
c92651a54969
Made the client-server protocol more robust. When a change to a unit is made using the web interface, the main process is stopped during the update. Splitted the PID in two PID's, one for heating and one for cooling. Adjusted the web edit scrreen for this, but there are still rough edges. Replaced the PID code, maybe this one works better for our purpose. The simulator air temperature changes on the simulator heater and cooler, but it is not realistic at all. This is a development version, do not use in production. The version is 0.3.0
Michiel Broek <mbroek@mbse.eu>
parents:
349
diff
changeset
|
556 | $outstr .= ' <td class="editname">PID Heat dGain</td>'.PHP_EOL; |
c92651a54969
Made the client-server protocol more robust. When a change to a unit is made using the web interface, the main process is stopped during the update. Splitted the PID in two PID's, one for heating and one for cooling. Adjusted the web edit scrreen for this, but there are still rough edges. Replaced the PID code, maybe this one works better for our purpose. The simulator air temperature changes on the simulator heater and cooler, but it is not realistic at all. This is a development version, do not use in production. The version is 0.3.0
Michiel Broek <mbroek@mbse.eu>
parents:
349
diff
changeset
|
557 | $outstr .= ' <td class="editfield"><input type="text" name="PIDH_dGain" size="6" value="'.$f[1].'"> Derivative</td>'.PHP_EOL; |
c92651a54969
Made the client-server protocol more robust. When a change to a unit is made using the web interface, the main process is stopped during the update. Splitted the PID in two PID's, one for heating and one for cooling. Adjusted the web edit scrreen for this, but there are still rough edges. Replaced the PID code, maybe this one works better for our purpose. The simulator air temperature changes on the simulator heater and cooler, but it is not realistic at all. This is a development version, do not use in production. The version is 0.3.0
Michiel Broek <mbroek@mbse.eu>
parents:
349
diff
changeset
|
558 | $outstr .= ' </tr>'.PHP_EOL; |
c92651a54969
Made the client-server protocol more robust. When a change to a unit is made using the web interface, the main process is stopped during the update. Splitted the PID in two PID's, one for heating and one for cooling. Adjusted the web edit scrreen for this, but there are still rough edges. Replaced the PID code, maybe this one works better for our purpose. The simulator air temperature changes on the simulator heater and cooler, but it is not realistic at all. This is a development version, do not use in production. The version is 0.3.0
Michiel Broek <mbroek@mbse.eu>
parents:
349
diff
changeset
|
559 | } |
554
ab9f22ab57b5
Versie 0.8.5. Implementatie product code en product naam. Implementatie DLOG MQTT berichten. Verminderde server rotocol debug berichten.
Michiel Broek <mbroek@mbse.eu>
parents:
518
diff
changeset
|
560 | |
175
b73490398368
Units editing is more or less complete. Changed structures for heating, cooling, fan and door. Updated the web interface to confuigure all these things.
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
561 | if ($f[0] == "COOLER_ADDRESS") { |
b73490398368
Units editing is more or less complete. Changed structures for heating, cooling, fan and door. Updated the web interface to confuigure all these things.
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
562 | $outstr .= ' <tr class="editor">'.PHP_EOL; |
b73490398368
Units editing is more or less complete. Changed structures for heating, cooling, fan and door. Updated the web interface to confuigure all these things.
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
563 | $outstr .= ' <td class="editname">Cooler Switch Address</td>'.PHP_EOL; |
b73490398368
Units editing is more or less complete. Changed structures for heating, cooling, fan and door. Updated the web interface to confuigure all these things.
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
564 | $outstr .= ' <td class="editfield"><select name="CoolerAddress">'.PHP_EOL; |
b73490398368
Units editing is more or less complete. Changed structures for heating, cooling, fan and door. Updated the web interface to confuigure all these things.
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
565 | $outstr .= ' <option value="">Not Assigned</option>'.PHP_EOL; |
b73490398368
Units editing is more or less complete. Changed structures for heating, cooling, fan and door. Updated the web interface to confuigure all these things.
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
566 | if (startsWith($devices[0], "212")) { |
b73490398368
Units editing is more or less complete. Changed structures for heating, cooling, fan and door. Updated the web interface to confuigure all these things.
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
567 | $j = 1; |
b73490398368
Units editing is more or less complete. Changed structures for heating, cooling, fan and door. Updated the web interface to confuigure all these things.
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
568 | while (1) { |
b73490398368
Units editing is more or less complete. Changed structures for heating, cooling, fan and door. Updated the web interface to confuigure all these things.
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
569 | if (strcmp($devices[$j], ".") == 0) |
b73490398368
Units editing is more or less complete. Changed structures for heating, cooling, fan and door. Updated the web interface to confuigure all these things.
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
570 | break; |
b73490398368
Units editing is more or less complete. Changed structures for heating, cooling, fan and door. Updated the web interface to confuigure all these things.
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
571 | $g = explode(",", $devices[$j]); |
b73490398368
Units editing is more or less complete. Changed structures for heating, cooling, fan and door. Updated the web interface to confuigure all these things.
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
572 | if (($g[5] == "OUT_ANALOG") || ($g[5] == "OUT_BIN")) { |
b73490398368
Units editing is more or less complete. Changed structures for heating, cooling, fan and door. Updated the web interface to confuigure all these things.
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
573 | ($f[1] == $g[0]) ? $se = " selected" : $se = ""; |
b73490398368
Units editing is more or less complete. Changed structures for heating, cooling, fan and door. Updated the web interface to confuigure all these things.
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
574 | $outstr .= ' <option value="'.$g[0].'"'.$se.'>'.$g[1].' '.$g[4].'</option>'.PHP_EOL; |
b73490398368
Units editing is more or less complete. Changed structures for heating, cooling, fan and door. Updated the web interface to confuigure all these things.
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
575 | } |
b73490398368
Units editing is more or less complete. Changed structures for heating, cooling, fan and door. Updated the web interface to confuigure all these things.
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
576 | $j++; |
b73490398368
Units editing is more or less complete. Changed structures for heating, cooling, fan and door. Updated the web interface to confuigure all these things.
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
577 | } |
b73490398368
Units editing is more or less complete. Changed structures for heating, cooling, fan and door. Updated the web interface to confuigure all these things.
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
578 | } |
b73490398368
Units editing is more or less complete. Changed structures for heating, cooling, fan and door. Updated the web interface to confuigure all these things.
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
579 | $outstr .= ' </select></td>'.PHP_EOL; |
b73490398368
Units editing is more or less complete. Changed structures for heating, cooling, fan and door. Updated the web interface to confuigure all these things.
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
580 | } |
272
f436d826de4b
Added Heater and Cooler delay edit fields. Added more checks on entered data in the units edit screen.
Michiel Broek <mbroek@mbse.eu>
parents:
254
diff
changeset
|
581 | if ($f[0] == "COOLER_DELAY") { |
f436d826de4b
Added Heater and Cooler delay edit fields. Added more checks on entered data in the units edit screen.
Michiel Broek <mbroek@mbse.eu>
parents:
254
diff
changeset
|
582 | $outstr .= ' <td class="editname">Cooler Switch Delay</td>'.PHP_EOL; |
312
7b0f819a3805
Added more precision to the unit low and high black window margins. Switched to PID routine from Pid without a PhD. The PID compute routine is now in the one second loop. The switch delay times are now in seconds, 0..720.
Michiel Broek <mbroek@mbse.eu>
parents:
311
diff
changeset
|
583 | $outstr .= ' <td class="editfield"><input type="text" name="CoolerDelay" size="5" value="'.$f[1].'"> seconds (0..720)</td>'.PHP_EOL; |
272
f436d826de4b
Added Heater and Cooler delay edit fields. Added more checks on entered data in the units edit screen.
Michiel Broek <mbroek@mbse.eu>
parents:
254
diff
changeset
|
584 | $outstr .= ' </tr>'.PHP_EOL; |
f436d826de4b
Added Heater and Cooler delay edit fields. Added more checks on entered data in the units edit screen.
Michiel Broek <mbroek@mbse.eu>
parents:
254
diff
changeset
|
585 | } |
554
ab9f22ab57b5
Versie 0.8.5. Implementatie product code en product naam. Implementatie DLOG MQTT berichten. Verminderde server rotocol debug berichten.
Michiel Broek <mbroek@mbse.eu>
parents:
518
diff
changeset
|
586 | |
513
a2732027afb3
Version 0.6.1 added support for domoticz mqtt sensors.
Michiel Broek <mbroek@mbse.eu>
parents:
397
diff
changeset
|
587 | if ($f[0] == "COOLER_IDX") { |
a2732027afb3
Version 0.6.1 added support for domoticz mqtt sensors.
Michiel Broek <mbroek@mbse.eu>
parents:
397
diff
changeset
|
588 | $outstr .= ' <tr class="editor">'.PHP_EOL; |
a2732027afb3
Version 0.6.1 added support for domoticz mqtt sensors.
Michiel Broek <mbroek@mbse.eu>
parents:
397
diff
changeset
|
589 | $outstr .= ' <td class="editname">Cooler domoticz idx</td>'.PHP_EOL; |
a2732027afb3
Version 0.6.1 added support for domoticz mqtt sensors.
Michiel Broek <mbroek@mbse.eu>
parents:
397
diff
changeset
|
590 | $outstr .= ' <td class="editfield"><input type="text" name="CoolerIdx" size="5" value="'.$f[1].'"></td>'.PHP_EOL; |
a2732027afb3
Version 0.6.1 added support for domoticz mqtt sensors.
Michiel Broek <mbroek@mbse.eu>
parents:
397
diff
changeset
|
591 | } |
362
c92651a54969
Made the client-server protocol more robust. When a change to a unit is made using the web interface, the main process is stopped during the update. Splitted the PID in two PID's, one for heating and one for cooling. Adjusted the web edit scrreen for this, but there are still rough edges. Replaced the PID code, maybe this one works better for our purpose. The simulator air temperature changes on the simulator heater and cooler, but it is not realistic at all. This is a development version, do not use in production. The version is 0.3.0
Michiel Broek <mbroek@mbse.eu>
parents:
349
diff
changeset
|
592 | if ($f[0] == "PIDC_IMAX") { |
c92651a54969
Made the client-server protocol more robust. When a change to a unit is made using the web interface, the main process is stopped during the update. Splitted the PID in two PID's, one for heating and one for cooling. Adjusted the web edit scrreen for this, but there are still rough edges. Replaced the PID code, maybe this one works better for our purpose. The simulator air temperature changes on the simulator heater and cooler, but it is not realistic at all. This is a development version, do not use in production. The version is 0.3.0
Michiel Broek <mbroek@mbse.eu>
parents:
349
diff
changeset
|
593 | $outstr .= ' <td class="editname">PID Cool Maximum</td>'.PHP_EOL; |
c92651a54969
Made the client-server protocol more robust. When a change to a unit is made using the web interface, the main process is stopped during the update. Splitted the PID in two PID's, one for heating and one for cooling. Adjusted the web edit scrreen for this, but there are still rough edges. Replaced the PID code, maybe this one works better for our purpose. The simulator air temperature changes on the simulator heater and cooler, but it is not realistic at all. This is a development version, do not use in production. The version is 0.3.0
Michiel Broek <mbroek@mbse.eu>
parents:
349
diff
changeset
|
594 | $outstr .= ' <td class="editfield"><input type="text" name="PIDC_iMax" size="6" value="'.$f[1].'"> % (1..100)</td>'.PHP_EOL; |
c92651a54969
Made the client-server protocol more robust. When a change to a unit is made using the web interface, the main process is stopped during the update. Splitted the PID in two PID's, one for heating and one for cooling. Adjusted the web edit scrreen for this, but there are still rough edges. Replaced the PID code, maybe this one works better for our purpose. The simulator air temperature changes on the simulator heater and cooler, but it is not realistic at all. This is a development version, do not use in production. The version is 0.3.0
Michiel Broek <mbroek@mbse.eu>
parents:
349
diff
changeset
|
595 | $outstr .= ' </tr>'.PHP_EOL; |
c92651a54969
Made the client-server protocol more robust. When a change to a unit is made using the web interface, the main process is stopped during the update. Splitted the PID in two PID's, one for heating and one for cooling. Adjusted the web edit scrreen for this, but there are still rough edges. Replaced the PID code, maybe this one works better for our purpose. The simulator air temperature changes on the simulator heater and cooler, but it is not realistic at all. This is a development version, do not use in production. The version is 0.3.0
Michiel Broek <mbroek@mbse.eu>
parents:
349
diff
changeset
|
596 | } |
554
ab9f22ab57b5
Versie 0.8.5. Implementatie product code en product naam. Implementatie DLOG MQTT berichten. Verminderde server rotocol debug berichten.
Michiel Broek <mbroek@mbse.eu>
parents:
518
diff
changeset
|
597 | |
518
fd36bedab944
Added chiller configuration items
Michiel Broek <mbroek@mbse.eu>
parents:
513
diff
changeset
|
598 | if ($f[0] == "PIDC_IDLERANGE") { |
fd36bedab944
Added chiller configuration items
Michiel Broek <mbroek@mbse.eu>
parents:
513
diff
changeset
|
599 | $outstr .= ' <tr class="editor">'.PHP_EOL; |
fd36bedab944
Added chiller configuration items
Michiel Broek <mbroek@mbse.eu>
parents:
513
diff
changeset
|
600 | $outstr .= ' <td class="editname">Cooler Idle Range</td>'.PHP_EOL; |
fd36bedab944
Added chiller configuration items
Michiel Broek <mbroek@mbse.eu>
parents:
513
diff
changeset
|
601 | $outstr .= ' <td class="editfield"><input type="text" name="PIDC_idleRange" size="6" value="'.$f[1].'"> °C (Cooler margin)</td>'.PHP_EOL; |
fd36bedab944
Added chiller configuration items
Michiel Broek <mbroek@mbse.eu>
parents:
513
diff
changeset
|
602 | } |
362
c92651a54969
Made the client-server protocol more robust. When a change to a unit is made using the web interface, the main process is stopped during the update. Splitted the PID in two PID's, one for heating and one for cooling. Adjusted the web edit scrreen for this, but there are still rough edges. Replaced the PID code, maybe this one works better for our purpose. The simulator air temperature changes on the simulator heater and cooler, but it is not realistic at all. This is a development version, do not use in production. The version is 0.3.0
Michiel Broek <mbroek@mbse.eu>
parents:
349
diff
changeset
|
603 | if ($f[0] == "PIDC_PGAIN") { |
c92651a54969
Made the client-server protocol more robust. When a change to a unit is made using the web interface, the main process is stopped during the update. Splitted the PID in two PID's, one for heating and one for cooling. Adjusted the web edit scrreen for this, but there are still rough edges. Replaced the PID code, maybe this one works better for our purpose. The simulator air temperature changes on the simulator heater and cooler, but it is not realistic at all. This is a development version, do not use in production. The version is 0.3.0
Michiel Broek <mbroek@mbse.eu>
parents:
349
diff
changeset
|
604 | $outstr .= ' <td class="editname">PID Cool pGain</td>'.PHP_EOL; |
c92651a54969
Made the client-server protocol more robust. When a change to a unit is made using the web interface, the main process is stopped during the update. Splitted the PID in two PID's, one for heating and one for cooling. Adjusted the web edit scrreen for this, but there are still rough edges. Replaced the PID code, maybe this one works better for our purpose. The simulator air temperature changes on the simulator heater and cooler, but it is not realistic at all. This is a development version, do not use in production. The version is 0.3.0
Michiel Broek <mbroek@mbse.eu>
parents:
349
diff
changeset
|
605 | $outstr .= ' <td class="editfield"><input type="text" name="PIDC_pGain" size="6" value="'.$f[1].'"> Proportional</td>'.PHP_EOL; |
c92651a54969
Made the client-server protocol more robust. When a change to a unit is made using the web interface, the main process is stopped during the update. Splitted the PID in two PID's, one for heating and one for cooling. Adjusted the web edit scrreen for this, but there are still rough edges. Replaced the PID code, maybe this one works better for our purpose. The simulator air temperature changes on the simulator heater and cooler, but it is not realistic at all. This is a development version, do not use in production. The version is 0.3.0
Michiel Broek <mbroek@mbse.eu>
parents:
349
diff
changeset
|
606 | $outstr .= ' </tr>'.PHP_EOL; |
c92651a54969
Made the client-server protocol more robust. When a change to a unit is made using the web interface, the main process is stopped during the update. Splitted the PID in two PID's, one for heating and one for cooling. Adjusted the web edit scrreen for this, but there are still rough edges. Replaced the PID code, maybe this one works better for our purpose. The simulator air temperature changes on the simulator heater and cooler, but it is not realistic at all. This is a development version, do not use in production. The version is 0.3.0
Michiel Broek <mbroek@mbse.eu>
parents:
349
diff
changeset
|
607 | } |
554
ab9f22ab57b5
Versie 0.8.5. Implementatie product code en product naam. Implementatie DLOG MQTT berichten. Verminderde server rotocol debug berichten.
Michiel Broek <mbroek@mbse.eu>
parents:
518
diff
changeset
|
608 | |
362
c92651a54969
Made the client-server protocol more robust. When a change to a unit is made using the web interface, the main process is stopped during the update. Splitted the PID in two PID's, one for heating and one for cooling. Adjusted the web edit scrreen for this, but there are still rough edges. Replaced the PID code, maybe this one works better for our purpose. The simulator air temperature changes on the simulator heater and cooler, but it is not realistic at all. This is a development version, do not use in production. The version is 0.3.0
Michiel Broek <mbroek@mbse.eu>
parents:
349
diff
changeset
|
609 | if ($f[0] == "PIDC_IGAIN") { |
c92651a54969
Made the client-server protocol more robust. When a change to a unit is made using the web interface, the main process is stopped during the update. Splitted the PID in two PID's, one for heating and one for cooling. Adjusted the web edit scrreen for this, but there are still rough edges. Replaced the PID code, maybe this one works better for our purpose. The simulator air temperature changes on the simulator heater and cooler, but it is not realistic at all. This is a development version, do not use in production. The version is 0.3.0
Michiel Broek <mbroek@mbse.eu>
parents:
349
diff
changeset
|
610 | $outstr .= ' <tr class="editor">'.PHP_EOL; |
c92651a54969
Made the client-server protocol more robust. When a change to a unit is made using the web interface, the main process is stopped during the update. Splitted the PID in two PID's, one for heating and one for cooling. Adjusted the web edit scrreen for this, but there are still rough edges. Replaced the PID code, maybe this one works better for our purpose. The simulator air temperature changes on the simulator heater and cooler, but it is not realistic at all. This is a development version, do not use in production. The version is 0.3.0
Michiel Broek <mbroek@mbse.eu>
parents:
349
diff
changeset
|
611 | $outstr .= ' <td class="editname">PID Cool iGain</td>'.PHP_EOL; |
c92651a54969
Made the client-server protocol more robust. When a change to a unit is made using the web interface, the main process is stopped during the update. Splitted the PID in two PID's, one for heating and one for cooling. Adjusted the web edit scrreen for this, but there are still rough edges. Replaced the PID code, maybe this one works better for our purpose. The simulator air temperature changes on the simulator heater and cooler, but it is not realistic at all. This is a development version, do not use in production. The version is 0.3.0
Michiel Broek <mbroek@mbse.eu>
parents:
349
diff
changeset
|
612 | $outstr .= ' <td class="editfield"><input type="text" name="PIDC_iGain" size="6" value="'.$f[1].'"> Intergral</td>'.PHP_EOL; |
c92651a54969
Made the client-server protocol more robust. When a change to a unit is made using the web interface, the main process is stopped during the update. Splitted the PID in two PID's, one for heating and one for cooling. Adjusted the web edit scrreen for this, but there are still rough edges. Replaced the PID code, maybe this one works better for our purpose. The simulator air temperature changes on the simulator heater and cooler, but it is not realistic at all. This is a development version, do not use in production. The version is 0.3.0
Michiel Broek <mbroek@mbse.eu>
parents:
349
diff
changeset
|
613 | } |
c92651a54969
Made the client-server protocol more robust. When a change to a unit is made using the web interface, the main process is stopped during the update. Splitted the PID in two PID's, one for heating and one for cooling. Adjusted the web edit scrreen for this, but there are still rough edges. Replaced the PID code, maybe this one works better for our purpose. The simulator air temperature changes on the simulator heater and cooler, but it is not realistic at all. This is a development version, do not use in production. The version is 0.3.0
Michiel Broek <mbroek@mbse.eu>
parents:
349
diff
changeset
|
614 | if ($f[0] == "PIDC_DGAIN") { |
c92651a54969
Made the client-server protocol more robust. When a change to a unit is made using the web interface, the main process is stopped during the update. Splitted the PID in two PID's, one for heating and one for cooling. Adjusted the web edit scrreen for this, but there are still rough edges. Replaced the PID code, maybe this one works better for our purpose. The simulator air temperature changes on the simulator heater and cooler, but it is not realistic at all. This is a development version, do not use in production. The version is 0.3.0
Michiel Broek <mbroek@mbse.eu>
parents:
349
diff
changeset
|
615 | $outstr .= ' <td class="editname">PID Cool dGain</td>'.PHP_EOL; |
c92651a54969
Made the client-server protocol more robust. When a change to a unit is made using the web interface, the main process is stopped during the update. Splitted the PID in two PID's, one for heating and one for cooling. Adjusted the web edit scrreen for this, but there are still rough edges. Replaced the PID code, maybe this one works better for our purpose. The simulator air temperature changes on the simulator heater and cooler, but it is not realistic at all. This is a development version, do not use in production. The version is 0.3.0
Michiel Broek <mbroek@mbse.eu>
parents:
349
diff
changeset
|
616 | $outstr .= ' <td class="editfield"><input type="text" name="PIDC_dGain" size="6" value="'.$f[1].'"> Derivative</td>'.PHP_EOL; |
c92651a54969
Made the client-server protocol more robust. When a change to a unit is made using the web interface, the main process is stopped during the update. Splitted the PID in two PID's, one for heating and one for cooling. Adjusted the web edit scrreen for this, but there are still rough edges. Replaced the PID code, maybe this one works better for our purpose. The simulator air temperature changes on the simulator heater and cooler, but it is not realistic at all. This is a development version, do not use in production. The version is 0.3.0
Michiel Broek <mbroek@mbse.eu>
parents:
349
diff
changeset
|
617 | $outstr .= ' </tr>'.PHP_EOL; |
c92651a54969
Made the client-server protocol more robust. When a change to a unit is made using the web interface, the main process is stopped during the update. Splitted the PID in two PID's, one for heating and one for cooling. Adjusted the web edit scrreen for this, but there are still rough edges. Replaced the PID code, maybe this one works better for our purpose. The simulator air temperature changes on the simulator heater and cooler, but it is not realistic at all. This is a development version, do not use in production. The version is 0.3.0
Michiel Broek <mbroek@mbse.eu>
parents:
349
diff
changeset
|
618 | } |
554
ab9f22ab57b5
Versie 0.8.5. Implementatie product code en product naam. Implementatie DLOG MQTT berichten. Verminderde server rotocol debug berichten.
Michiel Broek <mbroek@mbse.eu>
parents:
518
diff
changeset
|
619 | |
175
b73490398368
Units editing is more or less complete. Changed structures for heating, cooling, fan and door. Updated the web interface to confuigure all these things.
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
620 | if ($f[0] == "FAN_ADDRESS") { |
b73490398368
Units editing is more or less complete. Changed structures for heating, cooling, fan and door. Updated the web interface to confuigure all these things.
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
621 | $outstr .= ' <tr class="editor">'.PHP_EOL; |
b73490398368
Units editing is more or less complete. Changed structures for heating, cooling, fan and door. Updated the web interface to confuigure all these things.
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
622 | $outstr .= ' <td class="editname">Fan Switch Address</td>'.PHP_EOL; |
b73490398368
Units editing is more or less complete. Changed structures for heating, cooling, fan and door. Updated the web interface to confuigure all these things.
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
623 | $outstr .= ' <td class="editfield"><select name="FanAddress">'.PHP_EOL; |
b73490398368
Units editing is more or less complete. Changed structures for heating, cooling, fan and door. Updated the web interface to confuigure all these things.
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
624 | $outstr .= ' <option value="">Not Assigned</option>'.PHP_EOL; |
b73490398368
Units editing is more or less complete. Changed structures for heating, cooling, fan and door. Updated the web interface to confuigure all these things.
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
625 | if (startsWith($devices[0], "212")) { |
b73490398368
Units editing is more or less complete. Changed structures for heating, cooling, fan and door. Updated the web interface to confuigure all these things.
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
626 | $j = 1; |
b73490398368
Units editing is more or less complete. Changed structures for heating, cooling, fan and door. Updated the web interface to confuigure all these things.
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
627 | while (1) { |
b73490398368
Units editing is more or less complete. Changed structures for heating, cooling, fan and door. Updated the web interface to confuigure all these things.
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
628 | if (strcmp($devices[$j], ".") == 0) |
b73490398368
Units editing is more or less complete. Changed structures for heating, cooling, fan and door. Updated the web interface to confuigure all these things.
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
629 | break; |
b73490398368
Units editing is more or less complete. Changed structures for heating, cooling, fan and door. Updated the web interface to confuigure all these things.
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
630 | $g = explode(",", $devices[$j]); |
b73490398368
Units editing is more or less complete. Changed structures for heating, cooling, fan and door. Updated the web interface to confuigure all these things.
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
631 | if (($g[5] == "OUT_ANALOG") || ($g[5] == "OUT_BIN")) { |
b73490398368
Units editing is more or less complete. Changed structures for heating, cooling, fan and door. Updated the web interface to confuigure all these things.
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
632 | ($f[1] == $g[0]) ? $se = " selected" : $se = ""; |
b73490398368
Units editing is more or less complete. Changed structures for heating, cooling, fan and door. Updated the web interface to confuigure all these things.
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
633 | $outstr .= ' <option value="'.$g[0].'"'.$se.'>'.$g[1].' '.$g[4].'</option>'.PHP_EOL; |
b73490398368
Units editing is more or less complete. Changed structures for heating, cooling, fan and door. Updated the web interface to confuigure all these things.
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
634 | } |
b73490398368
Units editing is more or less complete. Changed structures for heating, cooling, fan and door. Updated the web interface to confuigure all these things.
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
635 | $j++; |
b73490398368
Units editing is more or less complete. Changed structures for heating, cooling, fan and door. Updated the web interface to confuigure all these things.
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
636 | } |
b73490398368
Units editing is more or less complete. Changed structures for heating, cooling, fan and door. Updated the web interface to confuigure all these things.
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
637 | } |
b73490398368
Units editing is more or less complete. Changed structures for heating, cooling, fan and door. Updated the web interface to confuigure all these things.
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
638 | $outstr .= ' </select></td>'.PHP_EOL; |
b73490398368
Units editing is more or less complete. Changed structures for heating, cooling, fan and door. Updated the web interface to confuigure all these things.
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
639 | } |
349 | 640 | if ($f[0] == "FAN_DELAY") { |
641 | $outstr .= ' <td class="editname">Fan Switch Delay</td>'.PHP_EOL; | |
642 | $outstr .= ' <td class="editfield"><input type="text" name="FanDelay" size="5" value="'.$f[1].'"> seconds (0..720)</td>'.PHP_EOL; | |
643 | $outstr .= ' </tr>'.PHP_EOL; | |
644 | } | |
554
ab9f22ab57b5
Versie 0.8.5. Implementatie product code en product naam. Implementatie DLOG MQTT berichten. Verminderde server rotocol debug berichten.
Michiel Broek <mbroek@mbse.eu>
parents:
518
diff
changeset
|
645 | |
513
a2732027afb3
Version 0.6.1 added support for domoticz mqtt sensors.
Michiel Broek <mbroek@mbse.eu>
parents:
397
diff
changeset
|
646 | if ($f[0] == "FAN_IDX") { |
a2732027afb3
Version 0.6.1 added support for domoticz mqtt sensors.
Michiel Broek <mbroek@mbse.eu>
parents:
397
diff
changeset
|
647 | $outstr .= ' <tr class="editor">'.PHP_EOL; |
a2732027afb3
Version 0.6.1 added support for domoticz mqtt sensors.
Michiel Broek <mbroek@mbse.eu>
parents:
397
diff
changeset
|
648 | $outstr .= ' <td class="editname">Fan domoticz idx</td>'.PHP_EOL; |
518
fd36bedab944
Added chiller configuration items
Michiel Broek <mbroek@mbse.eu>
parents:
513
diff
changeset
|
649 | $outstr .= ' <td colspan="3" class="editfield"><input type="text" name="FanIdx" size="5" value="'.$f[1].'"></td>'.PHP_EOL; |
513
a2732027afb3
Version 0.6.1 added support for domoticz mqtt sensors.
Michiel Broek <mbroek@mbse.eu>
parents:
397
diff
changeset
|
650 | $outstr .= ' </tr>'.PHP_EOL; |
a2732027afb3
Version 0.6.1 added support for domoticz mqtt sensors.
Michiel Broek <mbroek@mbse.eu>
parents:
397
diff
changeset
|
651 | } |
306
97602274eb58
Updated to add support for lights in a fermenter unit and a Power Supply status.
Michiel Broek <mbroek@mbse.eu>
parents:
291
diff
changeset
|
652 | if ($f[0] == "LIGHT_ADDRESS") { |
97602274eb58
Updated to add support for lights in a fermenter unit and a Power Supply status.
Michiel Broek <mbroek@mbse.eu>
parents:
291
diff
changeset
|
653 | $outstr .= ' <tr class="editor">'.PHP_EOL; |
97602274eb58
Updated to add support for lights in a fermenter unit and a Power Supply status.
Michiel Broek <mbroek@mbse.eu>
parents:
291
diff
changeset
|
654 | $outstr .= ' <td class="editname">Lights Address</td>'.PHP_EOL; |
97602274eb58
Updated to add support for lights in a fermenter unit and a Power Supply status.
Michiel Broek <mbroek@mbse.eu>
parents:
291
diff
changeset
|
655 | $outstr .= ' <td class="editfield"><select name="LightAddress">'.PHP_EOL; |
97602274eb58
Updated to add support for lights in a fermenter unit and a Power Supply status.
Michiel Broek <mbroek@mbse.eu>
parents:
291
diff
changeset
|
656 | $outstr .= ' <option value="">Not Assigned</option>'.PHP_EOL; |
97602274eb58
Updated to add support for lights in a fermenter unit and a Power Supply status.
Michiel Broek <mbroek@mbse.eu>
parents:
291
diff
changeset
|
657 | if (startsWith($devices[0], "212")) { |
97602274eb58
Updated to add support for lights in a fermenter unit and a Power Supply status.
Michiel Broek <mbroek@mbse.eu>
parents:
291
diff
changeset
|
658 | $j = 1; |
97602274eb58
Updated to add support for lights in a fermenter unit and a Power Supply status.
Michiel Broek <mbroek@mbse.eu>
parents:
291
diff
changeset
|
659 | while (1) { |
97602274eb58
Updated to add support for lights in a fermenter unit and a Power Supply status.
Michiel Broek <mbroek@mbse.eu>
parents:
291
diff
changeset
|
660 | if (strcmp($devices[$j], ".") == 0) |
97602274eb58
Updated to add support for lights in a fermenter unit and a Power Supply status.
Michiel Broek <mbroek@mbse.eu>
parents:
291
diff
changeset
|
661 | break; |
97602274eb58
Updated to add support for lights in a fermenter unit and a Power Supply status.
Michiel Broek <mbroek@mbse.eu>
parents:
291
diff
changeset
|
662 | $g = explode(",", $devices[$j]); |
97602274eb58
Updated to add support for lights in a fermenter unit and a Power Supply status.
Michiel Broek <mbroek@mbse.eu>
parents:
291
diff
changeset
|
663 | if (($g[5] == "OUT_ANALOG") || ($g[5] == "OUT_BIN")) { |
97602274eb58
Updated to add support for lights in a fermenter unit and a Power Supply status.
Michiel Broek <mbroek@mbse.eu>
parents:
291
diff
changeset
|
664 | ($f[1] == $g[0]) ? $se = " selected" : $se = ""; |
97602274eb58
Updated to add support for lights in a fermenter unit and a Power Supply status.
Michiel Broek <mbroek@mbse.eu>
parents:
291
diff
changeset
|
665 | $outstr .= ' <option value="'.$g[0].'"'.$se.'>'.$g[1].' '.$g[4].'</option>'.PHP_EOL; |
97602274eb58
Updated to add support for lights in a fermenter unit and a Power Supply status.
Michiel Broek <mbroek@mbse.eu>
parents:
291
diff
changeset
|
666 | } |
97602274eb58
Updated to add support for lights in a fermenter unit and a Power Supply status.
Michiel Broek <mbroek@mbse.eu>
parents:
291
diff
changeset
|
667 | $j++; |
97602274eb58
Updated to add support for lights in a fermenter unit and a Power Supply status.
Michiel Broek <mbroek@mbse.eu>
parents:
291
diff
changeset
|
668 | } |
97602274eb58
Updated to add support for lights in a fermenter unit and a Power Supply status.
Michiel Broek <mbroek@mbse.eu>
parents:
291
diff
changeset
|
669 | } |
97602274eb58
Updated to add support for lights in a fermenter unit and a Power Supply status.
Michiel Broek <mbroek@mbse.eu>
parents:
291
diff
changeset
|
670 | $outstr .= ' </select></td>'.PHP_EOL; |
97602274eb58
Updated to add support for lights in a fermenter unit and a Power Supply status.
Michiel Broek <mbroek@mbse.eu>
parents:
291
diff
changeset
|
671 | } |
554
ab9f22ab57b5
Versie 0.8.5. Implementatie product code en product naam. Implementatie DLOG MQTT berichten. Verminderde server rotocol debug berichten.
Michiel Broek <mbroek@mbse.eu>
parents:
518
diff
changeset
|
672 | |
306
97602274eb58
Updated to add support for lights in a fermenter unit and a Power Supply status.
Michiel Broek <mbroek@mbse.eu>
parents:
291
diff
changeset
|
673 | if ($f[0] == "LIGHT_DELAY") { |
97602274eb58
Updated to add support for lights in a fermenter unit and a Power Supply status.
Michiel Broek <mbroek@mbse.eu>
parents:
291
diff
changeset
|
674 | $outstr .= ' <td class="editname">Lights Delay</td>'.PHP_EOL; |
312
7b0f819a3805
Added more precision to the unit low and high black window margins. Switched to PID routine from Pid without a PhD. The PID compute routine is now in the one second loop. The switch delay times are now in seconds, 0..720.
Michiel Broek <mbroek@mbse.eu>
parents:
311
diff
changeset
|
675 | $outstr .= ' <td class="editfield"><input type="text" name="LightDelay" size="5" value="'.$f[1].'"> seconds (0..720)</td>'.PHP_EOL; |
306
97602274eb58
Updated to add support for lights in a fermenter unit and a Power Supply status.
Michiel Broek <mbroek@mbse.eu>
parents:
291
diff
changeset
|
676 | $outstr .= ' </tr>'.PHP_EOL; |
97602274eb58
Updated to add support for lights in a fermenter unit and a Power Supply status.
Michiel Broek <mbroek@mbse.eu>
parents:
291
diff
changeset
|
677 | } |
554
ab9f22ab57b5
Versie 0.8.5. Implementatie product code en product naam. Implementatie DLOG MQTT berichten. Verminderde server rotocol debug berichten.
Michiel Broek <mbroek@mbse.eu>
parents:
518
diff
changeset
|
678 | |
513
a2732027afb3
Version 0.6.1 added support for domoticz mqtt sensors.
Michiel Broek <mbroek@mbse.eu>
parents:
397
diff
changeset
|
679 | if ($f[0] == "LIGHT_IDX") { |
a2732027afb3
Version 0.6.1 added support for domoticz mqtt sensors.
Michiel Broek <mbroek@mbse.eu>
parents:
397
diff
changeset
|
680 | $outstr .= ' <tr class="editor">'.PHP_EOL; |
a2732027afb3
Version 0.6.1 added support for domoticz mqtt sensors.
Michiel Broek <mbroek@mbse.eu>
parents:
397
diff
changeset
|
681 | $outstr .= ' <td class="editname">Light domoticz idx</td>'.PHP_EOL; |
518
fd36bedab944
Added chiller configuration items
Michiel Broek <mbroek@mbse.eu>
parents:
513
diff
changeset
|
682 | $outstr .= ' <td colspan="3" class="editfield"><input type="text" name="LightIdx" size="5" value="'.$f[1].'"></td>'.PHP_EOL; |
513
a2732027afb3
Version 0.6.1 added support for domoticz mqtt sensors.
Michiel Broek <mbroek@mbse.eu>
parents:
397
diff
changeset
|
683 | $outstr .= ' </tr>'.PHP_EOL; |
a2732027afb3
Version 0.6.1 added support for domoticz mqtt sensors.
Michiel Broek <mbroek@mbse.eu>
parents:
397
diff
changeset
|
684 | } |
554
ab9f22ab57b5
Versie 0.8.5. Implementatie product code en product naam. Implementatie DLOG MQTT berichten. Verminderde server rotocol debug berichten.
Michiel Broek <mbroek@mbse.eu>
parents:
518
diff
changeset
|
685 | |
175
b73490398368
Units editing is more or less complete. Changed structures for heating, cooling, fan and door. Updated the web interface to confuigure all these things.
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
686 | if ($f[0] == "DOOR_ADDRESS") { |
b73490398368
Units editing is more or less complete. Changed structures for heating, cooling, fan and door. Updated the web interface to confuigure all these things.
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
687 | $outstr .= ' <tr class="editor">'.PHP_EOL; |
b73490398368
Units editing is more or less complete. Changed structures for heating, cooling, fan and door. Updated the web interface to confuigure all these things.
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
688 | $outstr .= ' <td class="editname">Door Sensor Address</td>'.PHP_EOL; |
b73490398368
Units editing is more or less complete. Changed structures for heating, cooling, fan and door. Updated the web interface to confuigure all these things.
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
689 | $outstr .= ' <td class="editfield"><select name="DoorAddress">'.PHP_EOL; |
b73490398368
Units editing is more or less complete. Changed structures for heating, cooling, fan and door. Updated the web interface to confuigure all these things.
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
690 | $outstr .= ' <option value="">Not Assigned</option>'.PHP_EOL; |
b73490398368
Units editing is more or less complete. Changed structures for heating, cooling, fan and door. Updated the web interface to confuigure all these things.
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
691 | if (startsWith($devices[0], "212")) { |
b73490398368
Units editing is more or less complete. Changed structures for heating, cooling, fan and door. Updated the web interface to confuigure all these things.
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
692 | $j = 1; |
b73490398368
Units editing is more or less complete. Changed structures for heating, cooling, fan and door. Updated the web interface to confuigure all these things.
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
693 | while (1) { |
b73490398368
Units editing is more or less complete. Changed structures for heating, cooling, fan and door. Updated the web interface to confuigure all these things.
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
694 | if (strcmp($devices[$j], ".") == 0) |
b73490398368
Units editing is more or less complete. Changed structures for heating, cooling, fan and door. Updated the web interface to confuigure all these things.
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
695 | break; |
b73490398368
Units editing is more or less complete. Changed structures for heating, cooling, fan and door. Updated the web interface to confuigure all these things.
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
696 | $g = explode(",", $devices[$j]); |
b73490398368
Units editing is more or less complete. Changed structures for heating, cooling, fan and door. Updated the web interface to confuigure all these things.
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
697 | if ($g[5] == "IN_BIN") { |
b73490398368
Units editing is more or less complete. Changed structures for heating, cooling, fan and door. Updated the web interface to confuigure all these things.
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
698 | ($f[1] == $g[0]) ? $se = " selected" : $se = ""; |
b73490398368
Units editing is more or less complete. Changed structures for heating, cooling, fan and door. Updated the web interface to confuigure all these things.
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
699 | $outstr .= ' <option value="'.$g[0].'"'.$se.'>'.$g[1].' '.$g[4].'</option>'.PHP_EOL; |
b73490398368
Units editing is more or less complete. Changed structures for heating, cooling, fan and door. Updated the web interface to confuigure all these things.
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
700 | } |
b73490398368
Units editing is more or less complete. Changed structures for heating, cooling, fan and door. Updated the web interface to confuigure all these things.
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
701 | $j++; |
b73490398368
Units editing is more or less complete. Changed structures for heating, cooling, fan and door. Updated the web interface to confuigure all these things.
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
702 | } |
b73490398368
Units editing is more or less complete. Changed structures for heating, cooling, fan and door. Updated the web interface to confuigure all these things.
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
703 | } |
b73490398368
Units editing is more or less complete. Changed structures for heating, cooling, fan and door. Updated the web interface to confuigure all these things.
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
704 | $outstr .= ' </select></td>'.PHP_EOL; |
b73490398368
Units editing is more or less complete. Changed structures for heating, cooling, fan and door. Updated the web interface to confuigure all these things.
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
705 | } |
513
a2732027afb3
Version 0.6.1 added support for domoticz mqtt sensors.
Michiel Broek <mbroek@mbse.eu>
parents:
397
diff
changeset
|
706 | if ($f[0] == "DOOR_IDX") { |
a2732027afb3
Version 0.6.1 added support for domoticz mqtt sensors.
Michiel Broek <mbroek@mbse.eu>
parents:
397
diff
changeset
|
707 | $outstr .= ' <td class="editname">Door domoticz idx</td>'.PHP_EOL; |
a2732027afb3
Version 0.6.1 added support for domoticz mqtt sensors.
Michiel Broek <mbroek@mbse.eu>
parents:
397
diff
changeset
|
708 | $outstr .= ' <td class="editfield"><input type="text" name="DoorIdx" size="5" value="'.$f[1].'"></td>'.PHP_EOL; |
a2732027afb3
Version 0.6.1 added support for domoticz mqtt sensors.
Michiel Broek <mbroek@mbse.eu>
parents:
397
diff
changeset
|
709 | $outstr .= ' </tr>'.PHP_EOL; |
a2732027afb3
Version 0.6.1 added support for domoticz mqtt sensors.
Michiel Broek <mbroek@mbse.eu>
parents:
397
diff
changeset
|
710 | } |
554
ab9f22ab57b5
Versie 0.8.5. Implementatie product code en product naam. Implementatie DLOG MQTT berichten. Verminderde server rotocol debug berichten.
Michiel Broek <mbroek@mbse.eu>
parents:
518
diff
changeset
|
711 | |
306
97602274eb58
Updated to add support for lights in a fermenter unit and a Power Supply status.
Michiel Broek <mbroek@mbse.eu>
parents:
291
diff
changeset
|
712 | if ($f[0] == "PSU_ADDRESS") { |
97602274eb58
Updated to add support for lights in a fermenter unit and a Power Supply status.
Michiel Broek <mbroek@mbse.eu>
parents:
291
diff
changeset
|
713 | $outstr .= ' <tr class="editor">'.PHP_EOL; |
554
ab9f22ab57b5
Versie 0.8.5. Implementatie product code en product naam. Implementatie DLOG MQTT berichten. Verminderde server rotocol debug berichten.
Michiel Broek <mbroek@mbse.eu>
parents:
518
diff
changeset
|
714 | $outstr .= ' <td class="editname">PSU Sensor Address</td>'.PHP_EOL; |
306
97602274eb58
Updated to add support for lights in a fermenter unit and a Power Supply status.
Michiel Broek <mbroek@mbse.eu>
parents:
291
diff
changeset
|
715 | $outstr .= ' <td class="editfield"><select name="PSUAddress">'.PHP_EOL; |
97602274eb58
Updated to add support for lights in a fermenter unit and a Power Supply status.
Michiel Broek <mbroek@mbse.eu>
parents:
291
diff
changeset
|
716 | $outstr .= ' <option value="">Not Assigned</option>'.PHP_EOL; |
97602274eb58
Updated to add support for lights in a fermenter unit and a Power Supply status.
Michiel Broek <mbroek@mbse.eu>
parents:
291
diff
changeset
|
717 | if (startsWith($devices[0], "212")) { |
97602274eb58
Updated to add support for lights in a fermenter unit and a Power Supply status.
Michiel Broek <mbroek@mbse.eu>
parents:
291
diff
changeset
|
718 | $j = 1; |
97602274eb58
Updated to add support for lights in a fermenter unit and a Power Supply status.
Michiel Broek <mbroek@mbse.eu>
parents:
291
diff
changeset
|
719 | while (1) { |
97602274eb58
Updated to add support for lights in a fermenter unit and a Power Supply status.
Michiel Broek <mbroek@mbse.eu>
parents:
291
diff
changeset
|
720 | if (strcmp($devices[$j], ".") == 0) |
97602274eb58
Updated to add support for lights in a fermenter unit and a Power Supply status.
Michiel Broek <mbroek@mbse.eu>
parents:
291
diff
changeset
|
721 | break; |
97602274eb58
Updated to add support for lights in a fermenter unit and a Power Supply status.
Michiel Broek <mbroek@mbse.eu>
parents:
291
diff
changeset
|
722 | $g = explode(",", $devices[$j]); |
97602274eb58
Updated to add support for lights in a fermenter unit and a Power Supply status.
Michiel Broek <mbroek@mbse.eu>
parents:
291
diff
changeset
|
723 | if ($g[5] == "IN_BIN") { |
97602274eb58
Updated to add support for lights in a fermenter unit and a Power Supply status.
Michiel Broek <mbroek@mbse.eu>
parents:
291
diff
changeset
|
724 | ($f[1] == $g[0]) ? $se = " selected" : $se = ""; |
97602274eb58
Updated to add support for lights in a fermenter unit and a Power Supply status.
Michiel Broek <mbroek@mbse.eu>
parents:
291
diff
changeset
|
725 | $outstr .= ' <option value="'.$g[0].'"'.$se.'>'.$g[1].' '.$g[4].'</option>'.PHP_EOL; |
97602274eb58
Updated to add support for lights in a fermenter unit and a Power Supply status.
Michiel Broek <mbroek@mbse.eu>
parents:
291
diff
changeset
|
726 | } |
97602274eb58
Updated to add support for lights in a fermenter unit and a Power Supply status.
Michiel Broek <mbroek@mbse.eu>
parents:
291
diff
changeset
|
727 | $j++; |
97602274eb58
Updated to add support for lights in a fermenter unit and a Power Supply status.
Michiel Broek <mbroek@mbse.eu>
parents:
291
diff
changeset
|
728 | } |
97602274eb58
Updated to add support for lights in a fermenter unit and a Power Supply status.
Michiel Broek <mbroek@mbse.eu>
parents:
291
diff
changeset
|
729 | } |
97602274eb58
Updated to add support for lights in a fermenter unit and a Power Supply status.
Michiel Broek <mbroek@mbse.eu>
parents:
291
diff
changeset
|
730 | $outstr .= ' </select></td>'.PHP_EOL; |
97602274eb58
Updated to add support for lights in a fermenter unit and a Power Supply status.
Michiel Broek <mbroek@mbse.eu>
parents:
291
diff
changeset
|
731 | } |
513
a2732027afb3
Version 0.6.1 added support for domoticz mqtt sensors.
Michiel Broek <mbroek@mbse.eu>
parents:
397
diff
changeset
|
732 | if ($f[0] == "PSU_IDX") { |
a2732027afb3
Version 0.6.1 added support for domoticz mqtt sensors.
Michiel Broek <mbroek@mbse.eu>
parents:
397
diff
changeset
|
733 | $outstr .= ' <td class="editname">PSU domoticz idx</td>'.PHP_EOL; |
a2732027afb3
Version 0.6.1 added support for domoticz mqtt sensors.
Michiel Broek <mbroek@mbse.eu>
parents:
397
diff
changeset
|
734 | $outstr .= ' <td class="editfield"><input type="text" name="PSUIdx" size="5" value="'.$f[1].'"></td>'.PHP_EOL; |
a2732027afb3
Version 0.6.1 added support for domoticz mqtt sensors.
Michiel Broek <mbroek@mbse.eu>
parents:
397
diff
changeset
|
735 | $outstr .= ' </tr>'.PHP_EOL; |
a2732027afb3
Version 0.6.1 added support for domoticz mqtt sensors.
Michiel Broek <mbroek@mbse.eu>
parents:
397
diff
changeset
|
736 | } |
554
ab9f22ab57b5
Versie 0.8.5. Implementatie product code en product naam. Implementatie DLOG MQTT berichten. Verminderde server rotocol debug berichten.
Michiel Broek <mbroek@mbse.eu>
parents:
518
diff
changeset
|
737 | |
175
b73490398368
Units editing is more or less complete. Changed structures for heating, cooling, fan and door. Updated the web interface to confuigure all these things.
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
738 | if ($f[0] == "TEMP_SET_MIN") { |
b73490398368
Units editing is more or less complete. Changed structures for heating, cooling, fan and door. Updated the web interface to confuigure all these things.
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
739 | $outstr .= ' <tr class="editor">'.PHP_EOL; |
b73490398368
Units editing is more or less complete. Changed structures for heating, cooling, fan and door. Updated the web interface to confuigure all these things.
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
740 | $outstr .= ' <td class="editname">Min. temp setting</td>'.PHP_EOL; |
272
f436d826de4b
Added Heater and Cooler delay edit fields. Added more checks on entered data in the units edit screen.
Michiel Broek <mbroek@mbse.eu>
parents:
254
diff
changeset
|
741 | $outstr .= ' <td class="editfield"><input type="text" name="TempSetMin" size="5" value="'.$f[1].'"> °C</td>'.PHP_EOL; |
175
b73490398368
Units editing is more or less complete. Changed structures for heating, cooling, fan and door. Updated the web interface to confuigure all these things.
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
742 | } |
b73490398368
Units editing is more or less complete. Changed structures for heating, cooling, fan and door. Updated the web interface to confuigure all these things.
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
743 | if ($f[0] == "TEMP_SET_MAX") { |
b73490398368
Units editing is more or less complete. Changed structures for heating, cooling, fan and door. Updated the web interface to confuigure all these things.
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
744 | $outstr .= ' <td class="editname">Max. temp setting</td>'.PHP_EOL; |
272
f436d826de4b
Added Heater and Cooler delay edit fields. Added more checks on entered data in the units edit screen.
Michiel Broek <mbroek@mbse.eu>
parents:
254
diff
changeset
|
745 | $outstr .= ' <td class="editfield"><input type="text" name="TempSetMax" size="5" value="'.$f[1].'"> °C</td>'.PHP_EOL; |
175
b73490398368
Units editing is more or less complete. Changed structures for heating, cooling, fan and door. Updated the web interface to confuigure all these things.
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
746 | $outstr .= ' </tr>'.PHP_EOL; |
b73490398368
Units editing is more or less complete. Changed structures for heating, cooling, fan and door. Updated the web interface to confuigure all these things.
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
747 | } |
554
ab9f22ab57b5
Versie 0.8.5. Implementatie product code en product naam. Implementatie DLOG MQTT berichten. Verminderde server rotocol debug berichten.
Michiel Broek <mbroek@mbse.eu>
parents:
518
diff
changeset
|
748 | |
175
b73490398368
Units editing is more or less complete. Changed structures for heating, cooling, fan and door. Updated the web interface to confuigure all these things.
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
749 | $i++; |
b73490398368
Units editing is more or less complete. Changed structures for heating, cooling, fan and door. Updated the web interface to confuigure all these things.
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
750 | } |
b73490398368
Units editing is more or less complete. Changed structures for heating, cooling, fan and door. Updated the web interface to confuigure all these things.
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
751 | } |
153
866a947b732a
Added the framework for the units editor. In the dashboard the radio selector buttons are converteed to jqwidgets radiobuttons.
Michiel Broek <mbroek@mbse.eu>
parents:
140
diff
changeset
|
752 | $outstr .= ' <tr class="editor">'.PHP_EOL; |
866a947b732a
Added the framework for the units editor. In the dashboard the radio selector buttons are converteed to jqwidgets radiobuttons.
Michiel Broek <mbroek@mbse.eu>
parents:
140
diff
changeset
|
753 | $outstr .= ' <td class="editname"><input type="submit" value="Save" name="key"></td>'.PHP_EOL; |
518
fd36bedab944
Added chiller configuration items
Michiel Broek <mbroek@mbse.eu>
parents:
513
diff
changeset
|
754 | $outstr .= ' <td colspan="3" class="editfield"><input type="submit" value="Cancel" name="key">'; |
153
866a947b732a
Added the framework for the units editor. In the dashboard the radio selector buttons are converteed to jqwidgets radiobuttons.
Michiel Broek <mbroek@mbse.eu>
parents:
140
diff
changeset
|
755 | $outstr .= '<input type="submit" value="Delete" name="key" style="margin-left: 100px;">'; |
866a947b732a
Added the framework for the units editor. In the dashboard the radio selector buttons are converteed to jqwidgets radiobuttons.
Michiel Broek <mbroek@mbse.eu>
parents:
140
diff
changeset
|
756 | $outstr .= '<input type="hidden" value="testdata" name="action">'; |
866a947b732a
Added the framework for the units editor. In the dashboard the radio selector buttons are converteed to jqwidgets radiobuttons.
Michiel Broek <mbroek@mbse.eu>
parents:
140
diff
changeset
|
757 | $outstr .= '<input type="hidden" value="'.$command.'" name="command">'; |
866a947b732a
Added the framework for the units editor. In the dashboard the radio selector buttons are converteed to jqwidgets radiobuttons.
Michiel Broek <mbroek@mbse.eu>
parents:
140
diff
changeset
|
758 | $outstr .= '<input type="hidden" value="'.$UUID.'" name="UUID"></td>'.PHP_EOL; |
866a947b732a
Added the framework for the units editor. In the dashboard the radio selector buttons are converteed to jqwidgets radiobuttons.
Michiel Broek <mbroek@mbse.eu>
parents:
140
diff
changeset
|
759 | $outstr .= ' </tr>'.PHP_EOL; |
866a947b732a
Added the framework for the units editor. In the dashboard the radio selector buttons are converteed to jqwidgets radiobuttons.
Michiel Broek <mbroek@mbse.eu>
parents:
140
diff
changeset
|
760 | $outstr .= ' </table>'.PHP_EOL; |
866a947b732a
Added the framework for the units editor. In the dashboard the radio selector buttons are converteed to jqwidgets radiobuttons.
Michiel Broek <mbroek@mbse.eu>
parents:
140
diff
changeset
|
761 | $outstr .= ' </form>'.PHP_EOL; |
866a947b732a
Added the framework for the units editor. In the dashboard the radio selector buttons are converteed to jqwidgets radiobuttons.
Michiel Broek <mbroek@mbse.eu>
parents:
140
diff
changeset
|
762 | $outstr .= ' </div> <!-- etable -->'.PHP_EOL; |
397
00ca08f5a6f8
Fermentation profiles now have a low and high temperature setting so that you can use a temperture window. Each profile step can now set for beer or air temperature reference. The logfiles have an extra temperature field for this. Bumped to version 0.4.2.
Michiel Broek <mbroek@mbse.eu>
parents:
386
diff
changeset
|
763 | $outstr .= ' <script type="text/javascript">'.PHP_EOL; |
00ca08f5a6f8
Fermentation profiles now have a low and high temperature setting so that you can use a temperture window. Each profile step can now set for beer or air temperature reference. The logfiles have an extra temperature field for this. Bumped to version 0.4.2.
Michiel Broek <mbroek@mbse.eu>
parents:
386
diff
changeset
|
764 | $outstr .= ' $(document).ready(function () {'.PHP_EOL; |
00ca08f5a6f8
Fermentation profiles now have a low and high temperature setting so that you can use a temperture window. Each profile step can now set for beer or air temperature reference. The logfiles have an extra temperature field for this. Bumped to version 0.4.2.
Michiel Broek <mbroek@mbse.eu>
parents:
386
diff
changeset
|
765 | $outstr .= ' $("#maintenance").jqxButton({ width: 150, height: 25, theme: \'ui-redmond\' });'.PHP_EOL; |
00ca08f5a6f8
Fermentation profiles now have a low and high temperature setting so that you can use a temperture window. Each profile step can now set for beer or air temperature reference. The logfiles have an extra temperature field for this. Bumped to version 0.4.2.
Michiel Broek <mbroek@mbse.eu>
parents:
386
diff
changeset
|
766 | $outstr .= ' });'.PHP_EOL; |
00ca08f5a6f8
Fermentation profiles now have a low and high temperature setting so that you can use a temperture window. Each profile step can now set for beer or air temperature reference. The logfiles have an extra temperature field for this. Bumped to version 0.4.2.
Michiel Broek <mbroek@mbse.eu>
parents:
386
diff
changeset
|
767 | $outstr .= ' </script>'.PHP_EOL; |
153
866a947b732a
Added the framework for the units editor. In the dashboard the radio selector buttons are converteed to jqwidgets radiobuttons.
Michiel Broek <mbroek@mbse.eu>
parents:
140
diff
changeset
|
768 | $outstr .= build_footer(); |
866a947b732a
Added the framework for the units editor. In the dashboard the radio selector buttons are converteed to jqwidgets radiobuttons.
Michiel Broek <mbroek@mbse.eu>
parents:
140
diff
changeset
|
769 | echo $outstr; |
866a947b732a
Added the framework for the units editor. In the dashboard the radio selector buttons are converteed to jqwidgets radiobuttons.
Michiel Broek <mbroek@mbse.eu>
parents:
140
diff
changeset
|
770 | } |
866a947b732a
Added the framework for the units editor. In the dashboard the radio selector buttons are converteed to jqwidgets radiobuttons.
Michiel Broek <mbroek@mbse.eu>
parents:
140
diff
changeset
|
771 | |
866a947b732a
Added the framework for the units editor. In the dashboard the radio selector buttons are converteed to jqwidgets radiobuttons.
Michiel Broek <mbroek@mbse.eu>
parents:
140
diff
changeset
|
772 | |
866a947b732a
Added the framework for the units editor. In the dashboard the radio selector buttons are converteed to jqwidgets radiobuttons.
Michiel Broek <mbroek@mbse.eu>
parents:
140
diff
changeset
|
773 | |
866a947b732a
Added the framework for the units editor. In the dashboard the radio selector buttons are converteed to jqwidgets radiobuttons.
Michiel Broek <mbroek@mbse.eu>
parents:
140
diff
changeset
|
774 | /* |
866a947b732a
Added the framework for the units editor. In the dashboard the radio selector buttons are converteed to jqwidgets radiobuttons.
Michiel Broek <mbroek@mbse.eu>
parents:
140
diff
changeset
|
775 | * Edit a Unit. Fetches the record data and shows the edit screen. |
866a947b732a
Added the framework for the units editor. In the dashboard the radio selector buttons are converteed to jqwidgets radiobuttons.
Michiel Broek <mbroek@mbse.eu>
parents:
140
diff
changeset
|
776 | * |
866a947b732a
Added the framework for the units editor. In the dashboard the radio selector buttons are converteed to jqwidgets radiobuttons.
Michiel Broek <mbroek@mbse.eu>
parents:
140
diff
changeset
|
777 | * @param string $_GET['action'] Must be 'edit'. |
866a947b732a
Added the framework for the units editor. In the dashboard the radio selector buttons are converteed to jqwidgets radiobuttons.
Michiel Broek <mbroek@mbse.eu>
parents:
140
diff
changeset
|
778 | * @param string $_GET['UUID'] The UUID of the Unit. |
866a947b732a
Added the framework for the units editor. In the dashboard the radio selector buttons are converteed to jqwidgets radiobuttons.
Michiel Broek <mbroek@mbse.eu>
parents:
140
diff
changeset
|
779 | */ |
866a947b732a
Added the framework for the units editor. In the dashboard the radio selector buttons are converteed to jqwidgets radiobuttons.
Michiel Broek <mbroek@mbse.eu>
parents:
140
diff
changeset
|
780 | function unit_edit() { |
866a947b732a
Added the framework for the units editor. In the dashboard the radio selector buttons are converteed to jqwidgets radiobuttons.
Michiel Broek <mbroek@mbse.eu>
parents:
140
diff
changeset
|
781 | if ($_GET['action'] == 'edit') { |
175
b73490398368
Units editing is more or less complete. Changed structures for heating, cooling, fan and door. Updated the web interface to confuigure all these things.
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
782 | edit_screen($_GET['UUID'], 'update', 'ThermFerm - Edit Unit', ''); |
b73490398368
Units editing is more or less complete. Changed structures for heating, cooling, fan and door. Updated the web interface to confuigure all these things.
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
783 | return; |
153
866a947b732a
Added the framework for the units editor. In the dashboard the radio selector buttons are converteed to jqwidgets radiobuttons.
Michiel Broek <mbroek@mbse.eu>
parents:
140
diff
changeset
|
784 | } else { |
866a947b732a
Added the framework for the units editor. In the dashboard the radio selector buttons are converteed to jqwidgets radiobuttons.
Michiel Broek <mbroek@mbse.eu>
parents:
140
diff
changeset
|
785 | load('units.php'); |
134
f05601490415
Redesigned the web interface, one single app is too slow. The main dashboard will be a shiny ajax driven page, the setup pages will be simple and php only. Keep It Simple, Stupid.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
786 | } |
f05601490415
Redesigned the web interface, one single app is too slow. The main dashboard will be a shiny ajax driven page, the setup pages will be simple and php only. Keep It Simple, Stupid.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
787 | } |
f05601490415
Redesigned the web interface, one single app is too slow. The main dashboard will be a shiny ajax driven page, the setup pages will be simple and php only. Keep It Simple, Stupid.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
788 | |
153
866a947b732a
Added the framework for the units editor. In the dashboard the radio selector buttons are converteed to jqwidgets radiobuttons.
Michiel Broek <mbroek@mbse.eu>
parents:
140
diff
changeset
|
789 | |
866a947b732a
Added the framework for the units editor. In the dashboard the radio selector buttons are converteed to jqwidgets radiobuttons.
Michiel Broek <mbroek@mbse.eu>
parents:
140
diff
changeset
|
790 | |
866a947b732a
Added the framework for the units editor. In the dashboard the radio selector buttons are converteed to jqwidgets radiobuttons.
Michiel Broek <mbroek@mbse.eu>
parents:
140
diff
changeset
|
791 | /* |
866a947b732a
Added the framework for the units editor. In the dashboard the radio selector buttons are converteed to jqwidgets radiobuttons.
Michiel Broek <mbroek@mbse.eu>
parents:
140
diff
changeset
|
792 | * @link edit unit |
866a947b732a
Added the framework for the units editor. In the dashboard the radio selector buttons are converteed to jqwidgets radiobuttons.
Michiel Broek <mbroek@mbse.eu>
parents:
140
diff
changeset
|
793 | * @link add unit |
866a947b732a
Added the framework for the units editor. In the dashboard the radio selector buttons are converteed to jqwidgets radiobuttons.
Michiel Broek <mbroek@mbse.eu>
parents:
140
diff
changeset
|
794 | */ |
866a947b732a
Added the framework for the units editor. In the dashboard the radio selector buttons are converteed to jqwidgets radiobuttons.
Michiel Broek <mbroek@mbse.eu>
parents:
140
diff
changeset
|
795 | function unit_list() { |
866a947b732a
Added the framework for the units editor. In the dashboard the radio selector buttons are converteed to jqwidgets radiobuttons.
Michiel Broek <mbroek@mbse.eu>
parents:
140
diff
changeset
|
796 | |
866a947b732a
Added the framework for the units editor. In the dashboard the radio selector buttons are converteed to jqwidgets radiobuttons.
Michiel Broek <mbroek@mbse.eu>
parents:
140
diff
changeset
|
797 | global $arr; |
866a947b732a
Added the framework for the units editor. In the dashboard the radio selector buttons are converteed to jqwidgets radiobuttons.
Michiel Broek <mbroek@mbse.eu>
parents:
140
diff
changeset
|
798 | |
866a947b732a
Added the framework for the units editor. In the dashboard the radio selector buttons are converteed to jqwidgets radiobuttons.
Michiel Broek <mbroek@mbse.eu>
parents:
140
diff
changeset
|
799 | $outstr = build_header('ThermFerm - Units Maintenance'); |
866a947b732a
Added the framework for the units editor. In the dashboard the radio selector buttons are converteed to jqwidgets radiobuttons.
Michiel Broek <mbroek@mbse.eu>
parents:
140
diff
changeset
|
800 | $outstr .= ' <div id="errors">'.PHP_EOL; |
866a947b732a
Added the framework for the units editor. In the dashboard the radio selector buttons are converteed to jqwidgets radiobuttons.
Michiel Broek <mbroek@mbse.eu>
parents:
140
diff
changeset
|
801 | $outstr .= ' </div> <!-- errors -->'.PHP_EOL; |
866a947b732a
Added the framework for the units editor. In the dashboard the radio selector buttons are converteed to jqwidgets radiobuttons.
Michiel Broek <mbroek@mbse.eu>
parents:
140
diff
changeset
|
802 | $outstr .= ' <div id="etable">'.PHP_EOL; |
866a947b732a
Added the framework for the units editor. In the dashboard the radio selector buttons are converteed to jqwidgets radiobuttons.
Michiel Broek <mbroek@mbse.eu>
parents:
140
diff
changeset
|
803 | $outstr .= ' <table class="setup">'.PHP_EOL; |
866a947b732a
Added the framework for the units editor. In the dashboard the radio selector buttons are converteed to jqwidgets radiobuttons.
Michiel Broek <mbroek@mbse.eu>
parents:
140
diff
changeset
|
804 | $outstr .= ' <tr class="trhead">'.PHP_EOL; |
866a947b732a
Added the framework for the units editor. In the dashboard the radio selector buttons are converteed to jqwidgets radiobuttons.
Michiel Broek <mbroek@mbse.eu>
parents:
140
diff
changeset
|
805 | $outstr .= ' <td class="setup" style="width: 300px;">UUID</td>'.PHP_EOL; |
554
ab9f22ab57b5
Versie 0.8.5. Implementatie product code en product naam. Implementatie DLOG MQTT berichten. Verminderde server rotocol debug berichten.
Michiel Broek <mbroek@mbse.eu>
parents:
518
diff
changeset
|
806 | $outstr .= ' <td class="setup" style="width: 300px;">Alias</td>'.PHP_EOL; |
153
866a947b732a
Added the framework for the units editor. In the dashboard the radio selector buttons are converteed to jqwidgets radiobuttons.
Michiel Broek <mbroek@mbse.eu>
parents:
140
diff
changeset
|
807 | $outstr .= ' <td class="setup" style="width: 60px;">Mode</td>'.PHP_EOL; |
866a947b732a
Added the framework for the units editor. In the dashboard the radio selector buttons are converteed to jqwidgets radiobuttons.
Michiel Broek <mbroek@mbse.eu>
parents:
140
diff
changeset
|
808 | $outstr .= ' <td class="setup" style="width: 40px;">Edit</td>'.PHP_EOL; |
866a947b732a
Added the framework for the units editor. In the dashboard the radio selector buttons are converteed to jqwidgets radiobuttons.
Michiel Broek <mbroek@mbse.eu>
parents:
140
diff
changeset
|
809 | $outstr .= ' </tr>'.PHP_EOL; |
134
f05601490415
Redesigned the web interface, one single app is too slow. The main dashboard will be a shiny ajax driven page, the setup pages will be simple and php only. Keep It Simple, Stupid.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
810 | |
153
866a947b732a
Added the framework for the units editor. In the dashboard the radio selector buttons are converteed to jqwidgets radiobuttons.
Michiel Broek <mbroek@mbse.eu>
parents:
140
diff
changeset
|
811 | if (startsWith($arr[0], "212")) { |
866a947b732a
Added the framework for the units editor. In the dashboard the radio selector buttons are converteed to jqwidgets radiobuttons.
Michiel Broek <mbroek@mbse.eu>
parents:
140
diff
changeset
|
812 | $j = 1; |
866a947b732a
Added the framework for the units editor. In the dashboard the radio selector buttons are converteed to jqwidgets radiobuttons.
Michiel Broek <mbroek@mbse.eu>
parents:
140
diff
changeset
|
813 | while (1) { |
866a947b732a
Added the framework for the units editor. In the dashboard the radio selector buttons are converteed to jqwidgets radiobuttons.
Michiel Broek <mbroek@mbse.eu>
parents:
140
diff
changeset
|
814 | if (strcmp($arr[$j], ".") == 0) |
866a947b732a
Added the framework for the units editor. In the dashboard the radio selector buttons are converteed to jqwidgets radiobuttons.
Michiel Broek <mbroek@mbse.eu>
parents:
140
diff
changeset
|
815 | break; |
866a947b732a
Added the framework for the units editor. In the dashboard the radio selector buttons are converteed to jqwidgets radiobuttons.
Michiel Broek <mbroek@mbse.eu>
parents:
140
diff
changeset
|
816 | $f = explode(",", $arr[$j]); |
866a947b732a
Added the framework for the units editor. In the dashboard the radio selector buttons are converteed to jqwidgets radiobuttons.
Michiel Broek <mbroek@mbse.eu>
parents:
140
diff
changeset
|
817 | $outstr .= ' <tr class="setup">'.PHP_EOL; |
866a947b732a
Added the framework for the units editor. In the dashboard the radio selector buttons are converteed to jqwidgets radiobuttons.
Michiel Broek <mbroek@mbse.eu>
parents:
140
diff
changeset
|
818 | $outstr .= ' <td class="setup">'.$f[0].'</td>'.PHP_EOL; |
866a947b732a
Added the framework for the units editor. In the dashboard the radio selector buttons are converteed to jqwidgets radiobuttons.
Michiel Broek <mbroek@mbse.eu>
parents:
140
diff
changeset
|
819 | $outstr .= ' <td class="setup">'.$f[1].'</td>'.PHP_EOL; |
866a947b732a
Added the framework for the units editor. In the dashboard the radio selector buttons are converteed to jqwidgets radiobuttons.
Michiel Broek <mbroek@mbse.eu>
parents:
140
diff
changeset
|
820 | $outstr .= ' <td class="setup">'.$f[2].'</td>'.PHP_EOL; |
866a947b732a
Added the framework for the units editor. In the dashboard the radio selector buttons are converteed to jqwidgets radiobuttons.
Michiel Broek <mbroek@mbse.eu>
parents:
140
diff
changeset
|
821 | if (strcmp($f[2], "OFF")) { |
866a947b732a
Added the framework for the units editor. In the dashboard the radio selector buttons are converteed to jqwidgets radiobuttons.
Michiel Broek <mbroek@mbse.eu>
parents:
140
diff
changeset
|
822 | $outstr .= ' <td class="setup">Busy</td>'.PHP_EOL; |
866a947b732a
Added the framework for the units editor. In the dashboard the radio selector buttons are converteed to jqwidgets radiobuttons.
Michiel Broek <mbroek@mbse.eu>
parents:
140
diff
changeset
|
823 | } else { |
866a947b732a
Added the framework for the units editor. In the dashboard the radio selector buttons are converteed to jqwidgets radiobuttons.
Michiel Broek <mbroek@mbse.eu>
parents:
140
diff
changeset
|
824 | $outstr .= ' <td class="setup"><a href="units.php?action=edit&UUID='.$f[0].'">Edit</a></td>'.PHP_EOL; |
866a947b732a
Added the framework for the units editor. In the dashboard the radio selector buttons are converteed to jqwidgets radiobuttons.
Michiel Broek <mbroek@mbse.eu>
parents:
140
diff
changeset
|
825 | } |
866a947b732a
Added the framework for the units editor. In the dashboard the radio selector buttons are converteed to jqwidgets radiobuttons.
Michiel Broek <mbroek@mbse.eu>
parents:
140
diff
changeset
|
826 | $outstr .= ' </tr>'.PHP_EOL; |
866a947b732a
Added the framework for the units editor. In the dashboard the radio selector buttons are converteed to jqwidgets radiobuttons.
Michiel Broek <mbroek@mbse.eu>
parents:
140
diff
changeset
|
827 | $j++; |
866a947b732a
Added the framework for the units editor. In the dashboard the radio selector buttons are converteed to jqwidgets radiobuttons.
Michiel Broek <mbroek@mbse.eu>
parents:
140
diff
changeset
|
828 | } |
866a947b732a
Added the framework for the units editor. In the dashboard the radio selector buttons are converteed to jqwidgets radiobuttons.
Michiel Broek <mbroek@mbse.eu>
parents:
140
diff
changeset
|
829 | } |
134
f05601490415
Redesigned the web interface, one single app is too slow. The main dashboard will be a shiny ajax driven page, the setup pages will be simple and php only. Keep It Simple, Stupid.
Michiel Broek <mbroek@mbse.eu>
parents:
diff
changeset
|
830 | |
153
866a947b732a
Added the framework for the units editor. In the dashboard the radio selector buttons are converteed to jqwidgets radiobuttons.
Michiel Broek <mbroek@mbse.eu>
parents:
140
diff
changeset
|
831 | $outstr .= ' </table>'.PHP_EOL; |
866a947b732a
Added the framework for the units editor. In the dashboard the radio selector buttons are converteed to jqwidgets radiobuttons.
Michiel Broek <mbroek@mbse.eu>
parents:
140
diff
changeset
|
832 | $outstr .= ' </div> <!-- etable -->'.PHP_EOL; |
866a947b732a
Added the framework for the units editor. In the dashboard the radio selector buttons are converteed to jqwidgets radiobuttons.
Michiel Broek <mbroek@mbse.eu>
parents:
140
diff
changeset
|
833 | |
866a947b732a
Added the framework for the units editor. In the dashboard the radio selector buttons are converteed to jqwidgets radiobuttons.
Michiel Broek <mbroek@mbse.eu>
parents:
140
diff
changeset
|
834 | $outstr .= ' <div id="atable">'.PHP_EOL; |
866a947b732a
Added the framework for the units editor. In the dashboard the radio selector buttons are converteed to jqwidgets radiobuttons.
Michiel Broek <mbroek@mbse.eu>
parents:
140
diff
changeset
|
835 | $outstr .= ' <form method="POST" action="units.php">'.PHP_EOL; |
866a947b732a
Added the framework for the units editor. In the dashboard the radio selector buttons are converteed to jqwidgets radiobuttons.
Michiel Broek <mbroek@mbse.eu>
parents:
140
diff
changeset
|
836 | $outstr .= ' <table class="editor">'.PHP_EOL; |
866a947b732a
Added the framework for the units editor. In the dashboard the radio selector buttons are converteed to jqwidgets radiobuttons.
Michiel Broek <mbroek@mbse.eu>
parents:
140
diff
changeset
|
837 | $outstr .= ' <tr class="trhead"><td colspan="3">Add new unit</td></tr>'.PHP_EOL; |
866a947b732a
Added the framework for the units editor. In the dashboard the radio selector buttons are converteed to jqwidgets radiobuttons.
Michiel Broek <mbroek@mbse.eu>
parents:
140
diff
changeset
|
838 | $outstr .= ' <tr class="editor">'.PHP_EOL; |
554
ab9f22ab57b5
Versie 0.8.5. Implementatie product code en product naam. Implementatie DLOG MQTT berichten. Verminderde server rotocol debug berichten.
Michiel Broek <mbroek@mbse.eu>
parents:
518
diff
changeset
|
839 | $outstr .= ' <td class="editname">Product Name</td>'.PHP_EOL; |
ab9f22ab57b5
Versie 0.8.5. Implementatie product code en product naam. Implementatie DLOG MQTT berichten. Verminderde server rotocol debug berichten.
Michiel Broek <mbroek@mbse.eu>
parents:
518
diff
changeset
|
840 | $outstr .= ' <td class="editfield"><input type="text" name="ProductName" size="50" value=""></td>'.PHP_EOL; |
153
866a947b732a
Added the framework for the units editor. In the dashboard the radio selector buttons are converteed to jqwidgets radiobuttons.
Michiel Broek <mbroek@mbse.eu>
parents:
140
diff
changeset
|
841 | $outstr .= ' <td class="editsub"><input type="submit" value="Add" name="key"></td>'.PHP_EOL; |
554
ab9f22ab57b5
Versie 0.8.5. Implementatie product code en product naam. Implementatie DLOG MQTT berichten. Verminderde server rotocol debug berichten.
Michiel Broek <mbroek@mbse.eu>
parents:
518
diff
changeset
|
842 | $outstr .= '<input type="hidden" value="FAKE000" name="ProductCode">'; |
175
b73490398368
Units editing is more or less complete. Changed structures for heating, cooling, fan and door. Updated the web interface to confuigure all these things.
Michiel Broek <mbroek@mbse.eu>
parents:
153
diff
changeset
|
843 | $outstr .= '<input type="hidden" value="0.0" name="Volume">'; |
564
3fc61dd28656
Versie 0.8.8 Fermentation stage implemented in units.
Michiel Broek <mbroek@mbse.eu>
parents:
554
diff
changeset
|
844 | $outstr .= '<input type="hidden" value="PRIMARY" name="Stage">'; |
243
ab75ff8e26e1
Fixed add unit web interface
Michiel Broek <mbroek@mbse.eu>
parents:
196
diff
changeset
|
845 | $outstr .= '<input type="hidden" value="" name="AirAddress">'; |
513
a2732027afb3
Version 0.6.1 added support for domoticz mqtt sensors.
Michiel Broek <mbroek@mbse.eu>
parents:
397
diff
changeset
|
846 | $outstr .= '<input type="hidden" value="0" name="AirIdx">'; |
243
ab75ff8e26e1
Fixed add unit web interface
Michiel Broek <mbroek@mbse.eu>
parents:
196
diff
changeset
|
847 | $outstr .= '<input type="hidden" value="" name="BeerAddress">'; |
513
a2732027afb3
Version 0.6.1 added support for domoticz mqtt sensors.
Michiel Broek <mbroek@mbse.eu>
parents:
397
diff
changeset
|
848 | $outstr .= '<input type="hidden" value="0" name="BeerIdx">'; |
518
fd36bedab944
Added chiller configuration items
Michiel Broek <mbroek@mbse.eu>
parents:
513
diff
changeset
|
849 | $outstr .= '<input type="hidden" value="" name="ChillerAddress">'; |
fd36bedab944
Added chiller configuration items
Michiel Broek <mbroek@mbse.eu>
parents:
513
diff
changeset
|
850 | $outstr .= '<input type="hidden" value="0" name="ChillerIdx">'; |
243
ab75ff8e26e1
Fixed add unit web interface
Michiel Broek <mbroek@mbse.eu>
parents:
196
diff
changeset
|
851 | $outstr .= '<input type="hidden" value="" name="HeaterAddress">'; |
272
f436d826de4b
Added Heater and Cooler delay edit fields. Added more checks on entered data in the units edit screen.
Michiel Broek <mbroek@mbse.eu>
parents:
254
diff
changeset
|
852 | $outstr .= '<input type="hidden" value="20" name="HeaterDelay">'; |
513
a2732027afb3
Version 0.6.1 added support for domoticz mqtt sensors.
Michiel Broek <mbroek@mbse.eu>
parents:
397
diff
changeset
|
853 | $outstr .= '<input type="hidden" value="0" name="HeaterIdx">'; |
243
ab75ff8e26e1
Fixed add unit web interface
Michiel Broek <mbroek@mbse.eu>
parents:
196
diff
changeset
|
854 | $outstr .= '<input type="hidden" value="" name="CoolerAddress">'; |
272
f436d826de4b
Added Heater and Cooler delay edit fields. Added more checks on entered data in the units edit screen.
Michiel Broek <mbroek@mbse.eu>
parents:
254
diff
changeset
|
855 | $outstr .= '<input type="hidden" value="20" name="CoolerDelay">'; |
513
a2732027afb3
Version 0.6.1 added support for domoticz mqtt sensors.
Michiel Broek <mbroek@mbse.eu>
parents:
397
diff
changeset
|
856 | $outstr .= '<input type="hidden" value="0" name="CoolerIdx">'; |
243
ab75ff8e26e1
Fixed add unit web interface
Michiel Broek <mbroek@mbse.eu>
parents:
196
diff
changeset
|
857 | $outstr .= '<input type="hidden" value="" name="FanAddress">'; |
386 | 858 | $outstr .= '<input type="hidden" value="20" name="FanDelay">'; |
513
a2732027afb3
Version 0.6.1 added support for domoticz mqtt sensors.
Michiel Broek <mbroek@mbse.eu>
parents:
397
diff
changeset
|
859 | $outstr .= '<input type="hidden" value="0" name="FanIdx">'; |
306
97602274eb58
Updated to add support for lights in a fermenter unit and a Power Supply status.
Michiel Broek <mbroek@mbse.eu>
parents:
291
diff
changeset
|
860 | $outstr .= '<input type="hidden" value="" name="LightAddress">'; |
97602274eb58
Updated to add support for lights in a fermenter unit and a Power Supply status.
Michiel Broek <mbroek@mbse.eu>
parents:
291
diff
changeset
|
861 | $outstr .= '<input type="hidden" value="1" name="LightDelay">'; |
513
a2732027afb3
Version 0.6.1 added support for domoticz mqtt sensors.
Michiel Broek <mbroek@mbse.eu>
parents:
397
diff
changeset
|
862 | $outstr .= '<input type="hidden" value="0" name="LightIdx">'; |
243
ab75ff8e26e1
Fixed add unit web interface
Michiel Broek <mbroek@mbse.eu>
parents:
196
diff
changeset
|
863 | $outstr .= '<input type="hidden" value="" name="DoorAddress">'; |
513
a2732027afb3
Version 0.6.1 added support for domoticz mqtt sensors.
Michiel Broek <mbroek@mbse.eu>
parents:
397
diff
changeset
|
864 | $outstr .= '<input type="hidden" value="0" name="DoorIdx">'; |
386 | 865 | $outstr .= '<input type="hidden" value="" name="PSUAddress">'; |
513
a2732027afb3
Version 0.6.1 added support for domoticz mqtt sensors.
Michiel Broek <mbroek@mbse.eu>
parents:
397
diff
changeset
|
866 | $outstr .= '<input type="hidden" value="0" name="PSUIdx">'; |
243
ab75ff8e26e1
Fixed add unit web interface
Michiel Broek <mbroek@mbse.eu>
parents:
196
diff
changeset
|
867 | $outstr .= '<input type="hidden" value="1.0" name="TempSetMin">'; |
ab75ff8e26e1
Fixed add unit web interface
Michiel Broek <mbroek@mbse.eu>
parents:
196
diff
changeset
|
868 | $outstr .= '<input type="hidden" value="30.0" name="TempSetMax">'; |
362
c92651a54969
Made the client-server protocol more robust. When a change to a unit is made using the web interface, the main process is stopped during the update. Splitted the PID in two PID's, one for heating and one for cooling. Adjusted the web edit scrreen for this, but there are still rough edges. Replaced the PID code, maybe this one works better for our purpose. The simulator air temperature changes on the simulator heater and cooler, but it is not realistic at all. This is a development version, do not use in production. The version is 0.3.0
Michiel Broek <mbroek@mbse.eu>
parents:
349
diff
changeset
|
869 | $outstr .= '<input type="hidden" value="100" name="PIDC_iMax">'; |
c92651a54969
Made the client-server protocol more robust. When a change to a unit is made using the web interface, the main process is stopped during the update. Splitted the PID in two PID's, one for heating and one for cooling. Adjusted the web edit scrreen for this, but there are still rough edges. Replaced the PID code, maybe this one works better for our purpose. The simulator air temperature changes on the simulator heater and cooler, but it is not realistic at all. This is a development version, do not use in production. The version is 0.3.0
Michiel Broek <mbroek@mbse.eu>
parents:
349
diff
changeset
|
870 | $outstr .= '<input type="hidden" value="4.0" name="PIDC_pGain">'; |
c92651a54969
Made the client-server protocol more robust. When a change to a unit is made using the web interface, the main process is stopped during the update. Splitted the PID in two PID's, one for heating and one for cooling. Adjusted the web edit scrreen for this, but there are still rough edges. Replaced the PID code, maybe this one works better for our purpose. The simulator air temperature changes on the simulator heater and cooler, but it is not realistic at all. This is a development version, do not use in production. The version is 0.3.0
Michiel Broek <mbroek@mbse.eu>
parents:
349
diff
changeset
|
871 | $outstr .= '<input type="hidden" value="0.2" name="PIDC_dGain">'; |
c92651a54969
Made the client-server protocol more robust. When a change to a unit is made using the web interface, the main process is stopped during the update. Splitted the PID in two PID's, one for heating and one for cooling. Adjusted the web edit scrreen for this, but there are still rough edges. Replaced the PID code, maybe this one works better for our purpose. The simulator air temperature changes on the simulator heater and cooler, but it is not realistic at all. This is a development version, do not use in production. The version is 0.3.0
Michiel Broek <mbroek@mbse.eu>
parents:
349
diff
changeset
|
872 | $outstr .= '<input type="hidden" value="1.0" name="PIDC_iGain">'; |
c92651a54969
Made the client-server protocol more robust. When a change to a unit is made using the web interface, the main process is stopped during the update. Splitted the PID in two PID's, one for heating and one for cooling. Adjusted the web edit scrreen for this, but there are still rough edges. Replaced the PID code, maybe this one works better for our purpose. The simulator air temperature changes on the simulator heater and cooler, but it is not realistic at all. This is a development version, do not use in production. The version is 0.3.0
Michiel Broek <mbroek@mbse.eu>
parents:
349
diff
changeset
|
873 | $outstr .= '<input type="hidden" value="1.0" name="PIDC_idleRange">'; |
c92651a54969
Made the client-server protocol more robust. When a change to a unit is made using the web interface, the main process is stopped during the update. Splitted the PID in two PID's, one for heating and one for cooling. Adjusted the web edit scrreen for this, but there are still rough edges. Replaced the PID code, maybe this one works better for our purpose. The simulator air temperature changes on the simulator heater and cooler, but it is not realistic at all. This is a development version, do not use in production. The version is 0.3.0
Michiel Broek <mbroek@mbse.eu>
parents:
349
diff
changeset
|
874 | $outstr .= '<input type="hidden" value="100" name="PIDH_iMax">'; |
c92651a54969
Made the client-server protocol more robust. When a change to a unit is made using the web interface, the main process is stopped during the update. Splitted the PID in two PID's, one for heating and one for cooling. Adjusted the web edit scrreen for this, but there are still rough edges. Replaced the PID code, maybe this one works better for our purpose. The simulator air temperature changes on the simulator heater and cooler, but it is not realistic at all. This is a development version, do not use in production. The version is 0.3.0
Michiel Broek <mbroek@mbse.eu>
parents:
349
diff
changeset
|
875 | $outstr .= '<input type="hidden" value="4.0" name="PIDH_pGain">'; |
c92651a54969
Made the client-server protocol more robust. When a change to a unit is made using the web interface, the main process is stopped during the update. Splitted the PID in two PID's, one for heating and one for cooling. Adjusted the web edit scrreen for this, but there are still rough edges. Replaced the PID code, maybe this one works better for our purpose. The simulator air temperature changes on the simulator heater and cooler, but it is not realistic at all. This is a development version, do not use in production. The version is 0.3.0
Michiel Broek <mbroek@mbse.eu>
parents:
349
diff
changeset
|
876 | $outstr .= '<input type="hidden" value="0.2" name="PIDH_dGain">'; |
c92651a54969
Made the client-server protocol more robust. When a change to a unit is made using the web interface, the main process is stopped during the update. Splitted the PID in two PID's, one for heating and one for cooling. Adjusted the web edit scrreen for this, but there are still rough edges. Replaced the PID code, maybe this one works better for our purpose. The simulator air temperature changes on the simulator heater and cooler, but it is not realistic at all. This is a development version, do not use in production. The version is 0.3.0
Michiel Broek <mbroek@mbse.eu>
parents:
349
diff
changeset
|
877 | $outstr .= '<input type="hidden" value="1.0" name="PIDH_iGain">'; |
c92651a54969
Made the client-server protocol more robust. When a change to a unit is made using the web interface, the main process is stopped during the update. Splitted the PID in two PID's, one for heating and one for cooling. Adjusted the web edit scrreen for this, but there are still rough edges. Replaced the PID code, maybe this one works better for our purpose. The simulator air temperature changes on the simulator heater and cooler, but it is not realistic at all. This is a development version, do not use in production. The version is 0.3.0
Michiel Broek <mbroek@mbse.eu>
parents:
349
diff
changeset
|
878 | $outstr .= '<input type="hidden" value="1.0" name="PIDH_idleRange">'; |
153
866a947b732a
Added the framework for the units editor. In the dashboard the radio selector buttons are converteed to jqwidgets radiobuttons.
Michiel Broek <mbroek@mbse.eu>
parents:
140
diff
changeset
|
879 | $outstr .= '<input type="hidden" value="testdata" name="action">'; |
866a947b732a
Added the framework for the units editor. In the dashboard the radio selector buttons are converteed to jqwidgets radiobuttons.
Michiel Broek <mbroek@mbse.eu>
parents:
140
diff
changeset
|
880 | $outstr .= '<input type="hidden" value="add" name="command">'; |
866a947b732a
Added the framework for the units editor. In the dashboard the radio selector buttons are converteed to jqwidgets radiobuttons.
Michiel Broek <mbroek@mbse.eu>
parents:
140
diff
changeset
|
881 | $outstr .= '<input type="hidden" value="00000000-0000-0000-0000-000000000000" name="UUID">'; |
866a947b732a
Added the framework for the units editor. In the dashboard the radio selector buttons are converteed to jqwidgets radiobuttons.
Michiel Broek <mbroek@mbse.eu>
parents:
140
diff
changeset
|
882 | $outstr .= ' </tr>'.PHP_EOL; |
866a947b732a
Added the framework for the units editor. In the dashboard the radio selector buttons are converteed to jqwidgets radiobuttons.
Michiel Broek <mbroek@mbse.eu>
parents:
140
diff
changeset
|
883 | $outstr .= ' </table>'.PHP_EOL; |
866a947b732a
Added the framework for the units editor. In the dashboard the radio selector buttons are converteed to jqwidgets radiobuttons.
Michiel Broek <mbroek@mbse.eu>
parents:
140
diff
changeset
|
884 | $outstr .= ' </form>'.PHP_EOL; |
866a947b732a
Added the framework for the units editor. In the dashboard the radio selector buttons are converteed to jqwidgets radiobuttons.
Michiel Broek <mbroek@mbse.eu>
parents:
140
diff
changeset
|
885 | $outstr .= ' </div> <!-- atable -->'.PHP_EOL; |
397
00ca08f5a6f8
Fermentation profiles now have a low and high temperature setting so that you can use a temperture window. Each profile step can now set for beer or air temperature reference. The logfiles have an extra temperature field for this. Bumped to version 0.4.2.
Michiel Broek <mbroek@mbse.eu>
parents:
386
diff
changeset
|
886 | $outstr .= ' <script type="text/javascript">'.PHP_EOL; |
00ca08f5a6f8
Fermentation profiles now have a low and high temperature setting so that you can use a temperture window. Each profile step can now set for beer or air temperature reference. The logfiles have an extra temperature field for this. Bumped to version 0.4.2.
Michiel Broek <mbroek@mbse.eu>
parents:
386
diff
changeset
|
887 | $outstr .= ' $(document).ready(function () {'.PHP_EOL; |
00ca08f5a6f8
Fermentation profiles now have a low and high temperature setting so that you can use a temperture window. Each profile step can now set for beer or air temperature reference. The logfiles have an extra temperature field for this. Bumped to version 0.4.2.
Michiel Broek <mbroek@mbse.eu>
parents:
386
diff
changeset
|
888 | $outstr .= ' $("#maintenance").jqxButton({ width: 150, height: 25, theme: \'ui-redmond\' });'.PHP_EOL; |
00ca08f5a6f8
Fermentation profiles now have a low and high temperature setting so that you can use a temperture window. Each profile step can now set for beer or air temperature reference. The logfiles have an extra temperature field for this. Bumped to version 0.4.2.
Michiel Broek <mbroek@mbse.eu>
parents:
386
diff
changeset
|
889 | $outstr .= ' });'.PHP_EOL; |
00ca08f5a6f8
Fermentation profiles now have a low and high temperature setting so that you can use a temperture window. Each profile step can now set for beer or air temperature reference. The logfiles have an extra temperature field for this. Bumped to version 0.4.2.
Michiel Broek <mbroek@mbse.eu>
parents:
386
diff
changeset
|
890 | $outstr .= ' </script>'.PHP_EOL; |
153
866a947b732a
Added the framework for the units editor. In the dashboard the radio selector buttons are converteed to jqwidgets radiobuttons.
Michiel Broek <mbroek@mbse.eu>
parents:
140
diff
changeset
|
891 | $outstr .= build_footer(); |
866a947b732a
Added the framework for the units editor. In the dashboard the radio selector buttons are converteed to jqwidgets radiobuttons.
Michiel Broek <mbroek@mbse.eu>
parents:
140
diff
changeset
|
892 | echo $outstr; |
866a947b732a
Added the framework for the units editor. In the dashboard the radio selector buttons are converteed to jqwidgets radiobuttons.
Michiel Broek <mbroek@mbse.eu>
parents:
140
diff
changeset
|
893 | } |
866a947b732a
Added the framework for the units editor. In the dashboard the radio selector buttons are converteed to jqwidgets radiobuttons.
Michiel Broek <mbroek@mbse.eu>
parents:
140
diff
changeset
|
894 |