1
mirror of https://github.com/rvdbreemen/OTGW-firmware synced 2024-11-16 04:33:49 +01:00

prep for last few msgid

remeha and some new codes added
This commit is contained in:
Robert van den Breemen 2021-01-20 08:50:35 +01:00
parent 4303793b74
commit 411876ea17
2 changed files with 56 additions and 12 deletions

View File

@ -55,12 +55,28 @@ typedef struct {
float TflowCH2 = 0.0 ; // f8.8 Flow water temperature CH2 circuit (°C) float TflowCH2 = 0.0 ; // f8.8 Flow water temperature CH2 circuit (°C)
float Tdhw2 = 0.0 ; // f8.8 Domestic hot water temperature 2 (°C) float Tdhw2 = 0.0 ; // f8.8 Domestic hot water temperature 2 (°C)
int16_t Texhaust = 0; // s16 Boiler exhaust temperature (°C) int16_t Texhaust = 0; // s16 Boiler exhaust temperature (°C)
uint16_t FanSpeed = 0; // u16 Fan Speed (rpm)
float ElectricalCurrentBurnerFlame =0.0; // f88 Electrical current through burner flame (µA)
float TRoomCH2= 0.0; // f88 Room Temperature for 2nd CH circuit ("°C)
uint16_t RelativeHumidity = 0; // u8 / u8 Relative Humidity (%)
uint16_t TdhwSetUBTdhwSetLB = 0 ; // s8 / s8 DHW setpoint upper & lower bounds for adjustment (°C) uint16_t TdhwSetUBTdhwSetLB = 0 ; // s8 / s8 DHW setpoint upper & lower bounds for adjustment (°C)
uint16_t MaxTSetUBMaxTSetLB = 0; // s8 / s8 Max CH water setpoint upper & lower bounds for adjustment (°C) uint16_t MaxTSetUBMaxTSetLB = 0; // s8 / s8 Max CH water setpoint upper & lower bounds for adjustment (°C)
uint16_t HcratioUBHcratioLB = 0; // s8 / s8 OTC heat curve ratio upper & lower bounds for adjustment uint16_t HcratioUBHcratioLB = 0; // s8 / s8 OTC heat curve ratio upper & lower bounds for adjustment
float TdhwSet = 0.0 ; // f8.8 DHW setpoint (°C) (Remote parameter 1) float TdhwSet = 0.0 ; // f8.8 DHW setpoint (°C) (Remote parameter 1)
float MaxTSet = 0.0 ; // f8.8 Max CH water setpoint (°C) (Remote parameters 2) float MaxTSet = 0.0 ; // f8.8 Max CH water setpoint (°C) (Remote parameters 2)
float Hcratio = 0.0 ; // f8.8 OTC heat curve ratio (°C) (Remote parameter 3) float Hcratio = 0.0 ; // f8.8 OTC heat curve ratio (°C) (Remote parameter 3)
//RF
uint16_t RFstrengthbatterylevel = 0; // u8/ u8 RF strength and battery level
uint16_t OperatingMode_HC1_HC2_DHW = 0; // u8 / u8 Operating Mode HC1, HC2/ DHW
uint16_t RoomRemoteOverrideFunction = 0; // Function of manual and program changes in master and remote room setpoint
//Electric Producer
uint16_t ElectricityProducerStarts = 0; // u16 Electricity producer starts
uint16_t ElectricityProducerHours = 0; // u16 Electricity producer hours
uint16_t ElectricityProduction = 0; // u16 Electricity production
uint16_t CumulativElectricityProduction = 0; // u16 Cumulativ Electricity production
//Ventilation/HeatRecovery Msgids //Ventilation/HeatRecovery Msgids
uint16_t StatusVH = 0; uint16_t StatusVH = 0;
uint8_t ControlSetpointVH = 0; uint8_t ControlSetpointVH = 0;
@ -85,6 +101,7 @@ typedef struct {
uint16_t FaultBufferSizeVH = 0; uint16_t FaultBufferSizeVH = 0;
uint16_t FaultBufferEntryVH = 0; uint16_t FaultBufferEntryVH = 0;
//Statitics //Statitics
uint16_t RemoteOverrideFunction = 0; // flag8 / - Function of manual and program changes in master and remote room setpoint. uint16_t RemoteOverrideFunction = 0; // flag8 / - Function of manual and program changes in master and remote room setpoint.
uint16_t OEMDiagnosticCode = 0; // u16 OEM-specific diagnostic/service code uint16_t OEMDiagnosticCode = 0; // u16 OEM-specific diagnostic/service code
@ -101,6 +118,11 @@ typedef struct {
uint16_t MasterVersion = 0; // u8 / u8 Master product version number and type uint16_t MasterVersion = 0; // u8 / u8 Master product version number and type
uint16_t SlaveVersion = 0; // u8 / u8 Slave product version number and type uint16_t SlaveVersion = 0; // u8 / u8 Slave product version number and type
//Rehmea
uint16_t RemehadFdUcodes = 0; // u16 Remeha dF-/dU-codes
uint16_t RemehaServicemessage = 0; // u16 Remeha Servicemessage
uint16_t RemehaDetectionConnectedSCU =0; // u16 Remeha detection connected SCUs
} OTdataStruct; } OTdataStruct;
static OTdataStruct OTdataObject; static OTdataStruct OTdataObject;
@ -161,6 +183,10 @@ enum OpenThermMessageID {
TflowCH2, // f8.8 Flow water temperature CH2 circuit (°C) TflowCH2, // f8.8 Flow water temperature CH2 circuit (°C)
Tdhw2, // f8.8 Domestic hot water temperature 2 (°C) Tdhw2, // f8.8 Domestic hot water temperature 2 (°C)
Texhaust, // s16 Boiler exhaust temperature (°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) 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) 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 HcratioUBHcratioLB, // s8 / s8 OTC heat curve ratio upper & lower bounds for adjustment
@ -189,7 +215,13 @@ enum OpenThermMessageID {
TSPEntryVH, // u8 / u8 TSP Entry V/H TSPEntryVH, // u8 / u8 TSP Entry V/H
FaultBufferSizeVH, // u8 / u8 Fault Buffer Size V/H FaultBufferSizeVH, // u8 / u8 Fault Buffer Size V/H
FaultBufferEntryVH, // u8 / u8 Fault Buffer Entry 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. 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 OEMDiagnosticCode = 115, // u16 OEM-specific diagnostic/service code
BurnerStarts, // u16 Number of starts burner BurnerStarts, // u16 Number of starts burner
CHPumpStarts, // u16 Number of starts CH pump CHPumpStarts, // u16 Number of starts CH pump
@ -203,6 +235,9 @@ enum OpenThermMessageID {
OpenThermVersionSlave, // f8.8 The implemented version of the OpenTherm Protocol Specification in the slave. OpenThermVersionSlave, // f8.8 The implemented version of the OpenTherm Protocol Specification in the slave.
MasterVersion, // u8 / u8 Master product version number and type MasterVersion, // u8 / u8 Master product version number and type
SlaveVersion, // u8 / u8 Slave 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 SCUs
}; };
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 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 }; enum OTmsgcmd_t { OT_READ, OT_WRITE, OT_RW, OT_UNDEF };
@ -253,10 +288,10 @@ enum OpenThermMessageID {
{ 32, OT_READ , ot_s16, "Tdhw2", "Domestic hot water temperature 2", "°C" }, { 32, OT_READ , ot_s16, "Tdhw2", "Domestic hot water temperature 2", "°C" },
{ 33, OT_READ , ot_f88, "Texhaust", "Boiler exhaust temperature", "°C" }, { 33, OT_READ , ot_f88, "Texhaust", "Boiler exhaust temperature", "°C" },
{ 34, OT_UNDEF , ot_undef, "", "", "" }, { 34, OT_UNDEF , ot_undef, "", "", "" },
{ 35, OT_UNDEF , ot_undef, "", "", "" }, { 35, OT_READ , ot_u16, "FanSpeed", "fan speed", "rpm" },
{ 36, OT_UNDEF , ot_undef, "", "", "" }, { 36, OT_READ , ot_f88, "ElectricalCurrentBurnerFlame", "Electrical current through burner flame", "µA" },
{ 37, OT_UNDEF , ot_undef, "", "", "" }, { 37, OT_READ , ot_f88, "TRoomCH2", "Room temperature for 2nd CH circuit", "°C" },
{ 38, OT_UNDEF , ot_undef, "", "", "" }, { 38, OT_READ , ot_u8u8, "RelativeHumidity", "Relative Humidity", "%" },
{ 39, OT_UNDEF , ot_undef, "", "", "" }, { 39, OT_UNDEF , ot_undef, "", "", "" },
{ 40, OT_UNDEF , ot_undef, "", "", "" }, { 40, OT_UNDEF , ot_undef, "", "", "" },
{ 41, OT_UNDEF , ot_undef, "", "", "" }, { 41, OT_UNDEF , ot_undef, "", "", "" },
@ -316,9 +351,9 @@ enum OpenThermMessageID {
{ 95, OT_UNDEF , ot_undef, "", "", "" }, { 95, OT_UNDEF , ot_undef, "", "", "" },
{ 96, OT_UNDEF , ot_undef, "", "", "" }, { 96, OT_UNDEF , ot_undef, "", "", "" },
{ 97, OT_UNDEF , ot_undef, "", "", "" }, { 97, OT_UNDEF , ot_undef, "", "", "" },
{ 98, OT_UNDEF , ot_undef, "", "", "" }, { 98, OT_READ , ot_u8u8, "RFstrengthbatterylevel", "RF strength and battery level", "" },
{ 99, OT_UNDEF , ot_undef, "", "", "" }, { 99, OT_READ , ot_u8u8, "OperatingMode_HC1_HC2_DHW", "Operating Mode HC1, HC2/ DHW", "" },
{ 100, OT_READ , ot_flag8, "RRemoteOverrideFunction", "Function of manual and program changes in master and remote room setpoint.", "" }, { 100, OT_READ , ot_flag8, "RoomRemoteOverrideFunction", "Function of manual and program changes in master and remote room setpoint.", "" },
{ 101, OT_UNDEF , ot_undef, "", "", "" }, { 101, OT_UNDEF , ot_undef, "", "", "" },
{ 102, OT_UNDEF , ot_undef, "", "", "" }, { 102, OT_UNDEF , ot_undef, "", "", "" },
{ 103, OT_UNDEF , ot_undef, "", "", "" }, { 103, OT_UNDEF , ot_undef, "", "", "" },
@ -327,10 +362,10 @@ enum OpenThermMessageID {
{ 106, OT_UNDEF , ot_undef, "", "", "" }, { 106, OT_UNDEF , ot_undef, "", "", "" },
{ 107, OT_UNDEF , ot_undef, "", "", "" }, { 107, OT_UNDEF , ot_undef, "", "", "" },
{ 108, OT_UNDEF , ot_undef, "", "", "" }, { 108, OT_UNDEF , ot_undef, "", "", "" },
{ 109, OT_UNDEF , ot_undef, "", "", "" }, { 109, OT_READ , ot_u16, "ElectricityProducerStarts", "Electricity producer starts", "" },
{ 110, OT_UNDEF , ot_undef, "", "", "" }, { 110, OT_READ , ot_u16, "ElectricityProducerHours", "Electricity producer hours", "" },
{ 111, OT_UNDEF , ot_undef, "", "", "" }, { 111, OT_READ , ot_u16, "ElectricityProduction", "Electricity production", "" },
{ 112, OT_UNDEF , ot_undef, "", "", "" }, { 112, OT_READ , ot_u16, "CumulativElectricityProduction", "Cumulativ Electricity production", "" },
{ 113, OT_UNDEF , ot_undef, "", "", "" }, { 113, OT_UNDEF , ot_undef, "", "", "" },
{ 114, OT_UNDEF , ot_undef, "", "", "" }, { 114, OT_UNDEF , ot_undef, "", "", "" },
{ 115, OT_READ , ot_u16, "OEMDiagnosticCode", "OEM-specific diagnostic/service code", "" }, { 115, OT_READ , ot_u16, "OEMDiagnosticCode", "OEM-specific diagnostic/service code", "" },
@ -346,8 +381,17 @@ enum OpenThermMessageID {
{ 125, OT_READ , ot_f88, "OpenThermVersionSlave", "Slave Version OpenTherm Protocol Specification", "" }, { 125, OT_READ , ot_f88, "OpenThermVersionSlave", "Slave Version OpenTherm Protocol Specification", "" },
{ 126, OT_READ , ot_u8u8, "MasterVersion", "Master product version number and type", "" }, { 126, OT_READ , ot_u8u8, "MasterVersion", "Master product version number and type", "" },
{ 127, OT_READ , ot_u8u8, "SlaveVersion", "Slave product version number and type", "" }, { 127, OT_READ , ot_u8u8, "SlaveVersion", "Slave product version number and type", "" },
{ 128, OT_UNDEF , ot_undef, "", "", "" },
{ 129, OT_UNDEF , ot_undef, "", "", "" },
{ 130, OT_UNDEF , ot_undef, "", "", "" },
{ 131, OR_RW , ot_u8u8, "RemehadFdUcodes", "Remeha dF-/dU-codes", "" },
{ 132, OT_READ , ot_u8u8, "RemehaServicemessage", "Remeha Servicemessage", "" },
{ 133, OT_READ , ot_u8u8, "RemehaDetectionConnectedSCU", "Remeha detection connected SCUs", "" },
// all data ids are not defined above are resevered for future use // all data ids are not defined above are resevered for future use
}; };
#define OT_MSGID_MAX 133
enum OpenThermStatus { enum OpenThermStatus {
OT_NOT_INITIALIZED, OT_NOT_INITIALIZED,
OT_READY, OT_READY,

View File

@ -174,7 +174,7 @@ const char *messageTypeToString(OpenThermMessageType message_type)
} }
const char *messageIDToString(OpenThermMessageID message_id){ const char *messageIDToString(OpenThermMessageID message_id){
if (message_id<=127) { if (message_id <= OT_MSGID_MAX) {
return OTmap[message_id].label; return OTmap[message_id].label;
} else return "Undefined";} } else return "Undefined";}