ELV MAX! protocol description

Forum about the home automation suites by ELV

Moderator: jrkalf

Re: ELV MAX! protocol description

Postby pfwolbers » Fri Feb 03, 2012 5:56 pm

Setting the temperature is working fine.
But I'd allso like to change the other paramters. Do you know how to do it?

Also my M (Meta) response is not the same as documented. I have al lot more data.
The Adres at the room structure is 11 and not 3!
pfwolbers
Starting Member
Starting Member
 
Posts: 7
Joined: November 2011

Re: ELV MAX! protocol description

Postby Digit » Sat Feb 04, 2012 12:21 pm

Your observation will be correct, just by the fact that the Metadata has a variable length. Because (a) Room names and Thermostat names have variable length and (b) your number of rooms and devices can be different from the example. So having more Metadata doesn't say a thing. If you think your Metadata has a different structure/format, then you could provide an example to show where the differences are.

I don't understand? Where does it say that "the Adres is 3"? I only see a "3" mentioned as the length of the Address: 3 bytes. I think that is correct, cause software based on that information works just fine. Again, an example would be nice to show what you're really trying to say.

PS
regarding the other parameters: I don't know how to change those either.
It's just a matter of capturing the ELV MAX! app <--> MAX!Cube traffic and figuring it out, but I don't need to change those parameters so didn't spend time on it.
User avatar
Digit
Global Moderator
Global Moderator
 
Posts: 3388
Joined: March 2006
Location: Netherlands

Re: ELV MAX! protocol description

Postby pfwolbers » Sat Feb 11, 2012 2:28 pm

Sorry, but I was al little busy.
See my code:
Meta response (I used part of the code from the other script):

Code: Select all
        Dim strDecodedHEX As String = Base64ToHex(strCoded)
        iPointer = 5
        'M_R_count = 1
        iNrOfRooms = Val("&H" & Mid(strDecodedHEX, iPointer, 2))
        Dim strRoomNr(iNrOfRooms) As String
        Dim strAddress(iNrOfRooms) As String
        Dim strRoomName(iNrOfRooms) As String


        iPointer += 2

        For iRoomCounter = 1 To iNrOfRooms
            strRoomNr(iRoomCounter) = Val("&H" & Mid(strDecodedHEX, iPointer, 2))
            iPointer += 2
            iRoomNameLength = Val("&H" & Mid(strDecodedHEX, iPointer, 2)) * 2
            iPointer += 2
            strRoomName(iRoomCounter) = Hex2asc(Mid(strDecodedHEX, iPointer, iRoomNameLength))
            iPointer += 2
            'strAddress(iRoomCounter) = Hex2Dec(Mid(strDecodedHEX, iPointer, 6))
            Dim temp = Mid(strDecodedHEX, iPointer, 6)
            iPointer += 22 ' Waarom 22????????????????? dit moet nog uitgezocht worden
        Next

        iPointer += 6 'Waarom 6???????????????? Geen idee

        'Description        Startpos    Length      Example Value
        '=====================================================================
        'Device type        00          1           1
        'Address            01          3           003508
        'Serial Number      04          10          IEQ0109125
        'Name length        0E          1           0C
        'Name               0F          variable    Thermostat 1
        'Room id                        1           01


        strNrOfDevices = Val("&H" & Mid(strDecodedHEX, iPointer, 2))
        iPointer += 2

        Dim strDeviceType As String
        Dim strDeviceNameMAX As String
        Dim strSerialNr As String
        Dim strRFAddress As String
        Dim strRoomID As String


        For iRoomCounter = 1 To strNrOfDevices
            Dim temp = Len(strDecodedHEX)

            strDeviceType = Mid(strDecodedHEX, iPointer, 2)
            iPointer += 2
            strRFAddress = Hex2Dec(Mid(strDecodedHEX, iPointer, 6))
            iPointer += 6
            strSerialNr = Hex2asc(Mid(strDecodedHEX, iPointer, 20))
            iPointer += 20
            iDeviceNameLength = Val("&H" & Mid(strDecodedHEX, iPointer, 2)) * 2
            iPointer += 2
            strDeviceNameMAX = Hex2asc(Mid(strDecodedHEX, iPointer, iDeviceNameLength))
            iPointer += iDeviceNameLength
            strRoomID = Val("&H" & Mid(strDecodedHEX, iPointer, 2))
            iPointer += 2


Take a look at the ?????.

Thanks a lot,

Peter Wolbers
pfwolbers
Starting Member
Starting Member
 
Posts: 7
Joined: November 2011

Re: ELV MAX! protocol description

Postby Digit » Sat Feb 11, 2012 3:40 pm

Hi Peter,

