huber


Namehuber JSON
Version 0.6.0 PyPI version JSON
download
home_pagehttp://github.com/numat/huber/
SummaryPython driver for Huber recirculating baths.
upload_time2024-02-05 19:50:46
maintainerAlex Ruddick
docs_urlNone
authorPatrick Fuller
requires_python
licenseGPLv2
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            huber
=====

Ethernet driver and command-line tool for Huber baths.

<p align="center">
  <img src="http://www.huber-online.com/images/product_img/group_3.06.jpg" />
</p>

Installation
============

```
pip install huber
```

Usage
=====

### Command Line

For basic tasks, this driver includes a command-line interface. Read the help
for more.

```
huber --help
```

### Python

For more complex projects, use python to automate your workflow. *This
driver solely uses asynchronous Python ≥3.5.*

```python
import asyncio
from huber import Bath

async def get():
    async with Bath('192.168.1.100') as bath:
        print(await bath.get())

asyncio.run(get())
```

If the bath is communicating, this should print a dictionary of the form:

```python
{
    'on': False,               # Temperature control (+pump) active
    'temperature': {
        'bath': 23.49,         # Internal (bath) temperature, °C
        'setpoint': 20.0       # Temperature setpoint, °C
    },
    'pump': {
        'pressure': 0.0,       # Pump head pressure, mbar
        'speed': 0,            # Pump speed, rpm
        'setpoint': 0          # Pump speed setpoint, rpm
    },
    'status': {
        'circulating': False,  # True if device is circulating
        'controlling': False,  # True if temperature control is active
        'error': False,        # True if an uncleared error is present
        'pumping': False,      # True if pump is on
        'warning': False       # True if an uncleared warning is present
    },
    'fill': 0.0,               # Oil level, [0, 1]
    'maintenance': 338,        # Time until maintenance alarm, days
    'warning': {               # Only present if warning is detected
        'code': -1,
        'condition': '',
        'recovery': '',
        'type': ''
    },
    'error': {                 # Only present if error is detected
        'code': -1,
        'condition': '',
        'recovery': '',
        'type': ''
    }
}
```

The main `get` method strings together multiple TCP requests, and can take >0.5s
to run. If you don't want all the data, you should instead use the following:

```python
await bath.get_setpoint()             # °C
await bath.get_bath_temperature()     # °C
await bath.get_process_temperature()  # °C (optionally installed)
await bath.get_pressure()             # mbar
await bath.get_pump_speed()           # rpm
await bath.get_fill_level()           # [0, 1]
await bath.get_next_maintenance()     # days
await bath.get_status()               # boolean dictionary
await bath.get_warning()              # None or dictionary
await bath.get_error()                # None or dictionary
```

You can also start, stop, set temperature setpoint, and set pump speed.

```python
await bath.start()
await bath.stop()
await bath.set_setpoint(50)      # °C
await bath.set_pump_speed(2000)  # rpm
await bath.clear_warning()
await bath.clear_error()
```

Implementation
==============

