Skip to content

Commit ff045f1

Browse files
authored
Argo sendSensorTemp (#1858)
When using the iFeel functionality the remote regularly sends silent (i.e. no beep) messages to the Argo unit to update the current temperature. This function adds the ability to send such messages. On a side note, to capture normal Argo IR messages using IRrecv::decodeArgo I had to reduce kArgoBits and disable the checksum, likely because the message wasn't fully recorded. To capture these temperature messages I had to use nbits = 32. X-Ref: #1859
1 parent bb78783 commit ff045f1

File tree

2 files changed

+24
-0
lines changed

2 files changed

+24
-0
lines changed

src/ir_Argo.cpp

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,28 @@ void IRArgoAC::begin(void) { _irsend.begin(); }
6363
void IRArgoAC::send(const uint16_t repeat) {
6464
_irsend.sendArgo(getRaw(), kArgoStateLength, repeat);
6565
}
66+
67+
/// Send current room temperature for the iFeel feature as a silent IR
68+
/// message (no acknowledgement from the device).
69+
/// @param[in] temp The temperature in degrees celsius.
70+
/// @param[in] repeat Nr. of times the message will be repeated.
71+
void IRArgoAC::sendSensorTemp(const uint8_t temp, const uint16_t repeat) {
72+
uint8_t tempc = temp - kArgoTempDelta;
73+
uint8_t check = 52 + tempc;
74+
uint8_t end = 0b011;
75+
76+
ArgoProtocol data;
77+
data.raw[0] = 0b10101100;
78+
data.raw[1] = 0b11110101;
79+
data.raw[2] = (tempc << 3) | (check >> 5);
80+
data.raw[3] = (check << 3) | end;
81+
for (uint8_t i = 4; i < kArgoStateLength; i++) data.raw[i] = 0x0;
82+
uint8_t sum = IRArgoAC::calcChecksum(data.raw, kArgoStateLength);
83+
data.raw[10] = 0b00000010;
84+
data.Sum = sum;
85+
86+
_irsend.sendArgo(data.raw, kArgoStateLength, repeat);
87+
}
6688
#endif // SEND_ARGO
6789

6890
/// Verify the checksum is valid for a given state.

src/ir_Argo.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,8 @@ class IRArgoAC {
131131

132132
#if SEND_ARGO
133133
void send(const uint16_t repeat = kArgoDefaultRepeat);
134+
void sendSensorTemp(const uint8_t temp,
135+
const uint16_t repeat = kArgoDefaultRepeat);
134136
/// Run the calibration to calculate uSec timing offsets for this platform.
135137
/// @return The uSec timing offset needed per modulation of the IR Led.
136138
/// @note This will produce a 65ms IR signal pulse at 38kHz.

0 commit comments

Comments
 (0)