rtl433  UNKNOWN
RTL-433 utility
oregon_scientific.c File Reference

Various Oregon Scientific protocols. More...

Functions

static float get_os_temperature (unsigned char *message)
 
static float get_os_rain_rate (unsigned char *message)
 
static float get_os_total_rain (unsigned char *message)
 
static unsigned int get_os_humidity (unsigned char *message)
 
static unsigned int get_os_uv (unsigned char *message)
 
static unsigned int get_os_channel (unsigned char *message, unsigned int sensor_id)
 
static unsigned int get_os_battery (unsigned char *message)
 
static unsigned int get_os_rollingcode (unsigned char *message)
 
static unsigned short int power (uint8_t const *msg)
 
static unsigned long long total (uint8_t const *msg)
 
static int validate_os_checksum (r_device *decoder, unsigned char *msg, int checksum_nibble_idx)
 
static int validate_os_v2_message (r_device *decoder, unsigned char *msg, int bits_expected, int msg_bits, int nibbles_in_checksum)
 
static int oregon_scientific_v2_1_decode (r_device *decoder, bitbuffer_t *bitbuffer)
 
static int oregon_scientific_v3_decode (r_device *decoder, bitbuffer_t *bitbuffer)
 
static int oregon_scientific_decode (r_device *decoder, bitbuffer_t *bitbuffer)
 

Variables

static char * output_fields []
 
r_device oregon_scientific
 

Detailed Description

Various Oregon Scientific protocols.

Copyright (C) 2015 Helge Weissig, Denis Bodor, Tommy Vestermark, Karl Lattimer, deennoo, pclov3r, onlinux, Pasquale Fiorillo.

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

Function Documentation

◆ get_os_battery()

static unsigned int get_os_battery ( unsigned char *  message)
static

◆ get_os_channel()

static unsigned int get_os_channel ( unsigned char *  message,
unsigned int  sensor_id 
)
static

◆ get_os_humidity()

static unsigned int get_os_humidity ( unsigned char *  message)
static

◆ get_os_rain_rate()

static float get_os_rain_rate ( unsigned char *  message)
static

◆ get_os_rollingcode()

static unsigned int get_os_rollingcode ( unsigned char *  message)
static

◆ get_os_temperature()

static float get_os_temperature ( unsigned char *  message)
static

◆ get_os_total_rain()

static float get_os_total_rain ( unsigned char *  message)
static

◆ get_os_uv()

static unsigned int get_os_uv ( unsigned char *  message)
static

◆ oregon_scientific_decode()

static int oregon_scientific_decode ( r_device decoder,
bitbuffer_t bitbuffer 
)
static

◆ oregon_scientific_v2_1_decode()

◆ oregon_scientific_v3_decode()

◆ power()

static unsigned short int power ( uint8_t const *  msg)
static

◆ total()

static unsigned long long total ( uint8_t const *  msg)
static

◆ validate_os_checksum()

static int validate_os_checksum ( r_device decoder,
unsigned char *  msg,
int  checksum_nibble_idx 
)
static

◆ validate_os_v2_message()

static int validate_os_v2_message ( r_device decoder,
unsigned char *  msg,
int  bits_expected,
int  msg_bits,
int  nibbles_in_checksum 
)
static

Variable Documentation

◆ oregon_scientific

r_device oregon_scientific
Initial value:
= {
.name = "Oregon Scientific Weather Sensor",
.short_width = 440,
.long_width = 0,
.reset_limit = 2400,
.decode_fn = &oregon_scientific_decode,
.disabled = 0,
.fields = output_fields,
}
static char * output_fields[]
Definition: oregon_scientific.c:726
static int oregon_scientific_decode(r_device *decoder, bitbuffer_t *bitbuffer)
Definition: oregon_scientific.c:718
Manchester encoding. Hardcoded zerobit. Rising Edge = 0, Falling edge = 1.
Definition: r_device.h:10

◆ output_fields

char* output_fields[]
static
Initial value:
= {
"brand",
"model",
"id",
"channel",
"battery",
"temperature_C",
"humidity",
"rain_rate",
"rain_rate_mm_h",
"rain_rate_in_h",
"rain_total",
"rain_mm",
"rain_in",
"gust",
"average",
"direction",
"wind_max_m_s",
"wind_avg_m_s",
"wind_dir_deg",
"pressure_hPa",
"uv",
"power_W",
"energy_kWh",
"radio_clock",
NULL,
}