Note that I do not know anything about this stuff.
I would like to see this recompiled to LUA such that it could run without Mono in Linux.
From the HAI Omni API
REQUEST SYSTEM FORMATS
This message requests the HAI controller to report the configured temperature format, time format, and date format.
Start character
Message length
Message type
Data
CRC 1
CRC 2 0x21
0x01
0x28
none
0x01
0x8E
Expected reply: SYSTEM FORMATS
SYSTEM FORMATS
This message is sent by the HAI controller in reply to a REQUEST SYSTEM FORMATS message. The controller reports the
configured temperature format, time format, and date format.
Start character
Message length
Message type
Data 1
Data 2
Data 3
CRC 1
CRC 2
0x21
0x04
0x29
temperature format (1-2)
time format (1-2)
date format (1-2)
varies
varies
The temperature format byte is shown below.
1 = F
2 = C
The time format byte is shown below.
1 = 12 HR
2 = 24 HR
The date format byte is shown below.
1 = MMDD
2 = DDMM
From the source I see:
using HAI_Shared;
using System;
using System.Collections.Generic;
using System.Data;
using System.Data.Odbc;
using System.Reflection;
using System.Text;
using System.Threading;
Getting format here:
private bool HandleUnsolicitedPackets(byte[] B)
{
if ((B.Length > 3) && (B[0] == 0x21))
{
bool handled = false;
switch ((enuOmniLink2MessageType)B[2])
{
case enuOmniLink2MessageType.SystemFormats:
break;
default:
break;
}
}
case enuObjectType.Auxillary:
for (byte i = 0; i < MSG.AuxStatusCount(); i++)
{
HAC.Zones[MSG.ObjectNumber(i)].CopyAuxExtendedStatus(MSG, i);
LogZoneStatus(MSG.ObjectNumber(i));
if (HAC.Zones[MSG.ObjectNumber(i)].IsTemperatureZone())
{
WebNotification.Send("temp", Helper.Serialize<ZoneContract>(Helper.ConvertZone(
MSG.ObjectNumber(i), HAC.Zones[MSG.ObjectNumber(i)])));
}
}
break;
if (Global.verbose_zone)
{
if (unit.IsTemperatureZone())
Event.WriteVerbose("ZoneStatus", id + " " + unit.Name + ", Temp: " + unit.TempText());
else
Event.WriteVerbose("ZoneStatus", id + " " + unit.Name + ", Status: " + unit.StatusText());
}
}