mirror of
https://github.com/rvdbreemen/OTGW-firmware
synced 2024-11-16 04:33:49 +01:00
pass-by-reference bug fixed
This commit is contained in:
parent
dbb35a8c4e
commit
620acaa913
180
OTGW-Core.h
180
OTGW-Core.h
@ -24,7 +24,7 @@ TelnetStreamClass OTGWstream(OTGW_SERIAL_PORT);
|
||||
#define OTGW_COMMAND_TOPIC "command"
|
||||
|
||||
typedef struct {
|
||||
uint16_t Status = 0; // flag8 / flag8 Master and Slave Status flags.
|
||||
uint16_t Statusflags = 0; // flag8 / flag8 Master and Slave Status flags.
|
||||
float TSet = 0.0; // f8.8 Control setpoint ie CH water temperature setpoint (°C)
|
||||
uint16_t MConfigMMemberIDcode = 0; // flag8 / u8 Master Configuration Flags / Master MemberID Code
|
||||
uint16_t SConfigSMemberIDcode = 0; // flag8 / u8 Slave Configuration Flags / Slave MemberID Code
|
||||
@ -158,95 +158,95 @@ enum OpenThermMessageType {
|
||||
};
|
||||
|
||||
enum OpenThermMessageID {
|
||||
Status, // flag8 / flag8 Master and Slave Status flags.
|
||||
TSet, // f8.8 Control setpoint ie CH water temperature setpoint (°C)
|
||||
MConfigMMemberIDcode, // flag8 / u8 Master Configuration Flags / Master MemberID Code
|
||||
SConfigSMemberIDcode, // flag8 / u8 Slave Configuration Flags / Slave MemberID Code
|
||||
Command, // u8 / u8 Remote Command
|
||||
ASFflags, // / OEM-fault-code flag8 / u8 Application-specific fault flags and OEM fault code
|
||||
RBPflags, // flag8 / flag8 Remote boiler parameter transfer-enable & read/write flags
|
||||
CoolingControl, // f8.8 Cooling control signal (%)
|
||||
TsetCH2, // f8.8 Control setpoint for 2e CH circuit (°C)
|
||||
TrOverride, // f8.8 Remote override room setpoint
|
||||
TSP, // u8 / u8 Number of Transparent-Slave-Parameters supported by slave
|
||||
TSPindexTSPvalue, // u8 / u8 Index number / Value of referred-to transparent slave parameter.
|
||||
FHBsize, // u8 / u8 Size of Fault-History-Buffer supported by slave
|
||||
FHBindexFHBvalue, // u8 / u8 Index number / Value of referred-to fault-history buffer entry.
|
||||
MaxRelModLevelSetting, // f8.8 Maximum relative modulation level setting (%)
|
||||
MaxCapacityMinModLevel, // u8 / u8 Maximum boiler capacity (kW) / Minimum boiler modulation level(%)
|
||||
TrSet, // f8.8 Room Setpoint (°C)
|
||||
RelModLevel, // f8.8 Relative Modulation Level (%)
|
||||
CHPressure, // f8.8 Water pressure in CH circuit (bar)
|
||||
DHWFlowRate, // f8.8 Water flow rate in DHW circuit. (litres/minute)
|
||||
DayTime, // special / u8 Day of Week and Time of Day
|
||||
Date, // u8 / u8 Calendar date
|
||||
Year, // u16 Calendar year
|
||||
TrSetCH2, // f8.8 Room Setpoint for 2nd CH circuit (°C)
|
||||
Tr, // f8.8 Room temperature (°C)
|
||||
Tboiler, // f8.8 Boiler flow water temperature (°C)
|
||||
Tdhw, // f8.8 DHW temperature (°C)
|
||||
Toutside, // f8.8 Outside temperature (°C)
|
||||
Tret, // f8.8 Return water temperature (°C)
|
||||
Tstorage, // f8.8 Solar storage temperature (°C)
|
||||
Tcollector, // f8.8 Solar collector temperature (°C)
|
||||
TflowCH2, // f8.8 Flow water temperature CH2 circuit (°C)
|
||||
Tdhw2, // f8.8 Domestic hot water temperature 2 (°C)
|
||||
Texhaust, // s16 Boiler exhaust temperature (°C)
|
||||
FanSpeed = 35, // u16 Fan Speed (rpm)
|
||||
ElectricalCurrentBurnerFlame, // f88 Electrical current through burner flame (µA)
|
||||
TRoomCH2, // f88 Room Temperature for 2nd CH circuit ("°C)
|
||||
RelativeHumidity, // u8 / u8 Relative Humidity (%)
|
||||
TdhwSetUBTdhwSetLB = 48, // s8 / s8 DHW setpoint upper & lower bounds for adjustment (°C)
|
||||
MaxTSetUBMaxTSetLB, // s8 / s8 Max CH water setpoint upper & lower bounds for adjustment (°C)
|
||||
HcratioUBHcratioLB, // s8 / s8 OTC heat curve ratio upper & lower bounds for adjustment
|
||||
TdhwSet = 56, // f8.8 DHW setpoint (°C) (Remote parameter 1)
|
||||
MaxTSet, // f8.8 Max CH water setpoint (°C) (Remote parameters 2)
|
||||
Hcratio, // f8.8 OTC heat curve ratio (°C) (Remote parameter 3)
|
||||
StatusVH = 70, // flag8 / flag8 Status Ventilation/Heat recovery
|
||||
ControlSetpointVH, // u8 Control setpoint V/H
|
||||
FaultFlagsCodeVH, // flag8 / u8 Fault Flags/Code V/H
|
||||
DiagnosticCodeVH, // u16 Diagnostic Code V/H
|
||||
ConfigMemberIDVH, // flag8 / u8 Config/Member ID V/H
|
||||
OpenthermVersionVH, // f8.8 OpenTherm Version V/H
|
||||
VersionTypeVH, // u8 / u8 Version & Type V/H
|
||||
RelativeVentilation, // u8 Relative Ventilation (%)
|
||||
RelativeHumidityVH, // u8 / u8 Relative Humidity (%)
|
||||
CO2LevelVH, // u16 CO2 Level (ppm)
|
||||
SupplyInletTemperature, // f8.8 Supply Inlet Temperature (°C)
|
||||
SupplyOutletTemperature, // f8.8 Supply Outlet Temperature(°C)
|
||||
ExhaustInletTemperature, // f8.8 Exhaust Inlet Temperature (°C)
|
||||
ExhaustOutletTemperature, // f8.8 Exhaust Outlet Temperature (°C)
|
||||
ActualExhaustFanSpeed, // u16 Actual Exhaust Fan Speed (rpm)
|
||||
ActualInletFanSpeed, // u16 Actual Inlet Fan Speed (rpm)
|
||||
RemoteParameterSettingVH, // flag8 / flag8 Remote Parameter Setting V/H
|
||||
NominalVentilationValue, // u8 Nominal Ventilation Value
|
||||
TSPNumberVH, // u8 / u8 TSP Number V/H
|
||||
TSPEntryVH, // u8 / u8 TSP Entry V/H
|
||||
FaultBufferSizeVH, // u8 / u8 Fault Buffer Size V/H
|
||||
FaultBufferEntryVH, // u8 / u8 Fault Buffer Entry V/H
|
||||
RFstrengthbatterylevel=98, // u8 / u8 RF strength and battery level
|
||||
OperatingMode_HC1_HC2_DHW, // u8 / u8 Operating Mode HC1, HC2/ DHW
|
||||
RemoteOverrideFunction = 100, // flag8 / - Function of manual and program changes in master and remote room setpoint.
|
||||
ElectricityProducerStarts = 109, // u16 Electricity producer starts
|
||||
ElectricityProducerHours, //u16 Electricity producer hours
|
||||
ElectricityProduction, //u16 Electricity production
|
||||
CumulativElectricityProduction, // u16 Cumulativ Electricity production
|
||||
OEMDiagnosticCode = 115, // u16 OEM-specific diagnostic/service code
|
||||
BurnerStarts, // u16 Number of starts burner
|
||||
CHPumpStarts, // u16 Number of starts CH pump
|
||||
DHWPumpValveStarts, // u16 Number of starts DHW pump/valve
|
||||
DHWBurnerStarts, // u16 Number of starts burner during DHW mode
|
||||
BurnerOperationHours, // u16 Number of hours that burner is in operation (i.e. flame on)
|
||||
CHPumpOperationHours, // u16 Number of hours that CH pump has been running
|
||||
DHWPumpValveOperationHours, // u16 Number of hours that DHW pump has been running or DHW valve has been opened
|
||||
DHWBurnerOperationHours, // u16 Number of hours that burner is in operation during DHW mode
|
||||
OpenThermVersionMaster, // f8.8 The implemented version of the OpenTherm Protocol Specification in the master.
|
||||
OpenThermVersionSlave, // f8.8 The implemented version of the OpenTherm Protocol Specification in the slave.
|
||||
MasterVersion, // u8 / u8 Master product version number and type
|
||||
SlaveVersion, // u8 / u8 Slave product version number and type
|
||||
RemehadFdUcodes, // u8 / u8 Remeha dF-/dU-codes
|
||||
RemehaServicemessage, // u8 / u8 Remeha Servicemessage
|
||||
RemehaDetectionConnectedSCU, // u8 / u8 Remeha detection connected SCU’s
|
||||
OT_Statusflags, // flag8 / flag8 Master and Slave Status flags.
|
||||
OT_TSet, // f8.8 Control setpoint ie CH water temperature setpoint (°C)
|
||||
OT_MConfigMMemberIDcode, // flag8 / u8 Master Configuration Flags / Master MemberID Code
|
||||
OT_SConfigSMemberIDcode, // flag8 / u8 Slave Configuration Flags / Slave MemberID Code
|
||||
OT_Command, // u8 / u8 Remote Command
|
||||
OT_ASFflags, // / OEM-fault-code flag8 / u8 Application-specific fault flags and OEM fault code
|
||||
OT_RBPflags, // flag8 / flag8 Remote boiler parameter transfer-enable & read/write flags
|
||||
OT_CoolingControl, // f8.8 Cooling control signal (%)
|
||||
OT_TsetCH2, // f8.8 Control setpoint for 2e CH circuit (°C)
|
||||
OT_TrOverride, // f8.8 Remote override room setpoint
|
||||
OT_TSP, // u8 / u8 Number of Transparent-Slave-Parameters supported by slave
|
||||
OT_TSPindexTSPvalue, // u8 / u8 Index number / Value of referred-to transparent slave parameter.
|
||||
OT_FHBsize, // u8 / u8 Size of Fault-History-Buffer supported by slave
|
||||
OT_FHBindexFHBvalue, // u8 / u8 Index number / Value of referred-to fault-history buffer entry.
|
||||
OT_MaxRelModLevelSetting, // f8.8 Maximum relative modulation level setting (%)
|
||||
OT_MaxCapacityMinModLevel, // u8 / u8 Maximum boiler capacity (kW) / Minimum boiler modulation level(%)
|
||||
OT_TrSet, // f8.8 Room Setpoint (°C)
|
||||
OT_RelModLevel, // f8.8 Relative Modulation Level (%)
|
||||
OT_CHPressure, // f8.8 Water pressure in CH circuit (bar)
|
||||
OT_DHWFlowRate, // f8.8 Water flow rate in DHW circuit. (litres/minute)
|
||||
OT_DayTime, // special / u8 Day of Week and Time of Day
|
||||
OT_Date, // u8 / u8 Calendar date
|
||||
OT_Year, // u16 Calendar year
|
||||
OT_TrSetCH2, // f8.8 Room Setpoint for 2nd CH circuit (°C)
|
||||
OT_Tr, // f8.8 Room temperature (°C)
|
||||
OT_Tboiler, // f8.8 Boiler flow water temperature (°C)
|
||||
OT_Tdhw, // f8.8 DHW temperature (°C)
|
||||
OT_Toutside, // f8.8 Outside temperature (°C)
|
||||
OT_Tret, // f8.8 Return water temperature (°C)
|
||||
OT_Tstorage, // f8.8 Solar storage temperature (°C)
|
||||
OT_Tcollector, // f8.8 Solar collector temperature (°C)
|
||||
OT_TflowCH2, // f8.8 Flow water temperature CH2 circuit (°C)
|
||||
OT_Tdhw2, // f8.8 Domestic hot water temperature 2 (°C)
|
||||
OT_Texhaust, // s16 Boiler exhaust temperature (°C)
|
||||
OT_FanSpeed = 35, // u16 Fan Speed (rpm)
|
||||
OT_ElectricalCurrentBurnerFlame, // f88 Electrical current through burner flame (µA)
|
||||
OT_TRoomCH2, // f88 Room Temperature for 2nd CH circuit ("°C)
|
||||
OT_RelativeHumidity, // u8 / u8 Relative Humidity (%)
|
||||
OT_TdhwSetUBTdhwSetLB = 48, // s8 / s8 DHW setpoint upper & lower bounds for adjustment (°C)
|
||||
OT_MaxTSetUBMaxTSetLB, // s8 / s8 Max CH water setpoint upper & lower bounds for adjustment (°C)
|
||||
OT_HcratioUBHcratioLB, // s8 / s8 OTC heat curve ratio upper & lower bounds for adjustment
|
||||
OT_TdhwSet = 56, // f8.8 DHW setpoint (°C) (Remote parameter 1)
|
||||
OT_MaxTSet, // f8.8 Max CH water setpoint (°C) (Remote parameters 2)
|
||||
OT_Hcratio, // f8.8 OTC heat curve ratio (°C) (Remote parameter 3)
|
||||
OT_StatusVH = 70, // flag8 / flag8 Status Ventilation/Heat recovery
|
||||
OT_ControlSetpointVH, // u8 Control setpoint V/H
|
||||
OT_FaultFlagsCodeVH, // flag8 / u8 Fault Flags/Code V/H
|
||||
OT_DiagnosticCodeVH, // u16 Diagnostic Code V/H
|
||||
OT_ConfigMemberIDVH, // flag8 / u8 Config/Member ID V/H
|
||||
OT_OpenthermVersionVH, // f8.8 OpenTherm Version V/H
|
||||
OT_VersionTypeVH, // u8 / u8 Version & Type V/H
|
||||
OT_RelativeVentilation, // u8 Relative Ventilation (%)
|
||||
OT_RelativeHumidityVH, // u8 / u8 Relative Humidity (%)
|
||||
OT_CO2LevelVH, // u16 CO2 Level (ppm)
|
||||
OT_SupplyInletTemperature, // f8.8 Supply Inlet Temperature (°C)
|
||||
OT_SupplyOutletTemperature, // f8.8 Supply Outlet Temperature(°C)
|
||||
OT_ExhaustInletTemperature, // f8.8 Exhaust Inlet Temperature (°C)
|
||||
OT_ExhaustOutletTemperature, // f8.8 Exhaust Outlet Temperature (°C)
|
||||
OT_ActualExhaustFanSpeed, // u16 Actual Exhaust Fan Speed (rpm)
|
||||
OT_ActualInletFanSpeed, // u16 Actual Inlet Fan Speed (rpm)
|
||||
OT_RemoteParameterSettingVH, // flag8 / flag8 Remote Parameter Setting V/H
|
||||
OT_NominalVentilationValue, // u8 Nominal Ventilation Value
|
||||
OT_TSPNumberVH, // u8 / u8 TSP Number V/H
|
||||
OT_TSPEntryVH, // u8 / u8 TSP Entry V/H
|
||||
OT_FaultBufferSizeVH, // u8 / u8 Fault Buffer Size V/H
|
||||
OT_FaultBufferEntryVH, // u8 / u8 Fault Buffer Entry V/H
|
||||
OT_RFstrengthbatterylevel=98, // u8 / u8 RF strength and battery level
|
||||
OT_OperatingMode_HC1_HC2_DHW, // u8 / u8 Operating Mode HC1, HC2/ DHW
|
||||
OT_RemoteOverrideFunction = 100, // flag8 / - Function of manual and program changes in master and remote room setpoint.
|
||||
OT_ElectricityProducerStarts = 109, // u16 Electricity producer starts
|
||||
OT_ElectricityProducerHours, //u16 Electricity producer hours
|
||||
OT_ElectricityProduction, //u16 Electricity production
|
||||
OT_CumulativElectricityProduction, // u16 Cumulativ Electricity production
|
||||
OT_OEMDiagnosticCode = 115, // u16 OEM-specific diagnostic/service code
|
||||
OT_BurnerStarts, // u16 Number of starts burner
|
||||
OT_CHPumpStarts, // u16 Number of starts CH pump
|
||||
OT_DHWPumpValveStarts, // u16 Number of starts DHW pump/valve
|
||||
OT_DHWBurnerStarts, // u16 Number of starts burner during DHW mode
|
||||
OT_BurnerOperationHours, // u16 Number of hours that burner is in operation (i.e. flame on)
|
||||
OT_CHPumpOperationHours, // u16 Number of hours that CH pump has been running
|
||||
OT_DHWPumpValveOperationHours, // u16 Number of hours that DHW pump has been running or DHW valve has been opened
|
||||
OT_DHWBurnerOperationHours, // u16 Number of hours that burner is in operation during DHW mode
|
||||
OT_OpenThermVersionMaster, // f8.8 The implemented version of the OpenTherm Protocol Specification in the master.
|
||||
OT_OpenThermVersionSlave, // f8.8 The implemented version of the OpenTherm Protocol Specification in the slave.
|
||||
OT_MasterVersion, // u8 / u8 Master product version number and type
|
||||
OT_SlaveVersion, // u8 / u8 Slave product version number and type
|
||||
OT_RemehadFdUcodes, // u8 / u8 Remeha dF-/dU-codes
|
||||
OT_RemehaServicemessage, // u8 / u8 Remeha Servicemessage
|
||||
OT_RemehaDetectionConnectedSCU, // u8 / u8 Remeha detection connected SCU’s
|
||||
};
|
||||
enum OTtype_t { ot_f88, ot_s16, ot_s8s8, ot_u16, ot_u8u8, ot_flag8, ot_flag8flag8, ot_special, ot_flag8u8, ot_u8, ot_undef};
|
||||
enum OTmsgcmd_t { OT_READ, OT_WRITE, OT_RW, OT_UNDEF };
|
||||
|
445
OTGW-Core.ino
445
OTGW-Core.ino
@ -243,7 +243,7 @@ void OpenthermData::f88(float value) {
|
||||
|
||||
uint16_t OpenthermData::u16() {
|
||||
uint16_t value = valueHB;
|
||||
return (value << 8) | valueLB;
|
||||
return ((value << 8) + valueLB);
|
||||
}
|
||||
|
||||
void OpenthermData::u16(uint16_t value) {
|
||||
@ -253,7 +253,7 @@ void OpenthermData::u16(uint16_t value) {
|
||||
|
||||
int16_t OpenthermData::s16() {
|
||||
int16_t value = valueHB;
|
||||
return (value << 8) | valueLB;
|
||||
return ((value << 8) + valueLB);
|
||||
}
|
||||
|
||||
void OpenthermData::s16(int16_t value) {
|
||||
@ -315,23 +315,23 @@ OpenThermMessageID getDataID(unsigned long frame)
|
||||
// 7: reserved
|
||||
|
||||
bool isCentralHeatingEnabled() {
|
||||
return OTdataObject.Status & 0x0100;
|
||||
return OTdataObject.Statusflags & 0x0100;
|
||||
}
|
||||
|
||||
bool isDomesticHotWaterEnabled() {
|
||||
return OTdataObject.Status & 0x0200;
|
||||
return OTdataObject.Statusflags & 0x0200;
|
||||
}
|
||||
|
||||
bool isCoolingEnabled() {
|
||||
return OTdataObject.Status & 0x0400;
|
||||
return OTdataObject.Statusflags & 0x0400;
|
||||
}
|
||||
|
||||
bool isOutsideTemperatureCompensationActive() {
|
||||
return OTdataObject.Status & 0x0800;
|
||||
return OTdataObject.Statusflags & 0x0800;
|
||||
}
|
||||
|
||||
bool isCentralHeating2enabled() {
|
||||
return OTdataObject.Status & 0x1000;
|
||||
return OTdataObject.Statusflags & 0x1000;
|
||||
}
|
||||
|
||||
//Slave
|
||||
@ -345,31 +345,32 @@ bool isCentralHeating2enabled() {
|
||||
// 7: reserved
|
||||
|
||||
bool isFaultIndicator() {
|
||||
return OTdataObject.Status & 0x0001;
|
||||
return OTdataObject.Statusflags & 0x0001;
|
||||
}
|
||||
|
||||
bool isCentralHeatingActive() {
|
||||
return OTdataObject.Status & 0x0002;
|
||||
return OTdataObject.Statusflags & 0x0002;
|
||||
}
|
||||
|
||||
bool isDomesticHotWaterActive() {
|
||||
return OTdataObject.Status & 0x0004;
|
||||
return OTdataObject.Statusflags & 0x0004;
|
||||
}
|
||||
|
||||
bool isFlameStatus() {
|
||||
return OTdataObject.Status & 0x0008;
|
||||
DebugTf("IsFlameStatus : [%04x]\r\n", OTdataObject.Statusflags );
|
||||
return OTdataObject.Statusflags & 0x0008;
|
||||
}
|
||||
|
||||
bool isCoolingActive() {
|
||||
return OTdataObject.Status & 0x0010;
|
||||
return OTdataObject.Statusflags & 0x0010;
|
||||
}
|
||||
|
||||
bool isCentralHeating2Active() {
|
||||
return OTdataObject.Status & 0x0020;
|
||||
return OTdataObject.Statusflags & 0x0020;
|
||||
}
|
||||
|
||||
bool isDiagnosticIndicator() {
|
||||
return OTdataObject.Status & 0x0040;
|
||||
return OTdataObject.Statusflags & 0x0040;
|
||||
}
|
||||
|
||||
//bit: [clear/0, set/1]
|
||||
@ -422,7 +423,7 @@ const char *byte_to_binary(int x)
|
||||
}
|
||||
|
||||
|
||||
void print_f88(float *value)
|
||||
float print_f88()
|
||||
{
|
||||
//function to print data
|
||||
float _value = round(OTdata.f88()*100.0) / 100.0; // round float 2 digits, like this: x.xx
|
||||
@ -432,10 +433,10 @@ void print_f88(float *value)
|
||||
Debugf("%-37s = %s %s\r\n", OTmap[OTdata.id].label, _msg , OTmap[OTdata.id].unit);
|
||||
//SendMQTT
|
||||
sendMQTTData(messageIDToString(static_cast<OpenThermMessageID>(OTdata.id)), _msg);
|
||||
(*value) = _value;
|
||||
return _value;
|
||||
}
|
||||
|
||||
void print_s16(int16_t *value)
|
||||
int16_t print_s16()
|
||||
{
|
||||
int16_t _value = OTdata.s16();
|
||||
// Debugf("%-37s = %5d %s\r\n", OTmap[OTdata.id].label, _value, OTmap[OTdata.id].unit);
|
||||
@ -445,10 +446,10 @@ void print_s16(int16_t *value)
|
||||
Debugf("%-37s = %s %s\r\n", OTmap[OTdata.id].label, _msg, OTmap[OTdata.id].unit);
|
||||
//SendMQTT
|
||||
sendMQTTData(messageIDToString(static_cast<OpenThermMessageID>(OTdata.id)), _msg);
|
||||
(*value) = _value;
|
||||
return _value;
|
||||
}
|
||||
|
||||
void print_s8s8(uint16_t *value)
|
||||
uint16_t print_s8s8()
|
||||
{
|
||||
uint16_t _value = OTdata.u16();
|
||||
Debugf("%-37s = %3d / %3d %s\r\n", OTmap[OTdata.id].label, (int8_t)OTdata.valueHB, (int8_t)OTdata.valueLB, OTmap[OTdata.id].unit);
|
||||
@ -466,11 +467,11 @@ void print_s8s8(uint16_t *value)
|
||||
strlcat(_topic, "_value_lb", sizeof(_topic));
|
||||
Debugf("%-37s = %s %s\r\n", OTmap[OTdata.id].label, _msg, OTmap[OTdata.id].unit);
|
||||
sendMQTTData(_topic, _msg);
|
||||
(*value)=_value;
|
||||
return _value;
|
||||
}
|
||||
|
||||
|
||||
void print_u16(uint16_t *value)
|
||||
uint16_t print_u16()
|
||||
{
|
||||
uint16_t _value = OTdata.u16();
|
||||
//Build string for MQTT
|
||||
@ -479,12 +480,12 @@ void print_u16(uint16_t *value)
|
||||
Debugf("%-37s = %s %s\r\n", OTmap[OTdata.id].label, _msg, OTmap[OTdata.id].unit);
|
||||
//SendMQTT
|
||||
sendMQTTData(messageIDToString(static_cast<OpenThermMessageID>(OTdata.id)), _msg);
|
||||
(*value) = _value;
|
||||
return _value;
|
||||
}
|
||||
|
||||
void print_status(uint16_t *value)
|
||||
uint16_t print_status()
|
||||
{
|
||||
uint16_t _value=OTdata.u16();
|
||||
uint16_t _value = OTdata.u16();
|
||||
char _flag8_master[8] {0};
|
||||
char _flag8_slave[8] {0};
|
||||
//bit: [clear/0, set/1]
|
||||
@ -545,10 +546,12 @@ void print_status(uint16_t *value)
|
||||
sendMQTTData("cooling", (((OTdata.valueLB) & 0x10) ? "ON" : "OFF"));
|
||||
sendMQTTData("centralheating2", (((OTdata.valueLB) & 0x20) ? "ON" : "OFF"));
|
||||
sendMQTTData("diagnostic_indicator", (((OTdata.valueLB) & 0x40) ? "ON" : "OFF"));
|
||||
(*value)=_value;
|
||||
|
||||
//DebugTf("Status u16 [%04x] _value [%04x] hb [%02x] lb [%02x]\r\n", OTdata.u16(), _value, OTdata.valueHB, OTdata.valueLB);
|
||||
return _value;
|
||||
}
|
||||
|
||||
void print_ASFflags(uint16_t *value)
|
||||
uint16_t print_ASFflags()
|
||||
{
|
||||
uint16_t _value=OTdata.u16();
|
||||
Debugf("%-37s = M[%s] OEM fault code [%3d]\r\n", OTmap[OTdata.id].label, byte_to_binary(OTdata.valueHB), OTdata.valueLB);
|
||||
@ -576,11 +579,11 @@ void print_ASFflags(uint16_t *value)
|
||||
sendMQTTData("gas_flame_fault", (((OTdata.valueHB) & 0x08) ? "ON" : "OFF"));
|
||||
sendMQTTData("air_pressure_fault", (((OTdata.valueHB) & 0x10) ? "ON" : "OFF"));
|
||||
sendMQTTData("water_over-temperature",(((OTdata.valueHB) & 0x20) ? "ON" : "OFF"));
|
||||
(*value)=_value;
|
||||
return _value;
|
||||
}
|
||||
|
||||
|
||||
void print_slavememberid(uint16_t *value)
|
||||
uint16_t print_slavememberid()
|
||||
{
|
||||
uint16_t _value=OTdata.u16();
|
||||
Debugf("%-37s = Slave Config[%s] MemberID code [%3d]\r\n", OTmap[OTdata.id].label, byte_to_binary(OTdata.valueHB), OTdata.valueLB);
|
||||
@ -609,10 +612,10 @@ void print_slavememberid(uint16_t *value)
|
||||
sendMQTTData("dhw_config", (((OTdata.valueHB) & 0x08) ? "ON" : "OFF"));
|
||||
sendMQTTData("master_low_off_pump_control_function", (((OTdata.valueHB) & 0x10) ? "ON" : "OFF"));
|
||||
sendMQTTData("ch2_present", (((OTdata.valueHB) & 0x20) ? "ON" : "OFF"));
|
||||
(*value)=_value;
|
||||
return _value;
|
||||
}
|
||||
|
||||
void print_mastermemberid(uint16_t *value)
|
||||
uint16_t print_mastermemberid()
|
||||
{
|
||||
uint16_t _value=OTdata.u16();
|
||||
Debugf("%-37s = Master Config[%s] MemberID code [%3d]\r\n", OTmap[OTdata.id].label, byte_to_binary(OTdata.valueHB), OTdata.valueLB);
|
||||
@ -621,10 +624,10 @@ void print_mastermemberid(uint16_t *value)
|
||||
sendMQTTData("master_configuration", byte_to_binary(OTdata.valueHB));
|
||||
utoa(OTdata.valueLB, _msg, 10);
|
||||
sendMQTTData("master_memberid_code", _msg);
|
||||
(*value)=_value;
|
||||
return _value;
|
||||
}
|
||||
|
||||
void print_flag8u8(uint16_t *value)
|
||||
uint16_t print_flag8u8()
|
||||
{
|
||||
uint16_t _value = OTdata.u16();
|
||||
Debugf("%-37s = M[%s] - [%3d]\r\n", OTmap[OTdata.id].label, byte_to_binary(OTdata.valueHB), OTdata.valueLB);
|
||||
@ -640,10 +643,10 @@ void print_flag8u8(uint16_t *value)
|
||||
strlcpy(_topic, messageIDToString(static_cast<OpenThermMessageID>(OTdata.id)), sizeof(_topic));
|
||||
strlcat(_topic, "_code", sizeof(_topic));
|
||||
sendMQTTData(_topic, _msg);
|
||||
(*value)=_value;
|
||||
return _value;
|
||||
}
|
||||
|
||||
void print_flag8(uint16_t *value)
|
||||
uint16_t print_flag8()
|
||||
{
|
||||
uint16_t _value=OTdata.u16();
|
||||
Debugf("%-37s = flag8 = [%s] - decimal = [%3d]\r\n", OTmap[OTdata.id].label, byte_to_binary(OTdata.valueLB), OTdata.valueLB);
|
||||
@ -654,10 +657,10 @@ void print_flag8(uint16_t *value)
|
||||
strlcpy(_topic, messageIDToString(static_cast<OpenThermMessageID>(OTdata.id)), sizeof(_topic));
|
||||
strlcat(_topic, "_flag8", sizeof(_topic));
|
||||
sendMQTTData(_topic, byte_to_binary(OTdata.valueLB));
|
||||
(*value)=_value;
|
||||
return _value;
|
||||
}
|
||||
|
||||
void print_flag8flag8(uint16_t *value)
|
||||
uint16_t print_flag8flag8()
|
||||
{
|
||||
uint16_t _value=OTdata.u16();
|
||||
//Build string for MQTT
|
||||
@ -672,10 +675,10 @@ void print_flag8flag8(uint16_t *value)
|
||||
strlcpy(_topic, messageIDToString(static_cast<OpenThermMessageID>(OTdata.id)), sizeof(_topic));
|
||||
strlcat(_topic, "_lb_flag8", sizeof(_topic));
|
||||
sendMQTTData(_topic, byte_to_binary(OTdata.valueLB));
|
||||
(*value)=_value;
|
||||
return _value;
|
||||
}
|
||||
|
||||
void print_u8u8(uint16_t *value)
|
||||
uint16_t print_u8u8()
|
||||
{
|
||||
uint16_t _value=OTdata.u16();
|
||||
Debugf("%-37s = %3d / %3d %s\r\n", OTmap[OTdata.id].label, (uint8_t)OTdata.valueHB, (uint8_t)OTdata.valueLB, OTmap[OTdata.id].unit);
|
||||
@ -694,10 +697,10 @@ void print_u8u8(uint16_t *value)
|
||||
strlcpy(_topic, messageIDToString(static_cast<OpenThermMessageID>(OTdata.id)), sizeof(_topic));
|
||||
strlcat(_topic, "_lb_u8", sizeof(_topic));
|
||||
sendMQTTData(_topic, _msg);
|
||||
(*value)=_value;
|
||||
return _value;
|
||||
}
|
||||
|
||||
void print_date(uint16_t *value)
|
||||
uint16_t print_date()
|
||||
{
|
||||
uint16_t _value=OTdata.u16();
|
||||
Debugf("%-37s = %3d / %3d %s\r\n", OTmap[OTdata.id].label, (uint8_t)OTdata.valueHB, (uint8_t)OTdata.valueLB, OTmap[OTdata.id].unit);
|
||||
@ -716,10 +719,10 @@ void print_date(uint16_t *value)
|
||||
strlcpy(_topic, messageIDToString(static_cast<OpenThermMessageID>(OTdata.id)), sizeof(_topic));
|
||||
strlcat(_topic, "_day_of_month", sizeof(_topic));
|
||||
sendMQTTData(_topic, _msg);
|
||||
(*value)=_value;
|
||||
return _value;
|
||||
}
|
||||
|
||||
void print_daytime(uint16_t *value)
|
||||
uint16_t print_daytime()
|
||||
{
|
||||
uint16_t _value = OTdata.u16();
|
||||
//function to print data
|
||||
@ -740,7 +743,7 @@ void print_daytime(uint16_t *value)
|
||||
strlcpy(_topic, messageIDToString(static_cast<OpenThermMessageID>(OTdata.id)), sizeof(_topic));
|
||||
strlcat(_topic, "_minutes", sizeof(_topic));
|
||||
sendMQTTData(_topic, itoa((OTdata.valueLB), _msg, 10));
|
||||
(*value) = _value;
|
||||
return _value;
|
||||
}
|
||||
|
||||
|
||||
@ -841,95 +844,95 @@ void processOTGW(const char * buf, int len){
|
||||
//#define OTprint(data, value, text, format) ({ data= value; Debugf("[%37s]", text); Debugf("= [format]", data)})
|
||||
//interpret values f8.8
|
||||
switch (static_cast<OpenThermMessageID>(OTdata.id)) {
|
||||
case TSet: print_f88(&OTdataObject.TSet); break;
|
||||
case CoolingControl: print_f88(&OTdataObject.CoolingControl ); break;
|
||||
case TsetCH2: print_f88(&OTdataObject.TsetCH2); break;
|
||||
case TrOverride: print_f88(&OTdataObject.TrOverride); break;
|
||||
case MaxRelModLevelSetting: print_f88(&OTdataObject.MaxRelModLevelSetting); break;
|
||||
case TrSet: print_f88(&OTdataObject.TrSet); break;
|
||||
case TrSetCH2: print_f88(&OTdataObject.TrSetCH2); break;
|
||||
case RelModLevel: print_f88(&OTdataObject.RelModLevel); break;
|
||||
case CHPressure: print_f88(&OTdataObject.CHPressure); break;
|
||||
case DHWFlowRate: print_f88(&OTdataObject.DHWFlowRate); break;
|
||||
case Tr: print_f88(&OTdataObject.Tr); break;
|
||||
case Tboiler: print_f88(&OTdataObject.Tboiler); break;
|
||||
case Tdhw: print_f88(&OTdataObject.Tdhw); break;
|
||||
case Toutside: print_f88(&OTdataObject.Toutside); break;
|
||||
case Tret: print_f88(&OTdataObject.Tret); break;
|
||||
case Tstorage: print_f88(&OTdataObject.Tstorage); break;
|
||||
case Tcollector: print_f88(&OTdataObject.Tcollector ); break;
|
||||
case TflowCH2: print_f88(&OTdataObject.TflowCH2); break;
|
||||
case Tdhw2: print_f88(&OTdataObject.Tdhw2); break;
|
||||
case Texhaust: print_s16(&OTdataObject.Texhaust); break;
|
||||
case TdhwSet: print_f88(&OTdataObject.TdhwSet); break;
|
||||
case MaxTSet: print_f88(&OTdataObject.MaxTSet); break;
|
||||
case Hcratio: print_f88(&OTdataObject.Hcratio); break;
|
||||
case OpenThermVersionMaster: print_f88(&OTdataObject.OpenThermVersionMaster); break;
|
||||
case OpenThermVersionSlave: print_f88(&OTdataObject.OpenThermVersionSlave); break;
|
||||
case Status: print_status(&OTdataObject.Status); break;
|
||||
case ASFflags: print_ASFflags(&OTdataObject.ASFflags); break;
|
||||
case MConfigMMemberIDcode: print_mastermemberid(&OTdataObject.MConfigMMemberIDcode); break;
|
||||
case SConfigSMemberIDcode: print_slavememberid(&OTdataObject.SConfigSMemberIDcode); break;
|
||||
case Command: print_u8u8(&OTdataObject.Command); break;
|
||||
case RBPflags: print_flag8flag8(&OTdataObject.RBPflags); break;
|
||||
case TSP: print_u8u8(&OTdataObject.TSP); break;
|
||||
case TSPindexTSPvalue: print_u8u8(&OTdataObject.TSPindexTSPvalue); break;
|
||||
case FHBsize: print_u8u8(&OTdataObject.FHBsize); break;
|
||||
case FHBindexFHBvalue: print_u8u8(&OTdataObject.FHBindexFHBvalue); break;
|
||||
case MaxCapacityMinModLevel: print_u8u8(&OTdataObject.MaxCapacityMinModLevel); break;
|
||||
case DayTime: print_daytime(&OTdataObject.DayTime); break;
|
||||
case Date: print_date(&OTdataObject.Date); break;
|
||||
case Year: print_u16(&OTdataObject.Year); break;
|
||||
case TdhwSetUBTdhwSetLB: print_s8s8(&OTdataObject.TdhwSetUBTdhwSetLB); break;
|
||||
case MaxTSetUBMaxTSetLB: print_s8s8(&OTdataObject.MaxTSetUBMaxTSetLB); break;
|
||||
case HcratioUBHcratioLB: print_s8s8(&OTdataObject.HcratioUBHcratioLB ); break;
|
||||
case RemoteOverrideFunction: print_flag8(&OTdataObject.RemoteOverrideFunction); break;
|
||||
case OEMDiagnosticCode: print_u16(&OTdataObject.OEMDiagnosticCode); break;
|
||||
case BurnerStarts: print_u16(&OTdataObject.BurnerStarts); break;
|
||||
case CHPumpStarts: print_u16(&OTdataObject.CHPumpStarts ); break;
|
||||
case DHWPumpValveStarts: print_u16(&OTdataObject.DHWPumpValveStarts); break;
|
||||
case DHWBurnerStarts: print_u16(&OTdataObject.DHWBurnerStarts ); break;
|
||||
case BurnerOperationHours: print_u16(&OTdataObject.BurnerOperationHours); break;
|
||||
case CHPumpOperationHours: print_u16(&OTdataObject.CHPumpOperationHours); break;
|
||||
case DHWPumpValveOperationHours: print_u16(&OTdataObject.DHWPumpValveOperationHours); break;
|
||||
case DHWBurnerOperationHours: print_u16(&OTdataObject.DHWBurnerOperationHours); break;
|
||||
case MasterVersion: print_u8u8(&OTdataObject.MasterVersion); break;
|
||||
case SlaveVersion: print_u8u8(&OTdataObject.SlaveVersion); break;
|
||||
case StatusVH: print_flag8flag8(&OTdataObject.StatusVH); break;
|
||||
case ControlSetpointVH: print_u8u8(&OTdataObject.ControlSetpointVH); break;
|
||||
case FaultFlagsCodeVH: print_flag8u8(&OTdataObject.FaultFlagsCodeVH ); break;
|
||||
case DiagnosticCodeVH: print_u16(&OTdataObject.DiagnosticCodeVH); break;
|
||||
case ConfigMemberIDVH: print_flag8u8(&OTdataObject.ConfigMemberIDVH); break;
|
||||
case OpenthermVersionVH: print_f88(&OTdataObject.OpenthermVersionVH); break;
|
||||
case VersionTypeVH: print_u8u8(&OTdataObject.VersionTypeVH); break;
|
||||
case RelativeVentilation: print_u8u8(&OTdataObject.RelativeVentilation); break;
|
||||
case RelativeHumidityVH: print_u8u8(&OTdataObject.RelativeHumidityVH ); break;
|
||||
case CO2LevelVH: print_u16(&OTdataObject.CO2LevelVH ); break;
|
||||
case SupplyInletTemperature: print_f88(&OTdataObject.SupplyInletTemperature); break;
|
||||
case SupplyOutletTemperature: print_f88(&OTdataObject.SupplyOutletTemperature); break;
|
||||
case ExhaustInletTemperature: print_f88(&OTdataObject.ExhaustInletTemperature); break;
|
||||
case ExhaustOutletTemperature: print_f88(&OTdataObject.ExhaustOutletTemperature); break;
|
||||
case ActualExhaustFanSpeed: print_u16(&OTdataObject.ActualExhaustFanSpeed); break;
|
||||
case ActualInletFanSpeed: print_u16(&OTdataObject.ActualInletFanSpeed); break;
|
||||
case RemoteParameterSettingVH: print_flag8flag8(&OTdataObject.RemoteParameterSettingVH); break;
|
||||
case NominalVentilationValue: print_u8u8(&OTdataObject.NominalVentilationValue); break;
|
||||
case TSPNumberVH: print_u8u8(&OTdataObject.TSPNumberVH); break;
|
||||
case TSPEntryVH: print_u8u8(&OTdataObject.TSPEntryVH ); break;
|
||||
case FaultBufferSizeVH: print_u8u8(&OTdataObject.FaultBufferSizeVH); break;
|
||||
case FaultBufferEntryVH: print_u8u8(&OTdataObject.FaultBufferEntryVH); break;
|
||||
case FanSpeed: print_u16(&OTdataObject.FanSpeed); break;
|
||||
case ElectricalCurrentBurnerFlame: print_f88(&OTdataObject.ElectricalCurrentBurnerFlame ); break;
|
||||
case TRoomCH2: print_f88(&OTdataObject.TRoomCH2); break;
|
||||
case RelativeHumidity: print_u8u8(&OTdataObject.RelativeHumidity); break;
|
||||
case RFstrengthbatterylevel: print_u8u8(&OTdataObject.RFstrengthbatterylevel ); break;
|
||||
case OperatingMode_HC1_HC2_DHW: print_u8u8(&OTdataObject.OperatingMode_HC1_HC2_DHW ); break;
|
||||
case ElectricityProducerStarts: print_u16(&OTdataObject.ElectricityProducerStarts); break;
|
||||
case ElectricityProducerHours: print_u16(&OTdataObject.ElectricityProducerHours ); break;
|
||||
case ElectricityProduction: print_u16(&OTdataObject.ElectricityProduction); break;
|
||||
case CumulativElectricityProduction:print_u16(&OTdataObject.CumulativElectricityProduction); break;
|
||||
case RemehadFdUcodes: print_u8u8(&OTdataObject.RemehadFdUcodes); break;
|
||||
case RemehaServicemessage: print_u8u8(&OTdataObject.RemehaServicemessage); break;
|
||||
case RemehaDetectionConnectedSCU: print_u8u8(&OTdataObject.RemehaDetectionConnectedSCU); break;
|
||||
case OT_TSet: OTdataObject.TSet = print_f88(); break;
|
||||
case OT_CoolingControl: OTdataObject.CoolingControl = print_f88(); break;
|
||||
case OT_TsetCH2: OTdataObject.TsetCH2 = print_f88(); break;
|
||||
case OT_TrOverride: OTdataObject.TrOverride = print_f88(); break;
|
||||
case OT_MaxRelModLevelSetting: OTdataObject.MaxRelModLevelSetting = print_f88(); break;
|
||||
case OT_TrSet: OTdataObject.TrSet = print_f88(); break;
|
||||
case OT_TrSetCH2: OTdataObject.TrSetCH2 = print_f88(); break;
|
||||
case OT_RelModLevel: OTdataObject.RelModLevel = print_f88(); break;
|
||||
case OT_CHPressure: OTdataObject.CHPressure = print_f88(); break;
|
||||
case OT_DHWFlowRate: OTdataObject.DHWFlowRate = print_f88(); break;
|
||||
case OT_Tr: OTdataObject.Tr = print_f88(); break;
|
||||
case OT_Tboiler: OTdataObject.Tboiler = print_f88(); break;
|
||||
case OT_Tdhw: OTdataObject.Tdhw = print_f88(); break;
|
||||
case OT_Toutside: OTdataObject.Toutside = print_f88(); break;
|
||||
case OT_Tret: OTdataObject.Tret = print_f88(); break;
|
||||
case OT_Tstorage: OTdataObject.Tstorage = print_f88(); break;
|
||||
case OT_Tcollector: OTdataObject.Tcollector = print_f88(); break;
|
||||
case OT_TflowCH2: OTdataObject.TflowCH2 = print_f88(); break;
|
||||
case OT_Tdhw2: OTdataObject.Tdhw2 = print_f88(); break;
|
||||
case OT_Texhaust: OTdataObject.Texhaust = print_s16(); break;
|
||||
case OT_TdhwSet: OTdataObject.TdhwSet = print_f88(); break;
|
||||
case OT_MaxTSet: OTdataObject.MaxTSet = print_f88(); break;
|
||||
case OT_Hcratio: OTdataObject.Hcratio = print_f88(); break;
|
||||
case OT_OpenThermVersionMaster: OTdataObject.OpenThermVersionMaster = print_f88(); break;
|
||||
case OT_OpenThermVersionSlave: OTdataObject.OpenThermVersionSlave = print_f88(); break;
|
||||
case OT_Statusflags: OTdataObject.Statusflags = print_status(); break;
|
||||
case OT_ASFflags: OTdataObject.ASFflags = print_ASFflags(); break;
|
||||
case OT_MConfigMMemberIDcode: OTdataObject.MConfigMMemberIDcode = print_mastermemberid(); break;
|
||||
case OT_SConfigSMemberIDcode: OTdataObject.SConfigSMemberIDcode = print_slavememberid(); break;
|
||||
case OT_Command: OTdataObject.Command = print_u8u8(); break;
|
||||
case OT_RBPflags: OTdataObject.RBPflags = print_flag8flag8(); break;
|
||||
case OT_TSP: OTdataObject.TSP = print_u8u8(); break;
|
||||
case OT_TSPindexTSPvalue: OTdataObject.TSPindexTSPvalue = print_u8u8(); break;
|
||||
case OT_FHBsize: OTdataObject.FHBsize = print_u8u8(); break;
|
||||
case OT_FHBindexFHBvalue: OTdataObject.FHBindexFHBvalue = print_u8u8(); break;
|
||||
case OT_MaxCapacityMinModLevel: OTdataObject.MaxCapacityMinModLevel = print_u8u8(); break;
|
||||
case OT_DayTime: OTdataObject.DayTime = print_daytime(); break;
|
||||
case OT_Date: OTdataObject.Date = print_date(); break;
|
||||
case OT_Year: OTdataObject.Year = print_u16(); break;
|
||||
case OT_TdhwSetUBTdhwSetLB: OTdataObject.TdhwSetUBTdhwSetLB = print_s8s8(); break;
|
||||
case OT_MaxTSetUBMaxTSetLB: OTdataObject.MaxTSetUBMaxTSetLB = print_s8s8(); break;
|
||||
case OT_HcratioUBHcratioLB: OTdataObject.HcratioUBHcratioLB = print_s8s8(); break;
|
||||
case OT_RemoteOverrideFunction: OTdataObject.RemoteOverrideFunction= print_flag8(); break;
|
||||
case OT_OEMDiagnosticCode: OTdataObject.OEMDiagnosticCode = print_u16(); break;
|
||||
case OT_BurnerStarts: OTdataObject.BurnerStarts = print_u16(); break;
|
||||
case OT_CHPumpStarts: OTdataObject.CHPumpStarts = print_u16(); break;
|
||||
case OT_DHWPumpValveStarts: OTdataObject.DHWPumpValveStarts = print_u16(); break;
|
||||
case OT_DHWBurnerStarts: OTdataObject.DHWBurnerStarts = print_u16(); break;
|
||||
case OT_BurnerOperationHours: OTdataObject.BurnerOperationHours = print_u16(); break;
|
||||
case OT_CHPumpOperationHours: OTdataObject.CHPumpOperationHours = print_u16(); break;
|
||||
case OT_DHWPumpValveOperationHours: OTdataObject.DHWPumpValveOperationHours = print_u16(); break;
|
||||
case OT_DHWBurnerOperationHours: OTdataObject.DHWBurnerOperationHours = print_u16(); break;
|
||||
case OT_MasterVersion: OTdataObject.MasterVersion = print_u8u8(); break;
|
||||
case OT_SlaveVersion: OTdataObject.SlaveVersion = print_u8u8(); break;
|
||||
case OT_StatusVH: OTdataObject.StatusVH = print_flag8flag8(); break;
|
||||
case OT_ControlSetpointVH: OTdataObject.ControlSetpointVH = print_u8u8(); break;
|
||||
case OT_FaultFlagsCodeVH: OTdataObject.FaultFlagsCodeVH = print_flag8u8(); break;
|
||||
case OT_DiagnosticCodeVH: OTdataObject.DiagnosticCodeVH = print_u16(); break;
|
||||
case OT_ConfigMemberIDVH: OTdataObject.ConfigMemberIDVH = print_flag8u8(); break;
|
||||
case OT_OpenthermVersionVH: OTdataObject.OpenthermVersionVH = print_f88(); break;
|
||||
case OT_VersionTypeVH: OTdataObject.VersionTypeVH = print_u8u8(); break;
|
||||
case OT_RelativeVentilation: OTdataObject.RelativeVentilation = print_u8u8(); break;
|
||||
case OT_RelativeHumidityVH: OTdataObject.RelativeHumidityVH = print_u8u8(); break;
|
||||
case OT_CO2LevelVH: OTdataObject.CO2LevelVH = print_u16(); break;
|
||||
case OT_SupplyInletTemperature: OTdataObject.SupplyInletTemperature = print_f88(); break;
|
||||
case OT_SupplyOutletTemperature: OTdataObject.SupplyOutletTemperature = print_f88(); break;
|
||||
case OT_ExhaustInletTemperature: OTdataObject.ExhaustInletTemperature = print_f88(); break;
|
||||
case OT_ExhaustOutletTemperature: OTdataObject.ExhaustOutletTemperature = print_f88(); break;
|
||||
case OT_ActualExhaustFanSpeed: OTdataObject.ActualExhaustFanSpeed = print_u16(); break;
|
||||
case OT_ActualInletFanSpeed: OTdataObject.ActualInletFanSpeed = print_u16(); break;
|
||||
case OT_RemoteParameterSettingVH: OTdataObject.RemoteParameterSettingVH = print_flag8flag8(); break;
|
||||
case OT_NominalVentilationValue: OTdataObject.NominalVentilationValue = print_u8u8(); break;
|
||||
case OT_TSPNumberVH: OTdataObject.TSPNumberVH = print_u8u8(); break;
|
||||
case OT_TSPEntryVH: OTdataObject.TSPEntryVH = print_u8u8(); break;
|
||||
case OT_FaultBufferSizeVH: OTdataObject.FaultBufferSizeVH = print_u8u8(); break;
|
||||
case OT_FaultBufferEntryVH: OTdataObject.FaultBufferEntryVH = print_u8u8(); break;
|
||||
case OT_FanSpeed: OTdataObject.FanSpeed = print_u16(); break;
|
||||
case OT_ElectricalCurrentBurnerFlame: OTdataObject.ElectricalCurrentBurnerFlame = print_f88(); break;
|
||||
case OT_TRoomCH2: OTdataObject.TRoomCH2 = print_f88(); break;
|
||||
case OT_RelativeHumidity: OTdataObject.RelativeHumidity = print_u8u8(); break;
|
||||
case OT_RFstrengthbatterylevel: OTdataObject.RFstrengthbatterylevel = print_u8u8(); break;
|
||||
case OT_OperatingMode_HC1_HC2_DHW: OTdataObject.OperatingMode_HC1_HC2_DHW = print_u8u8(); break;
|
||||
case OT_ElectricityProducerStarts: OTdataObject.ElectricityProducerStarts = print_u16(); break;
|
||||
case OT_ElectricityProducerHours: OTdataObject.ElectricityProducerHours = print_u16(); break;
|
||||
case OT_ElectricityProduction: OTdataObject.ElectricityProduction = print_u16(); break;
|
||||
case OT_CumulativElectricityProduction:OTdataObject.CumulativElectricityProduction = print_u16(); break;
|
||||
case OT_RemehadFdUcodes: OTdataObject.RemehadFdUcodes = print_u8u8(); break;
|
||||
case OT_RemehaServicemessage: OTdataObject.RemehaServicemessage = print_u8u8(); break;
|
||||
case OT_RemehaDetectionConnectedSCU: OTdataObject.RemehaDetectionConnectedSCU = print_u8u8(); break;
|
||||
}
|
||||
} else Debugln(); //next line
|
||||
} else if (strstr(buf, "Error 01")!= NULL) {
|
||||
@ -1046,95 +1049,95 @@ void handleOTGW()
|
||||
String getOTGWValue(int msgid)
|
||||
{
|
||||
switch (static_cast<OpenThermMessageID>(msgid)) {
|
||||
case TSet: return String(OTdataObject.TSet); break;
|
||||
case CoolingControl: return String(OTdataObject.CoolingControl); break;
|
||||
case TsetCH2: return String(OTdataObject.TsetCH2); break;
|
||||
case TrOverride: return String(OTdataObject.TrOverride); break;
|
||||
case MaxRelModLevelSetting: return String(OTdataObject.MaxRelModLevelSetting); break;
|
||||
case TrSet: return String(OTdataObject.TrSet); break;
|
||||
case TrSetCH2: return String(OTdataObject.TrSetCH2); break;
|
||||
case RelModLevel: return String(OTdataObject.RelModLevel); break;
|
||||
case CHPressure: return String(OTdataObject.CHPressure); break;
|
||||
case DHWFlowRate: return String(OTdataObject.DHWFlowRate); break;
|
||||
case Tr: return String(OTdataObject.Tr); break;
|
||||
case Tboiler: return String(OTdataObject.Tboiler); break;
|
||||
case Tdhw: return String(OTdataObject.Tdhw); break;
|
||||
case Toutside: return String(OTdataObject.Toutside); break;
|
||||
case Tret: return String(OTdataObject.Tret); break;
|
||||
case Tstorage: return String(OTdataObject.Tstorage); break;
|
||||
case Tcollector: return String(OTdataObject.Tcollector); break;
|
||||
case TflowCH2: return String(OTdataObject.TflowCH2); break;
|
||||
case Tdhw2: return String(OTdataObject.Tdhw2); break;
|
||||
case Texhaust: return String(OTdataObject.Texhaust); break;
|
||||
case TdhwSet: return String(OTdataObject.TdhwSet); break;
|
||||
case MaxTSet: return String(OTdataObject.MaxTSet); break;
|
||||
case Hcratio: return String(OTdataObject.Hcratio); break;
|
||||
case OpenThermVersionMaster: return String(OTdataObject.OpenThermVersionMaster); break;
|
||||
case OpenThermVersionSlave: return String(OTdataObject.OpenThermVersionSlave); break;
|
||||
case Status: return String(OTdataObject.Status); break;
|
||||
case ASFflags: return String(OTdataObject.ASFflags); break;
|
||||
case MConfigMMemberIDcode: return String(OTdataObject.MConfigMMemberIDcode); break;
|
||||
case SConfigSMemberIDcode: return String(OTdataObject.SConfigSMemberIDcode); break;
|
||||
case Command: return String(OTdataObject.Command); break;
|
||||
case RBPflags: return String(OTdataObject.RBPflags); break;
|
||||
case TSP: return String(OTdataObject.TSP); break;
|
||||
case TSPindexTSPvalue: return String(OTdataObject.TSPindexTSPvalue); break;
|
||||
case FHBsize: return String(OTdataObject.FHBsize); break;
|
||||
case FHBindexFHBvalue: return String(OTdataObject.FHBindexFHBvalue); break;
|
||||
case MaxCapacityMinModLevel: return String(OTdataObject.MaxCapacityMinModLevel); break;
|
||||
case DayTime: return String(OTdataObject.DayTime); break;
|
||||
case Date: return String(OTdataObject.Date); break;
|
||||
case Year: return String(OTdataObject.Year); break;
|
||||
case TdhwSetUBTdhwSetLB: return String(OTdataObject.TdhwSetUBTdhwSetLB); break;
|
||||
case MaxTSetUBMaxTSetLB: return String(OTdataObject.MaxTSetUBMaxTSetLB); break;
|
||||
case HcratioUBHcratioLB: return String(OTdataObject.HcratioUBHcratioLB); break;
|
||||
case RemoteOverrideFunction: return String(OTdataObject.RemoteOverrideFunction); break;
|
||||
case OEMDiagnosticCode: return String(OTdataObject.OEMDiagnosticCode); break;
|
||||
case BurnerStarts: return String(OTdataObject.BurnerStarts); break;
|
||||
case CHPumpStarts: return String(OTdataObject.CHPumpStarts); break;
|
||||
case DHWPumpValveStarts: return String(OTdataObject.DHWPumpValveStarts); break;
|
||||
case DHWBurnerStarts: return String(OTdataObject.DHWBurnerStarts); break;
|
||||
case BurnerOperationHours: return String(OTdataObject.BurnerOperationHours); break;
|
||||
case CHPumpOperationHours: return String(OTdataObject.CHPumpOperationHours); break;
|
||||
case DHWPumpValveOperationHours: return String(OTdataObject.DHWPumpValveOperationHours); break;
|
||||
case DHWBurnerOperationHours: return String(OTdataObject.DHWBurnerOperationHours); break;
|
||||
case MasterVersion: return String(OTdataObject.MasterVersion); break;
|
||||
case SlaveVersion: return String(OTdataObject.SlaveVersion); break;
|
||||
case StatusVH: return String(OTdataObject.StatusVH); break;
|
||||
case ControlSetpointVH: return String(OTdataObject.ControlSetpointVH); break;
|
||||
case FaultFlagsCodeVH: return String(OTdataObject.FaultFlagsCodeVH); break;
|
||||
case DiagnosticCodeVH: return String(OTdataObject.DiagnosticCodeVH); break;
|
||||
case ConfigMemberIDVH: return String(OTdataObject.ConfigMemberIDVH); break;
|
||||
case OpenthermVersionVH: return String(OTdataObject.OpenthermVersionVH); break;
|
||||
case VersionTypeVH: return String(OTdataObject.VersionTypeVH); break;
|
||||
case RelativeVentilation: return String(OTdataObject.RelativeVentilation); break;
|
||||
case RelativeHumidityVH: return String(OTdataObject.RelativeHumidityVH); break;
|
||||
case CO2LevelVH: return String(OTdataObject.CO2LevelVH); break;
|
||||
case SupplyInletTemperature: return String(OTdataObject.SupplyInletTemperature); break;
|
||||
case SupplyOutletTemperature: return String(OTdataObject.SupplyOutletTemperature); break;
|
||||
case ExhaustInletTemperature: return String(OTdataObject.ExhaustInletTemperature); break;
|
||||
case ExhaustOutletTemperature: return String(OTdataObject.ExhaustOutletTemperature); break;
|
||||
case ActualExhaustFanSpeed: return String(OTdataObject.ActualExhaustFanSpeed); break;
|
||||
case ActualInletFanSpeed: return String(OTdataObject.ActualInletFanSpeed); break;
|
||||
case RemoteParameterSettingVH: return String(OTdataObject.RemoteParameterSettingVH); break;
|
||||
case NominalVentilationValue: return String(OTdataObject.NominalVentilationValue); break;
|
||||
case TSPNumberVH: return String(OTdataObject.TSPNumberVH); break;
|
||||
case TSPEntryVH: return String(OTdataObject.TSPEntryVH); break;
|
||||
case FaultBufferSizeVH: return String(OTdataObject.FaultBufferSizeVH); break;
|
||||
case FaultBufferEntryVH: return String(OTdataObject.FaultBufferEntryVH); break;
|
||||
case FanSpeed: return String(OTdataObject.FanSpeed); break;
|
||||
case ElectricalCurrentBurnerFlame: return String(OTdataObject.ElectricalCurrentBurnerFlame); break;
|
||||
case TRoomCH2: return String(OTdataObject.TRoomCH2); break;
|
||||
case RelativeHumidity: return String(OTdataObject.RelativeHumidity); break;
|
||||
case RFstrengthbatterylevel: return String(OTdataObject.RFstrengthbatterylevel); break;
|
||||
case OperatingMode_HC1_HC2_DHW: return String(OTdataObject.OperatingMode_HC1_HC2_DHW); break;
|
||||
case ElectricityProducerStarts: return String(OTdataObject.ElectricityProducerStarts); break;
|
||||
case ElectricityProducerHours: return String(OTdataObject.ElectricityProducerHours); break;
|
||||
case ElectricityProduction: return String(OTdataObject.ElectricityProduction); break;
|
||||
case CumulativElectricityProduction: return String(OTdataObject.CumulativElectricityProduction); break;
|
||||
case RemehadFdUcodes: return String(OTdataObject.RemehadFdUcodes); break;
|
||||
case RemehaServicemessage: return String(OTdataObject.RemehaServicemessage); break;
|
||||
case RemehaDetectionConnectedSCU: return String(OTdataObject.RemehaDetectionConnectedSCU); break;
|
||||
case OT_TSet: return String(OTdataObject.TSet); break;
|
||||
case OT_CoolingControl: return String(OTdataObject.CoolingControl); break;
|
||||
case OT_TsetCH2: return String(OTdataObject.TsetCH2); break;
|
||||
case OT_TrOverride: return String(OTdataObject.TrOverride); break;
|
||||
case OT_MaxRelModLevelSetting: return String(OTdataObject.MaxRelModLevelSetting); break;
|
||||
case OT_TrSet: return String(OTdataObject.TrSet); break;
|
||||
case OT_TrSetCH2: return String(OTdataObject.TrSetCH2); break;
|
||||
case OT_RelModLevel: return String(OTdataObject.RelModLevel); break;
|
||||
case OT_CHPressure: return String(OTdataObject.CHPressure); break;
|
||||
case OT_DHWFlowRate: return String(OTdataObject.DHWFlowRate); break;
|
||||
case OT_Tr: return String(OTdataObject.Tr); break;
|
||||
case OT_Tboiler: return String(OTdataObject.Tboiler); break;
|
||||
case OT_Tdhw: return String(OTdataObject.Tdhw); break;
|
||||
case OT_Toutside: return String(OTdataObject.Toutside); break;
|
||||
case OT_Tret: return String(OTdataObject.Tret); break;
|
||||
case OT_Tstorage: return String(OTdataObject.Tstorage); break;
|
||||
case OT_Tcollector: return String(OTdataObject.Tcollector); break;
|
||||
case OT_TflowCH2: return String(OTdataObject.TflowCH2); break;
|
||||
case OT_Tdhw2: return String(OTdataObject.Tdhw2); break;
|
||||
case OT_Texhaust: return String(OTdataObject.Texhaust); break;
|
||||
case OT_TdhwSet: return String(OTdataObject.TdhwSet); break;
|
||||
case OT_MaxTSet: return String(OTdataObject.MaxTSet); break;
|
||||
case OT_Hcratio: return String(OTdataObject.Hcratio); break;
|
||||
case OT_OpenThermVersionMaster: return String(OTdataObject.OpenThermVersionMaster); break;
|
||||
case OT_OpenThermVersionSlave: return String(OTdataObject.OpenThermVersionSlave); break;
|
||||
case OT_Statusflags: return String(OTdataObject.Statusflags); break;
|
||||
case OT_ASFflags: return String(OTdataObject.ASFflags); break;
|
||||
case OT_MConfigMMemberIDcode: return String(OTdataObject.MConfigMMemberIDcode); break;
|
||||
case OT_SConfigSMemberIDcode: return String(OTdataObject.SConfigSMemberIDcode); break;
|
||||
case OT_Command: return String(OTdataObject.Command); break;
|
||||
case OT_RBPflags: return String(OTdataObject.RBPflags); break;
|
||||
case OT_TSP: return String(OTdataObject.TSP); break;
|
||||
case OT_TSPindexTSPvalue: return String(OTdataObject.TSPindexTSPvalue); break;
|
||||
case OT_FHBsize: return String(OTdataObject.FHBsize); break;
|
||||
case OT_FHBindexFHBvalue: return String(OTdataObject.FHBindexFHBvalue); break;
|
||||
case OT_MaxCapacityMinModLevel: return String(OTdataObject.MaxCapacityMinModLevel); break;
|
||||
case OT_DayTime: return String(OTdataObject.DayTime); break;
|
||||
case OT_Date: return String(OTdataObject.Date); break;
|
||||
case OT_Year: return String(OTdataObject.Year); break;
|
||||
case OT_TdhwSetUBTdhwSetLB: return String(OTdataObject.TdhwSetUBTdhwSetLB); break;
|
||||
case OT_MaxTSetUBMaxTSetLB: return String(OTdataObject.MaxTSetUBMaxTSetLB); break;
|
||||
case OT_HcratioUBHcratioLB: return String(OTdataObject.HcratioUBHcratioLB); break;
|
||||
case OT_RemoteOverrideFunction: return String(OTdataObject.RemoteOverrideFunction); break;
|
||||
case OT_OEMDiagnosticCode: return String(OTdataObject.OEMDiagnosticCode); break;
|
||||
case OT_BurnerStarts: return String(OTdataObject.BurnerStarts); break;
|
||||
case OT_CHPumpStarts: return String(OTdataObject.CHPumpStarts); break;
|
||||
case OT_DHWPumpValveStarts: return String(OTdataObject.DHWPumpValveStarts); break;
|
||||
case OT_DHWBurnerStarts: return String(OTdataObject.DHWBurnerStarts); break;
|
||||
case OT_BurnerOperationHours: return String(OTdataObject.BurnerOperationHours); break;
|
||||
case OT_CHPumpOperationHours: return String(OTdataObject.CHPumpOperationHours); break;
|
||||
case OT_DHWPumpValveOperationHours: return String(OTdataObject.DHWPumpValveOperationHours); break;
|
||||
case OT_DHWBurnerOperationHours: return String(OTdataObject.DHWBurnerOperationHours); break;
|
||||
case OT_MasterVersion: return String(OTdataObject.MasterVersion); break;
|
||||
case OT_SlaveVersion: return String(OTdataObject.SlaveVersion); break;
|
||||
case OT_StatusVH: return String(OTdataObject.StatusVH); break;
|
||||
case OT_ControlSetpointVH: return String(OTdataObject.ControlSetpointVH); break;
|
||||
case OT_FaultFlagsCodeVH: return String(OTdataObject.FaultFlagsCodeVH); break;
|
||||
case OT_DiagnosticCodeVH: return String(OTdataObject.DiagnosticCodeVH); break;
|
||||
case OT_ConfigMemberIDVH: return String(OTdataObject.ConfigMemberIDVH); break;
|
||||
case OT_OpenthermVersionVH: return String(OTdataObject.OpenthermVersionVH); break;
|
||||
case OT_VersionTypeVH: return String(OTdataObject.VersionTypeVH); break;
|
||||
case OT_RelativeVentilation: return String(OTdataObject.RelativeVentilation); break;
|
||||
case OT_RelativeHumidityVH: return String(OTdataObject.RelativeHumidityVH); break;
|
||||
case OT_CO2LevelVH: return String(OTdataObject.CO2LevelVH); break;
|
||||
case OT_SupplyInletTemperature: return String(OTdataObject.SupplyInletTemperature); break;
|
||||
case OT_SupplyOutletTemperature: return String(OTdataObject.SupplyOutletTemperature); break;
|
||||
case OT_ExhaustInletTemperature: return String(OTdataObject.ExhaustInletTemperature); break;
|
||||
case OT_ExhaustOutletTemperature: return String(OTdataObject.ExhaustOutletTemperature); break;
|
||||
case OT_ActualExhaustFanSpeed: return String(OTdataObject.ActualExhaustFanSpeed); break;
|
||||
case OT_ActualInletFanSpeed: return String(OTdataObject.ActualInletFanSpeed); break;
|
||||
case OT_RemoteParameterSettingVH: return String(OTdataObject.RemoteParameterSettingVH); break;
|
||||
case OT_NominalVentilationValue: return String(OTdataObject.NominalVentilationValue); break;
|
||||
case OT_TSPNumberVH: return String(OTdataObject.TSPNumberVH); break;
|
||||
case OT_TSPEntryVH: return String(OTdataObject.TSPEntryVH); break;
|
||||
case OT_FaultBufferSizeVH: return String(OTdataObject.FaultBufferSizeVH); break;
|
||||
case OT_FaultBufferEntryVH: return String(OTdataObject.FaultBufferEntryVH); break;
|
||||
case OT_FanSpeed: return String(OTdataObject.FanSpeed); break;
|
||||
case OT_ElectricalCurrentBurnerFlame: return String(OTdataObject.ElectricalCurrentBurnerFlame); break;
|
||||
case OT_TRoomCH2: return String(OTdataObject.TRoomCH2); break;
|
||||
case OT_RelativeHumidity: return String(OTdataObject.RelativeHumidity); break;
|
||||
case OT_RFstrengthbatterylevel: return String(OTdataObject.RFstrengthbatterylevel); break;
|
||||
case OT_OperatingMode_HC1_HC2_DHW: return String(OTdataObject.OperatingMode_HC1_HC2_DHW); break;
|
||||
case OT_ElectricityProducerStarts: return String(OTdataObject.ElectricityProducerStarts); break;
|
||||
case OT_ElectricityProducerHours: return String(OTdataObject.ElectricityProducerHours); break;
|
||||
case OT_ElectricityProduction: return String(OTdataObject.ElectricityProduction); break;
|
||||
case OT_CumulativElectricityProduction: return String(OTdataObject.CumulativElectricityProduction); break;
|
||||
case OT_RemehadFdUcodes: return String(OTdataObject.RemehadFdUcodes); break;
|
||||
case OT_RemehaServicemessage: return String(OTdataObject.RemehaServicemessage); break;
|
||||
case OT_RemehaDetectionConnectedSCU: return String(OTdataObject.RemehaDetectionConnectedSCU); break;
|
||||
default: return "not implemented yet!";
|
||||
}
|
||||
}
|
||||
|
@ -343,6 +343,7 @@
|
||||
needReload = true;
|
||||
}
|
||||
epoch.value = data[i].epoch;
|
||||
update.textContent = data[i].value;
|
||||
//if (update.style.visibility == 'visible') update.textContent = data[i].value;
|
||||
|
||||
}
|
||||
|
133
restAPI.ino
133
restAPI.ino
@ -216,43 +216,43 @@ void sendTelegraf()
|
||||
|
||||
sendStartJsonArray();
|
||||
|
||||
sendJsonOTmonObj("flamestatus", isFlameStatus(), "", msglastupdated[Status]);
|
||||
sendJsonOTmonObj("chmodus", isCentralHeatingActive(),"", msglastupdated[Status]);
|
||||
sendJsonOTmonObj("chenable", isCentralHeatingEnabled(),"", msglastupdated[Status]);
|
||||
sendJsonOTmonObj("ch2modus", isCentralHeating2Active(),"", msglastupdated[Status]);
|
||||
sendJsonOTmonObj("ch2enable", isCentralHeating2enabled(),"", msglastupdated[Status]);
|
||||
sendJsonOTmonObj("dhwmode", isDomesticHotWaterActive(),"", msglastupdated[Status]);
|
||||
sendJsonOTmonObj("dhwenable", isDomesticHotWaterEnabled(),"", msglastupdated[Status]);
|
||||
sendJsonOTmonObj("diagnosticindicator", isDiagnosticIndicator(),"", msglastupdated[Status]);
|
||||
sendJsonOTmonObj("faultindicator", isFaultIndicator(),"", msglastupdated[Status]);
|
||||
sendJsonOTmonObj("flamestatus", isFlameStatus(), "", msglastupdated[OT_Statusflags]);
|
||||
sendJsonOTmonObj("chmodus", isCentralHeatingActive(),"", msglastupdated[OT_Statusflags]);
|
||||
sendJsonOTmonObj("chenable", isCentralHeatingEnabled(),"", msglastupdated[OT_Statusflags]);
|
||||
sendJsonOTmonObj("ch2modus", isCentralHeating2Active(),"", msglastupdated[OT_Statusflags]);
|
||||
sendJsonOTmonObj("ch2enable", isCentralHeating2enabled(),"", msglastupdated[OT_Statusflags]);
|
||||
sendJsonOTmonObj("dhwmode", isDomesticHotWaterActive(),"", msglastupdated[OT_Statusflags]);
|
||||
sendJsonOTmonObj("dhwenable", isDomesticHotWaterEnabled(),"", msglastupdated[OT_Statusflags]);
|
||||
sendJsonOTmonObj("diagnosticindicator", isDiagnosticIndicator(),"", msglastupdated[OT_Statusflags]);
|
||||
sendJsonOTmonObj("faultindicator", isFaultIndicator(),"", msglastupdated[OT_Statusflags]);
|
||||
|
||||
sendJsonOTmonObj("coolingmodus", isCoolingEnabled(),"", msglastupdated[Status]);
|
||||
sendJsonOTmonObj("coolingactive", isCoolingActive(),"", msglastupdated[Status]);
|
||||
sendJsonOTmonObj("otcactive", isOutsideTemperatureCompensationActive(),"", msglastupdated[Status]);
|
||||
sendJsonOTmonObj("coolingmodus", isCoolingEnabled(),"", msglastupdated[OT_Statusflags]);
|
||||
sendJsonOTmonObj("coolingactive", isCoolingActive(),"", msglastupdated[OT_Statusflags]);
|
||||
sendJsonOTmonObj("otcactive", isOutsideTemperatureCompensationActive(),"", msglastupdated[OT_Statusflags]);
|
||||
|
||||
sendJsonOTmonObj("servicerequest", isServiceRequest(),"", msglastupdated[ASFflags]);
|
||||
sendJsonOTmonObj("lockoutreset", isLockoutReset(),"", msglastupdated[ASFflags]);
|
||||
sendJsonOTmonObj("lowwaterpressure", isLowWaterPressure(),"", msglastupdated[ASFflags]);
|
||||
sendJsonOTmonObj("gasflamefault", isGasFlameFault(),"", msglastupdated[ASFflags]);
|
||||
sendJsonOTmonObj("airtemp", isAirTemperature(),"", msglastupdated[ASFflags]);
|
||||
sendJsonOTmonObj("waterovertemperature", isWaterOverTemperature(),"", msglastupdated[ASFflags]);
|
||||
sendJsonOTmonObj("servicerequest", isServiceRequest(),"", msglastupdated[OT_ASFflags]);
|
||||
sendJsonOTmonObj("lockoutreset", isLockoutReset(),"", msglastupdated[OT_ASFflags]);
|
||||
sendJsonOTmonObj("lowwaterpressure", isLowWaterPressure(),"", msglastupdated[OT_ASFflags]);
|
||||
sendJsonOTmonObj("gasflamefault", isGasFlameFault(),"", msglastupdated[OT_ASFflags]);
|
||||
sendJsonOTmonObj("airtemp", isAirTemperature(),"", msglastupdated[OT_ASFflags]);
|
||||
sendJsonOTmonObj("waterovertemperature", isWaterOverTemperature(),"", msglastupdated[OT_ASFflags]);
|
||||
|
||||
|
||||
sendJsonOTmonObj("outsidetemperature", OTdataObject.Toutside, "°C", msglastupdated[Toutside]);
|
||||
sendJsonOTmonObj("roomtemperature", OTdataObject.Tr, "°C", msglastupdated[Tr]);
|
||||
sendJsonOTmonObj("roomsetpoint", OTdataObject.TrSet, "°C", msglastupdated[TrSet]);
|
||||
sendJsonOTmonObj("remoteroomsetpoint", OTdataObject.TrOverride, "°C", msglastupdated[TrOverride]);
|
||||
sendJsonOTmonObj("controlsetpoint", OTdataObject.TSet,"°C", msglastupdated[TSet]);
|
||||
sendJsonOTmonObj("relmodlvl", OTdataObject.RelModLevel,"%", msglastupdated[RelModLevel]);
|
||||
sendJsonOTmonObj("maxrelmodlvl", OTdataObject.MaxRelModLevelSetting, "%", msglastupdated[MaxRelModLevelSetting]);
|
||||
sendJsonOTmonObj("outsidetemperature", OTdataObject.Toutside, "°C", msglastupdated[OT_Toutside]);
|
||||
sendJsonOTmonObj("roomtemperature", OTdataObject.Tr, "°C", msglastupdated[OT_Tr]);
|
||||
sendJsonOTmonObj("roomsetpoint", OTdataObject.TrSet, "°C", msglastupdated[OT_TrSet]);
|
||||
sendJsonOTmonObj("remoteroomsetpoint", OTdataObject.TrOverride, "°C", msglastupdated[OT_TrOverride]);
|
||||
sendJsonOTmonObj("controlsetpoint", OTdataObject.TSet,"°C", msglastupdated[OT_TSet]);
|
||||
sendJsonOTmonObj("relmodlvl", OTdataObject.RelModLevel,"%", msglastupdated[OT_RelModLevel]);
|
||||
sendJsonOTmonObj("maxrelmodlvl", OTdataObject.MaxRelModLevelSetting, "%", msglastupdated[OT_MaxRelModLevelSetting]);
|
||||
|
||||
sendJsonOTmonObj("boilertemperature", OTdataObject.Tboiler, "°C", msglastupdated[Tboiler]);
|
||||
sendJsonOTmonObj("returnwatertemperature", OTdataObject.Tret,"°C", msglastupdated[Tret]);
|
||||
sendJsonOTmonObj("dhwtemperature", OTdataObject.Tdhw,"°C", msglastupdated[Tdhw]);
|
||||
sendJsonOTmonObj("dhwsetpoint", OTdataObject.TdhwSet,"°C", msglastupdated[TdhwSet]);
|
||||
sendJsonOTmonObj("maxchwatersetpoint", OTdataObject.MaxTSet,"°C", msglastupdated[MaxTSet]);
|
||||
sendJsonOTmonObj("chwaterpressure", OTdataObject.CHPressure, "bar", msglastupdated[CHPressure]);
|
||||
sendJsonOTmonObj("oemfaultcode", OTdataObject.OEMDiagnosticCode, "", msglastupdated[OEMDiagnosticCode]);
|
||||
sendJsonOTmonObj("boilertemperature", OTdataObject.Tboiler, "°C", msglastupdated[OT_Tboiler]);
|
||||
sendJsonOTmonObj("returnwatertemperature", OTdataObject.Tret,"°C", msglastupdated[OT_Tret]);
|
||||
sendJsonOTmonObj("dhwtemperature", OTdataObject.Tdhw,"°C", msglastupdated[OT_Tdhw]);
|
||||
sendJsonOTmonObj("dhwsetpoint", OTdataObject.TdhwSet,"°C", msglastupdated[OT_TdhwSet]);
|
||||
sendJsonOTmonObj("maxchwatersetpoint", OTdataObject.MaxTSet,"°C", msglastupdated[OT_MaxTSet]);
|
||||
sendJsonOTmonObj("chwaterpressure", OTdataObject.CHPressure, "bar", msglastupdated[OT_CHPressure]);
|
||||
sendJsonOTmonObj("oemfaultcode", OTdataObject.OEMDiagnosticCode, "", msglastupdated[OT_OEMDiagnosticCode]);
|
||||
|
||||
sendEndJsonArray();
|
||||
|
||||
@ -265,43 +265,46 @@ void sendOTmonitor()
|
||||
|
||||
sendStartJsonObj("otmonitor");
|
||||
|
||||
sendJsonOTmonObj("flamestatus", CONOFF(isFlameStatus()),"", msglastupdated[Status]);
|
||||
sendJsonOTmonObj("chmodus", CONOFF(isCentralHeatingActive()),"", msglastupdated[Status]);
|
||||
sendJsonOTmonObj("chenable", CONOFF(isCentralHeatingEnabled()),"", msglastupdated[Status]);
|
||||
sendJsonOTmonObj("ch2modus", CONOFF(isCentralHeating2Active()),"", msglastupdated[Status]);
|
||||
sendJsonOTmonObj("ch2enable", CONOFF(isCentralHeating2enabled()),"", msglastupdated[Status]);
|
||||
sendJsonOTmonObj("dhwmode", CONOFF(isDomesticHotWaterActive()),"", msglastupdated[Status]);
|
||||
sendJsonOTmonObj("dhwenable", CONOFF(isDomesticHotWaterEnabled()),"", msglastupdated[Status]);
|
||||
sendJsonOTmonObj("diagnosticindicator", CONOFF(isDiagnosticIndicator()),"", msglastupdated[Status]);
|
||||
sendJsonOTmonObj("faultindicator", CONOFF(isFaultIndicator()),"", msglastupdated[Status]);
|
||||
|
||||
sendJsonOTmonObj("coolingmodus", CONOFF(isCoolingEnabled()),"", msglastupdated[Status]);
|
||||
sendJsonOTmonObj("coolingactive", CONOFF(isCoolingActive()),"", msglastupdated[Status]);
|
||||
sendJsonOTmonObj("otcactive", CONOFF(isOutsideTemperatureCompensationActive()),"", msglastupdated[Status]);
|
||||
// sendJsonOTmonObj("status hb", byte_to_binary((OTdataObject.Statusflags>>8) & 0xFF),"", msglastupdated[OT_Statusflags]);
|
||||
// sendJsonOTmonObj("status lb", byte_to_binary(OTdataObject.Statusflags & 0xFF),"", msglastupdated[OT_Statusflags]);
|
||||
|
||||
sendJsonOTmonObj("servicerequest", CONOFF(isServiceRequest()),"", msglastupdated[ASFflags]);
|
||||
sendJsonOTmonObj("lockoutreset", CONOFF(isLockoutReset()),"", msglastupdated[ASFflags]);
|
||||
sendJsonOTmonObj("lowwaterpressure", CONOFF(isLowWaterPressure()),"", msglastupdated[ASFflags]);
|
||||
sendJsonOTmonObj("gasflamefault", CONOFF(isGasFlameFault()),"", msglastupdated[ASFflags]);
|
||||
sendJsonOTmonObj("airtemp", CONOFF(isAirTemperature()),"", msglastupdated[ASFflags]);
|
||||
sendJsonOTmonObj("waterovertemperature", CONOFF(isWaterOverTemperature()),"", msglastupdated[ASFflags]);
|
||||
sendJsonOTmonObj("flamestatus", CONOFF(isFlameStatus()),"", msglastupdated[OT_Statusflags]);
|
||||
sendJsonOTmonObj("chmodus", CONOFF(isCentralHeatingActive()),"", msglastupdated[OT_Statusflags]);
|
||||
sendJsonOTmonObj("chenable", CONOFF(isCentralHeatingEnabled()),"", msglastupdated[OT_Statusflags]);
|
||||
sendJsonOTmonObj("ch2modus", CONOFF(isCentralHeating2Active()),"", msglastupdated[OT_Statusflags]);
|
||||
sendJsonOTmonObj("ch2enable", CONOFF(isCentralHeating2enabled()),"", msglastupdated[OT_Statusflags]);
|
||||
sendJsonOTmonObj("dhwmode", CONOFF(isDomesticHotWaterActive()),"", msglastupdated[OT_Statusflags]);
|
||||
sendJsonOTmonObj("dhwenable", CONOFF(isDomesticHotWaterEnabled()),"", msglastupdated[OT_Statusflags]);
|
||||
sendJsonOTmonObj("diagnosticindicator", CONOFF(isDiagnosticIndicator()),"", msglastupdated[OT_Statusflags]);
|
||||
sendJsonOTmonObj("faultindicator", CONOFF(isFaultIndicator()),"", msglastupdated[OT_Statusflags]);
|
||||
|
||||
sendJsonOTmonObj("coolingmodus", CONOFF(isCoolingEnabled()),"", msglastupdated[OT_Statusflags]);
|
||||
sendJsonOTmonObj("coolingactive", CONOFF(isCoolingActive()),"", msglastupdated[OT_Statusflags]);
|
||||
sendJsonOTmonObj("otcactive", CONOFF(isOutsideTemperatureCompensationActive()),"", msglastupdated[OT_Statusflags]);
|
||||
|
||||
sendJsonOTmonObj("servicerequest", CONOFF(isServiceRequest()),"", msglastupdated[OT_ASFflags]);
|
||||
sendJsonOTmonObj("lockoutreset", CONOFF(isLockoutReset()),"", msglastupdated[OT_ASFflags]);
|
||||
sendJsonOTmonObj("lowwaterpressure", CONOFF(isLowWaterPressure()),"", msglastupdated[OT_ASFflags]);
|
||||
sendJsonOTmonObj("gasflamefault", CONOFF(isGasFlameFault()),"", msglastupdated[OT_ASFflags]);
|
||||
sendJsonOTmonObj("airtemp", CONOFF(isAirTemperature()),"", msglastupdated[OT_ASFflags]);
|
||||
sendJsonOTmonObj("waterovertemperature", CONOFF(isWaterOverTemperature()),"", msglastupdated[OT_ASFflags]);
|
||||
|
||||
|
||||
sendJsonOTmonObj("outsidetemperature", OTdataObject.Toutside, "°C", msglastupdated[Toutside]);
|
||||
sendJsonOTmonObj("roomtemperature", OTdataObject.Tr, "°C", msglastupdated[Tr]);
|
||||
sendJsonOTmonObj("roomsetpoint", OTdataObject.TrSet, "°C", msglastupdated[TrSet]);
|
||||
sendJsonOTmonObj("remoteroomsetpoint", OTdataObject.TrOverride, "°C", msglastupdated[TrOverride]);
|
||||
sendJsonOTmonObj("controlsetpoint", OTdataObject.TSet,"°C", msglastupdated[TSet]);
|
||||
sendJsonOTmonObj("relmodlvl", OTdataObject.RelModLevel,"%", msglastupdated[RelModLevel]);
|
||||
sendJsonOTmonObj("maxrelmodlvl", OTdataObject.MaxRelModLevelSetting, "%", msglastupdated[MaxRelModLevelSetting]);
|
||||
sendJsonOTmonObj("outsidetemperature", OTdataObject.Toutside, "°C", msglastupdated[OT_Toutside]);
|
||||
sendJsonOTmonObj("roomtemperature", OTdataObject.Tr, "°C", msglastupdated[OT_Tr]);
|
||||
sendJsonOTmonObj("roomsetpoint", OTdataObject.TrSet, "°C", msglastupdated[OT_TrSet]);
|
||||
sendJsonOTmonObj("remoteroomsetpoint", OTdataObject.TrOverride, "°C", msglastupdated[OT_TrOverride]);
|
||||
sendJsonOTmonObj("controlsetpoint", OTdataObject.TSet,"°C", msglastupdated[OT_TSet]);
|
||||
sendJsonOTmonObj("relmodlvl", OTdataObject.RelModLevel,"%", msglastupdated[OT_RelModLevel]);
|
||||
sendJsonOTmonObj("maxrelmodlvl", OTdataObject.MaxRelModLevelSetting, "%", msglastupdated[OT_MaxRelModLevelSetting]);
|
||||
|
||||
sendJsonOTmonObj("boilertemperature", OTdataObject.Tboiler, "°C", msglastupdated[Tboiler]);
|
||||
sendJsonOTmonObj("returnwatertemperature", OTdataObject.Tret,"°C", msglastupdated[Tret]);
|
||||
sendJsonOTmonObj("dhwtemperature", OTdataObject.Tdhw,"°C", msglastupdated[Tdhw]);
|
||||
sendJsonOTmonObj("dhwsetpoint", OTdataObject.TdhwSet,"°C", msglastupdated[TdhwSet]);
|
||||
sendJsonOTmonObj("maxchwatersetpoint", OTdataObject.MaxTSet,"°C", msglastupdated[MaxTSet]);
|
||||
sendJsonOTmonObj("chwaterpressure", OTdataObject.CHPressure, "bar", msglastupdated[CHPressure]);
|
||||
sendJsonOTmonObj("oemfaultcode", OTdataObject.OEMDiagnosticCode, "", msglastupdated[OEMDiagnosticCode]);
|
||||
sendJsonOTmonObj("boilertemperature", OTdataObject.Tboiler, "°C", msglastupdated[OT_Tboiler]);
|
||||
sendJsonOTmonObj("returnwatertemperature", OTdataObject.Tret,"°C", msglastupdated[OT_Tret]);
|
||||
sendJsonOTmonObj("dhwtemperature", OTdataObject.Tdhw,"°C", msglastupdated[OT_Tdhw]);
|
||||
sendJsonOTmonObj("dhwsetpoint", OTdataObject.TdhwSet,"°C", msglastupdated[OT_TdhwSet]);
|
||||
sendJsonOTmonObj("maxchwatersetpoint", OTdataObject.MaxTSet,"°C", msglastupdated[OT_MaxTSet]);
|
||||
sendJsonOTmonObj("chwaterpressure", OTdataObject.CHPressure, "bar", msglastupdated[OT_CHPressure]);
|
||||
sendJsonOTmonObj("oemfaultcode", OTdataObject.OEMDiagnosticCode, "", msglastupdated[OT_OEMDiagnosticCode]);
|
||||
|
||||
sendEndJsonObj("otmonitor");
|
||||
|
||||
|
18
version.h
18
version.h
@ -2,15 +2,15 @@
|
||||
#define _VERSION_MAJOR 0
|
||||
#define _VERSION_MINOR 8
|
||||
#define _VERSION_PATCH 1
|
||||
#define _VERSION_BUILD 808
|
||||
#define _VERSION_GITHASH "f824ea0"
|
||||
#define _VERSION_BUILD 855
|
||||
#define _VERSION_GITHASH "dbb35a8"
|
||||
//#define _VERSION_PRERELEASE beta //uncomment to define prerelease labels: alpha - beta - rc
|
||||
#define _VERSION_DATE "22-03-2021"
|
||||
#define _VERSION_TIME "20:22:52"
|
||||
#define _VERSION_DATE "23-03-2021"
|
||||
#define _VERSION_TIME "21:46:16"
|
||||
#define _SEMVER_CORE "0.8.1"
|
||||
#define _SEMVER_BUILD "0.8.1+808"
|
||||
#define _SEMVER_GITHASH "0.8.1+f824ea0"
|
||||
#define _SEMVER_FULL "0.8.1+f824ea0"
|
||||
#define _SEMVER_NOBUILD "0.8.1 (22-03-2021)"
|
||||
#define _VERSION "0.8.1+f824ea0 (22-03-2021)"
|
||||
#define _SEMVER_BUILD "0.8.1+855"
|
||||
#define _SEMVER_GITHASH "0.8.1+dbb35a8"
|
||||
#define _SEMVER_FULL "0.8.1+dbb35a8"
|
||||
#define _SEMVER_NOBUILD "0.8.1 (23-03-2021)"
|
||||
#define _VERSION "0.8.1+dbb35a8 (23-03-2021)"
|
||||
//The version information is created automatically, more information here: https://github.com/rvdbreemen/autoinc-semver
|
||||
|
Loading…
Reference in New Issue
Block a user