134 $outstr .= ' loadComplete: function () { },'.PHP_EOL; |
134 $outstr .= ' loadComplete: function () { },'.PHP_EOL; |
135 $outstr .= ' loadError: function () { }'.PHP_EOL; |
135 $outstr .= ' loadError: function () { }'.PHP_EOL; |
136 $outstr .= ' });'.PHP_EOL; |
136 $outstr .= ' });'.PHP_EOL; |
137 |
137 |
138 $outstr .= ' var settings'.$unr.' = {'.PHP_EOL; |
138 $outstr .= ' var settings'.$unr.' = {'.PHP_EOL; |
139 $outstr .= ' title: "Fermentation temperature",'.PHP_EOL; |
139 $outstr .= ' title: "Fermentation history",'.PHP_EOL; |
140 $outstr .= ' description: "",'.PHP_EOL; |
140 $outstr .= ' description: "",'.PHP_EOL; |
141 $outstr .= ' padding: { left: 5, top: 5, right: 5, bottom: 5 },'.PHP_EOL; |
141 $outstr .= ' padding: { left: 5, top: 5, right: 5, bottom: 5 },'.PHP_EOL; |
142 $outstr .= ' titlePadding: { left: 90, top: 0, right: 0, bottom: 10 },'.PHP_EOL; |
142 $outstr .= ' titlePadding: { left: 90, top: 0, right: 0, bottom: 10 },'.PHP_EOL; |
143 $outstr .= ' source: dataAdapter'.$unr.','.PHP_EOL; |
143 $outstr .= ' source: dataAdapter'.$unr.','.PHP_EOL; |
144 $outstr .= ' categoryAxis:'.PHP_EOL; |
144 $outstr .= ' categoryAxis:'.PHP_EOL; |
174 $outstr .= ' setInterval(function(){'.PHP_EOL; |
174 $outstr .= ' setInterval(function(){'.PHP_EOL; |
175 $outstr .= ' $.getJSON("getstate.php?uuid='.$unit.'", function(data) {'.PHP_EOL; |
175 $outstr .= ' $.getJSON("getstate.php?uuid='.$unit.'", function(data) {'.PHP_EOL; |
176 $outstr .= ' $("#load_air_'.$unr.'").html(data.air_temperature);'.PHP_EOL; |
176 $outstr .= ' $("#load_air_'.$unr.'").html(data.air_temperature);'.PHP_EOL; |
177 $outstr .= ' $("#load_beer_'.$unr.'").html(data.beer_temperature);'.PHP_EOL; |
177 $outstr .= ' $("#load_beer_'.$unr.'").html(data.beer_temperature);'.PHP_EOL; |
178 $outstr .= ' $("#load_target_'.$unr.'").html(data.target_temperature);'.PHP_EOL; |
178 $outstr .= ' $("#load_target_'.$unr.'").html(data.target_temperature);'.PHP_EOL; |
|
179 $outstr .= ' $("#load_led1_'.$unr.'").html(data.led1);'.PHP_EOL; |
|
180 $outstr .= ' $("#load_led2_'.$unr.'").html(data.led2);'.PHP_EOL; |
|
181 $outstr .= ' $("#load_led3_'.$unr.'").html(data.led3);'.PHP_EOL; |
179 $outstr .= ' });'.PHP_EOL; |
182 $outstr .= ' });'.PHP_EOL; |
180 $outstr .= ' }, 10000);'.PHP_EOL; |
183 $outstr .= ' }, 10000);'.PHP_EOL; |
181 $outstr .= ' });'.PHP_EOL; |
184 $outstr .= ' });'.PHP_EOL; |
182 $outstr .= ' </script>'.PHP_EOL; |
185 $outstr .= ' </script>'.PHP_EOL; |
183 $outstr .= ' <div id="fermentor">'.PHP_EOL; |
186 $outstr .= ' <div id="fermentor">'.PHP_EOL; |
215 $outstr .= ' <div id="fermentor_display3">'.PHP_EOL; |
218 $outstr .= ' <div id="fermentor_display3">'.PHP_EOL; |
216 $outstr .= ' <div id="load_beer_'.$unr.'" class="dtemp">'.$beer_temperature.'</div>Beer'.PHP_EOL; |
219 $outstr .= ' <div id="load_beer_'.$unr.'" class="dtemp">'.$beer_temperature.'</div>Beer'.PHP_EOL; |
217 $outstr .= ' </div>'.PHP_EOL; |
220 $outstr .= ' </div>'.PHP_EOL; |
218 $outstr .= ' </div> <!-- fermentor_panel_display -->'.PHP_EOL; |
221 $outstr .= ' </div> <!-- fermentor_panel_display -->'.PHP_EOL; |
219 |
222 |
220 |
|
221 $outstr .= ' <div id="fermentor_panel_control">'.PHP_EOL; |
223 $outstr .= ' <div id="fermentor_panel_control">'.PHP_EOL; |
222 if ($cooler_state == "100") |
224 if ($cooler_state == "100") |
223 $cooler_led = "on"; |
225 $cooler_led = "on"; |
224 $outstr .= ' <div id="fermentor_led1">'.PHP_EOL; |
226 $outstr .= ' <div id="fermentor_led1">'.PHP_EOL; |
225 $outstr .= ' <img src="images/led_green_'.$cooler_led.'.png"><br>Cool'.PHP_EOL; |
227 $outstr .= ' <div id="load_led1_'.$unr.'"><img src="images/led_green_'.$cooler_led.'.png"></div>Cool'.PHP_EOL; |
226 $outstr .= ' </div>'.PHP_EOL; |
228 $outstr .= ' </div>'.PHP_EOL; |
227 if ($heater_state == "100") |
229 if ($heater_state == "100") |
228 $heater_led = "on"; |
230 $heater_led = "on"; |
229 $outstr .= ' <div id="fermentor_led2">'.PHP_EOL; |
231 $outstr .= ' <div id="fermentor_led2">'.PHP_EOL; |
230 $outstr .= ' <img src="images/led_green_'.$heater_led.'.png"><br>Heat'.PHP_EOL; |
232 $outstr .= ' <div id="load_led2_'.$unr.'"><img src="images/led_green_'.$heater_led.'.png"></div>Heat'.PHP_EOL; |
231 $outstr .= ' </div>'.PHP_EOL; |
233 $outstr .= ' </div>'.PHP_EOL; |
232 if ($fan_state == "100") |
234 if ($fan_state == "100") |
233 $fan_led = "on"; |
235 $fan_led = "on"; |
234 $outstr .= ' <div id="fermentor_led3">'.PHP_EOL; |
236 $outstr .= ' <div id="fermentor_led3">'.PHP_EOL; |
235 $outstr .= ' <img src="images/led_green_'.$fan_led.'.png"><br>Fan'.PHP_EOL; |
237 $outstr .= ' <div id="load_led3_'.$unr.'"><img src="images/led_green_'.$fan_led.'.png"></div>Fan'.PHP_EOL; |
236 $outstr .= ' </div>'.PHP_EOL; |
238 $outstr .= ' </div>'.PHP_EOL; |
237 |
239 |
238 $outstr .= ' <div id="fermentor_toggle1">'.PHP_EOL; |
240 $outstr .= ' <div id="fermentor_toggle1">'.PHP_EOL; |
239 $outstr .= ' <form action="index.php" method="post">'.PHP_EOL; |
241 $outstr .= ' <form action="index.php" method="post">'.PHP_EOL; |
240 (($mode == "NONE") && ($cooler == "yes")) ? $dis = "" : $dis = " disabled"; |
242 (($mode == "NONE") && ($cooler == "yes")) ? $dis = "" : $dis = " disabled"; |