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

Release files for midas 0.8.1

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.8.1
File Size Uploaded
midas-0.8.1.tar.gz 18.7 kB Details

Built distribution (wheel)

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

Total release size: 35.7 kB

Release files / midas-0.8.1.tar.gz

Download URL midas-0.8.1.tar.gz
Size 18.7 kB
Tags Source
SHA-256 checksum
How to use checksums
e9949c4640e06ae8ff6f41374bda06878d6c33aaa98eb660e803be7d4e8db58e
BLAKE2b-256 checksum
How to use checksums
f30335c5c55b3f55ab1554f05e43f109dbf4049e980b38d7674e276b9fb4266f
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.8.1-py3-none-any.whl

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

Release history Release notifications | RSS feed

This release

0.8.1 This release

2 release files

0.8.0

2 release files

0.7.0

2 release files

0.6.7

2 release files

0.6.6

2 release files

0.6.5

2 release files

0.6.4

2 release files

0.6.3

2 release files

0.6.2

2 release files

0.6.1

2 release files

0.6.0

3 release files

0.5.1

2 release files

0.5.0

2 release files

0.4.4

2 release files

0.4.3

2 release files

0.4.2

2 release files

0.4.1

2 release files

0.4.0

2 release files

0.3.5

2 release files

0.3.4

2 release files

0.3.3

2 release files

0.3.2

1 release file

0.3.1

2 release files

0.3.0

1 release file

0.2.12

2 release files

0.2.11

2 release files

0.2.10

2 release files

0.2.9

2 release files

0.2.8

2 release files

0.2.7

2 release files

0.2.6

2 release files

0.2.5

2 release files

0.2.4

2 release files

0.2.3

3 release files

0.2.2

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.1

2 release files

0.1.0

2 release files

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