Hi,
I have a temperature and humidity sensor that is connected to OmniPro II zones.
I don't have a thermostat so using the clsThermostat/clsThermostats objects is not probably an option.
I can handle unsolicited packets from the controller as i have set clsOL2EnableNotifications = true.
What I am looking for is what should I need for the request and the response objects.
I need to read the temperature and humidity of a specific sensor when I click a button.
I have been playing around with clsOL2MsgRequestProperties, clsOL2MsgRequestExtendedStatus, clsOL2MsgStatus and clsOL2MsgExtendedStatus but I can't seem to get the temperature and humidity values from a sensor.
I am using C#.Net as my programming codes.
Here is a sample code.
private void GetNextAuxStatus(ushort ix)
{
clsOL2MsgRequestExtendedStatus MSG = new clsOL2MsgRequestExtendedStatus(HAC.Connection);
MSG.ObjectType = enuObjectType.Auxillary;
MSG.StartingNumber = ix;
MSG.EndingNumber = ix;
HAC.Connection.Send(MSG, HandleUnitStatusesResponse);
}
private void HandleUnitStatusesResponse(clsOmniLinkMessageQueueItem M, byte[] B, bool Timeout)
{
if (Timeout)
return;
if (InvokeRequired)
Invoke(new HandleReceivedPacketDelegate(HandleUnitStatusesResponse), new object[] { M, B, Timeout });
else
{
if ((B.Length > 3) && (B[0] == 0x21))
{
switch ((enuOmniLink2MessageType)B[2])
{
case enuOmniLink2MessageType.EOD:
break;
case enuOmniLink2MessageType.Properties:
break;
case enuOmniLink2MessageType.ExtendedStatus:
break;
default:
break;
}
}
}
}
Any help is really appreciated.
Thanks.
I have a temperature and humidity sensor that is connected to OmniPro II zones.
I don't have a thermostat so using the clsThermostat/clsThermostats objects is not probably an option.
I can handle unsolicited packets from the controller as i have set clsOL2EnableNotifications = true.
What I am looking for is what should I need for the request and the response objects.
I need to read the temperature and humidity of a specific sensor when I click a button.
I have been playing around with clsOL2MsgRequestProperties, clsOL2MsgRequestExtendedStatus, clsOL2MsgStatus and clsOL2MsgExtendedStatus but I can't seem to get the temperature and humidity values from a sensor.
I am using C#.Net as my programming codes.
Here is a sample code.
private void GetNextAuxStatus(ushort ix)
{
clsOL2MsgRequestExtendedStatus MSG = new clsOL2MsgRequestExtendedStatus(HAC.Connection);
MSG.ObjectType = enuObjectType.Auxillary;
MSG.StartingNumber = ix;
MSG.EndingNumber = ix;
HAC.Connection.Send(MSG, HandleUnitStatusesResponse);
}
private void HandleUnitStatusesResponse(clsOmniLinkMessageQueueItem M, byte[] B, bool Timeout)
{
if (Timeout)
return;
if (InvokeRequired)
Invoke(new HandleReceivedPacketDelegate(HandleUnitStatusesResponse), new object[] { M, B, Timeout });
else
{
if ((B.Length > 3) && (B[0] == 0x21))
{
switch ((enuOmniLink2MessageType)B[2])
{
case enuOmniLink2MessageType.EOD:
break;
case enuOmniLink2MessageType.Properties:
break;
case enuOmniLink2MessageType.ExtendedStatus:
break;
default:
break;
}
}
}
}
Any help is really appreciated.
Thanks.