Meter Upload Development

31 posts, 6 contributors

Search the DAFNE Online Forums

 
NiVZ DAFNE Graduate
NHS Grampian
82 posts

Hi everyone,

A few people have asked how you can upload readings from your meter to the site without having to type them. I'm currently working on doing this for my OneTouch UltraEasy and UltraSmart but might try to extend it further depending how well it works.

If anyone can lend a hand please feel free to get in touch.

I'm going to describe briefly below how I've done this, and how people with other meters can contribute.

Luckily Lifescan provide the entire protocol for the OneTouch UltraEasy (http://www.lifescan.com/pdf/otdms/OneTouchUltraMiniProtocol.pdf)

This gives you the information you need to send commands to the meter and get the data back.

Next I downloaded a program called "Free Serial Port Monitor" and used this to watch the communication between the PC and the meter when running the software provided by Lifescan.

After watching the order the commands were sent, it was just a matter of being able to send the commands myself from my program and convert the values into something meaningful. I'm using a programming language called "AutoIT" but you could use any you are familiar with.

Nearly all meters work in a similar method using a USB to Serial cable. It's just a case of figuring out what commands you need to send to the meter and how to convert the computer numbers (hex) back into readable data.

Hopefully once this is a bit further down the line, some of you may want to contribute by downloading the "Serial Port Monitor" and send me the data produced when using your own meters software - this will save me having to source lots of different meters that I'll never use Smile

Thanks,

NiVZ

NiVZ DAFNE Graduate
NHS Grampian
82 posts

Just a quick post to say I am still working on this.

The Ultra Easy is very close to being finished and I've made some progress with the Ultra Smart, although it's taking a lot longer as there is no documentation.

I can however read the date and time from it now, and I'm close to getting the BG readings from it as well.

NiVZ

john day DAFNE Graduate
Nottingham University Hospital & QMC
54 posts

Hello ..

Have a look at my post on Online BG diaries .. would be very good if the uploading could be arranged!

Only problem for me is perhaps that I still run W98 and although the Compass sw upload runs fine, perhaps the sw you are thinking about may not?

I will let you know what the monitor yields if I can.

Cheers, John

NiVZ DAFNE Graduate
NHS Grampian
82 posts

Hi John,

I found this link: http://people.bath.ac.uk/enpsgp/Zaurus/accu-chek.html where someone has managed to figure out the Accu-Chek protocol so fingers crossed it is possible to do. If I ever get this finished I'll maybe try and add a few different meters in popularity order.

The language I'm programming in (AutoIT) is supposed to be Win 98 compatible so should be ok.

NiVZ

john day DAFNE Graduate
Nottingham University Hospital & QMC
54 posts

Hello NiVZ

Thanks for info, I would certainly be interested in uploading from the Aviva in due course.

Had a quick look at Simon Pickering’s info and suspect his comments re Roche are valid and Compass is definitely a bit clunky!

The technical comments don’t mean much to me, but if you do get anything worked out I would be happy to assist with any testing required.

Cheers, John

marke Site Administrator
South East Kent PCT
657 posts

Hi, we would be interested ( as Simon has said in the past) in anything you produce. I guess once you can 'extract' the data from the meter we need to get it into a format that can be 'uploaded' to the site. Let us know when you are in a position to do this and we can work on it.
I was also intetrested in the link you posted on the Roche meters. To be honest I gave up on Compass and switched to lifescan because I couldn't put up with their obsession with Infra-red any longer. In my experience I have never used a 'good' infra-red device, its a technology that had its day in the 80's and is long past its useby date. Especially as USB is now such a 'standard', its much better supported and widely used. Roche now have this 'smartpix' device that uses USB to the PC but still uses infra-red to the device :-( I would like to get my hands on a 'smartpix' but they won't send me one without charging and since I don't use a Roche meter, I can't see the point. One day maybe we can do something with Roche, however Lifescan seem much more friendly AND use USB !!

NiVZ DAFNE Graduate
NHS Grampian
82 posts

Hi marke,

I am really close to having the Ultra Easy completely done, but I started looking at the Ultra Smart as Simon said thats what he was using. Can I be nosey and ask your meter of choice?

Yeah infra-red is a bit old nowadays and probably not the fastest for data transfer. I thought I read somewhere on their site that they had a USB cable, but maybe it's the USB to infra-red.

Have you seen the Wavesense Jazz? It looks retro, but it has Bluetooth connectivity and automatically sends the data to your PC whenever it's on and in range.

It would be great if all the companies could create some sort of standard data format for accessing the data. Even the same companies use different standard. On the Ultra Easy the date is marked as seconds since 01/01/1970. On the Ultra Smart it's minutes since 01/01/2000!!!Don't see why they keep it all secret as it's not like they make any money on it anyway as they all give away their software for free.

As for getting the data uploaded, I'm hoping to format it into XML. Not sure what to do about duplicates, ie if you upload all your data one day then take 4 more readings and upload again. Worry about it once I've pieced what I've got together.

NiVZ

marke Site Administrator
South East Kent PCT
657 posts

Hi, I have an Ultra Smart as well I'm afraid :-( I like all the geeky features on it, being able to enter more than just BG readings.
The bluetooth meter sounds interesting in principle, however what does it do to the battery life ? Usually bluetooth tends to eat batteries so it might not be a great idea, it would be interesting to hear if anyone has tried one.
Yes it would be good to have a common standard however the rest of the computer industry has never managed it, so why believe that meter companies can do it. I am suprised by the minutes since 2000 approach, the seconds since 1970 is fairly standard on most unix/linux derivatives which I'm guessing these devices run. It would be nice to have published protocols, even better software API's. If its windows software its most likely been written using COM and it would be easy to publish an API for people to use. Although there is unlikely to be much demand for it I guess ;-)
Anyway keep at it, as soon as you have something read we can work out how to interface it to the website so we can upload.

Simon Site Administrator
Sheffield Teaching Hospitals
553 posts

I think the proprietary protocols are an example of the mercenary nature of drug companies - it's all about making money unfortunately. The software/cables are often paid for somewhere along the line (even if we the end users get them free) so the companies are reluctant to share their protocols/apis with third parties as they could produce rival software which then eats into the companies profits. Also, everyone thinks they are doing things the 'right' way and don't want to change to conform with other products/standards. As mark says, its not the blood glucose meter market that this is affected by, but most of IT.

Anyways, moan over Smile So in theory our BG diary is exposed as a REST API, meaning we can use HTTP methods to create, read, update, and delete (CRUD) data. As long as you are able to get your extracted data into an XML format (which we can develop together) then with a few tweaks our end you should just be able to use HTTP GET and POST to login and input data to the site, meaning you don't have to use a specific programming language.

If there's anything we can do to help in the meantime just give us a shout.

Simon

NiVZ DAFNE Graduate
NHS Grampian
82 posts

Hi Simon,

I've done a REST interface into Twitter before, and I'm familiar with using Java SOAP GET and SOAP requests over HTTP.

The UltraEasy is coming together nicely. Been trying to add some nice things like automatically figuring out which COM port the meter is on, and retrying initial connect 3 times if meter is not ready. I'll hopefully have something by the end of next week that can connect to the meter and get all it's readings in XML format.

After that I'll be needing you and Marke's help to get the data uploaded.

Do you guys have any ideas about whats best to do with duplicate entries? ie if you upload all your meter readings today, take a few more and then upload the next day

As far as I can tell we'll have 2 choices.

1. Read every reading from the meter every time and discard duplicates (or overwrite exisiting entries) when POSTing. This appears to be what the manufacturers software does and also means I can do a porgress bar.

2. Read the last entry from the web, then read from meter until we reach the last web entry. This would be quicker but means I couldn't do a progress bar because I won't know in advance how many meter readings we'll be using.

Might be useful to setup a test login/diary that we can send data to until we get it sussed.

I'll also need some other UltraEasy users to give it a try.
Cheers,

NiVZ