Skip to content

Less false positives for Digoo hardware #16

Description

@rplc

Hi,
I've registered a digoo receiver and I get a lot of false readings in my area here. In the following code sample I've added a few sanity checks that seem to exclude all false positives.

uint8_t digoo::isValidPacket(uint64_t ppacket) {
  uint8_t id = getId(ppacket);
  uint8_t firstCheck = (ppacket >> 24) & 0x4;
  uint8_t secondCheck = (ppacket >> 8) & 0x0F;

  //check for valid id and control bits, see protocol specs https://github.com/aquaticus/nexus433#nexus-protocol
  if (id != 0 && firstCheck == 0 && secondCheck == 15) {
    return OK;
  }
  return INVALID_SYNC;
}

But I am by no means a C++ programmer, so please improve the code ;)

Tested with a DG-R8H and DG-TH8805 transmitter.

Greetings Alex

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions