diff -r 66d4e137b99d -r 00ca08f5a6f8 www-thermferm/getstate.php --- a/www-thermferm/getstate.php Tue Sep 15 17:29:15 2015 +0200 +++ b/www-thermferm/getstate.php Wed Sep 16 22:05:05 2015 +0200 @@ -35,7 +35,8 @@ $air_state = "NA"; $beer_temperature = "NA"; $beer_state = "NA"; -$target_temperature = "NA"; +$target_temperature_lo = "NA"; +$target_temperature_hi = "NA"; $led1 = $led2 = $led3 = $sw1 = $sw2 = $sw3 = ""; $fridge_set = "NA"; $beer_set = "NA"; @@ -87,11 +88,13 @@ if (($f[0] == "DOOR_ADDRESS") && (strcmp($f[1], "(null)"))) $door = "yes"; if (($f[0] == "BEER_SET") && ($mode == "BEER")) - $target_temperature = $f[1]; + $target_temperature_lo = $target_temperature_hi = $f[1]; if (($f[0] == "FRIDGE_SET") && ($mode == "FRIDGE")) - $target_temperature = $f[1]; - if (($f[0] == "PROF_TARGET") && ($mode == "PROFILE")) - $target_temperature = $f[1]; + $target_temperature_lo = $target_temperature_hi = $f[1]; + if (($f[0] == "PROF_TARGET_LO") && ($mode == "PROFILE")) + $target_temperature_lo = $f[1]; + if (($f[0] == "PROF_TARGET_HI") && ($mode == "PROFILE")) + $target_temperature_hi = $f[1]; if (($f[0] == "PROF_STATE") && ($mode == "PROFILE")) $prof_state = 'State: '.$f[1]; $j++; @@ -139,17 +142,18 @@ $reply = array ( - 'air_temperature' => $air_temperature, - 'beer_temperature' => $beer_temperature, - 'target_temperature' => $target_temperature, - 'mode' => $modestr, - 'led1' => $led1, - 'led2' => $led2, - 'led3' => $led3, - 'sw1' => $sw1, - 'sw2' => $sw2, - 'sw3' => $sw3, - 'profile_state' => $prof_state + 'air_temperature' => $air_temperature, + 'beer_temperature' => $beer_temperature, + 'target_temperature_lo' => $target_temperature_lo, + 'target_temperature_hi' => $target_temperature_hi, + 'mode' => $modestr, + 'led1' => $led1, + 'led2' => $led2, + 'led3' => $led3, + 'sw1' => $sw1, + 'sw2' => $sw2, + 'sw3' => $sw3, + 'profile_state' => $prof_state );