Thu, 25 Apr 2024 14:26:47 +0200
Version 0.9.19a6. Fixes after a short trial on the production controller. Fixed json for alternate beer termperature sensor. Fixed division by 1000 for the room temperature and humidity values. The dropdown list for devices shows the address instead of description in the list.
configure | file | annotate | diff | comparison | revisions | |
configure.ac | file | annotate | diff | comparison | revisions | |
thermferm/mqtt.c | file | annotate | diff | comparison | revisions | |
thermferm/rdconfig.c | file | annotate | diff | comparison | revisions | |
thermferm/server.c | file | annotate | diff | comparison | revisions | |
www/drop_contacts.php | file | annotate | diff | comparison | revisions | |
www/drop_switches.php | file | annotate | diff | comparison | revisions | |
www/drop_tempsensors.php | file | annotate | diff | comparison | revisions | |
www/js/fermenter.js | file | annotate | diff | comparison | revisions | |
www/js/set_fermenters.js | file | annotate | diff | comparison | revisions |
--- a/configure Wed Apr 24 21:58:27 2024 +0200 +++ b/configure Thu Apr 25 14:26:47 2024 +0200 @@ -2037,7 +2037,7 @@ PACKAGE="mbsePi-apps" -VERSION="0.9.19a5" +VERSION="0.9.19a6" COPYRIGHT="Copyright (C) 2014-2024 Michiel Broek, All Rights Reserved" CYEARS="2014-2024"
--- a/configure.ac Wed Apr 24 21:58:27 2024 +0200 +++ b/configure.ac Thu Apr 25 14:26:47 2024 +0200 @@ -8,7 +8,7 @@ dnl General settings dnl After changeing the version number, run autoconf! PACKAGE="mbsePi-apps" -VERSION="0.9.19a5" +VERSION="0.9.19a6" COPYRIGHT="Copyright (C) 2014-2024 Michiel Broek, All Rights Reserved" CYEARS="2014-2024" AC_SUBST(PACKAGE)
--- a/thermferm/mqtt.c Wed Apr 24 21:58:27 2024 +0200 +++ b/thermferm/mqtt.c Thu Apr 25 14:26:47 2024 +0200 @@ -951,6 +951,10 @@ if (unit->beer_address) { payload = xstrcat(payload, (char *)",\"beer\":{\"address\":\""); payload = xstrcat(payload, unit->beer_address); + if (unit->beer_address2) { + payload = xstrcat(payload, (char *)"\",\"address2\":\""); + payload = xstrcat(payload, unit->beer_address2); + } payload = xstrcat(payload, (char *)"\",\"state\":\""); payload = xstrcat(payload, (char *)DEVPRESENT[unit->beer_state]); payload = xstrcat(payload, (char *)"\",\"temperature\":"); @@ -1519,7 +1523,7 @@ payload = xstrcat(payload, (char *)"\",\"state\":\""); payload = xstrcat(payload, (char *)DEVPRESENT[Config.temp_state]); payload = xstrcat(payload, (char *)"\",\"value\":"); - sprintf(buf, "%d", Config.temp_value); + sprintf(buf, "%.1f", Config.temp_value / 1000.0); payload = xstrcat(payload, buf); payload = xstrcat(payload, (char *)"}"); } @@ -1531,7 +1535,7 @@ payload = xstrcat(payload, (char *)"\",\"state\":\""); payload = xstrcat(payload, (char *)DEVPRESENT[Config.hum_state]); payload = xstrcat(payload, (char *)"\",\"value\":"); - sprintf(buf, "%d", Config.hum_value); + sprintf(buf, "%.1f", Config.hum_value / 1000.0); payload = xstrcat(payload, buf); payload = xstrcat(payload, (char *)"}"); } @@ -1653,14 +1657,14 @@ payload = xstrcat(payload, (char *)"\"THB\":{"); if (Config.temp_uuid) { payload = xstrcat(payload, (char *)"\"temperature\":"); - sprintf(buf, "%d", Config.temp_value); + sprintf(buf, "%.1f", Config.temp_value / 1000.0); payload = xstrcat(payload, buf); } if (Config.temp_uuid && Config.hum_uuid) payload = xstrcat(payload, (char *)","); if (Config.hum_uuid) { payload = xstrcat(payload, (char *)"\"humidity\":"); - sprintf(buf, "%d", Config.hum_value); + sprintf(buf, "%.1f", Config.hum_value / 1000.0); payload = xstrcat(payload, buf); } payload = xstrcat(payload, (char *)"}");
--- a/thermferm/rdconfig.c Wed Apr 24 21:58:27 2024 +0200 +++ b/thermferm/rdconfig.c Thu Apr 25 14:26:47 2024 +0200 @@ -636,12 +636,11 @@ unit->air_temperature = ival; xmlFree(key); } - if ((!xmlStrcmp(cur->name, (const xmlChar *)"BEER_ADDRESS"))) { + if ((!xmlStrcmp(cur->name, (const xmlChar *)"BEER_ADDRESS2"))) { + unit->beer_address2 = (char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1); + } else if ((!xmlStrcmp(cur->name, (const xmlChar *)"BEER_ADDRESS"))) { unit->beer_address = (char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1); } - if ((!xmlStrcmp(cur->name, (const xmlChar *)"BEER_ADDRESS2"))) { - unit->beer_address2 = (char *)xmlNodeListGetString(doc, cur->xmlChildrenNode, 1); - } if ((!xmlStrcmp(cur->name, (const xmlChar *)"BEER_STATE"))) { key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1); if (sscanf((const char *)key, "%d", &ival) == 1)
--- a/thermferm/server.c Wed Apr 24 21:58:27 2024 +0200 +++ b/thermferm/server.c Thu Apr 25 14:26:47 2024 +0200 @@ -740,7 +740,7 @@ srv_send(s, (char *)"TEMP_VALUE,%.1f", Config.temp_value / 1000.0); srv_send(s, (char *)"HUM_UUID,%s", Config.hum_uuid); srv_send(s, (char *)"HUM_STATE,%s", DEVPRESENT[Config.hum_state]); - srv_send(s, (char *)"HUM_VALUE,%.0f", Config.hum_value / 1000.0); + srv_send(s, (char *)"HUM_VALUE,%.1f", Config.hum_value / 1000.0); srv_send(s, (char *)"TEMP_HUM_IDX,%d", Config.temp_hum_idx); srv_send(s, (char *)"LCD_COLS,%d", Config.lcd_cols); srv_send(s, (char *)"LCD_ROWS,%d", Config.lcd_rows);
--- a/www/drop_contacts.php Wed Apr 24 21:58:27 2024 +0200 +++ b/www/drop_contacts.php Thu Apr 25 14:26:47 2024 +0200 @@ -65,7 +65,7 @@ if ($item['direction'] == "IN_BIN") { $sensors[] = array( 'uuid' => $item['uuid'], - 'name' => $item['description']." ".$item['comment'] + 'name' => $item['address']." ".$item['comment'] ); } }
--- a/www/drop_switches.php Wed Apr 24 21:58:27 2024 +0200 +++ b/www/drop_switches.php Thu Apr 25 14:26:47 2024 +0200 @@ -65,7 +65,7 @@ if ($item['direction'] == "OUT_BIN") { $sensors[] = array( 'uuid' => $item['uuid'], - 'name' => $item['description']." ".$item['comment'] + 'name' => $item['address']." ".$item['comment'] ); } }
--- a/www/drop_tempsensors.php Wed Apr 24 21:58:27 2024 +0200 +++ b/www/drop_tempsensors.php Thu Apr 25 14:26:47 2024 +0200 @@ -65,7 +65,7 @@ if ($item['direction'] == "IN_ANALOG") { $sensors[] = array( 'uuid' => $item['uuid'], - 'name' => $item['description']." ".$item['comment'] + 'name' => $item['address']." ".$item['comment'] ); } }
--- a/www/js/fermenter.js Wed Apr 24 21:58:27 2024 +0200 +++ b/www/js/fermenter.js Thu Apr 25 14:26:47 2024 +0200 @@ -169,7 +169,7 @@ }); function updateScreen() { - $('#room_thb').html((global.temp_value / 1000.0) + '°C ' + (global.hum_value / 1000.0) + '% humidity'); + $('#room_thb').html(global.temp_value + '°C ' + global.hum_value + '% humidity'); $('#info_system').html(record.unit); $('#info_beer').html(record.beercode + ' - ' + record.beername); $('#info_mode').jqxDropDownList('selectItem', record.mode);
--- a/www/js/set_fermenters.js Wed Apr 24 21:58:27 2024 +0200 +++ b/www/js/set_fermenters.js Thu Apr 25 14:26:47 2024 +0200 @@ -78,6 +78,7 @@ { name: 'air_address', map: 'air>address' }, { name: 'air_idx', map: 'air>idx', type: 'int' }, { name: 'beer_address', map: 'beer>address' }, + { name: 'beer_address2', map: 'beer>address2' }, { name: 'beer_idx', map: 'beer>idx', type: 'int' }, { name: 'chiller_address', map: 'chiller>address' }, { name: 'chiller_idx', map: 'chiller>idx', type: 'int' },