Skip to content

Commit

Permalink
Add support for Oregon Scientific AWR129 BBQ thermometer (merbanan#2439)
Browse files Browse the repository at this point in the history
  • Loading branch information
homeautomaton authored Mar 21, 2023
1 parent 354ffde commit 336ee28
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/devices/oregon_scientific.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
#define ID_RGR968 0x2d10
#define ID_THR228N 0xec40
#define ID_THN132N 0xec40 // same as THR228N but different packet size
#define ID_AWR129 0xec41 // same as THR228N
#define ID_RTGN318 0x0cc3 // warning: id is from 0x0cc3 and 0xfcc3
#define ID_RTGN129 0x0cc3 // same as RTGN318 but different packet size
#define ID_THGR810 0xf824 // This might be ID_THGR81, but what's true is lost in (git) history
Expand Down Expand Up @@ -368,13 +369,14 @@ static int oregon_scientific_v2_1_decode(r_device *decoder, bitbuffer_t *bitbuff
decoder_output_data(decoder, data);
return 1;
}
else if (sensor_id == ID_THR228N && msg_bits == 76) {
else if ((sensor_id == ID_THR228N || sensor_id == ID_AWR129) && msg_bits == 76) {
if (validate_os_v2_message(decoder, msg, 76, msg_bits, 12) != 0)
return 0;
float temp_c = get_os_temperature(msg);
/* clang-format off */
data = data_make(
"model", "", DATA_STRING, "Oregon-THR228N",
"model", "", DATA_COND, sensor_id == ID_THR228N, DATA_STRING, "Oregon-THR228N",
"model", "", DATA_COND, sensor_id == ID_AWR129, DATA_STRING, "Oregon-AWR129",
"id", "House Code", DATA_INT, get_os_rollingcode(msg),
"channel", "Channel", DATA_INT, get_os_channel(msg, sensor_id),
"battery_ok", "Battery", DATA_INT, !get_os_battery(msg),
Expand Down

0 comments on commit 336ee28

Please sign in to comment.