Skip to main content
Donate to the Python Software Foundation or Purchase a PyCharm License to Benefit the PSF! Donate Now

Python driver for Honeywell SPM Flex gas dectectors.

Project description


Python ≥3.5 driver for Honeywell SPM Flex gas detectors.


pip install spmflex


Command Line

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

$ spmflex

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


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

import asyncio
from spmflex import GasDetector

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

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

    "concentration": 0.0,
    "connected": true,
    "fault": "No fault",
    "flow": 256,
    "gas": "AsH3 - Arsine",
    "high-alarm threshold": "5.0",
    "id": "SPMFLEX08000000",
    "ip": "",
    "life": 93.0,
    "low-alarm threshold": "2.5",
    "temperature": 0,
    "units": "ppb"

This is a cleaned-up version of the data returned. If you want to see all of it, set raw=True.

Project details

Release history Release notifications

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date
spmflex-0.1.0-py2.py3-none-any.whl (11.1 kB) Copy SHA256 hash SHA256 Wheel py2.py3
spmflex-0.1.0.tar.gz (3.5 kB) Copy SHA256 hash SHA256 Source None

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page