Compare commits

...

3 Commits
v2.0.3 ... main

Author SHA1 Message Date
73e8a70f4f Version 2.0.5
Added sensor measurement frequency in switch hardware configuration.
2024-07-19 15:10:38 +03:00
db717bf6ee Version 2.0.4
Added support for error messages.
2024-07-16 09:05:55 +03:00
49a4564b99 Minor changes 2024-07-05 11:38:51 +03:00
2 changed files with 19 additions and 12 deletions

View File

@ -69,6 +69,7 @@ char *zh_get_device_type_value_name(zh_device_type_t value);
DF(ZHPT_RGB, "rgb") \
DF(ZHPT_EFFECT, "effect") \
DF(ZHPT_HARDWARE, "hardware") \
DF(ZHPT_ERROR, "") \
DF(ZHPT_MAX, "")
typedef enum // Enumeration of payload types supported by the ESP-NOW gateway.
@ -414,7 +415,7 @@ typedef enum // Enumeration of led types supported by gateway.
DF(HAST_BMP280, "BMP280") /* BMP180/BMP280 */ \
DF(HAST_BME280, "BME280") \
DF(HAST_BME680, "BME680") \
DF(HAST_HTU21D, "HTU21D") \
DF(HAST_HTU, "HTU") /* HTU20/HTU21/HTU30/HTU31 */ \
DF(HAST_HDC1080, "HDC1080") \
DF(HAST_MAX, "")
@ -529,16 +530,17 @@ typedef struct // Structure for data exchange between ESP-NOW devices.
} switch_config_message;
struct // Tertiary structure of zh_espnow_switch node hardware configuration message. @note Used for change hardware configuration / publish at MQTT zh_espnow_switch node hardware configuration message.
{
uint8_t relay_pin; // Relay GPIO number.
bool relay_on_level; // Relay ON level. @note HIGH (true) / LOW (false).
uint8_t led_pin; // Led GPIO number (if present).
bool led_on_level; // Led ON level (if present). @note HIGH (true) / LOW (false).
uint8_t int_button_pin; // Internal button GPIO number (if present).
bool int_button_on_level; // Internal button trigger level (if present). @note HIGH (true) / LOW (false).
uint8_t ext_button_pin; // External button GPIO number (if present).
bool ext_button_on_level; // External button trigger level (if present). @note HIGH (true) / LOW (false).
uint8_t sensor_pin; // Sensor GPIO number (if present).
ha_sensor_type_t sensor_type; // Sensor type (if present). @note Used to identify the sensor type by ESP-NOW gateway and send the appropriate sensor status messages to MQTT.
uint8_t relay_pin; // Relay GPIO number.
bool relay_on_level; // Relay ON level. @note HIGH (true) / LOW (false).
uint8_t led_pin; // Led GPIO number (if present).
bool led_on_level; // Led ON level (if present). @note HIGH (true) / LOW (false).
uint8_t int_button_pin; // Internal button GPIO number (if present).
bool int_button_on_level; // Internal button trigger level (if present). @note HIGH (true) / LOW (false).
uint8_t ext_button_pin; // External button GPIO number (if present).
bool ext_button_on_level; // External button trigger level (if present). @note HIGH (true) / LOW (false).
uint8_t sensor_pin; // Sensor GPIO number (if present).
ha_sensor_type_t sensor_type; // Sensor type (if present). @note Used to identify the sensor type by ESP-NOW gateway and send the appropriate sensor status messages to MQTT.
uint16_t measurement_frequency; // Sensor measurement frequency (if present).
} switch_hardware_config_message;
} config_message;
union // Secondary union of structures of any status messages. @attention Not used in this view. Should be converted to the required tertiary structure.
@ -604,6 +606,11 @@ typedef struct // Structure for data exchange between ESP-NOW devices.
{
ha_on_off_type_t status; // Status of the zh_espnow_switch. @note Example - ON / OFF. @attention Must be same with set on switch_config_message structure.
} switch_status_message;
struct // Tertiary structure of ESP-NOW node error message.
{
char message[150]; // Error message.
} error_message;
} status_message;
union // Secondary union of structures of any OTA update messages. @attention Not used in this view. Should be converted to the required tertiary structure.
{

View File

@ -1 +1 @@
2.0.3
2.0.5