raf1000 / brink_openhab

Brink Renovent HR and Openhab integration
9 stars 2 forks source link

TSP value > 255 #4

Closed Michiel-S0 closed 1 year ago

Michiel-S0 commented 1 year ago

I'm using the Brink Renovent 400, which supports volumes up to 400 m3/h. The maximum set at this moment is 300 m3/h. If I read the max volume (TSP index 48) or volume step 3 (TSP index 4), I get a value of 44 instead of 300, because there is only one byte available for the value (Byte 1 = Parity & message type, byte 2 = Data ID, byte 3 = TSP Index, Byte 4 = Value). Any idea how to solve this so read and/or set the right value?

raf1000 commented 1 year ago

Hello, Interesting observation. I have not noticed it as my max volume (also Brink 400) is 248 which is below 256 (1 byte). A solution shall be a function "gluing" 2 TSP. I need to find time to think and update the code, But I will not able to test it (as I do do not exceed 256)

Michiel-S0 commented 1 year ago

Thanks for the tip! I have checked the TSP Index: U1 = 0, U2 = 2, U3 = 4. So I tested with adding index 1, 3 and 5:

U11 = 0, // Volume Step 1 U12 = 1, // Volume Step 1 U21 = 2, // Volume Step 2 U22 = 3, // Volume Step 2 U31 = 4, // Volume Step 3 U32 = 5, // Volume Step 3

This returned following results:

U11 UINT8: 100
U12 UINT8: 0
U21 UINT8: 200
U22 UINT8: 0
U31 UINT8: 44
U32 UINT8: 1

Results should be: 100 (OK), 200 (OK) and 300 (1*256 + 44)

So the solution is indeed to do 2 requests and merge them into one. I would go for the option to do two requests, merge the two response bytes and use the UInt function.

I have not tested it with MaxVol, but the index there is 48, while 49 is still open or 'not used'. So I guess it will give the same result. And, there are even more indexes open, so it might be useful to also check these: 48/49, 50/51, 60/61, 62/63, 64/65, 66/67. These are all parameters that potentially can be bigger than 255.

I can help you with testing some of these parameters, at least if they are available in my system.

Michiel-S0 commented 1 year ago

U11 UINT8: 100 U12 UINT8: 0 U1 UINT16: 100

U21 UINT8: 200 U22 UINT8: 0 U2 UINT16: 200

U31 UINT8: 44 U32 UINT8: 1 U3 UINT16: 300

TSPMaxVol1 UINT8: 144 TSPMaxVol2 UINT8: 1 TSPMaxVol UINT16: 400

TSPMinVol1 UINT8: 50 TSPMinVol2 UINT8: 0 TSPMinVol UINT16: 50

TSPCurrentInputVol1 UINT8: 99 TSPCurrentInputVol2 UINT8: 0 TSPCurrentInputVol UINT16: 99

TSPCurrentOutputVol1 UINT8: 97 TSPCurrentOutputVol2 UINT8: 0 TSPCurrentOutputVol UINT16: 97

CPID1 UINT8: 0 CPID2 UINT8: 0 CPID UINT16: 0

CPOD1 UINT8: 0 CPOD2 UINT8: 0 CPOD UINT16: 0

raf1000 commented 1 year ago

Hello,

Thank your for addtional info. I have modified all 3 files as follows:

In Opentherm.h file and Opetherm.cpp file I have added two new methods: setBrink2TSP() and getBrink2TSP(). Please note that usage of setBrink2TSP() is restricted to U1, U2, and U3 parameters only (I do not think that U4 and U5 needs changes of 2 bytes as temperature does not exceed 200 = 100 C)

In the file _Brink_HRbypass.ino I have replaced (only) setBrinkTSP()/getBrinkTSP() with setBrink2TSP()/getBrink2TSP() where appropriate.

I have only compiled the code (scessfully) but not tested it. Let me know testing results.

Michiel-S0 commented 1 year ago

I have tested with following code:

uint16_t OpenTherm::getBrinkTSP2(BrinkTSPindex index1, BrinkTSPindex index2) {

unsigned long response1 = getBrinkTSP(index1);
delay(200);
unsigned long response2 = getBrinkTSP(index2);

unsigned long response = getU8(response1);
response |= getU8(response2) << 8;

return getUInt(response);

}

I have tested all the parameters listed in the previous comment, so every value that could be higher than 256 and where there is a second index available. I agree that it would be useless for temperatures. They also don't have a second index. As you can see, I got valid responses for U1, U2, U3, MaxVol, MinVol, CurrentInputVol and CurrentOutputVol. CPOD and CPID returned 0.

I hope this information is useful for you as well.

Remark: I have added the delay between the two requests because otherwise the second request is sent too quickly which results in an invalid response.

raf1000 commented 1 year ago

Ok, Strange that you have 0 for CPOD and CPID. In my case using getBrinkTSP() I can see correct values.

Could you check CurrentVol when you are running Brink at +256 m3 volume?

In theory it shall have also 2 bytes as it shows volume which is visible on the Brink panel (I ma using it as 1 byte and it works). But next seems to be MsgOperation so there is no place for 2bytes :-(

Michiel-S0 commented 1 year ago

OT DATA.xlsx

I have put all raw data by ID and TSP index in an Excel sheet. There you can see with data is available in my Brink Renovent 400 system. There are 2 tables, one for a volume of 100 and one for 300.

Remarks:

  1. Some of the data is not described or does not match the description in the OpenTherm reference list. I have marked these fields in yellow. The fields in red still need to be checked on format, but that's only for the Excel sheet. In the code it's ok.

  2. You will see that CurrentVol (44) also uses the field of MsgOperation (1, so +256), so I'm not sure if all field descriptions are right. CurrentInputVol and CurrentOutputVol also use two fields.

  3. I can't seem to find the pressure data. It is visible on the display of the ventilation system, but I don't know which field it is in the list. I see 42 and 5 in the list, so these are possible candidates, but I'm not sure.

raf1000 commented 1 year ago

Based on your excel file I can see that you have Brink Renovent Excellent 400. I have an older version Brink Renovent HR and all TSPs I have identified are for my version. Fortunately some (majority?) of parameters are the same for both versions and in the same TSPs.

I have notced that in addtion to 3 status fans which are coded in U1, U2 and U3, you have an addtional status fan and seems U4 is used for this purpose. And seems your U5 can by my U4 (Minimum atmospheric temperature bypassand) your U6 can be my U5?. Not sure if PCB option (P1-P17) extists but TSPs are used.

Regarding CurrentVol (44)I am not fully sure if it is 2 bytes TSP. I have noticed also that it displays a little bit different value (for example 74 m3/h) than CurrentInputVol (77 m3/h) and CurrentOutputVol (77m3/h)

Hance we have different versions of Brink I will not be able to help to identify other/missing data

PS> delay(200) is not needed in my case but I have a little bit different code (additional checking) but this might also depend on local environment