diff -r 908ef02d5d22 -r 00b45f2aaac3 www-thermferm/getstate.php --- a/www-thermferm/getstate.php Tue Jul 25 21:08:26 2017 +0200 +++ b/www-thermferm/getstate.php Fri Jul 28 13:28:11 2017 +0200 @@ -26,7 +26,7 @@ if (isset($_GET["uuid"])) $uuid = $_GET["uuid"]; else - $uuid = "48c9ae27-3f58-41c9-ae4b-1d57b249c45a"; + $uuid = "e53858c3-a97e-4b07-85e9-524257909f45"; $answer = send_cmd('UNIT GET '.$uuid); $arr = explode("\r\n", $answer); @@ -39,7 +39,7 @@ $chiller_state = "NA"; $target_temperature_lo = "NA"; $target_temperature_hi = "NA"; -$led1 = $led2 = $led3 = $sw1 = $sw2 = $sw3 = ""; +$led1 = $led2 = $led3 = $sw1 = $sw2 = $sw3 = $alarmled = ""; $fridge_set = "NA"; $beer_set = "NA"; $heater = $cooler = $chiller = $fan = $psu = $door = "no"; @@ -49,12 +49,11 @@ $heater_state = "NA"; $fan_state = "NA"; - if (startsWith($arr[0], "213")) { $j = 1; while (1) { if (strcmp($arr[$j], ".") == 0) - break; + break; $f = explode(",", $arr[$j]); if ($f[0] == "AIR_STATE") @@ -103,6 +102,8 @@ $target_temperature_hi = $f[1]; if (($f[0] == "PROF_STATE") && ($mode == "PROFILE")) $prof_state = 'State: '.$f[1]; + if ($f[0] == "ALARM") + $alarmled = $f[1] ? '
' : '
'; $j++; } } @@ -160,7 +161,8 @@ 'sw1' => $sw1, 'sw2' => $sw2, 'sw3' => $sw3, - 'profile_state' => $prof_state + 'profile_state' => $prof_state, + 'alarm' => $alarmled );