]> sigrok.org Git - libsigrokdecode.git/blame - decoders/ook_oregon/lists.py
added ook_oregon
[libsigrokdecode.git] / decoders / ook_oregon / lists.py
CommitLineData
63642c0b
S
1##
2## This file is part of the libsigrokdecode project.
3##
4## Copyright (C) 2018 Steve R <steversig@virginmedia.com>
5##
6## This program is free software; you can redistribute it and/or modify
7## it under the terms of the GNU General Public License as published by
8## the Free Software Foundation; either version 2 of the License, or
9## (at your option) any later version.
10##
11## This program is distributed in the hope that it will be useful,
12## but WITHOUT ANY WARRANTY; without even the implied warranty of
13## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14## GNU General Public License for more details.
15##
16## You should have received a copy of the GNU General Public License
17## along with this program; if not, see <http://www.gnu.org/licenses/>.
18##
19
20# Most of the info here comes from "434MHz RF Protocol Descriptions for
21# Wireless Weather Sensors - October 2015" Known Sensor ID Codes - p25.
22
23# Format is 4 hex digit ID code followed by a LIST of models that use that
24# ID and the type of sensor.
25# SensorID is used as the hash in a Python hash table, so it must be upper case.
26# The type of sensor is used to decode and display readings in the L2 decode,
27# it's case-sensitive.
28# Be very careful with the formatting ' [] and commas.
29
30sensor = {
31# 'SensorID': [['model1', 'model2'], 'type'],
32 '1984': [['WGR800'], 'Wind'], # The newer anemometer with no temperature/RH sensor.
33 '1994': [['WGR800'], 'Wind'], # The original anemometer which included a temperature/RH sensor.
34 '1A2D': [['THGR228N'], 'Temp_Hum1'],
35 '1A3D': [['THGR918'], ''],
36 '1D20': [['THGN123N', 'THGR122NX', 'THGN123N', 'THGR228N'], 'Temp_Hum'],
37 '1D30': [['THGN500', 'THGN132N'], ''],
38 '2914': [['PCR800'], 'Rain'],
39 '2A19': [['PCR800'], 'Rain1'],
40 '2A1D': [['RGR918'], 'Rain'],
41 '2D10': [['RGR968', 'PGR968 '], 'Rain1'],
42 '3A0D': [['STR918', 'WGR918'], 'Wind'],
43 '5A5D': [['BTHR918'], ''],
44 '5A6D': [['BTHR918N'], 'Temp_Hum_Baro'],
45 '5D53': [['BTHGN129'], 'Baro'],
46 '5D60': [['BTHR968'], 'Temp_Hum_Baro'],
47 'C844': [['THWR800'], 'Temp'],
48 'CC13': [['RTGR328N'], 'Temp_Hum'],
49 'CC23': [['THGR328N'], 'Temp_Hum'],
50 'CD39': [['RTHR328N'], 'Temp'],
51 'D874': [['UVN800'], 'UV1'],
52 'EA4C': [['THWR288A'], 'Temp'],
53 'EC40': [['THN132N', 'THR238NF'], 'Temp'],
54 'EC70': [['UVR128'], 'UV'],
55 'F824': [['THGN800', 'THGN801', 'THGR810'], 'Temp_Hum'],
56 'F8B4': [['THGR810'], 'Temp_Hum'],
57# '': ['PSR01'], '', ''],
58# '': ['RTGR328NA'], '', ''],
59# '': ['THC268'], '', ''],
60# '': ['THWR288A-JD'], '', ''],
61# '': ['THGR268'], '', ''],
62# '': ['THR268'], '', ''],
63}
64
65# The sensor checksum exceptions are used to calculate the right checksum for
66# sensors that don't follow the v1, v2.1 and v3 methods. For instance a v2.1
67# sensor that has a v3 checksum.
68sensor_checksum = {
69# 'SensorID': ['checksum_method', 'comment'],
70 '1D20': ['v3', 'THGR228N'],
71 '5D60': ['v3', 'BTHR918N'],
72 'EC40': ['v3', 'THN132N'],
73}
74
75dir_table = ['N', 'NNE', 'NE', 'ENE', 'E', 'ESE', 'SE', 'SSE', 'S', 'SSW', 'SW', 'WSW', 'W', 'WNW', 'NW', 'NNW', 'N']