Version 1.0.6

Added support some sensors.
Fixed some bugs.
This commit is contained in:
Alexey Zholtikov 2024-07-03 07:39:39 +03:00
parent 52a2cac8a8
commit b4843954ca
4 changed files with 9 additions and 7 deletions

@ -1 +1 @@
Subproject commit c568d84e56eca3b2d74c56dddafb97c9449a8adc Subproject commit 4b9ccf882de3d534b149d5dfe8b4a5ba080788a9

View File

@ -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); memcpy(data.payload_data.ota_message.espnow_ota_message.data, espnow_ota_write_data, data_read_size);
data.payload_type = ZHPT_UPDATE_PROGRESS; data.payload_type = ZHPT_UPDATE_PROGRESS;
zh_send_message(gateway_config->espnow_ota_data.mac_addr, (uint8_t *)&data, sizeof(zh_espnow_data_t)); 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_close(https_client);
esp_http_client_cleanup(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); sprintf(temperature, "%f", device_data->payload_data.status_message.sensor_status_message.temperature);
zh_json_add(&json, "temperature", temperature); zh_json_add(&json, "temperature", temperature);
break; break;
case HAST_DHT11: // Deprecated. Will be removed soon.
case HAST_DHT22: // Deprecated. Will be removed soon.
case HAST_DHT: 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); sprintf(temperature, "%f", device_data->payload_data.status_message.sensor_status_message.temperature);
zh_json_add(&json, "temperature", temperature); zh_json_add(&json, "temperature", temperature);
sprintf(humidity, "%f", device_data->payload_data.status_message.sensor_status_message.humidity); sprintf(humidity, "%f", device_data->payload_data.status_message.sensor_status_message.humidity);
zh_json_add(&json, "humidity", humidity); zh_json_add(&json, "humidity", humidity);
break; break;
case HAST_BH1750: 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); zh_json_add(&json, "illuminance", illuminance);
break; break;
case HAST_BMP280: case HAST_BMP280:

View File

@ -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); 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. * @param[in,out] arg Pointer to the structure of data exchange between tasks, functions and event handlers.
*/ */

View File

@ -1 +1 @@
1.0.5 1.0.6