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

Fix/update to Qingping Cleargrass CGD1 detection #810

Merged
merged 1 commit into from
Nov 24, 2020

Conversation

adamrbell
Copy link
Contributor

Before the fix:
{"id":"58:2D:34:50:A0:D0","name":"Qingping Alarm Clock","rssi":-82,"distance":11.4949,"servicedata":"080cd0a050342d580104c0007c02"}
The servicedata string does not match any pattern so is not parsed

After the fix:
{"id":"58:2D:34:50:A0:D0","name":"Qingping Alarm Clock","rssi":-83,"distance":12.61001,"model":"CGD1","tem":19.2,"tempc":19.2,"tempf":66.56,"hum":63.5}
The parser is invoked and the data is output as expected.

There are probably too many brackets (I'm not a C dev) and I can't test on whatever version of CGD1 broadcasts 080caf or 080c09 servicedata strings. First tested on 0.9.4 with ESP32 (ran for months without issue). Now updating all my gateways to 0.9.5 and remembered to create the pull request.

Before the fix:
{"id":"58:2D:34:50:A0:D0","name":"Qingping Alarm Clock","rssi":-82,"distance":11.4949,"servicedata":"080cd0a050342d580104c0007c02"}
The servicedata string does not match any pattern so is not parsed

After the fix:
{"id":"58:2D:34:50:A0:D0","name":"Qingping Alarm Clock","rssi":-83,"distance":12.61001,"model":"CGD1","tem":19.2,"tempc":19.2,"tempf":66.56,"hum":63.5}
The parser is invoked and the data is output as expected.

There are probably too many brackets (I'm not a C dev) and I can't test on whatever version of CGD1 broadcasts 080caf or 080c09 servicedata strings.
@1technophile 1technophile added this to the v0.9.6 milestone Nov 24, 2020
@1technophile
Copy link
Owner

Thanks for the PR!

@1technophile 1technophile merged commit 5890bf7 into 1technophile:development Nov 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants