Skip to content

Commit

Permalink
add support for nexus protocol to RCSwitch library
Browse files Browse the repository at this point in the history
Nexus protocol is used by temperature and humidity sensor that operate at 433 MHz.
It is used by various brands.
  • Loading branch information
slo617 committed Aug 1, 2024
1 parent 74551c8 commit 7f90759
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
5 changes: 3 additions & 2 deletions lib/lib_rf/rc-switch/src/RCSwitch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -151,8 +151,9 @@ static const RCSwitch::Protocol PROGMEM proto[] = {
{ 340, 0, { 0, 0 }, 1, { 14, 4 }, { 1, 2 }, { 2, 1 }, false, 0 }, // 33 (Dooya Control DC2708L)
{ 120, 0, { 0, 0 }, 1, { 1, 28 }, { 1, 3 }, { 3, 1 }, false, 0 }, // 34 DIGOO SD10 - so as to use this protocol RCSWITCH_SEPARATION_LIMIT must be set to 2600
{ 20, 0, { 0, 0 }, 1, { 239, 78 }, {20, 35 }, {35, 20}, false, 10000},// 35 Dooya 5-Channel blinds remote DC1603
{ 250, 0, { 0, 0 }, 1, { 18, 6 }, { 1, 3 }, { 3, 1 }, false, 0 }, // 36 Dooya remote DC2700AC for Dooya DT82TV curtains motor
{ 200, 0, { 0, 0 }, 0, { 0, 0 }, { 1, 3 }, { 3, 1} , false, 20} // 37 DEWENWILS Power Strip
{ 250, 0, { 0, 0 }, 1, { 18, 6 }, { 1, 3 }, { 3, 1 }, false, 0 }, // 36 Dooya remote DC2700AC for Dooya DT82TV curtains motor
{ 200, 0, { 0, 0 }, 0, { 0, 0 }, { 1, 3 }, { 3, 1 }, false, 20 }, // 37 DEWENWILS Power Strip
{ 500, 0, { 0, 0 }, 1, { 0, 7 }, { 1, 2 }, { 1, 4 }, false, 0 }, // 38 temperature and humidity sensor, various brands, nexus protocol, 36 bits + start impulse
};

enum {
Expand Down
6 changes: 3 additions & 3 deletions lib/lib_rf/rc-switch/src/RCSwitch.h
Original file line number Diff line number Diff line change
Expand Up @@ -57,15 +57,15 @@
#endif

// Number of maximum high/Low changes per packet.
// We can handle up to (unsigned long) => 32 bit * 2 H/L changes per bit + 2 for sync
// We can handle up to 36 bit * 2 H/L changes per bit + 2 for sync
// Для keeloq нужно увеличить RCSWITCH_MAX_CHANGES до 23+1+66*2+1=157
#define RCSWITCH_MAX_CHANGES 67 // default 67
#define RCSWITCH_MAX_CHANGES 75 // default 75 - longest protocol that requires this buffer size is 38/nexus

// separationLimit: minimum microseconds between received codes, closer codes are ignored.
// according to discussion on issue #14 it might be more suitable to set the separation
// limit to the same time as the 'low' part of the sync signal for the current protocol.
// should be set to the minimum value of pulselength * the sync signal
#define RCSWITCH_SEPARATION_LIMIT 4100
#define RCSWITCH_SEPARATION_LIMIT (500*7)

class RCSwitch {

Expand Down

0 comments on commit 7f90759

Please sign in to comment.