# HG changeset patch # User Michiel Broek # Date 1407439170 -7200 # Node ID 4136193a0c22ae03a40da3fdc61a02a9d87cc2de # Parent 5d013b4a9138503352a37ed71929b023f3d39cf0 Auto refresh LED's state added. diff -r 5d013b4a9138 -r 4136193a0c22 www-thermferm/getstate.php --- a/www-thermferm/getstate.php Thu Aug 07 20:34:07 2014 +0200 +++ b/www-thermferm/getstate.php Thu Aug 07 21:19:30 2014 +0200 @@ -73,11 +73,11 @@ if ($f[0] == "MODE") $mode = $f[1]; if ($f[0] == "COOLER_STATE") - $led1 = $f[1]; + $led1 = $f[1] ? '' : ''; if ($f[0] == "HEATER_STATE") - $led2 = $f[1]; + $led2 = $f[1] ? '' : ''; if ($f[0] == "FAN_STATE") - $led3 = $f[1]; + $led3 = $f[1] ? '' : ''; if (($f[0] == "BEER_SET") && ($mode == "BEER")) $target_temperature = $f[1]; if (($f[0] == "FRIDGE_SET") && ($mode == "FRIDGE")) diff -r 5d013b4a9138 -r 4136193a0c22 www-thermferm/liveview.php --- a/www-thermferm/liveview.php Thu Aug 07 20:34:07 2014 +0200 +++ b/www-thermferm/liveview.php Thu Aug 07 21:19:30 2014 +0200 @@ -136,7 +136,7 @@ $outstr .= ' });'.PHP_EOL; $outstr .= ' var settings'.$unr.' = {'.PHP_EOL; - $outstr .= ' title: "Fermentation temperature",'.PHP_EOL; + $outstr .= ' title: "Fermentation history",'.PHP_EOL; $outstr .= ' description: "",'.PHP_EOL; $outstr .= ' padding: { left: 5, top: 5, right: 5, bottom: 5 },'.PHP_EOL; $outstr .= ' titlePadding: { left: 90, top: 0, right: 0, bottom: 10 },'.PHP_EOL; @@ -176,6 +176,9 @@ $outstr .= ' $("#load_air_'.$unr.'").html(data.air_temperature);'.PHP_EOL; $outstr .= ' $("#load_beer_'.$unr.'").html(data.beer_temperature);'.PHP_EOL; $outstr .= ' $("#load_target_'.$unr.'").html(data.target_temperature);'.PHP_EOL; + $outstr .= ' $("#load_led1_'.$unr.'").html(data.led1);'.PHP_EOL; + $outstr .= ' $("#load_led2_'.$unr.'").html(data.led2);'.PHP_EOL; + $outstr .= ' $("#load_led3_'.$unr.'").html(data.led3);'.PHP_EOL; $outstr .= ' });'.PHP_EOL; $outstr .= ' }, 10000);'.PHP_EOL; $outstr .= ' });'.PHP_EOL; @@ -217,22 +220,21 @@ $outstr .= ' '.PHP_EOL; $outstr .= ' '.PHP_EOL; - $outstr .= '
'.PHP_EOL; if ($cooler_state == "100") $cooler_led = "on"; $outstr .= '
'.PHP_EOL; - $outstr .= '
Cool'.PHP_EOL; + $outstr .= '
Cool'.PHP_EOL; $outstr .= '
'.PHP_EOL; if ($heater_state == "100") $heater_led = "on"; $outstr .= '
'.PHP_EOL; - $outstr .= '
Heat'.PHP_EOL; + $outstr .= '
Heat'.PHP_EOL; $outstr .= '
'.PHP_EOL; if ($fan_state == "100") $fan_led = "on"; $outstr .= '
'.PHP_EOL; - $outstr .= '
Fan'.PHP_EOL; + $outstr .= '
Fan'.PHP_EOL; $outstr .= '
'.PHP_EOL; $outstr .= '
'.PHP_EOL;