openyou/libomron

M10-IT - two people

Opened this issue · 2 comments

After a bit of a struggle, being something of a linux newbie, I managed to get the data downloaded for my M10-IT, into sqlite and hence into LibreOffice calc, with correct UK text date/times. All great! Thanks to all for their work.

However, I have two people on my M10, and I can't find a way to get at the second data set. Not understanding the protocol it's not been possible for me to figure out how to change the python scripts to get at this data. I've never written any python before, but I'm hoping I can manage it provided I know what message I am meant to be sending. Any ideas?

Also, is there any way to automate the finding of the USB device numbers rather than having to create OMRON_DEV by hand each time? (I'm not sure but have some idea that one of the python scripts does this - is that correct?)

For your information only (no complaint!) the problems I had (not doubt due to being new to linux, and rather slow) are as follows. I'm on ubuntu 12.04 64 bit.

  • it took me a while to figure out what the git clone command was meant to be, having never heard of git before - I hadn't understood from the instructions I just had to add the http address of the repository
  • I had to download several additional libraries - no problem (pythyon_numpy, python_tk, python-matplotlib)
  • 'ls -l $OMRON_DEV groups' failed - I'm not sure what the 'groups' was intended to do but had to omit it
  • when I first ran the test it couldn't find the library libomron.so.0.9.0 - eventually I created a sh script that exported a LD_LIBRARY_PATH (I don't really understand this stuff but I cribbed it from elsewhere and it worked)

Anyhow, thanks again.

With the python scripts I now see that they work out the device numbers automatically. After another fairly steep learning process I then worked out how to use udev rules to avoid having to fiddle with access rights. That all now works fine.

My remaining query is whether I can extend the scripts to allow for two users on my M10-IT.

Any thoughts out there?

Hmm. Pretty quiet in this neighbourhood. Still, I feel I should complete the ramblings from my previous postings.

Being new to Linux, knowing no python at all (I'd never even heard of it, being after my time), and struggling to find my way through the layers of libraries, endless make files (what are they all?), swig (which remains a mystery) and so on, I finally understood just a little more about the software. I could see in the C version that some procedures took a 'bank' parameter, but I could not make any sense of the python calls or their syntax for optional parameters. So I just guessed, correctly as it happens, that I could add a parameter to the calls to get the count of items and the daily count from the python test script (omron_790IT_test.py), to get 'bank' B. In the documentation (which I hadn't previously realised was there) I found that values 0, 1 and 2 were allowed, so guessed that 1 would mean user (or bank) B.

So by persistence and inspired ignorance I got it to work for both users in the end. Now I have the data I can do what I like with it (probably graph it myself using libreoffice calc).

The Omron program was the last program that I regularly used in Windows that I been unable to get to replace under linux (I couldn't get the windows version to work using wine).

Whether I'll be brave enough to dump the dual-boot remains to be seen.

Anyway, many thanks to those who developed this. I'm free!