Add support for GE Choice Alert wireless alarm sensors (#1768)
This commit is contained in:
parent
bb340be040
commit
47351aeb8e
8 changed files with 112 additions and 1 deletions
|
@ -287,6 +287,7 @@ See [CONTRIBUTING.md](./docs/CONTRIBUTING.md).
|
||||||
[201] Unbranded SolarTPMS for trucks
|
[201] Unbranded SolarTPMS for trucks
|
||||||
[202] Funkbus / Instafunk (Berker, Jira, Jung)
|
[202] Funkbus / Instafunk (Berker, Jira, Jung)
|
||||||
[203] Porsche Boxster/Cayman TPMS
|
[203] Porsche Boxster/Cayman TPMS
|
||||||
|
[204] Jasco/GE Choice Alert Security Devices
|
||||||
|
|
||||||
* Disabled by default, use -R n or -G
|
* Disabled by default, use -R n or -G
|
||||||
|
|
||||||
|
|
|
@ -424,6 +424,7 @@ stop_after_successful_events false
|
||||||
protocol 201 # Unbranded SolarTPMS for trucks
|
protocol 201 # Unbranded SolarTPMS for trucks
|
||||||
protocol 202 # Funkbus / Instafunk (Berker, Jira, Jung)
|
protocol 202 # Funkbus / Instafunk (Berker, Jira, Jung)
|
||||||
protocol 203 # Porsche Boxster/Cayman TPMS
|
protocol 203 # Porsche Boxster/Cayman TPMS
|
||||||
|
protocol 204 # Jasco/GE Choice Alert Security Devices
|
||||||
|
|
||||||
## Flex devices (command line option "-X")
|
## Flex devices (command line option "-X")
|
||||||
|
|
||||||
|
|
|
@ -211,6 +211,7 @@
|
||||||
DECL(tpms_truck) \
|
DECL(tpms_truck) \
|
||||||
DECL(funkbus_remote) \
|
DECL(funkbus_remote) \
|
||||||
DECL(tpms_porsche) \
|
DECL(tpms_porsche) \
|
||||||
|
DECL(jasco) \
|
||||||
|
|
||||||
/* Add new decoders here. */
|
/* Add new decoders here. */
|
||||||
|
|
||||||
|
|
|
@ -166,7 +166,7 @@ RTL\-SDR device driver is available.
|
||||||
To set gain for RTL\-SDR use \-g <gain> to set an overall gain in dB.
|
To set gain for RTL\-SDR use \-g <gain> to set an overall gain in dB.
|
||||||
.RE
|
.RE
|
||||||
.RS
|
.RS
|
||||||
SoapySDR device driver is available.
|
SoapySDR device driver is not available.
|
||||||
.RE
|
.RE
|
||||||
.TP
|
.TP
|
||||||
[ \fB\-d\fI ""\fP ]
|
[ \fB\-d\fI ""\fP ]
|
||||||
|
|
|
@ -123,6 +123,7 @@ add_library(r_433 STATIC
|
||||||
devices/insteon.c
|
devices/insteon.c
|
||||||
devices/interlogix.c
|
devices/interlogix.c
|
||||||
devices/intertechno.c
|
devices/intertechno.c
|
||||||
|
devices/jasco.c
|
||||||
devices/kedsum.c
|
devices/kedsum.c
|
||||||
devices/kerui.c
|
devices/kerui.c
|
||||||
devices/klimalogg.c
|
devices/klimalogg.c
|
||||||
|
|
103
src/devices/jasco.c
Normal file
103
src/devices/jasco.c
Normal file
|
@ -0,0 +1,103 @@
|
||||||
|
/** @file
|
||||||
|
Jasco/GE Choice Alert Wireless Device Decoder.
|
||||||
|
|
||||||
|
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.
|
||||||
|
*/
|
||||||
|
/**
|
||||||
|
Jasco/GE Choice Alert Wireless Device Decoder.
|
||||||
|
|
||||||
|
- Frequency: 318.01 MHz
|
||||||
|
|
||||||
|
v0.1 based on the contact and water sensors Model 45131 / FCC ID QOB45131-3
|
||||||
|
|
||||||
|
v0.2 corrected decoder
|
||||||
|
|
||||||
|
v0.3 internal naming consistancies
|
||||||
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "decoder.h"
|
||||||
|
|
||||||
|
#define JASCO_MSG_BIT_LEN 86
|
||||||
|
|
||||||
|
static int jasco_decode(r_device *decoder, bitbuffer_t *bitbuffer)
|
||||||
|
{
|
||||||
|
|
||||||
|
if (bitbuffer->bits_per_row[0] != JASCO_MSG_BIT_LEN && bitbuffer->bits_per_row[0] != JASCO_MSG_BIT_LEN+1) {
|
||||||
|
if (decoder->verbose > 1 && bitbuffer->bits_per_row[0] > 0) {
|
||||||
|
fprintf(stderr, "%s: invalid bit count %d\n", __func__,
|
||||||
|
bitbuffer->bits_per_row[0]);
|
||||||
|
}
|
||||||
|
return DECODE_ABORT_LENGTH;
|
||||||
|
}
|
||||||
|
|
||||||
|
uint8_t b[4];
|
||||||
|
uint8_t chk;
|
||||||
|
uint32_t sensor_id = 0;
|
||||||
|
int s_closed=0;
|
||||||
|
// int battery=0;
|
||||||
|
bitbuffer_t packet_bits;
|
||||||
|
data_t *data;
|
||||||
|
uint8_t const preamble[] = {0xfc, 0x0c};
|
||||||
|
unsigned bitpos = 0;
|
||||||
|
|
||||||
|
if (decoder->verbose > 1) {
|
||||||
|
bitbuffer_debug(bitbuffer);
|
||||||
|
}
|
||||||
|
bitpos = bitbuffer_search(bitbuffer, 0, 0, preamble, sizeof(preamble) * 8) + sizeof(preamble) * 8;
|
||||||
|
|
||||||
|
bitpos = bitbuffer_manchester_decode(bitbuffer, 0, bitpos, &packet_bits, 87);
|
||||||
|
|
||||||
|
bitbuffer_extract_bytes(&packet_bits, 0, 0,b, 32);
|
||||||
|
|
||||||
|
if (decoder->verbose > 1) {
|
||||||
|
bitbuffer_debug(&packet_bits);
|
||||||
|
}
|
||||||
|
|
||||||
|
bitbuffer_clear(&packet_bits);
|
||||||
|
|
||||||
|
chk = b[0] ^ b[1] ^ b[2];
|
||||||
|
if (chk != b[3]) {
|
||||||
|
return DECODE_FAIL_MIC;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
sensor_id = (b[0] << 8)+ b[1];
|
||||||
|
|
||||||
|
s_closed = ((b[2] & 0xef) == 0xef);
|
||||||
|
|
||||||
|
|
||||||
|
/* clang-format off */
|
||||||
|
data = data_make(
|
||||||
|
"model", "", DATA_STRING, "Jasco/GE Choice Alert Security Devices",
|
||||||
|
"id", "Id", DATA_INT, sensor_id,
|
||||||
|
"status", "Closed", DATA_INT, s_closed,
|
||||||
|
"mic", "Integrity", DATA_STRING, "CRC",
|
||||||
|
NULL);
|
||||||
|
/* clang-format on */
|
||||||
|
|
||||||
|
decoder_output_data(decoder, data);
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
static char *output_fields[] = {
|
||||||
|
"model",
|
||||||
|
"id",
|
||||||
|
"status",
|
||||||
|
"mic",
|
||||||
|
NULL,
|
||||||
|
};
|
||||||
|
|
||||||
|
r_device jasco = {
|
||||||
|
.name = "Jasco/GE Choice Alert Security Devices",
|
||||||
|
.modulation = OOK_PULSE_PCM_RZ,
|
||||||
|
.short_width = 250,
|
||||||
|
.long_width = 250,
|
||||||
|
.reset_limit = 1800, // Maximum gap size before End Of Message
|
||||||
|
.decode_fn = &jasco_decode,
|
||||||
|
.fields = output_fields,
|
||||||
|
|
||||||
|
};
|
|
@ -254,6 +254,7 @@ COPY ..\..\libusb\MS64\dll\libusb*.dll $(TargetDir)</Command>
|
||||||
<ClCompile Include="..\src\devices\insteon.c" />
|
<ClCompile Include="..\src\devices\insteon.c" />
|
||||||
<ClCompile Include="..\src\devices\interlogix.c" />
|
<ClCompile Include="..\src\devices\interlogix.c" />
|
||||||
<ClCompile Include="..\src\devices\intertechno.c" />
|
<ClCompile Include="..\src\devices\intertechno.c" />
|
||||||
|
<ClCompile Include="..\src\devices\jasco.c" />
|
||||||
<ClCompile Include="..\src\devices\kedsum.c" />
|
<ClCompile Include="..\src\devices\kedsum.c" />
|
||||||
<ClCompile Include="..\src\devices\kerui.c" />
|
<ClCompile Include="..\src\devices\kerui.c" />
|
||||||
<ClCompile Include="..\src\devices\klimalogg.c" />
|
<ClCompile Include="..\src\devices\klimalogg.c" />
|
||||||
|
|
|
@ -499,6 +499,9 @@
|
||||||
<ClCompile Include="..\src\devices\intertechno.c">
|
<ClCompile Include="..\src\devices\intertechno.c">
|
||||||
<Filter>Source Files\devices</Filter>
|
<Filter>Source Files\devices</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
|
<ClCompile Include="..\src\devices\jasco.c">
|
||||||
|
<Filter>Source Files\devices</Filter>
|
||||||
|
</ClCompile>
|
||||||
<ClCompile Include="..\src\devices\kedsum.c">
|
<ClCompile Include="..\src\devices\kedsum.c">
|
||||||
<Filter>Source Files\devices</Filter>
|
<Filter>Source Files\devices</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
|
|
Loading…
Add table
Reference in a new issue