ovos-skill-fallback-hivemind


Nameovos-skill-fallback-hivemind JSON
Version 0.0.0a10 PyPI version JSON
download
home_pagehttps://github.com/JarbasHiveMind/ovos-skill-fallback-hivemind
Summaryovos HiveMind skill
upload_time2024-05-21 13:52:57
maintainerNone
docs_urlNone
authorJarbasAi
requires_pythonNone
licenseApache-2.0
keywords ovos skill plugin
VCS
bugtrack_url
requirements ovos-utils ovos_workshop ovos-plugin-manager ovos-translate-server-plugin hivemind_bus_client
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # HiveMind Fallback Skill

When in doubt, ask a smarter OVOS install

> NOTE: this repository eventually will be converted from a FallbackSkill into a pipeline plugin

## Configuration

Under skill settings (`~/.config/mycroft/skills/skill-ovos-fallback-hivemind.openvoiceos/settings.json`) you can tweak some parameters for HiveMind Skill.

```json
{
  "name": "HiveMind",
  "confirmation": true,
  "slave_mode": false,
  "allow_selfsigned": false
}
```

| Option             | Value      | Description                                                                                                                                    |
|--------------------|------------|------------------------------------------------------------------------------------------------------------------------------------------------|
| `name`             | `HiveMind` | Name to give to the HiveMind AI assistant in the confirmation dialog                                                                           |
| `confirmation`     | `true`     | Spoken confirmation will be triggered when a request is sent HiveMind                                                                          |
| `allow_selfsigned` | `false`    | Allow self signed SSL certificates ofr HiveMind connection                                                                                     |
| `slave_mode`       | `false`    | In slave mode HiveMind master receives all bus messages for passive monitoring and will be able to inject arbitrary messages into the OVOS bus |


## HiveMind Setup

You need to register the skill in the HiveMind server
```bash
$ hivemind-core add-client
Credentials added to database!

Node ID: 2
Friendly Name: HiveMind-Node-2
Access Key: 5a9e580a2773a262cbb23fe9759881ff
Password: 9b247ca66c7cd2b6388ad49ca504279d
Encryption Key: 4185240103de0770
WARNING: Encryption Key is deprecated, only use if your client does not support password
```

And then set the identity file in the satellite device (where the skill will run)
```bash
$ hivemind-client set-identity --key 5a9e580a2773a262cbb23fe9759881ff --password 9b247ca66c7cd2b6388ad49ca504279d --host 0.0.0.0 --port 5678 --siteid test
identity saved: /home/miro/.config/hivemind/_identity.json
```

check the created identity file if you like
```bash
$ cat ~/.config/hivemind/_identity.json
{
    "password": "9b247ca66c7cd2b6388ad49ca504279d",
    "access_key": "5a9e580a2773a262cbb23fe9759881ff",
    "site_id": "test",
    "default_port": 5678,
    "default_master": "ws://0.0.0.0"
}
```

test that a connection is possible using the identity file
```bash
$ hivemind-client test-identity
(...)
2024-05-20 21:22:28.003 - OVOS - hivemind_bus_client.client:__init__:112 - INFO - Session ID: 34d75c93-4e65-4ea9-b5f4-87169dcfda01
(...)
== Identity successfully connected to HiveMind!
```

If this step fails, your skill will also fail to connect to HiveMind


## Slave Mode

