www-thermferm/getstate.php

changeset 522
4d9ed666431d
parent 397
00ca08f5a6f8
child 529
00b45f2aaac3
--- a/www-thermferm/getstate.php	Sat Jul 22 23:04:44 2017 +0200
+++ b/www-thermferm/getstate.php	Sat Jul 22 23:34:50 2017 +0200
@@ -1,6 +1,6 @@
 <?php
 /*****************************************************************************
- * Copyright (C) 2014
+ * Copyright (C) 2014-2017
  *   
  * Michiel Broek <mbroek at mbse dot eu>
  *
@@ -35,12 +35,14 @@
 $air_state = "NA";
 $beer_temperature = "NA";
 $beer_state = "NA";
+$chiller_temperature = "NA";
+$chiller_state = "NA";
 $target_temperature_lo = "NA";
 $target_temperature_hi = "NA";
 $led1 = $led2 = $led3 = $sw1 = $sw2 = $sw3 = "";
 $fridge_set = "NA";
 $beer_set = "NA";
-$heater = $cooler = $fan = $psu = $door = "no";
+$heater = $cooler = $chiller = $fan = $psu = $door = "no";
 $prof_state = "OFF";
 $mode = "NA";
 $cooler_state = "NA";
@@ -63,6 +65,10 @@
 		$beer_state = $f[1];
 	if (($f[0] == "BEER_TEMPERATURE") && ($beer_state == "OK"))
 		$beer_temperature = $f[1];
+	if ($f[0] == "CHILLER_STATE")
+	    	$chiller_state = $f[1];
+	if (($f[0] == "CHILLER_TEMPERATURE") && ($chiller_state == "OK"))
+	    	$chiller_temperature = $f[1];
 	if ($f[0] == "MODE")
 		$mode = $f[1];
 	if (($f[0] == "COOLER_ADDRESS") && (strcmp($f[1], "(null)")))
@@ -144,6 +150,7 @@
 $reply = array (
     'air_temperature'       => $air_temperature,
     'beer_temperature'      => $beer_temperature,
+    'chiller_temperature'   => $chiller_temperature,
     'target_temperature_lo' => $target_temperature_lo,
     'target_temperature_hi' => $target_temperature_hi,
     'mode'                  => $modestr,

mercurial