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

support for Glucomen Aero GK #125

Open
mamoit opened this issue Jun 27, 2023 · 2 comments
Open

support for Glucomen Aero GK #125

mamoit opened this issue Jun 27, 2023 · 2 comments

Comments

@mamoit
Copy link

mamoit commented Jun 27, 2023

Hello,

I have tried to dump the data from a glucomen aero gk with the glucomenareo driver without much success.

I'm running the code that is in main (54e8272).

The device shows up as follows:

[qua jun 28 00:15:32 2023] usb 5-3.3: new full-speed USB device number 67 using xhci_hcd
[qua jun 28 00:15:32 2023] usb 5-3.3: New USB device found, idVendor=2c81, idProduct=0500, bcdDevice=10.00
[qua jun 28 00:15:32 2023] usb 5-3.3: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[qua jun 28 00:15:32 2023] usb 5-3.3: Product: Ernie
[qua jun 28 00:15:32 2023] usb 5-3.3: Manufacturer: IndieSemi

So the id is 2c81:0500 instead of the 10c4:ea60 defined in the driver.

I tried skipping the auto detection, but running an info command throws a KeyError: ' mg/dL' on line 61 of glucomenareo.py.

My guess is that this device will need a different driver or at least some tweaking, I'm willing to experiment and try to develop this driver, but some initial guidance would really help.

@mamoit
Copy link
Author

mamoit commented Jun 27, 2023

Got it!
The unit has a whitespace before mg/dL.
I'll submit a PR.

@mamoit
Copy link
Author

mamoit commented Jun 28, 2023

Ok, my patch is probably not the correct one...
We should strip() the unit read from the device and probably tweak the device id.
I got it working with this ugly patch though since I can't find the place where the unit is being read from the device and strip it there.

diff --git a/glucometerutils/drivers/glucomenareo.py b/glucometerutils/drivers/glucomenareo.py
index ca903e0..83cf11a 100644
--- a/glucometerutils/drivers/glucomenareo.py
+++ b/glucometerutils/drivers/glucomenareo.py
@@ -32,6 +32,7 @@ _CMD_GET_READINGS = b"\x80"
 _UNITS_MAPPING = {
     "mmol/L": common.Unit.MMOL_L,
     "mg/dL": common.Unit.MG_DL,
+    " mg/dL": common.Unit.MG_DL,
 }
 
 _MARKINGS_MAPPING: Mapping[str, Union[str, common.Meal]] = {

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

No branches or pull requests

1 participant