(03-26-2021, 04:48 PM)Dean Roddey Wrote: You can just post about it here on the forum and we can figure out what to do. what driver is it?
It is the RCS RS-485 V2 Driver. I was having difficulty (Only in CQC) with two thermostats connected to the RS485 bus. It wasn't showing any data for the lowest thermostat address. In my troubleshooting, I found that the field ids were always set to the field ids of the last thermostat in the array. The problem was that it set field defs just fine, but not all of the parameters were reset for the next loop to get ids (Specifically the value in ThermoPref).
Here is the culprit code (starting at line 664 in the driver file):
Index := 0;
While( Index < m_StatCount)
//
// Get the thermo address of this one, and use that to get the
// user provided (or defaulted) thermo name.
//
ThermoAddr := m_IndexToStatAddress[Index];
ThermoPref := m_ThermoNames[ThermoAddr];
// Do the non-V2 fields first. OutsideTempStat has to be the first one
FldDef.Set(ThermoPref + "_OutsideTempStat", CQCFldTypes.Int, CQCFldAccess.ReadWrite);
FieldList.AddObject(FldDef);
FldDef.Set(ThermoPref + "_RunScheduleStat", CQCFldTypes.Boolean, CQCFldAccess.ReadWrite);
FieldList.AddObject(FldDef);
...More field ids set....
// These have to follow V2 standards, so we can use a helper
V2Help.GetThermoFlds
(
FieldList
, ThermoPref
, LimTemp
, LimHighSP
, LimLowSP
, "Enum: Auto, On"
, "Enum: Off, On"
, "Enum: Off, Cool, Heat, Auto"
, "Enum: Off, Cool, Heat, Auto, Unknown"
);
Index ++;
EndWhile;
SetFields(FieldList);
Index := 0;
While( Index < m_StatCount)
*******I added this to get it to the correct value for ThermoPref vice using the last value********
//
// Get the thermo address of this one, and use that to get the
// field id for the associated thermostat.
//
ThermoAddr := m_IndexToStatAddress[Index];
ThermoPref := m_ThermoNames[ThermoAddr];
******************* End of my added Code**********************
m_Field_OutsideTemp[Index] := FldIdFromName(ThermoPref + "_OutsideTempStat");
...more of the same..
// Set the mode and fan mode to reasonable defaults
WriteStringFld(m_Field_Mode[Index], "Auto");
WriteStringFld(m_Field_FanMode[Index], "Auto");
Index ++;
EndWhile;
// poll for initial data...