diff --git a/components/zh_config b/components/zh_config index c568d84..4b9ccf8 160000 --- a/components/zh_config +++ b/components/zh_config @@ -1 +1 @@ -Subproject commit c568d84e56eca3b2d74c56dddafb97c9449a8adc +Subproject commit 4b9ccf882de3d534b149d5dfe8b4a5ba080788a9 diff --git a/main/zh_gateway.c b/main/zh_gateway.c index a6d69f3..9d07ba0 100755 --- a/main/zh_gateway.c +++ b/main/zh_gateway.c @@ -955,7 +955,7 @@ void zh_espnow_ota_update_task(void *pvParameter) memcpy(data.payload_data.ota_message.espnow_ota_message.data, espnow_ota_write_data, data_read_size); data.payload_type = ZHPT_UPDATE_PROGRESS; zh_send_message(gateway_config->espnow_ota_data.mac_addr, (uint8_t *)&data, sizeof(zh_espnow_data_t)); - if (xSemaphoreTake(gateway_config->espnow_ota_data_semaphore, 10000 / portTICK_PERIOD_MS) != pdTRUE) + if (xSemaphoreTake(gateway_config->espnow_ota_data_semaphore, 15000 / portTICK_PERIOD_MS) != pdTRUE) { esp_http_client_close(https_client); esp_http_client_cleanup(https_client); @@ -1702,16 +1702,18 @@ void zh_espnow_sensor_send_mqtt_json_status_message(const zh_espnow_data_t *devi sprintf(temperature, "%f", device_data->payload_data.status_message.sensor_status_message.temperature); zh_json_add(&json, "temperature", temperature); break; - case HAST_DHT11: // Deprecated. Will be removed soon. - case HAST_DHT22: // Deprecated. Will be removed soon. case HAST_DHT: + case HAST_AHT: + case HAST_SHT: + case HAST_HTU21D: + case HAST_HDC1080: sprintf(temperature, "%f", device_data->payload_data.status_message.sensor_status_message.temperature); zh_json_add(&json, "temperature", temperature); sprintf(humidity, "%f", device_data->payload_data.status_message.sensor_status_message.humidity); zh_json_add(&json, "humidity", humidity); break; case HAST_BH1750: - sprintf(temperature, "%f", device_data->payload_data.status_message.sensor_status_message.illuminance); + sprintf(illuminance, "%f", device_data->payload_data.status_message.sensor_status_message.illuminance); zh_json_add(&json, "illuminance", illuminance); break; case HAST_BMP280: diff --git a/main/zh_gateway.h b/main/zh_gateway.h index 5ce2265..1b904fd 100755 --- a/main/zh_gateway.h +++ b/main/zh_gateway.h @@ -141,7 +141,7 @@ void zh_eth_event_handler(void *arg, esp_event_base_t event_base, int32_t event_ void zh_wifi_event_handler(void *arg, esp_event_base_t event_base, int32_t event_id, void *event_data); /** - * @brief Function for ESP-NOW event processing + * @brief Function for ESP-NOW event processing. * * @param[in,out] arg Pointer to the structure of data exchange between tasks, functions and event handlers. */ diff --git a/version.txt b/version.txt index 1464c52..ece61c6 100755 --- a/version.txt +++ b/version.txt @@ -1 +1 @@ -1.0.5 \ No newline at end of file +1.0.6 \ No newline at end of file