support for Glucomen Aero GK
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.
Got it!
The unit has a whitespace before mg/dL.
I'll submit a PR.
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]] = {