{"id":15167079,"url":"https://github.com/keslerm/mqtt_return","last_synced_at":"2025-04-09T03:26:46.710Z","repository":{"id":64733897,"uuid":"577491192","full_name":"keslerm/mqtt_return","owner":"keslerm","description":"SaltStack Extension for adding a MQTT or AWS IoT broker as an event returner","archived":false,"fork":false,"pushed_at":"2022-12-14T14:43:46.000Z","size":60,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-01T21:33:54.014Z","etag":null,"topics":["mqtt","saltstack","saltstack-extension"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/keslerm.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-12-12T21:23:48.000Z","updated_at":"2022-12-14T14:45:21.000Z","dependencies_parsed_at":"2022-12-14T20:24:12.371Z","dependency_job_id":null,"html_url":"https://github.com/keslerm/mqtt_return","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/keslerm%2Fmqtt_return","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/keslerm%2Fmqtt_return/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/keslerm%2Fmqtt_return/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/keslerm%2Fmqtt_return/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/keslerm","download_url":"https://codeload.github.com/keslerm/mqtt_return/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247970553,"owners_count":21026166,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["mqtt","saltstack","saltstack-extension"],"created_at":"2024-09-27T05:24:27.024Z","updated_at":"2025-04-09T03:26:46.690Z","avatar_url":"https://github.com/keslerm.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# mqtt_return\n\nA useful Salt Event returner for publishing messages to MQTT or AWS IoT\n\n## Quickstart\n\nTo get started with your new project:\n\n    # Create a new venv\n    python3 -m venv env --prompt mqtt_return\n    source env/bin/activate\n\n    # On mac, you may need to upgrade pip\n    python -m pip install --upgrade pip\n\n    # On WSL or some flavors of linux you may need to install the `enchant`\n    # library in order to build the docs\n    sudo apt-get install -y enchant\n\n    # Install extension + test/dev/doc dependencies into your environment\n    python -m pip install -e .[tests,dev,docs]\n\n    # Run tests!\n    python -m nox -e tests-3\n\n    # skip requirements install for next time\n    export SKIP_REQUIREMENTS_INSTALL=1\n\n    # Build the docs, serve, and view in your web browser:\n    python -m nox -e docs \u0026\u0026 (cd docs/_build/html; python -m webbrowser localhost:8000; python -m http.server; cd -)\n\n    # Run the example function\n    salt-call --local mqtt_return.example_function text=\"Happy Hacking!\"\n\n\n## Configuration\n\nFor publishing to a standard MQTT broker\n\n```yaml\nevent_return: [mqtt_return]\n\nreturner.mqtt_return.output: mqtt\n\nreturner.mqtt_return.endpoint: mqtt\nreturner.mqtt_return.port: 1883\nreturner.mqtt_return.topic_prefix: \"example/prefix\"\n```\n\nFor publishing to AWS IoT Core MQTT broker using boto3 and the iot-data client\n\n```yaml\nevent_return: [mqtt_return]\n\nreturner.mqtt_return.output: awsiot\n\nreturner.mqtt_return.endpoint: https://example.iot.amazonaws.com\nreturner.mqtt_return.topic_prefix: \"example/prefix\"\nreturner.mqtt_return.aws_access_key_id: \"aaaaa\"\nreturner.mqtt_return.aws_secret_access_key: \"aaaaa\"\n```\n\n\n## Topic Re-writing\n\nAllows you to re-write the topics with Regex and Python Substr\n\nFor example to remove the `salt/` prefix from the topics:\n\n```yaml\nreturner.mqtt_return.topic_rewrite_regex: \"salt/\"\nreturner.mqtt_return.topic_rewrite_replace: \"\"\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkeslerm%2Fmqtt_return","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkeslerm%2Fmqtt_return","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkeslerm%2Fmqtt_return/lists"}