Skip to main content

spmflex

Python ≥3.5 driver for Honeywell SPM Flex gas detectors.

Installation

pip install spmflex

Usage

Command Line

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

$ spmflex 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 spmflex 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:

{
    "concentration": 0.0,
    "connected": true,
    "fault": "No fault",
    "flow": 256,
    "gas": "AsH3 - Arsine",
    "high-alarm threshold": "5.0",
    "id": "SPMFLEX08000000",
    "ip": "http://192.168.1.100/",
    "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.

Download files

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

Source Distribution

spmflex-0.1.1.tar.gz (3.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

spmflex-0.1.1-py2.py3-none-any.whl (11.2 kB view details)

Uploaded Python 2Python 3

File details

Details for the file spmflex-0.1.1.tar.gz.

File metadata

  • Download URL: spmflex-0.1.1.tar.gz
  • Upload date:
  • Size: 3.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.3

File hashes

Hashes for spmflex-0.1.1.tar.gz
Algorithm Hash digest
SHA256 20b06c1f207dc476d60c3b56718f9191d725db47b8eddf319236a6182431454c
MD5 36460dcac9df9562324ac04b26d205ed
BLAKE2b-256 54b193d1bcb0807dfabe58e8c68a689f1805bc237ecd12f7656b9c1d392228d4

See more details on using hashes here.

File details

Details for the file spmflex-0.1.1-py2.py3-none-any.whl.

File metadata

  • Download URL: spmflex-0.1.1-py2.py3-none-any.whl
  • Upload date:
  • Size: 11.2 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.3

File hashes

Hashes for spmflex-0.1.1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 ea4a9c7f67ab33db9636535d84c8939744d3855e055a348cda05fb2ce798bcab
MD5 26b3c25adf5f2c8565fabd27641dc541
BLAKE2b-256 88bdd263b52004592bb79ae59b0bb59461488d2fa0f0c46743ae34d78e5f6520

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 files

0.1.0

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page