Skip to main content

midas

Python driver for Honeywell Midas gas detectors.

Installation

uv 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.

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:

{
  '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()

Metadata

Release files for midas 0.9.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for midas 0.9.0
File Size Uploaded Provenance Actions
midas-0.9.0.tar.gz 19.1 kB Without provenance Details for midas-0.9.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for midas 0.9.0
File Interpreter ABI Platform Actions
midas-0.9.0-py3-none-any.whl Python 3 none any Details for midas-0.9.0-py3-none-any.whl

Total release size: 36.1 kB

Release files / midas-0.9.0.tar.gz

Download URL midas-0.9.0.tar.gz
Size 19.1 kB
Tags Source
SHA-256 checksum
How to use checksums
861efc5e5d0e946953a0f7c072347d3ff853f8d9e814b678e86f699511ccc481
BLAKE2b-256 checksum
How to use checksums
deeacbcefeb54b6899a01608280858b5b88a51c54862cbd171a9f36c8d909cb4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.12.3

Release files / midas-0.9.0-py3-none-any.whl

Download URL midas-0.9.0-py3-none-any.whl
Size 17.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7278dd8e0cf49376b842b6f453016e58d527f85b096714ab578cbef72d36e936
BLAKE2b-256 checksum
How to use checksums
abbafc15eadddecf37d6f086072996decdd61c4098a228908396130d9b5efb6f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.12.3

Security for midas 0.9.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.9.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page