11 using Newtonsoft.Json;
40 if (buffer.tmode.ToString() ==
"0")
44 if (buffer.tmode.ToString() ==
"1")
48 if (buffer.tmode.ToString() ==
"2")
52 if (buffer.tmode.ToString() ==
"3")
58 if (buffer.fmode.ToString() ==
"0")
62 if (buffer.fmode.ToString() ==
"1")
66 if (buffer.fmode.ToString() ==
"2")
72 if (buffer.hold.ToString() ==
"0")
76 if (buffer.hold.ToString() ==
"1")
82 if (buffer.tstate.ToString() ==
"0")
86 if (buffer.tstate.ToString() ==
"1")
90 if (buffer.tstate.ToString() ==
"2")
96 if (buffer.ttarget.ToString() ==
"0")
100 if (buffer.ttarget.ToString() ==
"1")
104 if (buffer.ttarget.ToString() ==
"2")
110 if (buffer.program_mode.ToString() ==
"0")
114 if (buffer.program_mode.ToString() ==
"1")
118 if (buffer.program_mode.ToString() ==
"2")
122 if (buffer.program_mode.ToString() ==
"3")
128 if (buffer.fstate.ToString() ==
"0")
132 if (buffer.fstate.ToString() ==
"1")
138 BBThermostatData += DateTime.Now.ToString(
"HH:mm:ss") +
"," + DateTime.Now.ToString(
"yyyy-MM-dd");
158 return Convert.ToString(((
int)value - 32) * 5 / 9);
172 Console.WriteLine(Environment.NewLine);
static string BBThermostatRequestB()
this method retrieve the humidity from the thermostat
static string BBThermostatRequestA()
this method retrieve the full status of the thermostat
static string BBThermostatAllStat
static void SensorStatus(bool Status)
static string BBThermostatData
static void SaveErrorData(string error)
Log all the error that occurs in the program
static void BBThermosataCheck()
Get thermostat data and encrypt
static void EncryptData(string SensorData)
This method encrypts the thermostat data
static void GetBBThermostatAllData()
This method request and parse the thermostat stat data
static void GetBBThermostatHumidtyData()
This method request and parse the thermostat humidity data
static string TempConvertor(float value)
This method converts the temperature from imperial to metric
static string BBThermostatHumidity