This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm that you accept these cookies being set.

Translate 2byte hex values to 14byte string
#2
You can create a table to map hexadecimal error code to text, then attach it to error code object. You should use 250-byte text data type for status output (32/1/3 in this example).

Code:
errors = {
  [0x10] = 'External protection device activated',
  [0x11] = 'Malfunction of indoor unit PCB',
  [0x13] = 'Drain Level Control System Abnormality',
  [0x14] = 'Malfunction of freezing protection',
  [0x15] = 'High pressure control in heating, freeze-up protection control in cooling',
}

value = event.getvalue()
errtext = errors[ value ]

if errtext then
  grp.update('32/1/3', errtext)
end
Reply


Messages In This Thread
RE: Translate 2byte hex values to 14byte string - by admin - 14.02.2019, 10:54

Forum Jump: