# HG changeset patch # User Michiel Broek # Date 1498497667 -7200 # Node ID fd36bedab9443bca02eb4eae6be2a4e98ae340ce # Parent 5fd12d9f3f84001a8adec442d2ba5218f3868616 Added chiller configuration items diff -r 5fd12d9f3f84 -r fd36bedab944 thermferm/mqtt.c --- a/thermferm/mqtt.c Mon Jun 26 13:58:11 2017 +0200 +++ b/thermferm/mqtt.c Mon Jun 26 19:21:07 2017 +0200 @@ -272,6 +272,19 @@ payload = xstrcat(payload, (char *)",\"beer\":null"); } + if (unit->chiller_address) { + payload = xstrcat(payload, (char *)",\"chiller\":{\"address\":\""); + payload = xstrcat(payload, unit->chiller_address); + payload = xstrcat(payload, (char *)"\",\"state\":\""); + payload = xstrcat(payload, (char *)TEMPSTATE[unit->chiller_state]); + payload = xstrcat(payload, (char *)"\",\"temperature\":"); + sprintf(buf, "%.3f", unit->chiller_temperature / 1000.0); + payload = xstrcat(payload, buf); + payload = xstrcat(payload, (char *)"}"); + } else { + payload = xstrcat(payload, (char *)",\"chiller\":null"); + } + if (unit->heater_address) { payload = xstrcat(payload, (char *)",\"heater\":{\"address\":\""); payload = xstrcat(payload, unit->heater_address); diff -r 5fd12d9f3f84 -r fd36bedab944 thermferm/rdconfig.c --- a/thermferm/rdconfig.c Mon Jun 26 13:58:11 2017 +0200 +++ b/thermferm/rdconfig.c Mon Jun 26 19:21:07 2017 +0200 @@ -81,6 +81,8 @@ free(tmp2->air_address); if (tmp2->beer_address) free(tmp2->beer_address); + if (tmp2->chiller_address) + free(tmp2->chiller_address); if (tmp2->heater_address) free(tmp2->heater_address); if (tmp2->cooler_address) @@ -383,6 +385,24 @@ return 1; } } + if (tmp3->chiller_address) { + if (((rc = xmlTextWriterWriteFormatElement(writer, BAD_CAST "CHILLER_ADDRESS", "%s", tmp3->chiller_address)) < 0)) { + syslog(LOG_NOTICE, "wrconfig: error at xmlTextWriterWriteFormatElement"); + return 1; + } + if (((rc = xmlTextWriterWriteFormatElement(writer, BAD_CAST "CHILLER_STATE", "%d", tmp3->chiller_state)) < 0)) { + syslog(LOG_NOTICE, "wrconfig: error at xmlTextWriterWriteFormatElement"); + return 1; + } + if (((rc = xmlTextWriterWriteFormatElement(writer, BAD_CAST "CHILLER_TEMPERATURE", "%d", tmp3->chiller_temperature)) < 0)) { + syslog(LOG_NOTICE, "wrconfig: error at xmlTextWriterWriteFormatElement"); + return 1; + } + if (((rc = xmlTextWriterWriteFormatElement(writer, BAD_CAST "CHILLER_IDX", "%d", tmp3->chiller_idx)) < 0)) { + syslog(LOG_NOTICE, "wrconfig: error at xmlTextWriterWriteFormatElement"); + return 1; + } + } if (tmp3->heater_address) { if (((rc = xmlTextWriterWriteFormatElement(writer, BAD_CAST "HEATER_ADDRESS", "%s", tmp3->heater_address)) < 0)) { syslog(LOG_NOTICE, "wrconfig: error at xmlTextWriterWriteFormatElement"); @@ -1069,15 +1089,15 @@ unit = (units_list *)malloc(sizeof(units_list)); unit->next = NULL; unit->version = 1; - unit->uuid = unit->name = unit->alias = unit->air_address = unit->beer_address = unit->heater_address = \ + unit->uuid = unit->name = unit->alias = unit->air_address = unit->beer_address = unit->chiller_address = unit->heater_address = \ unit->cooler_address = unit->fan_address = unit->door_address = \ unit->light_address = unit->psu_address = unit->profile = NULL; unit->volume = unit->prof_peak_abs = unit->prof_peak_rel = 0.0; - unit->air_temperature = unit->beer_temperature = unit->beer_set = unit->fridge_set = 20.0; - unit->air_state = unit->beer_state = 1; // missing + unit->air_temperature = unit->beer_temperature = unit->chiller_temperature = unit->beer_set = unit->fridge_set = 20.0; + unit->air_state = unit->beer_state = unit->chiller_state = 1; // missing unit->heater_state = unit->cooler_state = unit->fan_state = unit->door_state = \ unit->light_state = unit->psu_state = unit->mode = unit->prof_state = 0; - unit->air_idx = unit->beer_idx = unit->heater_idx = unit->cooler_idx = unit->fan_idx = \ + unit->air_idx = unit->beer_idx = unit->chiller_idx = unit->heater_idx = unit->cooler_idx = unit->fan_idx = \ unit->door_idx = unit->light_idx = unit->psu_idx = 0; unit->heater_delay = unit->cooler_delay = unit->fan_delay = 20; /* 5 minutes delay */ unit->light_delay = 1; /* 15 seconds delay */ @@ -1160,6 +1180,27 @@ unit->beer_temperature = ival; xmlFree(key); } + if ((!xmlStrcmp(cur->name, (const xmlChar *)"CHILLER_ADDRESS"))) { + unit->chiller_address = (char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1); + } + if ((!xmlStrcmp(cur->name, (const xmlChar *)"CHILLER_STATE"))) { + key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1); + if (sscanf((const char *)key, "%d", &ival) == 1) + unit->chiller_state = ival; + xmlFree(key); + } + if ((!xmlStrcmp(cur->name, (const xmlChar *)"CHILLER_IDX"))) { + key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1); + if (sscanf((const char *)key, "%d", &ival) == 1) + unit->chiller_idx = ival; + xmlFree(key); + } + if ((!xmlStrcmp(cur->name, (const xmlChar *)"CHILLER_TEMPERATURE"))) { + key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1); + if (sscanf((const char *)key, "%d", &ival) == 1) + unit->chiller_temperature = ival; + xmlFree(key); + } if ((!xmlStrcmp(cur->name, (const xmlChar *)"HEATER_ADDRESS"))) { unit->heater_address = (char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1); } diff -r 5fd12d9f3f84 -r fd36bedab944 thermferm/server.c --- a/thermferm/server.c Mon Jun 26 13:58:11 2017 +0200 +++ b/thermferm/server.c Mon Jun 26 19:21:07 2017 +0200 @@ -1864,6 +1864,9 @@ if (current->beer_address) free(current->beer_address); current->beer_address = NULL; + if (current->chiller_address) + free(current->chiller_address); + current->chiller_address = NULL; if (current->heater_address) free(current->heater_address); current->heater_address = NULL; @@ -1904,6 +1907,9 @@ if (current->beer_address) free(current->beer_address); current->beer_address = NULL; + if (current->chiller_address) + free(current->chiller_address); + current->chiller_address = NULL; if (current->heater_address) free(current->heater_address); current->heater_address = NULL; @@ -2009,14 +2015,14 @@ uuid_unparse(uu, unit->uuid); unit->name = xstrcpy(param); unit->alias = xstrcpy(an); - unit->air_address = unit->beer_address = unit->heater_address = unit->cooler_address = \ + unit->air_address = unit->beer_address = unit->chiller_address = unit->heater_address = unit->cooler_address = \ unit->fan_address = unit->door_address = unit->light_address = \ unit->psu_address = unit->profile = NULL; - unit->air_idx = unit->beer_idx = unit->heater_idx = unit->cooler_idx = unit->fan_idx = \ + unit->air_idx = unit->beer_idx = unit->chiller_idx = unit->heater_idx = unit->cooler_idx = unit->fan_idx = \ unit->door_idx = unit->light_idx = unit->psu_idx = 0; unit->volume = unit->prof_peak_abs = unit->prof_peak_rel = 0.0; - unit->air_state = unit->beer_state = 1; - unit->air_temperature = unit->beer_temperature = 20000; + unit->air_state = unit->beer_state = unit->chiller_state = 1; + unit->air_temperature = unit->beer_temperature = unit->chiller_temperature = 20000; unit->beer_set = unit->fridge_set = 20.0; unit->heater_state = unit->cooler_state = unit->fan_state = unit->door_state = unit->mode = \ unit->light_state = unit->psu_state = unit->prof_state = 0; @@ -2102,6 +2108,10 @@ srv_send((char *)"BEER_STATE,%s", TEMPSTATE[unit->beer_state]); srv_send((char *)"BEER_TEMPERATURE,%.3f", unit->beer_temperature / 1000.0); srv_send((char *)"BEER_IDX,%d", unit->beer_idx); + srv_send((char *)"CHILLER_ADDRESS,%s", MBSE_SS(unit->chiller_address)); + srv_send((char *)"CHILLER_STATE,%s", TEMPSTATE[unit->chiller_state]); + srv_send((char *)"CHILLER_TEMPERATURE,%.3f", unit->chiller_temperature / 1000.0); + srv_send((char *)"CHILLER_IDX,%d", unit->chiller_idx); srv_send((char *)"HEATER_ADDRESS,%s", unit->heater_address); srv_send((char *)"HEATER_STATE,%d", unit->heater_state); srv_send((char *)"HEATER_DELAY,%d", unit->heater_delay); @@ -2264,6 +2274,27 @@ unit->beer_idx = ival; } + } else if (strcmp(kwd, (char *)"CHILLER_ADDRESS") == 0) { + if (val && unit->chiller_address && (strcmp(val, unit->chiller_address))) + syslog(LOG_NOTICE, "Fermenter unit %s chiller address `%s' to `%s'", unit->uuid, unit->chiller_address, val); + if (unit->chiller_address) { + device_count(FALSE, unit->chiller_address); + free(unit->chiller_address); + } + if (val) { + unit->chiller_address = xstrcpy(val); + device_count(TRUE, unit->chiller_address); + } else + unit->chiller_address = NULL; + unit->mqtt_flag |= MQTT_FLAG_DATA; + + } else if (val && (strcmp(kwd, (char *)"CHILLER_IDX") == 0)) { + if (sscanf(val, "%d", &ival) == 1) { + if (unit->chiller_idx != ival) + syslog(LOG_NOTICE, "Fermenter unit %s chiller idx %d to %d", unit->uuid, unit->chiller_idx, ival); + unit->beer_idx = ival; + } + } else if (strcmp(kwd, (char *)"HEATER_ADDRESS") == 0) { if (val && unit->heater_address && (strcmp(val, unit->heater_address))) syslog(LOG_NOTICE, "Fermenter unit %s heater address `%s' to `%s'", unit->uuid, unit->heater_address, val); diff -r 5fd12d9f3f84 -r fd36bedab944 thermferm/thermferm.c --- a/thermferm/thermferm.c Mon Jun 26 13:58:11 2017 +0200 +++ b/thermferm/thermferm.c Mon Jun 26 19:21:07 2017 +0200 @@ -1240,7 +1240,7 @@ unit->air_temperature = temp; unit->air_state = 0; } else { - syslog(LOG_NOTICE, "deviation error deviation=%d, old=%d new=%d", deviation, unit->air_temperature, temp); + syslog(LOG_NOTICE, "deviation error air deviation=%d, old=%d new=%d", deviation, unit->air_temperature, temp); } } else if (rc == DEVPRESENT_ERROR) { unit->air_state = 1; @@ -1262,7 +1262,7 @@ unit->beer_temperature = temp; unit->beer_state = 0; } else { - syslog(LOG_NOTICE, "deviation error deviation=%d, old=%d new=%d", deviation, unit->beer_temperature, temp); + syslog(LOG_NOTICE, "deviation error beer deviation=%d, old=%d new=%d", deviation, unit->beer_temperature, temp); } } else if (rc == DEVPRESENT_ERROR) { unit->beer_state = 1; @@ -1271,6 +1271,28 @@ } } + if (unit->chiller_address) { + rc = device_in(unit->chiller_address, &temp); + if (rc == DEVPRESENT_YES) { + deviation = 40000; + if ((unit->chiller_temperature == 0) || + (unit->chiller_temperature && (temp > (int)unit->chiller_temperature - deviation) && (temp < ((int)unit->chiller_temperature + deviation)))) { + if (unit->chiller_temperature != temp) { + unit->mqtt_flag |= MQTT_FLAG_DATA; + pub_domoticz_temp(unit->chiller_idx, temp); + } + unit->chiller_temperature = temp; + unit->chiller_state = 0; + } else { + syslog(LOG_NOTICE, "deviation error chiller deviation=%d, old=%d new=%d", deviation, unit->chiller_temperature, temp); + } + } else if (rc == DEVPRESENT_ERROR) { + unit->chiller_state = 1; + } else { + unit->chiller_state = 2; + } + } + /* * Unit door state, default is closed. */ @@ -1629,6 +1651,14 @@ if ((unit->mode == UNITMODE_BEER) && ((unit->air_temperature / 1000.0) < (unit->PID_cool->Input - 5.0))) { unit->PID_cool->OutP = 0.0; } + /* + * Prevent cooling if we use a chiller and the chiller temperature is not low enough. + */ + if (unit->chiller_address && (unit->chiller_state == 0)) { + if ((unit->chiller_temperature / 1000.0) > (unit->PID_cool->Input - 1)) { + unit->PID_cool->OutP = 0.0; + } + } if (debug) fprintf(stdout, "Cool: sp=%.2f Input=%.2f iState=%.2f Err=%.2f Out=%.2f\n", unit->PID_cool->SetP, unit->PID_cool->Input, unit->PID_cool->iState, unit->PID_cool->Err, unit->PID_cool->OutP); diff -r 5fd12d9f3f84 -r fd36bedab944 thermferm/thermferm.h --- a/thermferm/thermferm.h Mon Jun 26 13:58:11 2017 +0200 +++ b/thermferm/thermferm.h Mon Jun 26 19:21:07 2017 +0200 @@ -142,6 +142,10 @@ int beer_state; /* 0=ok, 1=missing, 2=error */ int beer_temperature; /* Beer temperature in C * 1000 */ int beer_idx; /* Domoticz idx */ + char *chiller_address; /* DS18B20 address */ + int chiller_state; /* 0=ok, 1=missing, 2=error */ + int chiller_temperature; /* Chiller temp. in C * 1000 */ + int chiller_idx; /* Domoticz idx */ char *heater_address; /* Heater relay or PWM */ int heater_state; /* Heater state 0..100 */ int heater_delay; /* Heater delay time /15 sec */ diff -r 5fd12d9f3f84 -r fd36bedab944 www-thermferm/css/style.css --- a/www-thermferm/css/style.css Mon Jun 26 13:58:11 2017 +0200 +++ b/www-thermferm/css/style.css Mon Jun 26 19:21:07 2017 +0200 @@ -149,7 +149,7 @@ } td.editfield { - width: 500px; + width: 300px; padding: 1px 3px 1px 3px; } diff -r 5fd12d9f3f84 -r fd36bedab944 www-thermferm/units.php --- a/www-thermferm/units.php Mon Jun 26 13:58:11 2017 +0200 +++ b/www-thermferm/units.php Mon Jun 26 19:21:07 2017 +0200 @@ -96,6 +96,8 @@ $cmd[] = "AIR_IDX,".$_POST['AirIdx']; $cmd[] = "BEER_ADDRESS,".$_POST['BeerAddress']; $cmd[] = "BEER_IDX,".$_POST['BeerIdx']; + $cmd[] = "CHILLER_ADDRESS,".$_POST['ChillerAddress']; + $cmd[] = "CHILLER_IDX,".$_POST['ChillerIdx']; $cmd[] = "HEATER_ADDRESS,".$_POST['HeaterAddress']; $cmd[] = "HEATER_DELAY,".$_POST['HeaterDelay']; $cmd[] = "HEATER_IDX,".$_POST['HeaterIdx']; @@ -137,6 +139,8 @@ unset($_POST['AirIdx']); unset($_POST['BeerAddress']); unset($_POST['BeerIdx']); + unset($_POST['ChillerAddress']); + unset($_POST['ChillerIdx']); unset($_POST['HeaterAddress']); unset($_POST['HeaterDelay']); unset($_POST['HeaterIdx']); @@ -197,7 +201,7 @@ global $arr; - if (isset($_POST['UUID']) && isset($_POST['Name']) && isset($_POST['Volume']) && isset($_POST['AirAddress']) && + if (isset($_POST['UUID']) && isset($_POST['Name']) && isset($_POST['Volume']) && isset($_POST['AirAddress']) && isset($_POST['ChillerAddress']) && isset($_POST['BeerAddress']) && isset($_POST['HeaterAddress']) && isset($_POST['CoolerAddress']) && isset($_POST['LightAddress']) && isset($_POST['HeaterDelay']) && isset($_POST['CoolerDelay']) && isset($_POST['LightDelay']) && isset($_POST['PSUAddress']) && isset($_POST['FanAddress']) && isset($_POST['DoorAddress']) && isset($_POST['TempSetMin']) && isset($_POST['TempSetMax']) && @@ -205,7 +209,7 @@ isset($_POST['PIDH_pGain']) && isset($_POST['PIDH_iGain']) && isset($_POST['PIDH_dGain']) && isset($_POST['PIDH_idleRange']) && isset($_POST['PIDC_iMax']) && isset($_POST['PIDH_iMax']) && isset($_POST['AirIdx']) && isset($_POST['BeerIdx']) && isset($_POST['HeaterIdx']) && isset($_POST['CoolerIdx']) && isset($_POST['LightIdx']) && isset($_POST['DoorIdx']) && - isset($_POST['PSUIdx']) && isset($_POST['FanIdx']) && + isset($_POST['PSUIdx']) && isset($_POST['FanIdx']) && isset($_POST['ChillerIdx']) && isset($_POST['FanDelay']) && isset($_POST['key']) && isset($_POST['command'])) { if ($_POST['key'] == 'Cancel') @@ -360,13 +364,13 @@ if ($f[0] == "NAME") { $outstr .= ' '.PHP_EOL; $outstr .= ' Unit Name'.PHP_EOL; - $outstr .= ' '.PHP_EOL; + $outstr .= ' '.PHP_EOL; $outstr .= ' '.PHP_EOL; } if ($f[0] == "VOLUME") { $outstr .= ' '.PHP_EOL; $outstr .= ' Unit Volume'.PHP_EOL; - $outstr .= ' '.PHP_EOL; + $outstr .= ' '.PHP_EOL; $outstr .= ' '.PHP_EOL; } if ($f[0] == "AIR_ADDRESS") { @@ -388,10 +392,10 @@ } } $outstr .= ' '.PHP_EOL; - $outstr .= ' '.PHP_EOL; +// $outstr .= ' '.PHP_EOL; } if ($f[0] == "AIR_IDX") { - $outstr .= ' '.PHP_EOL; +// $outstr .= ' '.PHP_EOL; $outstr .= ' Air domoticz idx'.PHP_EOL; $outstr .= ' '.PHP_EOL; $outstr .= ' '.PHP_EOL; @@ -415,14 +419,41 @@ } } $outstr .= ' '.PHP_EOL; - $outstr .= ' '.PHP_EOL; +// $outstr .= ' '.PHP_EOL; } if ($f[0] == "BEER_IDX") { - $outstr .= ' '.PHP_EOL; +// $outstr .= ' '.PHP_EOL; $outstr .= ' Beer domoticz idx'.PHP_EOL; $outstr .= ' '.PHP_EOL; $outstr .= ' '.PHP_EOL; } + if ($f[0] == "CHILLER_ADDRESS") { + $outstr .= ' '.PHP_EOL; + $outstr .= ' Chiller Sensor Address'.PHP_EOL; + $outstr .= ' '.PHP_EOL; +// $outstr .= ' '.PHP_EOL; + } + if ($f[0] == "CHILLER_IDX") { +// $outstr .= ' '.PHP_EOL; + $outstr .= ' Chiller domoticz idx'.PHP_EOL; + $outstr .= ' '.PHP_EOL; + $outstr .= ' '.PHP_EOL; + } if ($f[0] == "HEATER_ADDRESS") { $outstr .= ' '.PHP_EOL; $outstr .= ' Heater Switch Address'.PHP_EOL; @@ -442,10 +473,10 @@ } } $outstr .= ' '.PHP_EOL; - $outstr .= ' '.PHP_EOL; +// $outstr .= ' '.PHP_EOL; } if ($f[0] == "HEATER_DELAY") { - $outstr .= ' '.PHP_EOL; +// $outstr .= ' '.PHP_EOL; $outstr .= ' Heater Switch Delay'.PHP_EOL; $outstr .= ' seconds (0..720)'.PHP_EOL; $outstr .= ' '.PHP_EOL; @@ -454,16 +485,22 @@ $outstr .= ' '.PHP_EOL; $outstr .= ' Heater domoticz idx'.PHP_EOL; $outstr .= ' '.PHP_EOL; - $outstr .= ' '.PHP_EOL; +// $outstr .= ' '.PHP_EOL; } if ($f[0] == "PIDH_IMAX") { - $outstr .= ' '.PHP_EOL; +// $outstr .= ' '.PHP_EOL; $outstr .= ' PID Heat Maximum'.PHP_EOL; $outstr .= ' % (1..100)'.PHP_EOL; $outstr .= ' '.PHP_EOL; } + if ($f[0] == "PIDH_IDLERANGE") { + $outstr .= ' '.PHP_EOL; + $outstr .= ' Heater Idle Range'.PHP_EOL; + $outstr .= ' °C (Heater margin)'.PHP_EOL; +// $outstr .= ' '.PHP_EOL; + } if ($f[0] == "PIDH_PGAIN") { - $outstr .= ' '.PHP_EOL; +// $outstr .= ' '.PHP_EOL; $outstr .= ' PID Heat pGain'.PHP_EOL; $outstr .= ' Proportional'.PHP_EOL; $outstr .= ' '.PHP_EOL; @@ -472,20 +509,14 @@ $outstr .= ' '.PHP_EOL; $outstr .= ' PID Heat iGain'.PHP_EOL; $outstr .= ' Intergral'.PHP_EOL; - $outstr .= ' '.PHP_EOL; +// $outstr .= ' '.PHP_EOL; } if ($f[0] == "PIDH_DGAIN") { - $outstr .= ' '.PHP_EOL; +// $outstr .= ' '.PHP_EOL; $outstr .= ' PID Heat dGain'.PHP_EOL; $outstr .= ' Derivative'.PHP_EOL; $outstr .= ' '.PHP_EOL; } - if ($f[0] == "PIDH_IDLERANGE") { - $outstr .= ' '.PHP_EOL; - $outstr .= ' Heater Idle Range'.PHP_EOL; - $outstr .= ' °C (Heater margin)'.PHP_EOL; - $outstr .= ' '.PHP_EOL; - } if ($f[0] == "COOLER_ADDRESS") { $outstr .= ' '.PHP_EOL; $outstr .= ' Cooler Switch Address'.PHP_EOL; @@ -505,10 +536,10 @@ } } $outstr .= ' '.PHP_EOL; - $outstr .= ' '.PHP_EOL; +// $outstr .= ' '.PHP_EOL; } if ($f[0] == "COOLER_DELAY") { - $outstr .= ' '.PHP_EOL; +// $outstr .= ' '.PHP_EOL; $outstr .= ' Cooler Switch Delay'.PHP_EOL; $outstr .= ' seconds (0..720)'.PHP_EOL; $outstr .= ' '.PHP_EOL; @@ -517,16 +548,22 @@ $outstr .= ' '.PHP_EOL; $outstr .= ' Cooler domoticz idx'.PHP_EOL; $outstr .= ' '.PHP_EOL; - $outstr .= ' '.PHP_EOL; +// $outstr .= ' '.PHP_EOL; } if ($f[0] == "PIDC_IMAX") { - $outstr .= ' '.PHP_EOL; +// $outstr .= ' '.PHP_EOL; $outstr .= ' PID Cool Maximum'.PHP_EOL; $outstr .= ' % (1..100)'.PHP_EOL; $outstr .= ' '.PHP_EOL; } + if ($f[0] == "PIDC_IDLERANGE") { + $outstr .= ' '.PHP_EOL; + $outstr .= ' Cooler Idle Range'.PHP_EOL; + $outstr .= ' °C (Cooler margin)'.PHP_EOL; +// $outstr .= ' '.PHP_EOL; + } if ($f[0] == "PIDC_PGAIN") { - $outstr .= ' '.PHP_EOL; +// $outstr .= ' '.PHP_EOL; $outstr .= ' PID Cool pGain'.PHP_EOL; $outstr .= ' Proportional'.PHP_EOL; $outstr .= ' '.PHP_EOL; @@ -535,20 +572,14 @@ $outstr .= ' '.PHP_EOL; $outstr .= ' PID Cool iGain'.PHP_EOL; $outstr .= ' Intergral'.PHP_EOL; - $outstr .= ' '.PHP_EOL; +// $outstr .= ' '.PHP_EOL; } if ($f[0] == "PIDC_DGAIN") { - $outstr .= ' '.PHP_EOL; +// $outstr .= ' '.PHP_EOL; $outstr .= ' PID Cool dGain'.PHP_EOL; $outstr .= ' Derivative'.PHP_EOL; $outstr .= ' '.PHP_EOL; } - if ($f[0] == "PIDC_IDLERANGE") { - $outstr .= ' '.PHP_EOL; - $outstr .= ' Cooler Idle Range'.PHP_EOL; - $outstr .= ' °C (Cooler margin)'.PHP_EOL; - $outstr .= ' '.PHP_EOL; - } if ($f[0] == "FAN_ADDRESS") { $outstr .= ' '.PHP_EOL; $outstr .= ' Fan Switch Address'.PHP_EOL; @@ -568,10 +599,10 @@ } } $outstr .= ' '.PHP_EOL; - $outstr .= ' '.PHP_EOL; +// $outstr .= ' '.PHP_EOL; } if ($f[0] == "FAN_DELAY") { - $outstr .= ' '.PHP_EOL; +// $outstr .= ' '.PHP_EOL; $outstr .= ' Fan Switch Delay'.PHP_EOL; $outstr .= ' seconds (0..720)'.PHP_EOL; $outstr .= ' '.PHP_EOL; @@ -579,7 +610,7 @@ if ($f[0] == "FAN_IDX") { $outstr .= ' '.PHP_EOL; $outstr .= ' Fan domoticz idx'.PHP_EOL; - $outstr .= ' '.PHP_EOL; + $outstr .= ' '.PHP_EOL; $outstr .= ' '.PHP_EOL; } if ($f[0] == "LIGHT_ADDRESS") { @@ -601,10 +632,10 @@ } } $outstr .= ' '.PHP_EOL; - $outstr .= ' '.PHP_EOL; +// $outstr .= ' '.PHP_EOL; } if ($f[0] == "LIGHT_DELAY") { - $outstr .= ' '.PHP_EOL; +// $outstr .= ' '.PHP_EOL; $outstr .= ' Lights Delay'.PHP_EOL; $outstr .= ' seconds (0..720)'.PHP_EOL; $outstr .= ' '.PHP_EOL; @@ -612,7 +643,7 @@ if ($f[0] == "LIGHT_IDX") { $outstr .= ' '.PHP_EOL; $outstr .= ' Light domoticz idx'.PHP_EOL; - $outstr .= ' '.PHP_EOL; + $outstr .= ' '.PHP_EOL; $outstr .= ' '.PHP_EOL; } if ($f[0] == "DOOR_ADDRESS") { @@ -634,10 +665,10 @@ } } $outstr .= ' '.PHP_EOL; - $outstr .= ' '.PHP_EOL; +// $outstr .= ' '.PHP_EOL; } if ($f[0] == "DOOR_IDX") { - $outstr .= ' '.PHP_EOL; +// $outstr .= ' '.PHP_EOL; $outstr .= ' Door domoticz idx'.PHP_EOL; $outstr .= ' '.PHP_EOL; $outstr .= ' '.PHP_EOL; @@ -661,10 +692,10 @@ } } $outstr .= ' '.PHP_EOL; - $outstr .= ' '.PHP_EOL; +// $outstr .= ' '.PHP_EOL; } if ($f[0] == "PSU_IDX") { - $outstr .= ' '.PHP_EOL; +// $outstr .= ' '.PHP_EOL; $outstr .= ' PSU domoticz idx'.PHP_EOL; $outstr .= ' '.PHP_EOL; $outstr .= ' '.PHP_EOL; @@ -673,10 +704,10 @@ $outstr .= ' '.PHP_EOL; $outstr .= ' Min. temp setting'.PHP_EOL; $outstr .= ' °C'.PHP_EOL; - $outstr .= ' '.PHP_EOL; +// $outstr .= ' '.PHP_EOL; } if ($f[0] == "TEMP_SET_MAX") { - $outstr .= ' '.PHP_EOL; +// $outstr .= ' '.PHP_EOL; $outstr .= ' Max. temp setting'.PHP_EOL; $outstr .= ' °C'.PHP_EOL; $outstr .= ' '.PHP_EOL; @@ -686,7 +717,7 @@ } $outstr .= ' '.PHP_EOL; $outstr .= ' '.PHP_EOL; - $outstr .= ' '; + $outstr .= ' '; $outstr .= ''; $outstr .= ''; $outstr .= ''; @@ -779,6 +810,8 @@ $outstr .= ''; $outstr .= ''; $outstr .= ''; + $outstr .= ''; + $outstr .= ''; $outstr .= ''; $outstr .= ''; $outstr .= '';