This uses the PB method described in
[the manual](http://www.huber-online.com/download/manuals/Handbuch_Datenkommunikation_PB_en.pdf).
Note that this does not take advantage of the PB package commands, which would
cut down on the data transmission at the cost of extra bath configuration.
This also does not take advantage of the high-accuracy PB data transmission,
as its resolution is unnecessary in most use cases.

            

Raw data

            {
    "_id": null,
    "home_page": "http://github.com/numat/huber/",
    "name": "huber",
    "maintainer": "Alex Ruddick",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "alex@numat-tech.com",
    "keywords": "",
    "author": "Patrick Fuller",
    "author_email": "pat@numat-tech.com",
    "download_url": "https://files.pythonhosted.org/packages/bd/d4/95060be9a239f9fa8530dc1eeeb125a3445833aa6bfa988fc2164d26cb79/huber-0.6.0.tar.gz",
    "platform": null,
    "description": "huber\n=====\n\nEthernet driver and command-line tool for Huber baths.\n\n<p align=\"center\">\n  <img src=\"http://www.huber-online.com/images/product_img/group_3.06.jpg\" />\n</p>\n\nInstallation\n============\n\n```\npip install huber\n```\n\nUsage\n=====\n\n### Command Line\n\nFor basic tasks, this driver includes a command-line interface. Read the help\nfor more.\n\n```\nhuber --help\n```\n\n### Python\n\nFor more complex projects, use python to automate your workflow. *This\ndriver solely uses asynchronous Python \u22653.5.*\n\n```python\nimport asyncio\nfrom huber import Bath\n\nasync def get():\n    async with Bath('192.168.1.100') as bath:\n        print(await bath.get())\n\nasyncio.run(get())\n```\n\nIf the bath is communicating, this should print a dictionary of the form:\n\n```python\n{\n    'on': False,               # Temperature control (+pump) active\n    'temperature': {\n        'bath': 23.49,         # Internal (bath) temperature, \u00b0C\n        'setpoint': 20.0       # Temperature setpoint, \u00b0C\n    },\n    'pump': {\n        'pressure': 0.0,       # Pump head pressure, mbar\n        'speed': 0,            # Pump speed, rpm\n        'setpoint': 0          # Pump speed setpoint, rpm\n    },\n    'status': {\n        'circulating': False,  # True if device is circulating\n        'controlling': False,  # True if temperature control is active\n        'error': False,        # True if an uncleared error is present\n        'pumping': False,      # True if pump is on\n        'warning': False       # True if an uncleared warning is present\n    },\n    'fill': 0.0,               # Oil level, [0, 1]\n    'maintenance': 338,        # Time until maintenance alarm, days\n    'warning': {               # Only present if warning is detected\n        'code': -1,\n        'condition': '',\n        'recovery': '',\n        'type': ''\n    },\n    'error': {                 # Only present if error is detected\n        'code': -1,\n        'condition': '',\n        'recovery': '',\n        'type': ''\n    }\n}\n```\n\nThe main `get` method strings together multiple TCP requests, and can take >0.5s\nto run. If you don't want all the data, you should instead use the following:\n\n```python\nawait bath.get_setpoint()             # \u00b0C\nawait bath.get_bath_temperature()     # \u00b0C\nawait bath.get_process_temperature()  # \u00b0C (optionally installed)\nawait bath.get_pressure()             # mbar\nawait bath.get_pump_speed()           # rpm\nawait bath.get_fill_level()           # [0, 1]\nawait bath.get_next_maintenance()     # days\nawait bath.get_status()               # boolean dictionary\nawait bath.get_warning()              # None or dictionary\nawait bath.get_error()                # None or dictionary\n```\n\nYou can also start, stop, set temperature setpoint, and set pump speed.\n\n```python\nawait bath.start()\nawait bath.stop()\nawait bath.set_setpoint(50)      # \u00b0C\nawait bath.set_pump_speed(2000)  # rpm\nawait bath.clear_warning()\nawait bath.clear_error()\n```\n\nImplementation\n==============\n\nThis uses the PB method described in\n[the manual](http://www.huber-online.com/download/manuals/Handbuch_Datenkommunikation_PB_en.pdf).\nNote that this does not take advantage of the PB package commands, which would\ncut down on the data transmission at the cost of extra bath configuration.\nThis also does not take advantage of the high-accuracy PB data transmission,\nas its resolution is unnecessary in most use cases.\n",
    "bugtrack_url": null,
    "license": "GPLv2",
    "summary": "Python driver for Huber recirculating baths.",
    "version": "0.6.0",
    "project_urls": {
        "Homepage": "http://github.com/numat/huber/"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "362544a94dd2b6fb23e6e457ae5ccf6cb79eebae6028b1be0267db5bbf1ab355",
                "md5": "fa88164a63d46133af6e226f5a6b8afc",
                "sha256": "a09bbdae0e647ae60b56ebc8d94b28a6d4ad604819cee3887800e0823cf44807"
            },
            "downloads": -1,
            "filename": "huber-0.6.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "fa88164a63d46133af6e226f5a6b8afc",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 54920,
            "upload_time": "2024-02-05T19:50:44",
            "upload_time_iso_8601": "2024-02-05T19:50:44.616481Z",
            "url": "https://files.pythonhosted.org/packages/36/25/44a94dd2b6fb23e6e457ae5ccf6cb79eebae6028b1be0267db5bbf1ab355/huber-0.6.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "bdd495060be9a239f9fa8530dc1eeeb125a3445833aa6bfa988fc2164d26cb79",
                "md5": "2fc76280518120e3866ae04202662388",
                "sha256": "6b8a7bc0a3ec395754d376e5cdc8c57247b0c6ad6f15d097b463aaa0ed6b0f4a"
            },
            "downloads": -1,
            "filename": "huber-0.6.0.tar.gz",
            "has_sig": false,
            "md5_digest": "2fc76280518120e3866ae04202662388",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 55802,
            "upload_time": "2024-02-05T19:50:46",
            "upload_time_iso_8601": "2024-02-05T19:50:46.541461Z",
            "url": "https://files.pythonhosted.org/packages/bd/d4/95060be9a239f9fa8530dc1eeeb125a3445833aa6bfa988fc2164d26cb79/huber-0.6.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-02-05 19:50:46",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "numat",
    "github_project": "huber",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "huber"
}
        
Elapsed time: 0.17220s