Advertisement
dragonbane

Mitsubishi CODE Format

Sep 28th, 2023 (edited)
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.24 KB | None | 0 0
  1. Mitsubishi CODE VALUE Format:
  2. 1 byte: fc (magic) (always)
  3. 20 bytes: commandString
  4. 1 byte: checksum (commandString added together byte for byte excluding the checksum) (always)
  5. TOTAL: 22 bytes
  6.  
  7. commandString:
  8. 1 byte: transferMode (0x41 = write request, 0x42 = read request, 0x62 = read response)
  9. 3 byte: 01 30 10 (always)
  10. 1 byte: groupCode (see below)
  11. 15 bytes: data (dynamic depending on transferMode and groupCode)
  12.  
  13. Read (42) request data:
  14. bytes[15]: 000000000000000000000000000000 (padding) (always)
  15.  
  16. Read (42) response data (depends on groupCode):
  17. N/A
  18.  
  19. Write (41) request data (depends on groupCode):
  20. 01: Power/Mode/Temp
  21. 1 byte: flags (01 = powerState, 02 = deviceMode, 04 = setTemp, 08 = fanSpeed) (e.g. 01 just sends a power state, 07 means sending a combined power/mode/setTemp state) (you can 00 bytes you don't need when omitting the flags)
  22. 1 byte: unk (maybe getAck, 0 = off, 2 = do ack) (always 2)
  23. 1 byte: powerState (00 = off, 01 = on, 02 = also on/not used?) (when state is off, the next 11 bytes are all padded with 00)
  24. 1 byte: deviceMode (see below)
  25. 1 byte: convertTempFrac(195) (would stand for 19.5 degrees, 190 for 19.0) (likely encodes the frac part) (see below)
  26. 1 byte: fanSpeed (auto: 00, manual: 1x with the x denoting the fan speed 1-5)
  27. byte[7]: unk2
  28. 1 byte: convertTempInt(195) (encodes the integer part) (see below)
  29. 1 byte: 42 (possibly magic or denotes a read will follow after with the ack) (always)
  30.  
  31. convertTempFrac(int tempIn):
  32. int tempOut = 32 - (tempIn / 10) - 1;
  33. string fracPart = tempIn.substr(2, 1);
  34.  
  35. if (fracPart == 5) //has a fractional part
  36. return "1" + tempOut.toHex(); //must be 0-f (0-15)
  37. else
  38. return "0" + tempOut.toHex(); //must be 0-f (0-15)
  39.  
  40. convertTempInt(int tempIn):
  41. return (tempIn / 5 + 128).toHex(); //1 byte max
  42.  
  43.  
  44.  
  45. Read (42) request full example:
  46. 1 byte: transferMode = 42
  47. 3 byte: 01 30 10 (always)
  48. 1 byte: groupCode (getState normally sends 4 VALUE tags in the CODE section, requesting respectively 02, 03, 05 and 09)
  49. bytes[15]: 000000000000000000000000000000 (padding) (always)
  50.  
  51.  
  52.  
  53. WRITE groups:
  54. 01 = power state, mode (only when on), temp (only when on)
  55. 08 = dehum, power saving, buzzer, wind and wind break, notification for remote control navigation
  56. 15 = zoning data
  57.  
  58. READ groups:
  59. 02 = power state, device mode and tempChanger
  60. 03 = room temperature
  61. 04 = abnormal state
  62. 05 = timer settings
  63. 09 = auto mode type (warm/cool) and TouchFlowTrigger
  64. c9 = thermal image support
  65. cd = DehumDispPercent and power saving support
  66. d0 = wind direction speed
  67.  
  68.  
  69. Constants:
  70. Power states:
  71. 00 = OFF
  72. 01 = ON
  73. 02 = ON
  74.  
  75. Device Modes:
  76. LAUNDRY: 00
  77. DEHUMIDIFICATION: 02
  78. MANUAL_DEHUMIDIFICATION: 0a
  79. PREVENTION_CONDENSATION: 0c (all grouped as DEHUMIDIFICATION)
  80.  
  81. WARM: 01
  82. AUTO_WARM: 09 (both grouped as WARM)
  83.  
  84. COOL: 03
  85. AUTO_COOL: 0b (both grouped as COOL)
  86.  
  87. BLAST: 07 (also known as FAN ONLY)
  88. AUTO: 08
  89. AI_MODE: 18 (undocumented)
  90.  
  91. WindAndWindBreak:
  92. 0: OFF
  93. 1: WIND_BREAK
  94. 2: WIND
  95. 3: NO_UNEVENNESS
  96.  
  97. wind dir and thermal support sends 08:
  98. dehum = false, powerSaving = true, buzzer = false, windAndWindBreak = false, notificationForRemoteControlNavigation = false
  99.  
  100. normal sends:
  101. dehum = false, powerSaving = false, buzzer = true, windAndWindBreak = false, notificationForRemoteControlNavigation = true
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement