mirror of
https://github.com/arendst/Tasmota.git
synced 2025-07-24 11:16:34 +00:00
New feature Outdoor Temperature for MiElHVAC (#22345)
* 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 f0973c84d4915e776f715c0749a593efc6f55953. * 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
This commit is contained in:
parent
02972ad3ea
commit
5200aca185
@ -85,7 +85,8 @@ struct miel_hvac_data_settings {
|
||||
struct miel_hvac_data_roomtemp {
|
||||
uint8_t _pad1[2];
|
||||
uint8_t temp;
|
||||
uint8_t _pad2[2];
|
||||
uint8_t _pad2[1];
|
||||
uint8_t outdoortemp;
|
||||
uint8_t temp05;
|
||||
uint8_t settemp;
|
||||
uint8_t _pad3[3];
|
||||
@ -138,6 +139,7 @@ CTASSERT(offsetof(struct miel_hvac_data, data.settings.temp05) == 11);
|
||||
CTASSERT(offsetof(struct miel_hvac_data, data.settings.airdirection) == 14);
|
||||
|
||||
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.temp05) == 6);
|
||||
CTASSERT(offsetof(struct miel_hvac_data, data.roomtemp.settemp) == 7);
|
||||
CTASSERT(offsetof(struct miel_hvac_data, data.roomtemp.opratingtime) == 11);
|
||||
@ -292,6 +294,13 @@ miel_hvac_roomtemp2deg(uint8_t roomtemp)
|
||||
}
|
||||
}
|
||||
|
||||
static inline float
|
||||
miel_hvac_outdoortemp2deg(uint8_t outdoortemp)
|
||||
{
|
||||
outdoortemp -= 128;
|
||||
return ((float) outdoortemp/2);
|
||||
}
|
||||
|
||||
struct miel_hvac_msg_remotetemp {
|
||||
uint8_t seven;
|
||||
uint8_t control;
|
||||
@ -1354,6 +1363,14 @@ miel_hvac_sensor(struct miel_hvac_softc *sc)
|
||||
ResponseAppend_P(PSTR(",\"Temperature\":\"%s\""),
|
||||
room_temp);
|
||||
|
||||
if(rt->outdoortemp > 1) {
|
||||
char outdoor_temp[33];
|
||||
float temp = miel_hvac_outdoortemp2deg(rt->outdoortemp);
|
||||
dtostrfd(ConvertTemp(temp), 1, outdoor_temp);
|
||||
ResponseAppend_P(PSTR(",\"OutdoorTemperature\":\"%s\""),
|
||||
outdoor_temp);
|
||||
}
|
||||
|
||||
uint32_t combined_time = ((uint32_t)rt->opratingtime << 16) | ((uint32_t)rt->opratingtime1 << 8) | (uint32_t)rt->opratingtime2;
|
||||
float operationtime_in_min = (float)combined_time;
|
||||
char operationtime[33];
|
||||
|
Loading…
x
Reference in New Issue
Block a user