If running in **slave** mode skills can emit serialized [HiveMessages](https://github.com/JarbasHiveMind/hivemind-websocket-client/blob/dev/hivemind_bus_client/message.py) via the regular bus

This can be used to inject bus messages from one device messagebus to the other

from **slave** -> **master**: (might be rejected by `hivemind-core`)
- emit `"hive.send.upstream"` with message.data, `{"msg_type": "bus", "payload": message.serialize()}`

from **master** -> **slave**:
- emit `"hive.send.downstream"` with message.data, `{"msg_type": "bus", "payload": message.serialize()}`

see the [hivemind protocol](https://jarbashivemind.github.io/HiveMind-community-docs/04_protocol) for more details on valid payloads

> NOTE: this is what enables [nested hives](https://jarbashivemind.github.io/HiveMind-community-docs/15_nested/), a device can be both a **master** (by running `hivemind-core`) and a **slave** (by running this repo)



            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/JarbasHiveMind/ovos-skill-fallback-hivemind",
    "name": "ovos-skill-fallback-hivemind",
    "maintainer": null,
    "docs_url": null,
    "requires_python": null,
    "maintainer_email": null,
    "keywords": "ovos skill plugin",
    "author": "JarbasAi",
    "author_email": "jarbasai@mailfence.com",
    "download_url": null,
    "platform": null,
    "description": "# HiveMind Fallback Skill\n\nWhen in doubt, ask a smarter OVOS install\n\n> NOTE: this repository eventually will be converted from a FallbackSkill into a pipeline plugin\n\n## Configuration\n\nUnder skill settings (`~/.config/mycroft/skills/skill-ovos-fallback-hivemind.openvoiceos/settings.json`) you can tweak some parameters for HiveMind Skill.\n\n```json\n{\n  \"name\": \"HiveMind\",\n  \"confirmation\": true,\n  \"slave_mode\": false,\n  \"allow_selfsigned\": false\n}\n```\n\n| Option             | Value      | Description                                                                                                                                    |\n|--------------------|------------|------------------------------------------------------------------------------------------------------------------------------------------------|\n| `name`             | `HiveMind` | Name to give to the HiveMind AI assistant in the confirmation dialog                                                                           |\n| `confirmation`     | `true`     | Spoken confirmation will be triggered when a request is sent HiveMind                                                                          |\n| `allow_selfsigned` | `false`    | Allow self signed SSL certificates ofr HiveMind connection                                                                                     |\n| `slave_mode`       | `false`    | In slave mode HiveMind master receives all bus messages for passive monitoring and will be able to inject arbitrary messages into the OVOS bus |\n\n\n## HiveMind Setup\n\nYou need to register the skill in the HiveMind server\n```bash\n$ hivemind-core add-client\nCredentials added to database!\n\nNode ID: 2\nFriendly Name: HiveMind-Node-2\nAccess Key: 5a9e580a2773a262cbb23fe9759881ff\nPassword: 9b247ca66c7cd2b6388ad49ca504279d\nEncryption Key: 4185240103de0770\nWARNING: Encryption Key is deprecated, only use if your client does not support password\n```\n\nAnd then set the identity file in the satellite device (where the skill will run)\n```bash\n$ hivemind-client set-identity --key 5a9e580a2773a262cbb23fe9759881ff --password 9b247ca66c7cd2b6388ad49ca504279d --host 0.0.0.0 --port 5678 --siteid test\nidentity saved: /home/miro/.config/hivemind/_identity.json\n```\n\ncheck the created identity file if you like\n```bash\n$ cat ~/.config/hivemind/_identity.json\n{\n    \"password\": \"9b247ca66c7cd2b6388ad49ca504279d\",\n    \"access_key\": \"5a9e580a2773a262cbb23fe9759881ff\",\n    \"site_id\": \"test\",\n    \"default_port\": 5678,\n    \"default_master\": \"ws://0.0.0.0\"\n}\n```\n\ntest that a connection is possible using the identity file\n```bash\n$ hivemind-client test-identity\n(...)\n2024-05-20 21:22:28.003 - OVOS - hivemind_bus_client.client:__init__:112 - INFO - Session ID: 34d75c93-4e65-4ea9-b5f4-87169dcfda01\n(...)\n== Identity successfully connected to HiveMind!\n```\n\nIf this step fails, your skill will also fail to connect to HiveMind\n\n\n## Slave Mode\n\nIf running in **slave** mode skills can emit serialized [HiveMessages](https://github.com/JarbasHiveMind/hivemind-websocket-client/blob/dev/hivemind_bus_client/message.py) via the regular bus\n\nThis can be used to inject bus messages from one device messagebus to the other\n\nfrom **slave** -> **master**: (might be rejected by `hivemind-core`)\n- emit `\"hive.send.upstream\"` with message.data, `{\"msg_type\": \"bus\", \"payload\": message.serialize()}`\n\nfrom **master** -> **slave**:\n- emit `\"hive.send.downstream\"` with message.data, `{\"msg_type\": \"bus\", \"payload\": message.serialize()}`\n\nsee the [hivemind protocol](https://jarbashivemind.github.io/HiveMind-community-docs/04_protocol) for more details on valid payloads\n\n> NOTE: this is what enables [nested hives](https://jarbashivemind.github.io/HiveMind-community-docs/15_nested/), a device can be both a **master** (by running `hivemind-core`) and a **slave** (by running this repo)\n\n\n",
    "bugtrack_url": null,
    "license": "Apache-2.0",
    "summary": "ovos HiveMind skill",
    "version": "0.0.0a10",
    "project_urls": {
        "Homepage": "https://github.com/JarbasHiveMind/ovos-skill-fallback-hivemind"
    },
    "split_keywords": [
        "ovos",
        "skill",
        "plugin"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "d142dd8be39a95c0cc5787419824071924960ad371b547101916bfd70f8bb221",
                "md5": "54fdae1f0ca0e688548d10718274b213",
                "sha256": "fc265f24a479dcb2b73f069f1f64e7db007a8a8d73653f1c0cebe6b8b600dd9f"
            },
            "downloads": -1,
            "filename": "ovos_skill_fallback_hivemind-0.0.0a10-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "54fdae1f0ca0e688548d10718274b213",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 21151,
            "upload_time": "2024-05-21T13:52:57",
            "upload_time_iso_8601": "2024-05-21T13:52:57.890315Z",
            "url": "https://files.pythonhosted.org/packages/d1/42/dd8be39a95c0cc5787419824071924960ad371b547101916bfd70f8bb221/ovos_skill_fallback_hivemind-0.0.0a10-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-05-21 13:52:57",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "JarbasHiveMind",
    "github_project": "ovos-skill-fallback-hivemind",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [
        {
            "name": "ovos-utils",
            "specs": [
                [
                    "~=",
                    "0.0"
                ],
                [
                    ">=",
                    "0.0.28"
                ]
            ]
        },
        {
            "name": "ovos_workshop",
            "specs": [
                [
                    "~=",
                    "0.0"
                ],
                [
                    ">=",
                    "0.0.11"
                ]
            ]
        },
        {
            "name": "ovos-plugin-manager",
            "specs": [
                [
                    "~=",
                    "0.0"
                ],
                [
                    ">=",
                    "0.0.26a9"
                ]
            ]
        },
        {
            "name": "ovos-translate-server-plugin",
            "specs": []
        },
        {
            "name": "hivemind_bus_client",
            "specs": [
                [
                    ">=",
                    "0.0.4a22"
                ]
            ]
        }
    ],
    "lcname": "ovos-skill-fallback-hivemind"
}
        
Elapsed time: 0.35718s