diff -r 48d19ec83a49 -r 988a898974f3 www-thermferm/liveview.php --- a/www-thermferm/liveview.php Mon Aug 04 15:25:13 2014 +0200 +++ b/www-thermferm/liveview.php Mon Aug 04 19:31:03 2014 +0200 @@ -56,6 +56,7 @@ $beer_temperature = "NA"; $power_led = $cooler_led = $heater_led = $fan_led = "off"; $heater = $cooler = $fan = "no"; + $heater_state = $cooler_state = $fan_state = 0; foreach($arr as $l) { $vals = explode(",", $l); @@ -76,15 +77,24 @@ if ((strcmp($vals[0], "BEER_TEMPERATURE") == 0) && ($beer_state == 0)) { $beer_temperature = $vals[1]; } - if ((strcmp($vals[0], "HEATER") == 0) && (strcmp($vals[1], "YES"))) { + if ((strcmp($vals[0], "HEATER_ADDRESS") == 0) && (strcmp($vals[1], "(null)"))) { $heater = "yes"; } - if ((strcmp($vals[0], "COOLER") == 0) && (strcmp($vals[1], "YES"))) { + if (strcmp($vals[0], "HEATER_STATE") == 0) { + $heater_state = $vals[1]; + } + if ((strcmp($vals[0], "COOLER_ADDRESS") == 0) && (strcmp($vals[1], "(null)"))) { $cooler = "yes"; } - if ((strcmp($vals[0], "FAN") == 0) && (strcmp($vals[1], "YES"))) { + if (strcmp($vals[0], "COOLER_STATE") == 0) { + $cooler_state = $vals[1]; + } + if ((strcmp($vals[0], "FAN_ADDRESS") == 0) && (strcmp($vals[1], "(null)"))) { $fan = "yes"; } + if (strcmp($vals[0], "FAN_STATE") == 0) { + $fan_state = $vals[1]; + } } $outstr .= '