mb8611


Namemb8611 JSON
Version 0.0.1 PyPI version JSON
download
home_pagehttps://github.com/Tatsh/mb8611
SummaryCLI tool for managing the Motorola MB8611 series modem and maybe other Motorola devices.
upload_time2023-12-09 09:04:28
maintainer
docs_urlNone
authorAndrew Udvare
requires_python>=3.11,<4
licenseMIT
keywords command line
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # MB8611 CLI

[![QA](https://github.com/Tatsh/mb8611/actions/workflows/qa.yml/badge.svg)](https://github.com/Tatsh/mb8611/actions/workflows/qa.yml)
[![Tests](https://github.com/Tatsh/mb8611/actions/workflows/tests.yml/badge.svg)](https://github.com/Tatsh/mb8611/actions/workflows/tests.yml)
[![Coverage Status](https://coveralls.io/repos/github/Tatsh/mb8611/badge.svg?branch=master)](https://coveralls.io/github/Tatsh/mb8611?branch=master)
[![Documentation Status](https://readthedocs.org/projects/mb8611/badge/?version=latest)](https://mb8611.readthedocs.io/en/latest/?badge=latest)
![PyPI - Version](https://img.shields.io/pypi/v/mb8611)
![GitHub tag (with filter)](https://img.shields.io/github/v/tag/Tatsh/mb8611)
![GitHub](https://img.shields.io/github/license/Tatsh/mb8611)
![GitHub commits since latest release (by SemVer including pre-releases)](https://img.shields.io/github/commits-since/Tatsh/mb8611/v0.0.1/master)

CLI tool and library for managing the Motorola MB8611 series modem and maybe other Motorola devices.

## Installation

### Poetry

```shell
poetry add mb8611
```

### Pip

```shell
pip install mb8611
```

## Command line usage

```plain
Usage: mb8611 [OPTIONS] {addr|address|clear-log|conn|connection|connection-
              info|conninfo|down|downstream|lag|lag-
              status|log|reboot|software|software-status|startup|startup-
              sequence|up|upstream}

  Main CLI.

Options:
  -H, --host TEXT      Host to connect to.
  -d, --debug          Enable debug level logging.
  -j, --json           Only output JSON. Encoded lists (tables) will still be
                       parsed.
  -p, --password TEXT  Administrator password.
  -u, --username TEXT  Administrator username.
  --help               Show this message and exit.
```

## Library usage

Refer to `mb8611.api` files for fields. Almost every field type is a string.

### Actions

- `GetHomeAddress`
- `GetHomeConnection`
- `GetMotoLagStatus`
- `GetMotoStatusConnectionInfo`
- `GetMotoStatusDownstreamChannelInfo`
- `GetMotoStatusLog`
- `GetMotoStatusLogXXX`
- `GetMotoStatusSecAccount`
- `GetMotoStatusSecXXX`
- `GetMotoStatusSoftware`
- `GetMotoStatusStartupSequence`
- `GetMotoStatusUpstreamChannelInfo`
- `GetNetworkModeSettings`

Some actions require a specific payload:

- `Login` — [`LoginPayload`](mb8611/api/login.py)
- `SetMotoLagStatus` — [`SetMotoLagStatusPayload`](mb8611/api/settings.py)
- `SetMotoStatusDSTargetFreq` — see [`SetMotoStatusDSTargetFreqPayload`](mb8611/api/settings.py)
- `SetStatusLogSettings` — see [`ClearLogPayload`](mb8611/api/settings.py)
- `SetStatusSecuritySettings` — see [`RebootPayload`](mb8611/api/settings.py)

### Example

```python
import pprint

from mb8611.client import Client

with Client(the_password) as client:
    addr = client.call_hnap('GetHomeAddress')
    # Fully typed dictionary
    assert addr['GetHomeAddressResponse']['GetHomeAddressResult'] == 'OK'
    pprint.pprint(addr)
```

`Client` implements a context manager. Calling `Client.login` unnecessary when using it with the
`with` statement.

```python
{'GetHomeAddressResponse': {'GetHomeAddressResult': 'OK',
                            'MotoHomeIpAddress': '...',
                            'MotoHomeIpv6Address': '',
                            'MotoHomeMacAddress': '...',
                            'MotoHomeSfVer': '8611-19.2.18'}}
```

## Examples

### Check if the modem is online

```shell
mb8611 --output-json conn | jq -r .MotoHomeOnline
```

```plain
Connected
```

### Display the modem's Upstream Bonded Channels

The output is a list of lists. Columns are:

- Channel
- Lock Status
- Channel Type
- Channel ID
- Symb. Rate (Ksym/sec)
- Freq. (MHz)
- Pwr (dBmV)

```shell
mb8611 up -j | jq -r '.MotoConnUpstreamChannel[]|@csv' | tr -d '"' | tabulate -s ','
```

```plain
-  ------  ------  -  ----  ----  --
1  Locked  SC-QAM  1  5120  17.6  43
2  Locked  SC-QAM  2  5120  24    47
3  Locked  SC-QAM  3  5120  30.4  43
4  Locked  SC-QAM  4  5120  36.8  44
-  ------  ------  -  ----  ----  --
```

## Known issues

**Note:** The modem does not require any authentication for the currently working actions such as
`addr`.

The following actions do not work as they require proper authentication (these return `'UN-AUTH'`
at this time):

- `clear-log` / `SetStatusLogSettings`
- `SetStatusSecuritySettings`
- `SetMotoLagStatus`
- `SetMotoStatusDSTargetFreq`

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/Tatsh/mb8611",
    "name": "mb8611",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.11,<4",
    "maintainer_email": "",
    "keywords": "command line",
    "author": "Andrew Udvare",
    "author_email": "audvare@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/85/3f/cfba8015acf323ff5f0a8af99ed1e73b256fd650d6aba4a16d099e8ac4d0/mb8611-0.0.1.tar.gz",
    "platform": null,
    "description": "# MB8611 CLI\n\n[![QA](https://github.com/Tatsh/mb8611/actions/workflows/qa.yml/badge.svg)](https://github.com/Tatsh/mb8611/actions/workflows/qa.yml)\n[![Tests](https://github.com/Tatsh/mb8611/actions/workflows/tests.yml/badge.svg)](https://github.com/Tatsh/mb8611/actions/workflows/tests.yml)\n[![Coverage Status](https://coveralls.io/repos/github/Tatsh/mb8611/badge.svg?branch=master)](https://coveralls.io/github/Tatsh/mb8611?branch=master)\n[![Documentation Status](https://readthedocs.org/projects/mb8611/badge/?version=latest)](https://mb8611.readthedocs.io/en/latest/?badge=latest)\n![PyPI - Version](https://img.shields.io/pypi/v/mb8611)\n![GitHub tag (with filter)](https://img.shields.io/github/v/tag/Tatsh/mb8611)\n![GitHub](https://img.shields.io/github/license/Tatsh/mb8611)\n![GitHub commits since latest release (by SemVer including pre-releases)](https://img.shields.io/github/commits-since/Tatsh/mb8611/v0.0.1/master)\n\nCLI tool and library for managing the Motorola MB8611 series modem and maybe other Motorola devices.\n\n## Installation\n\n### Poetry\n\n```shell\npoetry add mb8611\n```\n\n### Pip\n\n```shell\npip install mb8611\n```\n\n## Command line usage\n\n```plain\nUsage: mb8611 [OPTIONS] {addr|address|clear-log|conn|connection|connection-\n              info|conninfo|down|downstream|lag|lag-\n              status|log|reboot|software|software-status|startup|startup-\n              sequence|up|upstream}\n\n  Main CLI.\n\nOptions:\n  -H, --host TEXT      Host to connect to.\n  -d, --debug          Enable debug level logging.\n  -j, --json           Only output JSON. Encoded lists (tables) will still be\n                       parsed.\n  -p, --password TEXT  Administrator password.\n  -u, --username TEXT  Administrator username.\n  --help               Show this message and exit.\n```\n\n## Library usage\n\nRefer to `mb8611.api` files for fields. Almost every field type is a string.\n\n### Actions\n\n- `GetHomeAddress`\n- `GetHomeConnection`\n- `GetMotoLagStatus`\n- `GetMotoStatusConnectionInfo`\n- `GetMotoStatusDownstreamChannelInfo`\n- `GetMotoStatusLog`\n- `GetMotoStatusLogXXX`\n- `GetMotoStatusSecAccount`\n- `GetMotoStatusSecXXX`\n- `GetMotoStatusSoftware`\n- `GetMotoStatusStartupSequence`\n- `GetMotoStatusUpstreamChannelInfo`\n- `GetNetworkModeSettings`\n\nSome actions require a specific payload:\n\n- `Login` \u2014 [`LoginPayload`](mb8611/api/login.py)\n- `SetMotoLagStatus` \u2014 [`SetMotoLagStatusPayload`](mb8611/api/settings.py)\n- `SetMotoStatusDSTargetFreq` \u2014 see [`SetMotoStatusDSTargetFreqPayload`](mb8611/api/settings.py)\n- `SetStatusLogSettings` \u2014 see [`ClearLogPayload`](mb8611/api/settings.py)\n- `SetStatusSecuritySettings` \u2014 see [`RebootPayload`](mb8611/api/settings.py)\n\n### Example\n\n```python\nimport pprint\n\nfrom mb8611.client import Client\n\nwith Client(the_password) as client:\n    addr = client.call_hnap('GetHomeAddress')\n    # Fully typed dictionary\n    assert addr['GetHomeAddressResponse']['GetHomeAddressResult'] == 'OK'\n    pprint.pprint(addr)\n```\n\n`Client` implements a context manager. Calling `Client.login` unnecessary when using it with the\n`with` statement.\n\n```python\n{'GetHomeAddressResponse': {'GetHomeAddressResult': 'OK',\n                            'MotoHomeIpAddress': '...',\n                            'MotoHomeIpv6Address': '',\n                            'MotoHomeMacAddress': '...',\n                            'MotoHomeSfVer': '8611-19.2.18'}}\n```\n\n## Examples\n\n### Check if the modem is online\n\n```shell\nmb8611 --output-json conn | jq -r .MotoHomeOnline\n```\n\n```plain\nConnected\n```\n\n### Display the modem's Upstream Bonded Channels\n\nThe output is a list of lists. Columns are:\n\n- Channel\n- Lock Status\n- Channel Type\n- Channel ID\n- Symb. Rate (Ksym/sec)\n- Freq. (MHz)\n- Pwr (dBmV)\n\n```shell\nmb8611 up -j | jq -r '.MotoConnUpstreamChannel[]|@csv' | tr -d '\"' | tabulate -s ','\n```\n\n```plain\n-  ------  ------  -  ----  ----  --\n1  Locked  SC-QAM  1  5120  17.6  43\n2  Locked  SC-QAM  2  5120  24    47\n3  Locked  SC-QAM  3  5120  30.4  43\n4  Locked  SC-QAM  4  5120  36.8  44\n-  ------  ------  -  ----  ----  --\n```\n\n## Known issues\n\n**Note:** The modem does not require any authentication for the currently working actions such as\n`addr`.\n\nThe following actions do not work as they require proper authentication (these return `'UN-AUTH'`\nat this time):\n\n- `clear-log` / `SetStatusLogSettings`\n- `SetStatusSecuritySettings`\n- `SetMotoLagStatus`\n- `SetMotoStatusDSTargetFreq`\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "CLI tool for managing the Motorola MB8611 series modem and maybe other Motorola devices.",
    "version": "0.0.1",
    "project_urls": {
        "Documentation": "https://mb8611.readthedocs.io/",
        "Homepage": "https://github.com/Tatsh/mb8611",
        "Repository": "https://github.com/Tatsh/mb8611"
    },
    "split_keywords": [
        "command",
        "line"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "fe3c1afea5ffa6726cd775f963477f0e8dbae93541d3efaeba78f617ab3e0835",
                "md5": "c015d835d369a67d247787c88835bf9f",
                "sha256": "ea1c0334a065d524ff7693e8b421ad514edf118833f5630c42c400f2d2641d03"
            },
            "downloads": -1,
            "filename": "mb8611-0.0.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "c015d835d369a67d247787c88835bf9f",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.11,<4",
            "size": 13661,
            "upload_time": "2023-12-09T09:04:21",
            "upload_time_iso_8601": "2023-12-09T09:04:21.537648Z",
            "url": "https://files.pythonhosted.org/packages/fe/3c/1afea5ffa6726cd775f963477f0e8dbae93541d3efaeba78f617ab3e0835/mb8611-0.0.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "853fcfba8015acf323ff5f0a8af99ed1e73b256fd650d6aba4a16d099e8ac4d0",
                "md5": "c0ac4172f7b3538ddf0fdac866731b51",
                "sha256": "26a34f0bdc156de061c87c375613099124f9c366fa7f7beb0fe9ba3377719e84"
            },
            "downloads": -1,
            "filename": "mb8611-0.0.1.tar.gz",
            "has_sig": false,
            "md5_digest": "c0ac4172f7b3538ddf0fdac866731b51",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.11,<4",
            "size": 14061,
            "upload_time": "2023-12-09T09:04:28",
            "upload_time_iso_8601": "2023-12-09T09:04:28.620388Z",
            "url": "https://files.pythonhosted.org/packages/85/3f/cfba8015acf323ff5f0a8af99ed1e73b256fd650d6aba4a16d099e8ac4d0/mb8611-0.0.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-12-09 09:04:28",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "Tatsh",
    "github_project": "mb8611",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "mb8611"
}
        
Elapsed time: 1.82866s