Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Proper way to change detection order? #108

Open
horsey2022 opened this issue Oct 6, 2023 · 0 comments
Open

Proper way to change detection order? #108

horsey2022 opened this issue Oct 6, 2023 · 0 comments
Labels
question Further information is requested

Comments

@horsey2022
Copy link

Current Situation

I have two Govee H5054 wtaer leak detection sensor
On one device, the push button is recorded as unknown on one device.

I figured out that the problem is that in the contrib/govee.c two versions of the H5054 are supported. one uses checksum and the newer ones uses CRC. But both the CRC and Checksum matches (raw un-inverted code "code":"daf0cfab4931") but the checksum is run first which causing the decode to fail giving Unknown.

The original src/signalDecoder.cpp has
memcpy(&cfg->devices[62], &govee, sizeof(r_device));
memcpy(&cfg->devices[63], &govee_h5054, sizeof(r_device));

But I reversed to have the CRC version first and it detects the button correctly
memcpy(&cfg->devices[62], &govee_h5054, sizeof(r_device));
memcpy(&cfg->devices[63], &govee, sizeof(r_device));

I makes sense to me that the more robust CRC should be checked first before the older checksum version.
I don't know if this is the proper way to fix the problem. as when I search for govee_h5054, it also appears in tools/decoder.fragment and tools/rtl_433_devices.fragment, but just only by changing this one file it builds and detects the button properly.

  • It looks like the file is auto-generated somehow to be in alphabetical order
  • and just changing it in the signalDecoder.cpp does not seem to be the best solution.

Logs

N/A

Configuration

OpenMQTTgateway
lilygo-rtl_433

Environment

  • OS:
  • Software:
  • Node:
  • npm:

Process Supervisor

hb-service

Additional Context

No response

@horsey2022 horsey2022 added the question Further information is requested label Oct 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

1 participant