Don't know why, this code is not mine. My code is below; as you can see I only increment the index (Mi) with X after reading X bytes. That way I won't miss a byte while reading the Metadata. :wink:
Code: Select all
if leftstr(Buffer,2) = ELVMAX_RX_METADATA
then begin 
  B64pos:=posN(',',Buffer,2);
  if B64pos > 0
  then begin
    B64Coded:=copy(Buffer,B64Pos+1);
    Log2File('');
    Log2File(DateTimeToStr(Now));
    Log2File(stringreplace(Buffer,chr(13)+chr(10),'',[rfreplaceall]));
    Log2File(Utils.PrintBytes16(Base64Decode(B64Coded)));

    B64Decoded:=Base64Decode(B64Coded);

    MetaDataVersion:= ord(B64Decoded[2]);
    Log('MetaData Version = '+IntTostr(MetaDataVersion));
    If MetaDataVersion = 2
    then begin

      RF_SN_Lookup.Clear;

      Mi:=3;
      NrRooms:=ord(B64Decoded[Mi]);
      Log('Rooms count = '+IntTostr(NrRooms));
      inc(Mi);

      for i:=1 to NrRooms do
      begin
        RoomName:='';
        MasterAddress:='';

        RoomID:= ord(B64Decoded[Mi]);
        inc(Mi);
        RoomNameLen:=ord(B64Decoded[Mi]);
        for j:=1 to RoomNameLen do RoomName:=RoomName+B64Decoded[Mi+j];
        inc(Mi,1+RoomNameLen);
        MasterAddress:=IntToHex(ord(B64Decoded[Mi]),2)+
                       IntToHex(ord(B64Decoded[Mi+1]),2)+
                       IntToHex(ord(B64Decoded[Mi+2]),2);
        inc(Mi,3);

        Log('=== > Room Info: ID= '+IntTostr(RoomID)+', Name='+RoomName+', Master Addr='+MasterAddress);
      end;

      NrDevices:=ord(B64Decoded[Mi]);
      Log('Device count = '+IntTostr(NrDevices));
      inc(Mi);

      for i:=1 to NrDevices do
      begin
        DeviceName:='';
        RFAddress:='';

        DeviceType:=ord(B64Decoded[Mi]);
        inc(Mi);

        RFAddress:=IntToHex(ord(B64Decoded[Mi]),2)+
                   IntToHex(ord(B64Decoded[Mi+1]),2)+
                   IntToHex(ord(B64Decoded[Mi+2]),2);
        inc(Mi,3);

        SerialNr:=copy(B64Decoded,Mi,10);
        inc(Mi,10);

        DeviceNameLen:=ord(B64Decoded[Mi]);
        for j:=1 to DeviceNameLen do DeviceName:=DeviceName+B64Decoded[Mi+j];
        inc(Mi,1+DeviceNameLen);

        RoomId:= ord(B64Decoded[Mi]);
        inc(Mi);

        Log('=== > Device Info: Type= '+IntTostr(DeviceType)+', Addr='+RFAddress+', Serial= '+SerialNr+', Name='+DeviceName+', Room='+IntToStr(RoomID));
       
        // Tell MaxRadiatorThermostat what Room ID it has (can change by manipulation with Max App)
        DistributeToDevice(SerialNr, 'ROOM='+IntToStr(RoomID));

        RF_SN_Lookup.AddObject(RFAddress, TStringObject.Create(SerialNr));
      end;

    end;

  end else Log('!! Nothing to decode !!');
end;
User avatar
Digit
Global Moderator
Global Moderator
 
Posts: 3388
Joined: March 2006
Location: Netherlands

Re: ELV MAX! protocol description

Postby PumpkinEater » Wed Feb 22, 2012 10:42 am

Thanks for the interesting information regarding the MAX! protocol. I am just writing a small perl script to change the thermostat temperature in case an open window is detected ( I am using other window contacts not out of the MAX! serie).

One question regarding the S: send command:
06 3 00FE30 RF address valvue
09 1 01 ?, seems to roomnumber or nr (first valvue is 01, second is 02)

My observation:
If the device 00FE30 belongs to room 2, but room 1 is set in byte 09, then the temperature of room 1 and room 2 is changed as well. So what is the need of the rf address at all, as temperatures are normally set for a room, not for a single device?

Thanks,
Peter
PumpkinEater
Starting Member
Starting Member
 
Posts: 1
Joined: February 2012

Re: ELV MAX! protocol description

Postby Wayan » Mon Apr 02, 2012 9:28 am

Hello to all you tinkerers :)

I have one question - has anybody found the information whether a window sensor is open or not?

Thank you for your help :)

Wayan
Wayan
Starting Member
Starting Member
 
Posts: 3
Joined: April 2012

Re: ELV MAX! protocol description

