Skip to main content

Python driver for Honeywell SPM Flex gas dectectors.

Project description

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.

Project details


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.0.tar.gz (3.5 kB view details)

Uploaded Source

Built Distribution

spmflex-0.1.0-py2.py3-none-any.whl (11.1 kB view details)

Uploaded Python 2Python 3

File details

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

File metadata

  • Download URL: spmflex-0.1.0.tar.gz
  • Upload date:
  • Size: 3.5 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.0.tar.gz
Algorithm Hash digest
SHA256 7b5e0e47764ceb1a3269806c216c47cb1748613477c3f2ea6595190ba4d4f1ae
MD5 0043786fabb417e4f83ce77db4bb776b
BLAKE2b-256 b82688a8b25e3aa2f2b23153a3f5db18190ecafeb9dc05923fc831ac0df56883

See more details on using hashes here.

File details

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

File metadata

  • Download URL: spmflex-0.1.0-py2.py3-none-any.whl
  • Upload date:
  • Size: 11.1 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.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 deb6aefa0ec19517235334d96c558d58ca8830f686d25a53d11ed0a5f8da2d16
MD5 bcf486ac26acb67d31b644a7cffe8091
BLAKE2b-256 fa0496e0de0fb60cf462cd64771a8fa40d8b05d4ca2b84d22a05bb3cb35f6464

See more details on using hashes here.

Supported by

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