{"id":39675824,"url":"https://github.com/palazzem/econnect-python","last_synced_at":"2026-01-18T09:46:01.373Z","repository":{"id":47754703,"uuid":"167253171","full_name":"palazzem/econnect-python","owner":"palazzem","description":"API adapter used to control programmatically an Elmo alarm system","archived":false,"fork":false,"pushed_at":"2025-04-28T08:51:04.000Z","size":338,"stargazers_count":9,"open_issues_count":4,"forks_count":4,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-10-29T05:16:00.152Z","etag":null,"topics":["alarm-system","econnect","home-automation","python","python3"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/palazzem.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2019-01-23T20:58:42.000Z","updated_at":"2025-06-19T17:31:11.000Z","dependencies_parsed_at":"2024-05-31T15:15:04.642Z","dependency_job_id":"483d52d8-a593-48ea-9018-bc6f66391cb0","html_url":"https://github.com/palazzem/econnect-python","commit_stats":{"total_commits":232,"total_committers":7,"mean_commits":"33.142857142857146","dds":0.4094827586206896,"last_synced_commit":"50fc65365005d3341e36d12c18158350606136c2"},"previous_names":["palazzem/elmo-alerting"],"tags_count":21,"template":false,"template_full_name":null,"purl":"pkg:github/palazzem/econnect-python","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/palazzem%2Feconnect-python","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/palazzem%2Feconnect-python/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/palazzem%2Feconnect-python/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/palazzem%2Feconnect-python/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/palazzem","download_url":"https://codeload.github.com/palazzem/econnect-python/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/palazzem%2Feconnect-python/sbom","scorecard":{"id":718247,"data":{"date":"2025-08-11","repo":{"name":"github.com/palazzem/econnect-python","commit":"df9726fc7376251ed02d8859197eda318981f252"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":4.8,"checks":[{"name":"Code-Review","score":1,"reason":"Found 5/30 approved changesets -- score normalized to 1","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Token-Permissions","score":10,"reason":"GitHub workflow tokens follow principle of least privilege","details":["Info: topLevel 'contents' permission set to 'read': .github/workflows/building.yaml:11","Info: topLevel 'contents' permission set to 'read': .github/workflows/linting.yaml:11","Info: topLevel 'contents' permission set to 'read': .github/workflows/testing.yaml:11","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/building.yaml:23: update your workflow using https://app.stepsecurity.io/secureworkflow/palazzem/econnect-python/building.yaml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/building.yaml:26: update your workflow using https://app.stepsecurity.io/secureworkflow/palazzem/econnect-python/building.yaml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/linting.yaml:23: update your workflow using https://app.stepsecurity.io/secureworkflow/palazzem/econnect-python/linting.yaml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/linting.yaml:26: update your workflow using https://app.stepsecurity.io/secureworkflow/palazzem/econnect-python/linting.yaml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/testing.yaml:25: update your workflow using https://app.stepsecurity.io/secureworkflow/palazzem/econnect-python/testing.yaml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/testing.yaml:28: update your workflow using https://app.stepsecurity.io/secureworkflow/palazzem/econnect-python/testing.yaml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/testing.yaml:46: update your workflow using https://app.stepsecurity.io/secureworkflow/palazzem/econnect-python/testing.yaml/main?enable=pin","Warn: pipCommand not pinned by hash: .github/workflows/building.yaml:33","Warn: pipCommand not pinned by hash: .github/workflows/building.yaml:34","Warn: pipCommand not pinned by hash: .github/workflows/building.yaml:41","Warn: pipCommand not pinned by hash: .github/workflows/linting.yaml:32","Warn: pipCommand not pinned by hash: .github/workflows/linting.yaml:33","Warn: pipCommand not pinned by hash: .github/workflows/testing.yaml:39","Warn: pipCommand not pinned by hash: .github/workflows/testing.yaml:40","Info:   0 out of   6 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   1 third-party GitHubAction dependencies pinned","Info:   0 out of   7 pipCommand dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: BSD 3-Clause \"New\" or \"Revised\" License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":3,"reason":"branch protection is not maximal on development and all release branches","details":["Info: 'allow deletion' disabled on branch 'main'","Info: 'force pushes' disabled on branch 'main'","Warn: branch 'main' does not require approvers","Warn: codeowners review is not required on branch 'main'","Info: status check found to merge onto on branch 'main'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 30 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-22T10:24:33.159Z","repository_id":47754703,"created_at":"2025-08-22T10:24:33.159Z","updated_at":"2025-08-22T10:24:33.159Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28534175,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-18T00:39:45.795Z","status":"online","status_checked_at":"2026-01-18T02:00:07.578Z","response_time":98,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["alarm-system","econnect","home-automation","python","python3"],"created_at":"2026-01-18T09:46:01.226Z","updated_at":"2026-01-18T09:46:01.358Z","avatar_url":"https://github.com/palazzem.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# E-connect Python API\n\n[![Testing](https://github.com/palazzem/econnect-python/actions/workflows/testing.yaml/badge.svg)](https://github.com/palazzem/econnect-python/actions/workflows/testing.yaml)\n[![Linting](https://github.com/palazzem/econnect-python/actions/workflows/linting.yaml/badge.svg)](https://github.com/palazzem/econnect-python/actions/workflows/linting.yaml)\n[![Building](https://github.com/palazzem/econnect-python/actions/workflows/building.yaml/badge.svg)](https://github.com/palazzem/econnect-python/actions/workflows/building.yaml)\n[![Coverage Status](https://coveralls.io/repos/github/palazzem/econnect-python/badge.svg?branch=main)](https://coveralls.io/github/palazzem/econnect-python?branch=main)\n[![PyPI version](https://badge.fury.io/py/econnect-python.svg)](https://badge.fury.io/py/econnect-python)\n\n`econnect-python` is an API adapter used to control programmatically an Elmo-like alarm system.\nThrough a generic configuration, the client allows:\n\n* Retrieving access tokens to make API calls\n* Obtaining/releasing the system `Lock()` to have exclusive control of the system\n* Arm/disarm all the alarms registered in the system\n* Query the system and get the status of your sectors and inputs\n\n## Requirements\n\n* Python 3.8+\n* `requests`\n\n## Supported Systems\n\nThis package targets Elmo-like alarm systems. The following systems are known to work:\n- [Elmo e-Connect](https://e-connect.elmospa.com/)\n- [IESS Metronet](https://www.iessonline.com/)\n\n## Getting Started\n\nThis package is available on PyPI:\n\n```bash\n$ pip install econnect-python\n```\n\n### Usage\n\n```python\nfrom elmo import query\nfrom elmo.api.client import ElmoClient\n\n# Initialize a new client to authenticate your connection\n# and retrieve an access token used for the entire session.\nclient = ElmoClient()\nclient.auth(\"username\", \"password\")\n\n# To arm/disarm the system you must gain the exclusive Lock()\nwith client.lock(\"secret-code\") as c:\n    c.arm()                # Arm all alarms\n    c.disarm()             # Disarm all alarms\n    c.arm(sectors=[3, 4])  # Arm only sectors 3 and 4\n    c.disarm(sectors=[3])  # Disarm only sector 3\n\n# Query the system\nsectors = client.query(query.SECTORS)\ninputs = client.query(query.INPUTS)\n```\n\nThe access token is valid for 10 minutes, after which, you need to authenticate again to\nrefresh the token. Obtaining the lock via `client.lock(\"secret-code\")` is mandatory to arm or\ndisarm the system, otherwise the API returns `403`. `secret-code` is the numeric code you\nuse to arm/disarm the system from the alarm panel.\n\nOnce the lock is obtained, other clients cannot connect to the alarm system and only a\nmanual override on the terminal is allowed. Outside the context manager, the lock is\nautomatically released.\n\n### Connecting to Systems\n\nBy default, the `ElmoClient` constructor will automatically connect to the Elmo e-Connect\nsystem. However, if you need to connect to a different system, the `systems` module provides\na list of available alarm systems for you to choose from.\n\nHere's how you can use it:\n\n```python\nfrom elmo.api.client import ElmoClient\nfrom elmo.systems import ELMO_E_CONNECT, IESS_METRONET\n\n# Connect to the default Elmo e-Connect system\nclient = ElmoClient()\n\n# Explicitly connect to the Elmo e-Connect system\nclient = ElmoClient(base_url=ELMO_E_CONNECT)\n\n# Connect to the IESS Metronet system\nclient = ElmoClient(base_url=IESS_METRONET)\n```\n\nNote: The default constructor (with no parameters) remains unchanged to ensure backward compatibility and performs identically to the explicit call with `ELMO_E_CONNECT`.\n\n### Custom URLs\n\nIf `https://connect.elmospa.com` or `https://metronet.iessonline.com` are your authentication pages, no configuration\nis needed and you can skip this section.\n\nOn the other hand, if your authentication page is something similar to\n`https://connect3.elmospa.com/nwd`, you must configure your client as follows:\n\n```python\nfrom elmo.api.client import ElmoClient\n\n# Override the default URL and domain\nclient = ElmoClient(base_url=\"https://connect3.elmospa.com\", domain=\"nwd\")\nclient.auth(\"username\", \"password\")\n```\n\nIf your `base_url` or `domain` are not properly set, your credentials will not work\nand you will get a `403 Client Error` as your username and password are not correct.\n\n## Contributing\n\nWe are very open to the community's contributions - be it a quick fix of a typo, or a completely new feature!\nYou don't need to be a Python expert to provide meaningful improvements. To learn how to get started, check\nout our [Contributor Guidelines](https://github.com/palazzem/econnect-python/blob/main/CONTRIBUTING.md) first,\nand ask for help in our [Discord channel](https://discord.gg/NSmAPWw8tE) if you have questions.\n\n## Development\n\nWe welcome external contributions, even though the project was initially intended for personal use. If you think some\nparts could be exposed with a more generic interface, please open a [GitHub issue](https://github.com/palazzem/econnect-python/issues)\nto discuss your suggestion.\n\n### Dev Environment\n\nTo create a virtual environment and install the project and its dependencies, execute the following commands in your\nterminal:\n\n```bash\n# Create and activate a new virtual environment\npython3 -m venv venv\nsource venv/bin/activate\n\n# Upgrade pip and install all projects and their dependencies\npip install --upgrade pip\npip install -e '.[all]'\n\n# Install pre-commit hooks\npre-commit install\n```\n\n### Coding Guidelines\n\nTo maintain a consistent codebase, we utilize [flake8][1] and [black][2]. Consistency is crucial as it\nhelps readability, reduces errors, and facilitates collaboration among developers.\n\nTo ensure that every commit adheres to our coding standards, we've integrated [pre-commit hooks][3].\nThese hooks automatically run `flake8` and `black` before each commit, ensuring that all code changes\nare automatically checked and formatted.\n\nFor details on how to set up your development environment to make use of these hooks, please refer to the\n[Development][4] section of our documentation.\n\n[1]: https://pypi.org/project/flake8/\n[2]: https://github.com/ambv/black\n[3]: https://pre-commit.com/\n[4]: https://github.com/palazzem/econnect-python#development\n\n### Testing\n\nEnsuring the robustness and reliability of our code is paramount. Therefore, all contributions must include\nat least one test to verify the intended behavior.\n\nTo run tests locally, execute the test suite using `pytest` with the following command:\n```bash\npytest tests/ --cov --cov-branch -vv\n```\n\nFor a comprehensive test that mirrors the Continuous Integration (CI) environment across all supported Python\nversions, use `tox`:\n```bash\ntox\n```\n\n**Note**: To use `tox` effectively, ensure you have all the necessary Python versions installed. If any\nversions are missing, `tox` will provide relevant warnings.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpalazzem%2Feconnect-python","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpalazzem%2Feconnect-python","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpalazzem%2Feconnect-python/lists"}