Postby robin26 » Mon Apr 02, 2012 12:27 pm

Hi,
since there does not seem to be an actual temperature that is send back to the cube from the Thermostats would it be an idea to take the valve settings as a temperature indicator.
Valve settings should corelate to the temperature difference
sth. like
Valve
Opening
0% Temp>=SetTemp
25% Temp between SetTemp and (SetTemp -2)
50% Temp between (SetTemp -2) and (SetTemp-3)
100% Temp< Set Temp-4
Display could be a color indicator green,yellow,orange and red

regards
robin
robin26
Starting Member
Starting Member
 
Posts: 2
Joined: March 2012

Re: ELV MAX! protocol description

Postby Wayan » Tue Apr 03, 2012 2:18 pm

I found the Data for the window sensor.

Was my own fault, it is at the same place as the thermostate mode, so i thought i got thermostate values - but it was a window sensor ;)

so if you take the same position of data that gives you the thermostate mode (auto, manu etc) the last two bits give "10" when the window is open.

Time to find out what 01 and 11 are ;)

Wish you a nice day
Wayan
Wayan
Starting Member
Starting Member
 
Posts: 3
Joined: April 2012

Re: ELV MAX! protocol description

Postby Kingsammy » Fri Apr 13, 2012 9:49 am

I think it is already known, but here are some basic informations about the available device types, taken from the original MAX!-Software after doing some decompilation:

Invalid(256),
HeatingThermostat = 1,
HeatingThermostatPlus = 2,
WallMountedThermostat = 3,
ShutterContact = 4,
PushButton = 5
Kingsammy
Starting Member
Starting Member
 
Posts: 17
Joined: December 2011

Re: ELV MAX! protocol description

Postby Wayan » Wed Jul 18, 2012 8:26 am

I don't know if this is already known, but if anyone is interested:

If you decode the response from a send command like "S:20,0,1c", the first block "20" gives you the reached duty cycle time in percent hex coded. so we have a use of "32%" here.

If you only send a "s:" to the cube you will get the same result, so this can be used to get the duty cycle without sending an order to a thermostate or something.

Greetings Wayan
Wayan
Starting Member
Starting Member
 
Posts: 3
Joined: April 2012

Re: ELV MAX! protocol description

Postby Kingsammy » Thu Oct 18, 2012 2:18 pm

Few update for C response:

The length of data is coded in the first byte, start position 00.

Code: Select all
    Start Length  Value       Description
    ==================================================================
    00         1  D2          Length of data: D2 = 210(decimal) = 210 bytes
    01         3  003508      RF address
    04         1  01          Device Type
    05         3  0114FF      ?
    08        10  IEQ0109125  Serial Number       
    12         1  28          Comfort Temperature     
    13         1  28          Eco Temperature         
    14         1  3D          MaxSetPointTemperature
    15         1  09          MinSetPointTemperature
    16         1  07          Temperature Offset * 2
                              The default value is 3,5, which means the offset = 0 degrees.
                              The offset is adjustable between -3,5 and +3,5 degrees,
                              which results in a value in this response between 0 and 7 (decoded already)       
    17         1  28          Window Open Temperature   
    18         1  03          Window  Open Duration     
    19         1  30          Boost Duration and Boost Valve Value
                              The 3 MSB bits gives the duration, the 5 LSB bits the Valve Value%.
                              Duration: With 3 bits, the possible values (Dec) are 0 to 7, 0 is not used.
                              The duration in Minutes is: if Dec value = 7, then 30 minutes, else Dec value * 5 minutes
                              Valve Value: dec value 5 LSB bits * 5 gives Valve Value in %
    1A         1  0C          Decalcification: Day of week and Time
                              In bits: DDDHHHHH
                              The three most significant bits (MSB) are presenting the day, Saturday = 1, Friday = 7
                              The five least significant bits (LSB) are presenting the time (in hours)     
    1B         1  FF          Maximum Valve setting; *(100/255) to get in %
    1C         1  00          Valve Offset ; *(100/255) to get in %
    1D         ?  44 48 ...   Weekly program (see The weekly program)





And for L response:

The length of data is also coded in the first byte, start position 0.

