mirror of https://github.com/arendst/Tasmota.git
New feature Compressor Frequency for MiElHVAC (#22347)
* Add prohibit function for MiElHVAC
Add Prohibit functions:
* Power
* Temperature
* Mode
and all combinations of this functions
Updated VaneV names for better identify
* Fixed Compressor and Operation for MiElHVAC
Changed Widevane position name from ISEE to AUTO sam as in MELCLoud
* Revert "Fixed Compressor and Operation for MiElHVAC"
This reverts commit f0973c84d4
.
* New feature for MiElHVAC
* Added Compressor map
* Added Operation Power in Watts
* Added Operation Energy in kWh
* Changed Widevane position name from ISEE to AUTO, displays sam as in
* Changed all map value to lover case MELCloud
* New feature for MiElHVAC
* Add device operation time in minutes
* New feature Outdoor Temperature for MiElHVAC
* Add Outdoor Temperature
* New feature Compressor Frequency for MiElHVAC
* Added Outdoor Temperature
* Renamed internal properties due typo operating and oprating to operation
This commit is contained in:
parent
fd37801d53
commit
e4f431dc7b
|
@ -90,13 +90,14 @@ struct miel_hvac_data_roomtemp {
|
||||||
uint8_t temp05;
|
uint8_t temp05;
|
||||||
uint8_t settemp;
|
uint8_t settemp;
|
||||||
uint8_t _pad3[3];
|
uint8_t _pad3[3];
|
||||||
uint8_t opratingtime;
|
uint8_t operationtime;
|
||||||
uint8_t opratingtime1;
|
uint8_t operationtime1;
|
||||||
uint8_t opratingtime2;
|
uint8_t operationtime2;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct miel_hvac_data_status {
|
struct miel_hvac_data_status {
|
||||||
uint8_t _pad1[3];
|
uint8_t _pad1[2];
|
||||||
|
uint8_t compressorfrequency;
|
||||||
uint8_t compressor;
|
uint8_t compressor;
|
||||||
#define MIEL_HVAC_STATUS_COMPRESSOR_OFF 0x00
|
#define MIEL_HVAC_STATUS_COMPRESSOR_OFF 0x00
|
||||||
#define MIEL_HVAC_STATUS_COMPRESSOR_ON 0x01
|
#define MIEL_HVAC_STATUS_COMPRESSOR_ON 0x01
|
||||||
|
@ -142,10 +143,11 @@ CTASSERT(offsetof(struct miel_hvac_data, data.roomtemp.temp) == 3);
|
||||||
CTASSERT(offsetof(struct miel_hvac_data, data.roomtemp.outdoortemp) == 5);
|
CTASSERT(offsetof(struct miel_hvac_data, data.roomtemp.outdoortemp) == 5);
|
||||||
CTASSERT(offsetof(struct miel_hvac_data, data.roomtemp.temp05) == 6);
|
CTASSERT(offsetof(struct miel_hvac_data, data.roomtemp.temp05) == 6);
|
||||||
CTASSERT(offsetof(struct miel_hvac_data, data.roomtemp.settemp) == 7);
|
CTASSERT(offsetof(struct miel_hvac_data, data.roomtemp.settemp) == 7);
|
||||||
CTASSERT(offsetof(struct miel_hvac_data, data.roomtemp.opratingtime) == 11);
|
CTASSERT(offsetof(struct miel_hvac_data, data.roomtemp.operationtime) == 11);
|
||||||
CTASSERT(offsetof(struct miel_hvac_data, data.roomtemp.opratingtime1) == 12);
|
CTASSERT(offsetof(struct miel_hvac_data, data.roomtemp.operationtime1) == 12);
|
||||||
CTASSERT(offsetof(struct miel_hvac_data, data.roomtemp.opratingtime2) == 13);
|
CTASSERT(offsetof(struct miel_hvac_data, data.roomtemp.operationtime2) == 13);
|
||||||
|
|
||||||
|
CTASSERT(offsetof(struct miel_hvac_data, data.status.compressorfrequency) == 3);
|
||||||
CTASSERT(offsetof(struct miel_hvac_data, data.status.compressor) == 4);
|
CTASSERT(offsetof(struct miel_hvac_data, data.status.compressor) == 4);
|
||||||
CTASSERT(offsetof(struct miel_hvac_data, data.status.operationpower) == 5);
|
CTASSERT(offsetof(struct miel_hvac_data, data.status.operationpower) == 5);
|
||||||
CTASSERT(offsetof(struct miel_hvac_data, data.status.operationpower1) == 6);
|
CTASSERT(offsetof(struct miel_hvac_data, data.status.operationpower1) == 6);
|
||||||
|
@ -1371,7 +1373,7 @@ miel_hvac_sensor(struct miel_hvac_softc *sc)
|
||||||
outdoor_temp);
|
outdoor_temp);
|
||||||
}
|
}
|
||||||
|
|
||||||
uint32_t combined_time = ((uint32_t)rt->opratingtime << 16) | ((uint32_t)rt->opratingtime1 << 8) | (uint32_t)rt->opratingtime2;
|
uint32_t combined_time = ((uint32_t)rt->operationtime << 16) | ((uint32_t)rt->operationtime1 << 8) | (uint32_t)rt->operationtime2;
|
||||||
float operationtime_in_min = (float)combined_time;
|
float operationtime_in_min = (float)combined_time;
|
||||||
char operationtime[33];
|
char operationtime[33];
|
||||||
dtostrf(operationtime_in_min, 1, 0, operationtime);
|
dtostrf(operationtime_in_min, 1, 0, operationtime);
|
||||||
|
@ -1389,10 +1391,14 @@ miel_hvac_sensor(struct miel_hvac_softc *sc)
|
||||||
|
|
||||||
name = miel_hvac_map_byval(status->compressor,
|
name = miel_hvac_map_byval(status->compressor,
|
||||||
miel_hvac_compressor_map, nitems(miel_hvac_compressor_map));
|
miel_hvac_compressor_map, nitems(miel_hvac_compressor_map));
|
||||||
if (name != NULL) {
|
|
||||||
ResponseAppend_P(PSTR(",\"Compressor\":\"%s\""),
|
ResponseAppend_P(PSTR(",\"Compressor\":\"%s\""),
|
||||||
name);
|
name != NULL ? name : "N/A");
|
||||||
}
|
|
||||||
|
unsigned int compressor_frequency = status->compressorfrequency;
|
||||||
|
char compressorfrequency[33];
|
||||||
|
utoa(compressor_frequency, compressorfrequency, 10);
|
||||||
|
ResponseAppend_P(PSTR(",\"CompressorFrequency\":\"%s\""),
|
||||||
|
compressorfrequency);
|
||||||
|
|
||||||
uint16_t combined_power = ((uint16_t)status->operationpower << 8) | (uint16_t)status->operationpower1;
|
uint16_t combined_power = ((uint16_t)status->operationpower << 8) | (uint16_t)status->operationpower1;
|
||||||
char operationpower[33];
|
char operationpower[33];
|
||||||
|
|
Loading…
Reference in New Issue