midas


Namemidas JSON
Version 0.6.6 PyPI version JSON
download
home_pagehttps://github.com/numat/midas/
SummaryPython driver for Honeywell Midas gas detectors.
upload_time2024-02-05 19:33:07
maintainerAlex Ruddick
docs_urlNone
authorPatrick Fuller
requires_python
licenseGPLv2
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            midas
=====

Python ≥3.8 driver for [Honeywell Midas gas detectors](http://www.honeywellanalytics.com/en/products/Midas).

<p align="center">
  <img src="https://s7d1.scene7.com/is/image/Honeywell65/Midas" height="400" />
</p>

Installation
============

```
pip install midas
```

Usage
=====

### Command Line

To test your connection and stream real-time data, use the command-line
interface. You can read the state with:

```
$ midas 192.168.1.100
```

This will output a JSON object which can be further manipulated. See below for
object structure.


### Python

For more complex behavior, you can write a python script. This solely uses
Python ≥3.5's async/await syntax.

```python
import asyncio
from midas import GasDetector

async def get():
    async with GasDetector('192.168.1.100') as detector:
        print(await detector.get())

asyncio.run(get())
```

If the detector is operating at that address, this should output a
dictionary of the form:

```python
{
  'alarm': 'none',             # Can be 'none', 'low', or 'high'
  'concentration': 0.0,        # Current gas concentration reading
  'connected': True,           # Monitors heartbeat for connection
  'fault': {                   # Fault data, when applicable
    'code': 'F39',
    'condition': 'User has generated a simulated fault.',
    'description': 'Simulated fault',
    'recovery': 'Reset simulated fault.',
    'status': 'Instrument fault'
  },
  'flow': 514,                 # Flow rate, in cc / minute
  'high-alarm threshold': 2.0, # Threshold concentration for high alarm trigger
  'ip': '192.168.1.192',       # IP address of connection, can be used to link to Honeywell's own web interface
  'life': 538.95,              # Days until cartridge replacement required
  'low-alarm threshold': 1.0,  # Threshold concentration for low alarm trigger
  'state': 'Monitoring',       # Can be any option in `gas_detector.monitoring_status_options`
  'temperature': 26,           # Detector temperature, in celsius
  'units': 'ppm'               # Units for concentration values
}
```

Additionally, there are four commands which can be sent to the device
* Clear all alarms and faults - `detector.clear_alarms_and_faults()`
* Inhibit alarms - `detector.inhibit_alarms()`
* Inhibit alarms and faults - `detector.inhibit_alarms_and_faults()`
* Turn off inhibition - `detector.remove_inhibit()`

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/numat/midas/",
    "name": "midas",
    "maintainer": "Alex Ruddick",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "alex@numat-tech.com",
    "keywords": "",
    "author": "Patrick Fuller",
    "author_email": "pat@numat-tech.com",
    "download_url": "https://files.pythonhosted.org/packages/a6/19/06629c23c17b36f54809ef03e918f71f8d5c40d2e3705e4a2230eb869995/midas-0.6.6.tar.gz",
    "platform": null,
    "description": "midas\n=====\n\nPython \u22653.8 driver for [Honeywell Midas gas detectors](http://www.honeywellanalytics.com/en/products/Midas).\n\n<p align=\"center\">\n  <img src=\"https://s7d1.scene7.com/is/image/Honeywell65/Midas\" height=\"400\" />\n</p>\n\nInstallation\n============\n\n```\npip install midas\n```\n\nUsage\n=====\n\n### Command Line\n\nTo test your connection and stream real-time data, use the command-line\ninterface. You can read the state with:\n\n```\n$ midas 192.168.1.100\n```\n\nThis will output a JSON object which can be further manipulated. See below for\nobject structure.\n\n\n### Python\n\nFor more complex behavior, you can write a python script. This solely uses\nPython \u22653.5's async/await syntax.\n\n```python\nimport asyncio\nfrom midas import GasDetector\n\nasync def get():\n    async with GasDetector('192.168.1.100') as detector:\n        print(await detector.get())\n\nasyncio.run(get())\n```\n\nIf the detector is operating at that address, this should output a\ndictionary of the form:\n\n```python\n{\n  'alarm': 'none',             # Can be 'none', 'low', or 'high'\n  'concentration': 0.0,        # Current gas concentration reading\n  'connected': True,           # Monitors heartbeat for connection\n  'fault': {                   # Fault data, when applicable\n    'code': 'F39',\n    'condition': 'User has generated a simulated fault.',\n    'description': 'Simulated fault',\n    'recovery': 'Reset simulated fault.',\n    'status': 'Instrument fault'\n  },\n  'flow': 514,                 # Flow rate, in cc / minute\n  'high-alarm threshold': 2.0, # Threshold concentration for high alarm trigger\n  'ip': '192.168.1.192',       # IP address of connection, can be used to link to Honeywell's own web interface\n  'life': 538.95,              # Days until cartridge replacement required\n  'low-alarm threshold': 1.0,  # Threshold concentration for low alarm trigger\n  'state': 'Monitoring',       # Can be any option in `gas_detector.monitoring_status_options`\n  'temperature': 26,           # Detector temperature, in celsius\n  'units': 'ppm'               # Units for concentration values\n}\n```\n\nAdditionally, there are four commands which can be sent to the device\n* Clear all alarms and faults - `detector.clear_alarms_and_faults()`\n* Inhibit alarms - `detector.inhibit_alarms()`\n* Inhibit alarms and faults - `detector.inhibit_alarms_and_faults()`\n* Turn off inhibition - `detector.remove_inhibit()`\n",
    "bugtrack_url": null,
    "license": "GPLv2",
    "summary": "Python driver for Honeywell Midas gas detectors.",
    "version": "0.6.6",
    "project_urls": {
        "Homepage": "https://github.com/numat/midas/"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "1e74d2e6f73d3aebe84f35218abfdbf8bd6a4881f69da0a2319a49ddab545681",
                "md5": "d7cb216f381c17013ac9aff48e9f0a45",
                "sha256": "b0a7597bbc15a4b52cea9beb1c259228d7c9661240f5c3627864c2443f24d54d"
            },
            "downloads": -1,
            "filename": "midas-0.6.6-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "d7cb216f381c17013ac9aff48e9f0a45",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 17257,
            "upload_time": "2024-02-05T19:33:05",
            "upload_time_iso_8601": "2024-02-05T19:33:05.461158Z",
            "url": "https://files.pythonhosted.org/packages/1e/74/d2e6f73d3aebe84f35218abfdbf8bd6a4881f69da0a2319a49ddab545681/midas-0.6.6-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "a61906629c23c17b36f54809ef03e918f71f8d5c40d2e3705e4a2230eb869995",
                "md5": "d5c10ae893d19f35f45f5db30388a73c",
                "sha256": "a66142410595b497bb4ac52c908ac96fd33b255bce8c5404ce54b4808d4bd359"
            },
            "downloads": -1,
            "filename": "midas-0.6.6.tar.gz",
            "has_sig": false,
            "md5_digest": "d5c10ae893d19f35f45f5db30388a73c",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 17940,
            "upload_time": "2024-02-05T19:33:07",
            "upload_time_iso_8601": "2024-02-05T19:33:07.506737Z",
            "url": "https://files.pythonhosted.org/packages/a6/19/06629c23c17b36f54809ef03e918f71f8d5c40d2e3705e4a2230eb869995/midas-0.6.6.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-02-05 19:33:07",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "numat",
    "github_project": "midas",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "midas"
}
        
Elapsed time: 0.17305s