Code: Select all
    Start Length  Value       Description
    ==================================================================
    0          1  0B          Length of data: 0B = 11(decimal) = 11 bytes
    1          3  003508      RF address
    4          1  00          ?
    5          1  12          bit 4     Valid              0=invalid;1=information provided is valid
                              bit 3     Error              0=no; 1=Error occurred
                              bit 2     Answer             0=an answer to a command,1=not an answer to a command
                              bit 1     Status initialized 0=not initialized, 1=yes
                                   
                              12  = 00010010b
                                  = Valid, Initialized
                             
    6       1     1A          bit 7     Battery       1=Low
                              bit 6     Linkstatus    0=OK,1=error
                              bit 5     Panel         0=unlocked,1=locked
                              bit 4     Gateway       0=unknown,1=known
                              bit 3     DST setting   0=inactive,1=active
                              bit 2     Not used
                              bit 1,0   Mode         00=auto/week schedule
                                                     01=Manual
                                                     10=Vacation
                                                     11=Boost   
                              1A  = 00011010b
                                  = Battery OK, Linkstatus OK, Panel unlocked, Gateway known, DST active, Mode Vacation.

    7       1     20          Valve position in %
    8       1     2C          Temperature setpoint, 2Ch = 44d; 44/2=22 deg. C
    9       2     858B        Date until (05-09-2011) (see Encoding/Decoding date/time)
    B       1     2E          Time until (23:00) (see Encoding/Decoding date/time)
Kingsammy
Starting Member
Starting Member
 
Posts: 17
Joined: December 2011

Re: ELV MAX! protocol description

Postby Bwired » Thu Oct 18, 2012 10:14 pm

Thanks Sammy
I updated the main topic with your findings.
User avatar
Bwired
Administrator
Administrator
 
Posts: 5299
Joined: March 2006
Location: Netherlands

Re: ELV MAX! protocol description

Postby Kingsammy » Fri Oct 19, 2012 11:03 am

Hallo Bwired,

many thank, but you have interchanged the length of data between C-Response and L-Response in the main topic:

For L-Response length of data is 0B(hex) not D2(hex).
For C-response it is D2(hex) an not 0B(hex).
Kingsammy
Starting Member
Starting Member
 
Posts: 17
Joined: December 2011

Re: ELV MAX! protocol description

Postby Bwired » Fri Oct 19, 2012 12:06 pm

sorry to quick :), done!
User avatar
Bwired
Administrator
Administrator
 
Posts: 5299
Joined: March 2006
Location: Netherlands

Re: ELV MAX! protocol description

Postby Kingsammy » Wed Oct 24, 2012 9:53 am

Some more update for C-Response of devices:

The Room ID of a device (heating thermostate)and the Firmwareversion can be found at Startbyte 05 --> 01 = Room ID, 14 = Firmware = 20(decimal) which is equal to Firmware version 1.4 of a heating thermosatate or 15 = 21(decimal) = V1.5 of a heating thermosatate.

For shuttercontacts the Room ID and Firmware also can be found, e.g. 04 13 FF: 04 = Room ID, 13 = Firmware = 19(decimal), FF = ??


Code: Select all
        Start Length  Value       Description
        ==================================================================
        00         1  D2          Length of data: D2 = 210(decimal) = 210 bytes
        01         3  003508      RF address
        04         1  01          Device Type
        05         3  0114FF      01 = Room ID
                                  14 = Firmware = 20(decimal) = V1.4 or 15 = 21(decimal) = V1.5 for heating thermostates
                                  13 = Firmware = 19(decimal) for Shuttercontacts
                                  FF = ??
        08        10  IEQ0109125  Serial Number       
        12         1  28          Comfort Temperature     
        13         1  28          Eco Temperature         
        14         1  3D          MaxSetPointTemperature
        15         1  09          MinSetPointTemperature
        16         1  07          Temperature Offset * 2
                                  The default value is 3,5, which means the offset = 0 degrees.
                                  The offset is adjustable between -3,5 and +3,5 degrees,
                                  which results in a value in this response between 0 and 7 (decoded already)       
        17         1  28          Window Open Temperature   
        18         1  03          Window  Open Duration     
        19         1  30          Boost Duration and Boost Valve Value
                                  The 3 MSB bits gives the duration, the 5 LSB bits the Valve Value%.
                                  Duration: With 3 bits, the possible values (Dec) are 0 to 7, 0 is not used.
                                  The duration in Minutes is: if Dec value = 7, then 30 minutes, else Dec value * 5 minutes
                                  Valve Value: dec value 5 LSB bits * 5 gives Valve Value in %
        1A         1  0C          Decalcification: Day of week and Time
                                  In bits: DDDHHHHH
                                  The three most significant bits (MSB) are presenting the day, Saturday = 1, Friday = 7
                                  The five least significant bits (LSB) are presenting the time (in hours)     
        1B         1  FF          Maximum Valve setting; *(100/255) to get in %
        1C         1  00          Valve Offset ; *(100/255) to get in %
        1D         ?  44 48 ...   Weekly program (see The weekly program)


Kingsammy
Starting Member
Starting Member
 
Posts: 17
Joined: December 2011

PreviousNext

Return to FS20, FHT, ESA and ELV

Who is online

Users browsing this forum: No registered users and 1 guest