Coder Social home page Coder Social logo

0x2b3bfa0 / python-omron-mit-elite-plus Goto Github PK

View Code? Open in Web Editor NEW
6.0 3.0 2.0 8 KB

Python script to extract measurements from an Omron MIT Elite Plus USB blood pressure meter

Home Page: https://github.com/0x2b3bfa0/python-omron-mit-elite-plus

Python 100.00%
omron blood-pressure python

python-omron-mit-elite-plus's Introduction

Omron MIT Elite Plus HEM-7301-ITKE7

Python script to extract measurements from an Omron MIT Elite Plus (HEM-7301-ITKE7) blood pressure monitor with USB support (0590:0028). This has also been tested to work with an Omron T9P (HEM-759P-C1) using the HHX-CABLE-USB1. This cable claims to work with HJ-720IT, HEM-7080IT-E and HEM-790IT models, although this has not been tested yet.


Based on https://usb2me.wordpress.com/2013/02/06/omron-mit-elite-plus-hem-7301-itke7 (direct link).

This upper arm blood pressure monitor has memory for last 90 measurements. It records date, time, systolic/diastolic pressure and pulse. It has somewhat more complicated USB protocol using request/response packets. It has also support for wakeup request.

Installing

git clone https://github.com/0x2b3bfa0/python-omron-mit-elite-plus.git
cd python-omron-mit-elite-plus
pip install -r requirements.txt

Linux permissions

By default, this script will need to be run as root to gain privileges to access the device. The elevate python module is used to request this automatically if running as the current user fails due to permissions issues. In the long term, it is recommended that udev rules be added to allow any (or selected) users to access the USB device so that running as root is not required. To do this:

  1. Copy the 73-omron-bpm.rules file to /etc/udev/rules.d/73-omron-bpm.rules.
  2. Run sudo udevadm control --reload-rules && sudo udevadm trigger as per this post to apply the new rules.

Windows driver installation

This script uses the PyUSB library to communicate with the monitor. On Windows computers this usually needs a backend to be installed - see the PyUSB readme for more details.

Zadig is one application that has been used with a little bit of trial and error by a family member to get this script / monitor to operate on Windows 10.

Usage

This script is controlled through command line arguments. For example, to read all data on the monitor, write this to output.csv and then clear it, run

python omron_elite_plus.py -r -c -o output.csv

Options

usage: omron_elite_plus.py [-h] [-r] [--correct-times] [-c] [-t]
                           [-n] [-o OUTPUT]

Tool for connecting to Omron branded blood pressure monitors

options:
  -h, --help            show this help message and exit
  -r, --no-read         Do not read all data stored on the monitor.
                        The default action if not provided is to
                        read everything.
  --correct-times       When reading, adds an offset from the
                        computer's time to the monitor's time for
                        each record to correct for the date and time
                        on the monitor not being set correctly.
  -c, --clear           Request that the monitor clear its internal
                        memory after reading.
  -t, --time            Get the current time from the monitor.
  -n, --number          Get the number of records stored on the
                        monitor.
  -o OUTPUT, --output OUTPUT
                        Write the results to the provided file
                        instead of to the console.

Alternatives

python-omron-mit-elite-plus's People

Contributors

0x2b3bfa0 avatar jgohyeah avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

lmigiro jgohyeah

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.