pax_global_header 0000666 0000000 0000000 00000000064 14645513034 0014517 g ustar 00root root 0000000 0000000 52 comment=5d87bfb322da283e514adce01512324c7f63d9e5 pyenphase-pyenphase-1bfa6dd/ 0000775 0000000 0000000 00000000000 14645513034 0016256 5 ustar 00root root 0000000 0000000 pyenphase-pyenphase-1bfa6dd/.all-contributorsrc 0000664 0000000 0000000 00000000440 14645513034 0022105 0 ustar 00root root 0000000 0000000 { "projectName": "pyenphase", "projectOwner": "pyenphase", "repoType": "github", "repoHost": "https://github.com", "files": ["README.md"], "imageSize": 80, "commit": true, "commitConvention": "angular", "contributors": [], "contributorsPerLine": 7, "skipCi": true } pyenphase-pyenphase-1bfa6dd/.copier-answers.yml 0000664 0000000 0000000 00000000765 14645513034 0022030 0 ustar 00root root 0000000 0000000 # Changes here will be overwritten by Copier _commit: 038bdbe _src_path: gh:browniebroke/pypackage-template add_me_as_contributor: false copyright_year: '2023' documentation: true email: cgarwood@gmail.com full_name: pyenphase github_username: pyenphase initial_commit: true open_source_license: MIT package_name: pyenphase project_name: pyenphase project_short_description: Library to control enphase envoy project_slug: pyenphase run_poetry_install: true setup_github: false setup_pre_commit: true pyenphase-pyenphase-1bfa6dd/.editorconfig 0000664 0000000 0000000 00000000444 14645513034 0020735 0 ustar 00root root 0000000 0000000 # http://editorconfig.org root = true [*] indent_style = space indent_size = 4 trim_trailing_whitespace = true insert_final_newline = true charset = utf-8 end_of_line = lf [*.bat] indent_style = tab end_of_line = crlf [LICENSE] insert_final_newline = false [Makefile] indent_style = tab pyenphase-pyenphase-1bfa6dd/.flake8 0000664 0000000 0000000 00000000056 14645513034 0017432 0 ustar 00root root 0000000 0000000 [flake8] exclude = docs max-line-length = 188 pyenphase-pyenphase-1bfa6dd/.github/ 0000775 0000000 0000000 00000000000 14645513034 0017616 5 ustar 00root root 0000000 0000000 pyenphase-pyenphase-1bfa6dd/.github/FUNDING.yml 0000664 0000000 0000000 00000000026 14645513034 0021431 0 ustar 00root root 0000000 0000000 github: ["pyenphase"] pyenphase-pyenphase-1bfa6dd/.github/ISSUE_TEMPLATE/ 0000775 0000000 0000000 00000000000 14645513034 0022001 5 ustar 00root root 0000000 0000000 pyenphase-pyenphase-1bfa6dd/.github/ISSUE_TEMPLATE/1-bug_report.md 0000664 0000000 0000000 00000000422 14645513034 0024627 0 ustar 00root root 0000000 0000000 --- name: Bug report about: Create a report to help us improve labels: bug --- **Describe the bug** A clear and concise description of what the bug is. **To Reproduce** Steps to reproduce the behavior: **Additional context** Add any other context about the problem here. pyenphase-pyenphase-1bfa6dd/.github/ISSUE_TEMPLATE/2-feature-request.md 0000664 0000000 0000000 00000000672 14645513034 0025610 0 ustar 00root root 0000000 0000000 --- name: Feature request about: Suggest an idea for this project labels: enhancement --- **Is your feature request related to a problem? Please describe.** A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] **Describe the solution you'd like** A clear and concise description of what you want to happen. **Additional context** Add any other context or screenshots about the feature request here. pyenphase-pyenphase-1bfa6dd/.github/labels.toml 0000664 0000000 0000000 00000003515 14645513034 0021761 0 ustar 00root root 0000000 0000000 [breaking] color = "ffcc00" name = "breaking" description = "Breaking change." [bug] color = "d73a4a" name = "bug" description = "Something isn't working" [dependencies] color = "0366d6" name = "dependencies" description = "Pull requests that update a dependency file" [github_actions] color = "000000" name = "github_actions" description = "Update of github actions" [documentation] color = "1bc4a5" name = "documentation" description = "Improvements or additions to documentation" [duplicate] color = "cfd3d7" name = "duplicate" description = "This issue or pull request already exists" [enhancement] color = "a2eeef" name = "enhancement" description = "New feature or request" ["good first issue"] color = "7057ff" name = "good first issue" description = "Good for newcomers" ["help wanted"] color = "008672" name = "help wanted" description = "Extra attention is needed" [invalid] color = "e4e669" name = "invalid" description = "This doesn't seem right" [nochangelog] color = "555555" name = "nochangelog" description = "Exclude pull requests from changelog" [question] color = "d876e3" name = "question" description = "Further information is requested" [removed] color = "e99695" name = "removed" description = "Removed piece of functionalities." [tests] color = "bfd4f2" name = "tests" description = "CI, CD and testing related changes" [wontfix] color = "ffffff" name = "wontfix" description = "This will not be worked on" [discussion] color = "c2e0c6" name = "discussion" description = "Some discussion around the project" [hacktoberfest] color = "ffa663" name = "hacktoberfest" description = "Good issues for Hacktoberfest" [answered] color = "0ee2b6" name = "answered" description = "Automatically closes as answered after a delay" [waiting] color = "5f7972" name = "waiting" description = "Automatically closes if no answer after a delay" pyenphase-pyenphase-1bfa6dd/.github/workflows/ 0000775 0000000 0000000 00000000000 14645513034 0021653 5 ustar 00root root 0000000 0000000 pyenphase-pyenphase-1bfa6dd/.github/workflows/ci.yml 0000664 0000000 0000000 00000003315 14645513034 0022773 0 ustar 00root root 0000000 0000000 name: CI on: push: branches: - main pull_request: concurrency: group: ${{ github.head_ref || github.run_id }} cancel-in-progress: true permissions: write-all jobs: lint: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - uses: actions/setup-python@v4 with: python-version: "3.11" - uses: pre-commit/action@v3.0.0 test: strategy: fail-fast: false matrix: python-version: - "3.11" - "3.12" os: - ubuntu-latest runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v3 - name: Set up Python uses: actions/setup-python@v4 with: python-version: ${{ matrix.python-version }} - uses: snok/install-poetry@v1.3.3 - name: Install Dependencies run: poetry install shell: bash - name: Test with Pytest run: poetry run pytest --cov-report=xml shell: bash - name: Upload coverage to Codecov uses: codecov/codecov-action@v3 with: token: ${{ secrets.CODECOV_TOKEN }} release: runs-on: ubuntu-latest environment: release needs: - test - lint steps: - uses: actions/checkout@v3 with: fetch-depth: 0 - name: Release uses: python-semantic-release/python-semantic-release@v7.34.6 if: github.ref_name == 'main' with: github_token: ${{ secrets.GITHUB_TOKEN }} pypi_token: ${{ secrets.PYPI_TOKEN }} - name: Test release uses: python-semantic-release/python-semantic-release@v7.34.6 if: github.ref_name != 'main' with: additional_options: --noop pyenphase-pyenphase-1bfa6dd/.github/workflows/hacktoberfest.yml 0000664 0000000 0000000 00000000534 14645513034 0025224 0 ustar 00root root 0000000 0000000 name: Hacktoberfest on: schedule: # Run every day in October - cron: "0 0 * 10 *" # Run on the 1st of November to revert - cron: "0 13 1 11 *" jobs: hacktoberfest: runs-on: ubuntu-latest steps: - uses: browniebroke/hacktoberfest-labeler-action@v2.3.0 with: github_token: ${{ secrets.GH_PAT }} pyenphase-pyenphase-1bfa6dd/.github/workflows/issue-manager.yml 0000664 0000000 0000000 00000001340 14645513034 0025134 0 ustar 00root root 0000000 0000000 name: Issue Manager on: schedule: - cron: "0 0 * * *" issue_comment: types: - created issues: types: - labeled pull_request_target: types: - labeled workflow_dispatch: jobs: issue-manager: runs-on: ubuntu-latest steps: - uses: tiangolo/issue-manager@0.4.0 with: token: ${{ secrets.GITHUB_TOKEN }} config: > { "answered": { "message": "Assuming the original issue was solved, it will be automatically closed now." }, "waiting": { "message": "Automatically closing. To re-open, please provide the additional information requested." } } pyenphase-pyenphase-1bfa6dd/.github/workflows/poetry-upgrade.yml 0000664 0000000 0000000 00000000340 14645513034 0025342 0 ustar 00root root 0000000 0000000 name: Upgrader on: workflow_dispatch: schedule: - cron: "19 14 6 * *" jobs: upgrade: uses: browniebroke/github-actions/.github/workflows/poetry-upgrade.yml@v1 secrets: gh_pat: ${{ secrets.GH_PAT }} pyenphase-pyenphase-1bfa6dd/.github/workflows/pr-title.yml 0000664 0000000 0000000 00000000560 14645513034 0024137 0 ustar 00root root 0000000 0000000 name: PR Title on: pull_request: pull_request_target: jobs: # Make sure pre title follow the conventional commits convention: # https://www.conventionalcommits.org commitlint: name: Lint PR Title runs-on: ubuntu-latest steps: - uses: amannn/action-semantic-pull-request@v5 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} pyenphase-pyenphase-1bfa6dd/.gitignore 0000664 0000000 0000000 00000015350 14645513034 0020252 0 ustar 00root root 0000000 0000000 # Created by https://www.toptal.com/developers/gitignore/api/python,visualstudiocode,pycharm+all,linux,macos,windows # Edit at https://www.toptal.com/developers/gitignore?templates=python,visualstudiocode,pycharm+all,linux,macos,windows ### Linux ### *~ # temporary files which can be created if a process still has a handle open of a deleted file .fuse_hidden* # KDE directory preferences .directory # Linux trash folder which might appear on any partition or disk .Trash-* # .nfs files are created when an open file is removed but is still being accessed .nfs* ### macOS ### # General .DS_Store .AppleDouble .LSOverride # Icon must end with two \r Icon # Thumbnails ._* # Files that might appear in the root of a volume .DocumentRevisions-V100 .fseventsd .Spotlight-V100 .TemporaryItems .Trashes .VolumeIcon.icns .com.apple.timemachine.donotpresent # Directories potentially created on remote AFP share .AppleDB .AppleDesktop Network Trash Folder Temporary Items .apdisk ### macOS Patch ### # iCloud generated files *.icloud ### PyCharm+all ### # Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider # Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839 # User-specific stuff .idea/**/workspace.xml .idea/**/tasks.xml .idea/**/usage.statistics.xml .idea/**/dictionaries .idea/**/shelf # AWS User-specific .idea/**/aws.xml # Generated files .idea/**/contentModel.xml # Sensitive or high-churn files .idea/**/dataSources/ .idea/**/dataSources.ids .idea/**/dataSources.local.xml .idea/**/sqlDataSources.xml .idea/**/dynamic.xml .idea/**/uiDesigner.xml .idea/**/dbnavigator.xml # Gradle .idea/**/gradle.xml .idea/**/libraries # Gradle and Maven with auto-import # When using Gradle or Maven with auto-import, you should exclude module files, # since they will be recreated, and may cause churn. Uncomment if using # auto-import. # .idea/artifacts # .idea/compiler.xml # .idea/jarRepositories.xml # .idea/modules.xml # .idea/*.iml # .idea/modules # *.iml # *.ipr # CMake cmake-build-*/ # Mongo Explorer plugin .idea/**/mongoSettings.xml # File-based project format *.iws # IntelliJ out/ # mpeltonen/sbt-idea plugin .idea_modules/ # JIRA plugin atlassian-ide-plugin.xml # Cursive Clojure plugin .idea/replstate.xml # SonarLint plugin .idea/sonarlint/ # Crashlytics plugin (for Android Studio and IntelliJ) com_crashlytics_export_strings.xml crashlytics.properties crashlytics-build.properties fabric.properties # Editor-based Rest Client .idea/httpRequests # Android studio 3.1+ serialized cache file .idea/caches/build_file_checksums.ser ### PyCharm+all Patch ### # Ignore everything but code style settings and run configurations # that are supposed to be shared within teams. .idea/* !.idea/codeStyles !.idea/runConfigurations ### Python ### # Byte-compiled / optimized / DLL files __pycache__/ *.py[cod] *$py.class # C extensions *.so # Distribution / packaging .Python build/ develop-eggs/ dist/ downloads/ eggs/ .eggs/ lib/ lib64/ parts/ sdist/ var/ wheels/ share/python-wheels/ *.egg-info/ .installed.cfg *.egg MANIFEST # PyInstaller # Usually these files are written by a python script from a template # before PyInstaller builds the exe, so as to inject date/other infos into it. *.manifest *.spec # Installer logs pip-log.txt pip-delete-this-directory.txt # Unit test / coverage reports htmlcov/ .tox/ .nox/ .coverage .coverage.* .cache nosetests.xml coverage.xml *.cover *.py,cover .hypothesis/ .pytest_cache/ cover/ # Translations *.mo *.pot # Django stuff: *.log local_settings.py db.sqlite3 db.sqlite3-journal # Flask stuff: instance/ .webassets-cache # Scrapy stuff: .scrapy # Sphinx documentation docs/_build/ # PyBuilder .pybuilder/ target/ # Jupyter Notebook .ipynb_checkpoints # IPython profile_default/ ipython_config.py # pyenv # For a library or package, you might want to ignore these files since the code is # intended to run in multiple environments; otherwise, check them in: # .python-version # pipenv # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control. # However, in case of collaboration, if having platform-specific dependencies or dependencies # having no cross-platform support, pipenv may install dependencies that don't work, or not # install all needed dependencies. #Pipfile.lock # poetry # Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control. # This is especially recommended for binary packages to ensure reproducibility, and is more # commonly ignored for libraries. # https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control #poetry.lock # pdm # Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control. #pdm.lock # pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it # in version control. # https://pdm.fming.dev/#use-with-ide .pdm.toml # PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm __pypackages__/ # Celery stuff celerybeat-schedule celerybeat.pid # SageMath parsed files *.sage.py # Environments .env .venv env/ venv/ ENV/ env.bak/ venv.bak/ # Spyder project settings .spyderproject .spyproject # Rope project settings .ropeproject # mkdocs documentation /site # mypy .mypy_cache/ .dmypy.json dmypy.json # Pyre type checker .pyre/ # pytype static type analyzer .pytype/ # Cython debug symbols cython_debug/ # PyCharm # JetBrains specific template is maintained in a separate JetBrains.gitignore that can # be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore # and can be added to the global gitignore or merged into this file. For a more nuclear # option (not recommended) you can uncomment the following to ignore the entire idea folder. #.idea/ ### Python Patch ### # Poetry local configuration file - https://python-poetry.org/docs/configuration/#local-configuration poetry.toml # ruff .ruff_cache/ # LSP config files pyrightconfig.json ### VisualStudioCode ### .vscode/* !.vscode/settings.json !.vscode/tasks.json !.vscode/launch.json !.vscode/extensions.json !.vscode/*.code-snippets # Local History for Visual Studio Code .history/ # Built Visual Studio Code Extensions *.vsix ### VisualStudioCode Patch ### # Ignore all local history of files .history .ionide ### Windows ### # Windows thumbnail cache files Thumbs.db Thumbs.db:encryptable ehthumbs.db ehthumbs_vista.db # Dump file *.stackdump # Folder config file [Dd]esktop.ini # Recycle Bin used on file shares $RECYCLE.BIN/ # Windows Installer files *.cab *.msi *.msix *.msm *.msp # Windows shortcuts *.lnk # End of https://www.toptal.com/developers/gitignore/api/python,visualstudiocode,pycharm+all,linux,macos,windows pyenphase-pyenphase-1bfa6dd/.gitpod.yml 0000664 0000000 0000000 00000000306 14645513034 0020344 0 ustar 00root root 0000000 0000000 tasks: - command: | pip install poetry PIP_USER=false poetry install - command: | pip install pre-commit pre-commit install PIP_USER=false pre-commit install-hooks pyenphase-pyenphase-1bfa6dd/.pre-commit-config.yaml 0000664 0000000 0000000 00000003412 14645513034 0022537 0 ustar 00root root 0000000 0000000 # See https://pre-commit.com for more information # See https://pre-commit.com/hooks.html for more hooks exclude: "CHANGELOG.md|.copier-answers.yml" default_stages: [commit] ci: autofix_commit_msg: "chore(pre-commit.ci): auto fixes" autoupdate_commit_msg: "chore(pre-commit.ci): pre-commit autoupdate" repos: - repo: https://github.com/pre-commit/pre-commit-hooks rev: v4.6.0 hooks: - id: debug-statements - id: check-builtin-literals - id: check-case-conflict - id: check-docstring-first - id: check-json exclude: | (?x)^( tests/fixtures/.*/.*\.json )$ - id: check-toml - id: check-xml - id: check-yaml - id: detect-private-key - id: end-of-file-fixer - id: trailing-whitespace - repo: https://github.com/python-poetry/poetry rev: 1.8.0 hooks: - id: poetry-check - repo: https://github.com/pre-commit/mirrors-prettier rev: v4.0.0-alpha.8 hooks: - id: prettier args: ["--tab-width", "2"] - repo: https://github.com/asottile/pyupgrade rev: v3.16.0 hooks: - id: pyupgrade args: [--py37-plus] - repo: https://github.com/PyCQA/isort rev: 5.13.2 hooks: - id: isort - repo: https://github.com/psf/black rev: 24.4.2 hooks: - id: black - repo: https://github.com/codespell-project/codespell rev: v2.3.0 hooks: - id: codespell - repo: https://github.com/PyCQA/flake8 rev: 7.1.0 hooks: - id: flake8 - repo: https://github.com/pre-commit/mirrors-mypy rev: v1.10.1 hooks: - id: mypy additional_dependencies: ["types-orjson"] - repo: https://github.com/PyCQA/bandit rev: 1.7.9 hooks: - id: bandit args: [-x, tests] pyenphase-pyenphase-1bfa6dd/.prettierignore 0000664 0000000 0000000 00000000031 14645513034 0021313 0 ustar 00root root 0000000 0000000 tests/fixtures/**/*.json pyenphase-pyenphase-1bfa6dd/.readthedocs.yml 0000664 0000000 0000000 00000001247 14645513034 0021350 0 ustar 00root root 0000000 0000000 # Read the Docs configuration file # See https://docs.readthedocs.io/en/stable/config-file/v2.html for details # Required version: 2 # Set the version of Python and other tools you might need build: os: ubuntu-20.04 tools: python: "3.11" jobs: post_create_environment: # Install poetry - pip install poetry post_install: # Install dependencies # VIRTUAL_ENV needs to be set manually for now. # See https://github.com/readthedocs/readthedocs.org/pull/11152/ - VIRTUAL_ENV=$READTHEDOCS_VIRTUALENV_PATH poetry install --with docs # Build documentation in the docs directory with Sphinx sphinx: configuration: docs/conf.py pyenphase-pyenphase-1bfa6dd/.rtx.toml 0000664 0000000 0000000 00000000070 14645513034 0020043 0 ustar 00root root 0000000 0000000 [tools] python = { version="3.11", virtualenv=".venv" } pyenphase-pyenphase-1bfa6dd/CHANGELOG.md 0000664 0000000 0000000 00000051127 14645513034 0020075 0 ustar 00root root 0000000 0000000 # Changelog ## v1.21.0 (2024-07-16) ### Feature * **generator:** Probe for generator ([#160](https://github.com/pyenphase/pyenphase/issues/160)) ([`42a2533`](https://github.com/pyenphase/pyenphase/commit/42a2533f44ec975c72bd0be9dc70c75a987ff030)) ## v1.20.6 (2024-07-03) ### Fix * raise EnvoyCommunicationError for httpx ConnectError and TimeoutException exceptions during Envoy.update ([#170](https://github.com/pyenphase/pyenphase/issues/170)) ([`c6d238f`](https://github.com/pyenphase/pyenphase/commit/c6d238f83b10622cb20493bcf70e4e54deb751d2)) ## v1.20.5 (2024-07-03) ### Fix * Report EnvoyHTTPStatusError for _json_request if status not in 200-300 ([#171](https://github.com/pyenphase/pyenphase/issues/171)) ([`46fb2b3`](https://github.com/pyenphase/pyenphase/commit/46fb2b386ff1991ba26d4b60628163cff147afa9)) ## v1.20.4 (2024-07-02) ### Fix * For fw 3.x mark production with only zero values as EnvoyPoorDataQuality error ([#173](https://github.com/pyenphase/pyenphase/issues/173)) ([`8b6b302`](https://github.com/pyenphase/pyenphase/commit/8b6b302b626742e101708c5bbd0c0a46e86f9cb7)) ## v1.20.3 (2024-05-07) ### Fix * Get production phase data using details parameter ([#159](https://github.com/pyenphase/pyenphase/issues/159)) ([`d2a478c`](https://github.com/pyenphase/pyenphase/commit/d2a478c25581cbb147506d138db3043c70345fae)) ## v1.20.2 (2024-04-18) ### Fix * Add missing EnvoyTokenAuth class properties ([#150](https://github.com/pyenphase/pyenphase/issues/150)) ([`d01157a`](https://github.com/pyenphase/pyenphase/commit/d01157a1ec3139f67e085f0a4e529f2e7af09943)) ### Documentation * Use new format to specify virtual env for readthedocs ([#152](https://github.com/pyenphase/pyenphase/issues/152)) ([`4b9a9ea`](https://github.com/pyenphase/pyenphase/commit/4b9a9ea79ef94dfd1fed2b262a12cb016da2802c)) * Let readthedocs use virtualenv for build ([#151](https://github.com/pyenphase/pyenphase/issues/151)) ([`9e8b648`](https://github.com/pyenphase/pyenphase/commit/9e8b648875db5fcc2210d7f180c0d278485eafb8)) ## v1.20.1 (2024-03-26) ### Fix * Endless loop on envoy unreachable ([#145](https://github.com/pyenphase/pyenphase/issues/145)) ([`f074c61`](https://github.com/pyenphase/pyenphase/commit/f074c61b56b0fdb1080ff3c54f82c59a8015b6d9)) ## v1.20.0 (2024-03-21) ### Feature * Report storage CT data ([#144](https://github.com/pyenphase/pyenphase/issues/144)) ([`52c53fe`](https://github.com/pyenphase/pyenphase/commit/52c53fe20123514177290e964e03a23454e42e9c)) ## v1.19.2 (2024-03-08) ### Fix * Consumption CT not found when 3 CT reported ([#140](https://github.com/pyenphase/pyenphase/issues/140)) ([`7c2f52c`](https://github.com/pyenphase/pyenphase/commit/7c2f52cc28fdc872a8c5875fc7f7d8b7e233bc01)) ## v1.19.1 (2024-02-27) ### Fix * Force release ([#139](https://github.com/pyenphase/pyenphase/issues/139)) ([`b16f132`](https://github.com/pyenphase/pyenphase/commit/b16f13264ffdb90de53d3d9730eb0cd700724ffd)) ## v1.19.0 (2024-01-27) ### Feature * Add envoy_model property ([#136](https://github.com/pyenphase/pyenphase/issues/136)) ([`42652cd`](https://github.com/pyenphase/pyenphase/commit/42652cda168d1cf1d4b637071f0603d0b0707066)) ## v1.18.0 (2024-01-23) ### Feature * Add updater for Current Transformer data ([#135](https://github.com/pyenphase/pyenphase/issues/135)) ([`1ca6118`](https://github.com/pyenphase/pyenphase/commit/1ca6118e6aaecb829b4cd711d72d6296fad26bae)) ### Documentation * Document CT meter data ([#134](https://github.com/pyenphase/pyenphase/issues/134)) ([`cfd396b`](https://github.com/pyenphase/pyenphase/commit/cfd396bde18a908d7703d421a10126abc06f0542)) ## v1.17.0 (2024-01-11) ### Feature * Write request reply to debuglog when in debug ([#131](https://github.com/pyenphase/pyenphase/issues/131)) ([`e255684`](https://github.com/pyenphase/pyenphase/commit/e25568444ca4a629bc38904c0f27777550219117)) ### Documentation * Reorganize and extend documentation. ([#129](https://github.com/pyenphase/pyenphase/issues/129)) ([`4d8e463`](https://github.com/pyenphase/pyenphase/commit/4d8e463fc5d5e500876f721ae2831cc90a275d9a)) ## v1.16.0 (2024-01-09) ### Feature * Provide phase data for envoy metered with ct ([#126](https://github.com/pyenphase/pyenphase/issues/126)) ([`454dbc5`](https://github.com/pyenphase/pyenphase/commit/454dbc58ebb2edf23e9c64173fb8b5d155b327fc)) ## v1.15.2 (2023-12-20) ### Fix * 3.9.x firmware with meters probe ([#128](https://github.com/pyenphase/pyenphase/issues/128)) ([`06606c5`](https://github.com/pyenphase/pyenphase/commit/06606c5516c84b3ee500843b8b843bf180658055)) ## v1.15.1 (2023-12-20) ### Fix * Skip meters endpoint if it returns a 401 ([#125](https://github.com/pyenphase/pyenphase/issues/125)) ([`166c25c`](https://github.com/pyenphase/pyenphase/commit/166c25c410b6fa319bddea78db44606da7364aeb)) ## v1.15.0 (2023-12-19) ### Feature * Provide phase configuration for envoy metered with ct ([#122](https://github.com/pyenphase/pyenphase/issues/122)) ([`12204a8`](https://github.com/pyenphase/pyenphase/commit/12204a8ec2082cb561f334e21e6febfdb2c8a082)) ## v1.14.3 (2023-11-11) ### Fix * **#99:** Envoy metered without CT reporting wrong values ([#111](https://github.com/pyenphase/pyenphase/issues/111)) ([`2188969`](https://github.com/pyenphase/pyenphase/commit/21889696fdc06f423f382eb404483e1b5d641094)) ### Documentation * Update usage.md ([#109](https://github.com/pyenphase/pyenphase/issues/109)) ([`2e31671`](https://github.com/pyenphase/pyenphase/commit/2e316718081fccab314844a76aa9c6e4e54d20a9)) ## v1.14.2 (2023-11-06) ### Fix * Make date field optional in storage settings tariff model ([#112](https://github.com/pyenphase/pyenphase/issues/112)) ([`cf98198`](https://github.com/pyenphase/pyenphase/commit/cf98198b80326f5bf57c58c77eedbe17b6142b0b)) ## v1.14.1 (2023-11-02) ### Fix * Add economy EnvoyStorageMode ([#110](https://github.com/pyenphase/pyenphase/issues/110)) ([`edaf93c`](https://github.com/pyenphase/pyenphase/commit/edaf93c8c1cd71f34bf0be227436f676b1c13772)) ## v1.14.0 (2023-10-24) ### Feature * **multiphase:** Add phase_count property to envoy ([#105](https://github.com/pyenphase/pyenphase/issues/105)) ([`39ec460`](https://github.com/pyenphase/pyenphase/commit/39ec4606b1bfc152189c48edc89396267564ac13)) ## v1.13.1 (2023-10-21) ### Fix * Ensure tariff endpoint is skipped on firmware 3 ([#102](https://github.com/pyenphase/pyenphase/issues/102)) ([`4fd7796`](https://github.com/pyenphase/pyenphase/commit/4fd77967230089ec9e86c6e6c3e237b6153abb87)) ## v1.13.0 (2023-10-20) ### Feature * Add support for changing storage mode and reserve soc ([#101](https://github.com/pyenphase/pyenphase/issues/101)) ([`16a1471`](https://github.com/pyenphase/pyenphase/commit/16a1471d7b2e961be218825151401a4cd27fe096)) ## v1.12.0 (2023-10-11) ### Feature * Add initial tariff support and charge from grid functions ([#95](https://github.com/pyenphase/pyenphase/issues/95)) ([`5418d4c`](https://github.com/pyenphase/pyenphase/commit/5418d4c99ee6a5f0998367525ccba65f0edb9bc5)) ## v1.11.4 (2023-09-13) ### Fix * Use eim if activeCount is true ([#91](https://github.com/pyenphase/pyenphase/issues/91)) ([`ac041a4`](https://github.com/pyenphase/pyenphase/commit/ac041a4abd2119fa3c784aa74634b27e118b7624)) ## v1.11.3 (2023-09-13) ### Fix * More dry contact settings should be optional ([#90](https://github.com/pyenphase/pyenphase/issues/90)) ([`4fc503a`](https://github.com/pyenphase/pyenphase/commit/4fc503a4f8f60051319aaabf386bced2cd0f3076)) ## v1.11.2 (2023-09-12) ### Fix * Disable consumption when there are no active meters ([#87](https://github.com/pyenphase/pyenphase/issues/87)) ([`fa28f1c`](https://github.com/pyenphase/pyenphase/commit/fa28f1c31344f0e2d1bc60640902e94bd55b0331)) ## v1.11.1 (2023-09-12) ### Fix * Black_s_start key not returned by all Ensemble systems ([#84](https://github.com/pyenphase/pyenphase/issues/84)) ([`357f0bd`](https://github.com/pyenphase/pyenphase/commit/357f0bd132a976f31a052063ce514ac86534de8e)) ## v1.11.0 (2023-09-08) ### Feature * Add fallback when api/v1/production endpoint is broken ([#83](https://github.com/pyenphase/pyenphase/issues/83)) ([`d7e195e`](https://github.com/pyenphase/pyenphase/commit/d7e195e498362d1374366d88a24afc8da6b01321)) ## v1.10.0 (2023-09-08) ### Feature * Add 7.6.175 fixtures with total consumption ([#81](https://github.com/pyenphase/pyenphase/issues/81)) ([`1bc2b20`](https://github.com/pyenphase/pyenphase/commit/1bc2b20a427c6d03df318fcf5c529391fc6e25ed)) ## v1.9.3 (2023-09-07) ### Fix * Handle /production returning a 401 even with the correct auth on some 3.x firmwares ([#80](https://github.com/pyenphase/pyenphase/issues/80)) ([`947605f`](https://github.com/pyenphase/pyenphase/commit/947605fba25b41d12db273e9352c29b08cac1d4d)) ## v1.9.2 (2023-09-07) ### Fix * Raise EnvoyAuthenticationRequired when local auth is incorrect ([#79](https://github.com/pyenphase/pyenphase/issues/79)) ([`208e91a`](https://github.com/pyenphase/pyenphase/commit/208e91a6a66e8afa0931bb3a78e557b882277148)) ## v1.9.1 (2023-09-04) ### Fix * Envoy default password is last 6 not first 6 ([#78](https://github.com/pyenphase/pyenphase/issues/78)) ([`33d07f6`](https://github.com/pyenphase/pyenphase/commit/33d07f6fb231a274bfdf5e693d1d2200fc0b516d)) ## v1.9.0 (2023-09-03) ### Feature * Add ivp/meters and ivp/meters/readings to fixture collector ([#77](https://github.com/pyenphase/pyenphase/issues/77)) ([`74c02bc`](https://github.com/pyenphase/pyenphase/commit/74c02bc882435f8605c85600c7f598a7e77c7141)) ## v1.8.1 (2023-08-23) ### Fix * Preemptively update dry contact state when toggling ([#75](https://github.com/pyenphase/pyenphase/issues/75)) ([`6a3f12f`](https://github.com/pyenphase/pyenphase/commit/6a3f12f26355721a4d12f3ef490659e4c4ce4a4c)) ## v1.8.0 (2023-08-19) ### Feature * Add initial support for firmware 8.1.41 ([#73](https://github.com/pyenphase/pyenphase/issues/73)) ([`3562261`](https://github.com/pyenphase/pyenphase/commit/3562261d51a2f3d539d125c3512d9b1ca9b9bd6d)) ## v1.7.1 (2023-08-15) ### Fix * Startup was blocked for multiple minutes if the envoy was offline ([#71](https://github.com/pyenphase/pyenphase/issues/71)) ([`983ef52`](https://github.com/pyenphase/pyenphase/commit/983ef52e92ffff5a91b8de8bddda68f460058b56)) ## v1.7.0 (2023-08-15) ### Feature * Add support for opening and closing dry contact relays ([#70](https://github.com/pyenphase/pyenphase/issues/70)) ([`f59aa54`](https://github.com/pyenphase/pyenphase/commit/f59aa546e4991c5aee446e9629b48df2ca556272)) ## v1.6.0 (2023-08-13) ### Feature * Add support for changing settings on dry contact relays ([#68](https://github.com/pyenphase/pyenphase/issues/68)) ([`345165a`](https://github.com/pyenphase/pyenphase/commit/345165a92ffc7ffc35c5d09626757c53f4add7d2)) ## v1.5.3 (2023-08-12) ### Fix * Add "schedule" to DryContactAction ([#67](https://github.com/pyenphase/pyenphase/issues/67)) ([`403d8dc`](https://github.com/pyenphase/pyenphase/commit/403d8dc5c0361a30b95e57fdeda13ea25fd8179a)) ## v1.5.2 (2023-08-11) ### Fix * Add EnvoyEnchargeAggregate to __all__ ([#66](https://github.com/pyenphase/pyenphase/issues/66)) ([`63b7698`](https://github.com/pyenphase/pyenphase/commit/63b76980d620cf7e125df0d6058c80230f66756a)) ## v1.5.1 (2023-08-11) ### Fix * Switch fetching aggregate Encharge data to simpler endpoint ([#65](https://github.com/pyenphase/pyenphase/issues/65)) ([`e076476`](https://github.com/pyenphase/pyenphase/commit/e07647656920779e7a18a045ddfea1dec583fba7)) ## v1.5.0 (2023-08-11) ### Feature * Add EnchargeAggregate model for aggregated battery data ([#64](https://github.com/pyenphase/pyenphase/issues/64)) ([`6985935`](https://github.com/pyenphase/pyenphase/commit/69859358ad6c4146fac30198ec5a342633db9834)) ## v1.4.0 (2023-08-10) ### Feature * Add support for toggling grid on/off ([#62](https://github.com/pyenphase/pyenphase/issues/62)) ([`63d44dd`](https://github.com/pyenphase/pyenphase/commit/63d44ddbc59d04ca6afb6b3526a37cda32c7417d)) ## v1.3.0 (2023-08-09) ### Feature * Refactor register interface to allow unregistering an updater ([#60](https://github.com/pyenphase/pyenphase/issues/60)) ([`82efcec`](https://github.com/pyenphase/pyenphase/commit/82efcec228dbe263c3f1c39e6ded3e9283fbfac2)) ## v1.2.2 (2023-08-09) ### Fix * Remove unreachable code in inverters updater ([#61](https://github.com/pyenphase/pyenphase/issues/61)) ([`84b6be0`](https://github.com/pyenphase/pyenphase/commit/84b6be081cde7bf624baaae2b5df5c1177144dec)) ## v1.2.1 (2023-08-09) ### Fix * Incorrect typing on enpower mains_*_state attributes ([#59](https://github.com/pyenphase/pyenphase/issues/59)) ([`14c7c14`](https://github.com/pyenphase/pyenphase/commit/14c7c14124ca33df6e011b1fa32ed4c57da7e294)) ## v1.2.0 (2023-08-09) ### Feature * Refactor to break updaters into modules ([#54](https://github.com/pyenphase/pyenphase/issues/54)) ([`a4686a3`](https://github.com/pyenphase/pyenphase/commit/a4686a30be37f88a3af27257b4a8d017d1579122)) ## v1.1.4 (2023-08-08) ### Fix * Return DryContactStatus enum for status ([#53](https://github.com/pyenphase/pyenphase/issues/53)) ([`d366ff3`](https://github.com/pyenphase/pyenphase/commit/d366ff3c86a3419bb0ffcbd24a1edb0333b0a32f)) ## v1.1.3 (2023-08-08) ### Fix * Handle envoy sending bad json ([#52](https://github.com/pyenphase/pyenphase/issues/52)) ([`7109e66`](https://github.com/pyenphase/pyenphase/commit/7109e6604f5fc1d1b197a128ceb264c9e00410d4)) ## v1.1.2 (2023-08-08) ### Fix * Adjust timeouts for when envoy is having trouble with DNS ([#51](https://github.com/pyenphase/pyenphase/issues/51)) ([`c82f9bb`](https://github.com/pyenphase/pyenphase/commit/c82f9bbf69f884516985dde04207d375c4953ad3)) ## v1.1.1 (2023-08-08) ### Fix * Add Enpower and DryContact classes to __all__ ([#50](https://github.com/pyenphase/pyenphase/issues/50)) ([`d37b5e9`](https://github.com/pyenphase/pyenphase/commit/d37b5e9b6e6f12d62ba57a2f6d745868adf67914)) ## v1.1.0 (2023-08-08) ### Feature * Add support for pulling dry contact data ([#48](https://github.com/pyenphase/pyenphase/issues/48)) ([`7814650`](https://github.com/pyenphase/pyenphase/commit/78146506bb4a93b51987a2b8725cc32f35368643)) ## v1.0.0 (2023-08-08) ### Breaking * drop python3.10 support ([#49](https://github.com/pyenphase/pyenphase/issues/49)) ([`9d8c20d`](https://github.com/pyenphase/pyenphase/commit/9d8c20d8f1d9b08b57649f7c8b84715f25312887)) ## v0.18.0 (2023-08-08) ### Feature * Add support for polling Enpower data ([#47](https://github.com/pyenphase/pyenphase/issues/47)) ([`0ac58e0`](https://github.com/pyenphase/pyenphase/commit/0ac58e0396d67b4e858deba08eb6bef5c6de9f39)) ## v0.17.0 (2023-08-07) ### Feature * Add fixtures for 7.6.114 without clamps ([#44](https://github.com/pyenphase/pyenphase/issues/44)) ([`4be0a33`](https://github.com/pyenphase/pyenphase/commit/4be0a339ed9ae458246f2260e03c5d4c89c58410)) ## v0.16.0 (2023-08-07) ### Feature * Collect headers as well as XML files ([#43](https://github.com/pyenphase/pyenphase/issues/43)) ([`82678be`](https://github.com/pyenphase/pyenphase/commit/82678be2bdcd59b77befc04883b2bb4693789f36)) * Update 7.6.175 fixtures ([#45](https://github.com/pyenphase/pyenphase/issues/45)) ([`9c96475`](https://github.com/pyenphase/pyenphase/commit/9c96475f345786a24b5b786a4880a949a01cabd8)) ## v0.15.1 (2023-08-07) ### Fix * Add Encharge classes to __all__ ([#42](https://github.com/pyenphase/pyenphase/issues/42)) ([`229a84d`](https://github.com/pyenphase/pyenphase/commit/229a84df72a1ec6292f47fe426c46890feb1b83e)) ## v0.15.0 (2023-08-07) ### Feature * Add Encharge battery support ([#40](https://github.com/pyenphase/pyenphase/issues/40)) ([`e1a96e9`](https://github.com/pyenphase/pyenphase/commit/e1a96e9de3ade6429561ef863ed8302b481e02df)) ## v0.14.1 (2023-08-07) ### Fix * Probe failures with 5.0.62 firmware ([#38](https://github.com/pyenphase/pyenphase/issues/38)) ([`314df6d`](https://github.com/pyenphase/pyenphase/commit/314df6d83c4dfd7c91970e61f86e34218ce46be8)) ## v0.14.0 (2023-08-06) ### Feature * Add part number ([#36](https://github.com/pyenphase/pyenphase/issues/36)) ([`5b1d46d`](https://github.com/pyenphase/pyenphase/commit/5b1d46dd7c64180fff3118b087330a48de6646fe)) ## v0.13.0 (2023-08-06) ### Feature * Add fixture collecting script ([#30](https://github.com/pyenphase/pyenphase/issues/30)) ([`5d66ee9`](https://github.com/pyenphase/pyenphase/commit/5d66ee96154bbd6238a27b6e449b6bb0aece3a54)) ## v0.12.0 (2023-08-06) ### Feature * Probe for Encharge and Enpower support ([#26](https://github.com/pyenphase/pyenphase/issues/26)) ([`da2db7d`](https://github.com/pyenphase/pyenphase/commit/da2db7d8005c81153dff6b5802d3c4851dd79432)) ## v0.11.0 (2023-08-06) ### Feature * Add support for bifurcated endpoints ([#28](https://github.com/pyenphase/pyenphase/issues/28)) ([`7853cfd`](https://github.com/pyenphase/pyenphase/commit/7853cfd1ecb2e1cadf8e874f6d351c4efe408a79)) ## v0.10.0 (2023-08-06) ### Feature * Add the ability to refresh the token on demand ([#25](https://github.com/pyenphase/pyenphase/issues/25)) ([`d1e391c`](https://github.com/pyenphase/pyenphase/commit/d1e391ccd9fcc9fcb3636f6f4a101005998f9f60)) ## v0.9.0 (2023-08-05) ### Feature * Add EnvoyTokenAuth to __all__ ([#24](https://github.com/pyenphase/pyenphase/issues/24)) ([`738f4c7`](https://github.com/pyenphase/pyenphase/commit/738f4c7b1385e1045e9ca5065e06b0816d6a398f)) ## v0.8.0 (2023-08-05) ### Feature * Add EnvoyData to __all__ ([#23](https://github.com/pyenphase/pyenphase/issues/23)) ([`63f9ba9`](https://github.com/pyenphase/pyenphase/commit/63f9ba94f7d10945aa314836f9a7425cda28ae59)) ## v0.7.1 (2023-08-05) ### Fix * Legacy installer auth was not working ([#22](https://github.com/pyenphase/pyenphase/issues/22)) ([`a2dd5e5`](https://github.com/pyenphase/pyenphase/commit/a2dd5e55ccfc796d7e162ccc75bb116fde1ca631)) ## v0.7.0 (2023-08-05) ### Feature * Export a few more models for type checking ([#21](https://github.com/pyenphase/pyenphase/issues/21)) ([`e2337c4`](https://github.com/pyenphase/pyenphase/commit/e2337c4b8bf69e816611e76e4239fdbea78bf6e9)) ## v0.6.1 (2023-08-05) ### Fix * Unclosed cloud client session ([#20](https://github.com/pyenphase/pyenphase/issues/20)) ([`b46282a`](https://github.com/pyenphase/pyenphase/commit/b46282a9f9ed20be4487582cd2461a02b7740de6)) ## v0.6.0 (2023-08-05) ### Feature * Export names at top level ([#19](https://github.com/pyenphase/pyenphase/issues/19)) ([`b209357`](https://github.com/pyenphase/pyenphase/commit/b2093578d12978da49788ca08c3959d2c3fb3641)) ## v0.5.0 (2023-08-05) ### Feature * Add consumption api ([#17](https://github.com/pyenphase/pyenphase/issues/17)) ([`f094c4d`](https://github.com/pyenphase/pyenphase/commit/f094c4d129cbb26e0f6bf3cf9024967a0def46e7)) ## v0.4.0 (2023-08-05) ### Feature * Add update functions ([#16](https://github.com/pyenphase/pyenphase/issues/16)) ([`d2802e0`](https://github.com/pyenphase/pyenphase/commit/d2802e0e9322050d37e0affa4a87f127731c29a2)) ## v0.3.0 (2023-07-26) ### Feature * Add support for legacy firmware ([#11](https://github.com/pyenphase/pyenphase/issues/11)) ([`49cb15c`](https://github.com/pyenphase/pyenphase/commit/49cb15c58cde38dc41ff30c24c3365c491605274)) ## v0.2.0 (2023-07-26) ### Feature * Use sessionId cookie to have access to some endpoints ([#7](https://github.com/pyenphase/pyenphase/issues/7)) ([`09a1a8a`](https://github.com/pyenphase/pyenphase/commit/09a1a8aa30f2e3be1aa636f2488dc736f4d4f476)) ## v0.1.0 (2023-05-28) ### Feature * Add initial cloud auth support ([#6](https://github.com/pyenphase/pyenphase/issues/6)) ([`28f4872`](https://github.com/pyenphase/pyenphase/commit/28f4872625a01ee209153d489de566b7ba2302e6)) ## v0.0.3 (2023-05-23) ### Fix * Permission ([`89f9399`](https://github.com/pyenphase/pyenphase/commit/89f9399bccafcc611d83e264d8f4795d43a7f34e)) * Permission ([`c73e3ed`](https://github.com/pyenphase/pyenphase/commit/c73e3ed86106d6a9b4ea78c37c1a3133ef0af458)) * Permission ([`39e5209`](https://github.com/pyenphase/pyenphase/commit/39e520904e649bb37bd13c790d221b455b4dc90b)) * Permission ([`2068511`](https://github.com/pyenphase/pyenphase/commit/2068511f19a8c2c9ac8322937c830762cba27a16)) * Test publish ([#2](https://github.com/pyenphase/pyenphase/issues/2)) ([`e3df6b2`](https://github.com/pyenphase/pyenphase/commit/e3df6b264ca55dc12b75dd602cc1f92fa3a54950)) * Update ci python version ([#1](https://github.com/pyenphase/pyenphase/issues/1)) ([`4c2dd2e`](https://github.com/pyenphase/pyenphase/commit/4c2dd2e70464b884b9d8a02ccaf39f04f46ab270)) * Drop 3.12 ([`8e0c0f4`](https://github.com/pyenphase/pyenphase/commit/8e0c0f40ad38152bc13a85566d67c7e86345d291)) * Lint ([`683691c`](https://github.com/pyenphase/pyenphase/commit/683691c730e1ef4c491348d66dce70cd75917fd1)) * Typing ([`a75ae30`](https://github.com/pyenphase/pyenphase/commit/a75ae303ef4f98cfafe95081901df7ce88f4fb9e)) * Bump versions ([`eef5623`](https://github.com/pyenphase/pyenphase/commit/eef56234a9353d110b174b445da1cfb4034d7c1f)) pyenphase-pyenphase-1bfa6dd/CONTRIBUTING.md 0000664 0000000 0000000 00000007412 14645513034 0020513 0 ustar 00root root 0000000 0000000 # Contributing Contributions are welcome, and they are greatly appreciated! Every little helps, and credit will always be given. You can contribute in many ways: ## Types of Contributions ### Report Bugs Report bugs to [our issue page][gh-issues]. If you are reporting a bug, please include: - Your operating system name and version. - Any details about your local setup that might be helpful in troubleshooting. - Detailed steps to reproduce the bug. ### Fix Bugs Look through the GitHub issues for bugs. Anything tagged with "bug" and "help wanted" is open to whoever wants to implement it. ### Implement Features Look through the GitHub issues for features. Anything tagged with "enhancement" and "help wanted" is open to whoever wants to implement it. ### Write Documentation pyenphase could always use more documentation, whether as part of the official pyenphase docs, in docstrings, or even on the web in blog posts, articles, and such. ### Submit Feedback The best way to send feedback [our issue page][gh-issues] on GitHub. If you are proposing a feature: - Explain in detail how it would work. - Keep the scope as narrow as possible, to make it easier to implement. - Remember that this is a volunteer-driven project, and that contributions are welcome 😊 ## Get Started! Ready to contribute? Here's how to set yourself up for local development. 1. Fork the repo on GitHub. 2. Clone your fork locally: ```shell $ git clone git@github.com:your_name_here/pyenphase.git ``` 3. Install the project dependencies with [Poetry](https://python-poetry.org): ```shell $ poetry install ``` 4. Create a branch for local development: ```shell $ git checkout -b name-of-your-bugfix-or-feature ``` Now you can make your changes locally. 5. When you're done making changes, check that your changes pass our tests: ```shell $ poetry run pytest ``` 6. Linting is done through [pre-commit](https://pre-commit.com). Provided you have the tool installed globally, you can run them all as one-off: ```shell $ pre-commit run -a ``` Or better, install the hooks once and have them run automatically each time you commit: ```shell $ pre-commit install ``` 7. Commit your changes and push your branch to GitHub: ```shell $ git add . $ git commit -m "feat(something): your detailed description of your changes" $ git push origin name-of-your-bugfix-or-feature ``` Note: the commit message should follow [the conventional commits](https://www.conventionalcommits.org). We run [`commitlint` on CI](https://github.com/marketplace/actions/commit-linter) to validate it, and if you've installed pre-commit hooks at the previous step, the message will be checked at commit time. 8. Submit a pull request through the GitHub website or using the GitHub CLI (if you have it installed): ```shell $ gh pr create --fill ``` ## Pull Request Guidelines We like to have the pull request open as soon as possible, that's a great place to discuss any piece of work, even unfinished. You can use draft pull request if it's still a work in progress. Here are a few guidelines to follow: 1. Include tests for feature or bug fixes. 2. Update the documentation for significant features. 3. Ensure tests are passing on CI. ## Tips To run a subset of tests: ```shell $ pytest tests ``` ## Making a new release The deployment should be automated and can be triggered from the Semantic Release workflow in GitHub. The next version will be based on [the commit logs](https://python-semantic-release.readthedocs.io/en/latest/commit-log-parsing.html#commit-log-parsing). This is done by [python-semantic-release](https://python-semantic-release.readthedocs.io/en/latest/index.html) via a GitHub action. [gh-issues]: https://github.com/pyenphase/pyenphase/issues pyenphase-pyenphase-1bfa6dd/LICENSE 0000664 0000000 0000000 00000002053 14645513034 0017263 0 ustar 00root root 0000000 0000000 MIT License Copyright (c) 2023 pyenphase Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. pyenphase-pyenphase-1bfa6dd/README.md 0000664 0000000 0000000 00000006624 14645513034 0017545 0 ustar 00root root 0000000 0000000 # pyenphase
Library to control enphase envoy ## Installation Install this via pip (or your favourite package manager): `pip install pyenphase` ## Contributors ✨ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)): This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome! ## Credits This package was created with [Copier](https://copier.readthedocs.io/) and the [browniebroke/pypackage-template](https://github.com/browniebroke/pypackage-template) project template. pyenphase-pyenphase-1bfa6dd/commitlint.config.js 0000664 0000000 0000000 00000000364 14645513034 0022242 0 ustar 00root root 0000000 0000000 module.exports = { extends: ["@commitlint/config-conventional"], rules: { "header-max-length": [0, "always", Infinity], "body-max-line-length": [0, "always", Infinity], "footer-max-line-length": [0, "always", Infinity], }, }; pyenphase-pyenphase-1bfa6dd/devtools/ 0000775 0000000 0000000 00000000000 14645513034 0020115 5 ustar 00root root 0000000 0000000 pyenphase-pyenphase-1bfa6dd/devtools/experiment.py 0000664 0000000 0000000 00000002467 14645513034 0022660 0 ustar 00root root 0000000 0000000 import asyncio import logging import os from pprint import pprint from pyenphase.envoy import Envoy logging.basicConfig(level=logging.DEBUG) async def main() -> None: envoy = Envoy(os.environ.get("ENVOY_HOST", "envoy.local")) await envoy.setup() username = os.environ.get("ENVOY_USERNAME") password = os.environ.get("ENVOY_PASSWORD") token = os.environ.get("ENVOY_TOKEN") await envoy.authenticate(username=username, password=password, token=token) # Test https://enphase.com/download/iq-gateway-access-using-local-apis-or-local-ui-token-based-authentication-tech-brief endpoints print(await envoy.update()) end_points = [ "/ivp/livedata/status", "/api/v1/production", "/api/v1/production/inverters", "/production.json", "/production", "/ivp/meters", "/ivp/meters/readings", "/ivp/meters/reports/consumption", "/ivp/ensemble/inventory", "/ivp/ensemble/dry_contacts", "/ivp/ss/dry_contact_settings", ] for end_point in end_points: try: json_dict = await envoy.request(end_point) except Exception as e: print(e) continue print((end_point, "=" * 80)) pprint(json_dict) print((end_point, "=" * 80)) asyncio.run(main()) pyenphase-pyenphase-1bfa6dd/devtools/fixture_collector.py 0000664 0000000 0000000 00000020073 14645513034 0024225 0 ustar 00root root 0000000 0000000 """Create test fixture file set for pyenphase by scanning known endpoints on Envoy. execute python fixture_collector.py --help for directons Copy this file to the Home Assistant config folder. Open a terminal on your HA system Navigate to the config folder and execute python fixture_collector.py Alternatively copy and execute this file to a system with pyenphase installed and network connectivity to your Home Assistant config folder and the Envoy. """ import argparse import asyncio import getpass import json import logging import os import zipfile from pyenphase.envoy import DEFAULT_HEADERS, Envoy from pyenphase.exceptions import ( EnvoyAuthenticationRequired, EnvoyFirmwareFatalCheckError, ) # logging.basicConfig(level=logging.WARNING) async def main( envoy_address: str | None, username: str | None, password: str | None, token: str | None, verbose: bool = False, label: str = "", clean: bool = False, ) -> None: envoy = Envoy(os.environ.get("ENVOY_HOST", envoy_address or "envoy.local")) try: await envoy.setup() except EnvoyFirmwareFatalCheckError as err: print(f"Could not connect to Envoy: {err.status_code} {err.status}") return None try: await envoy.authenticate(username=username, password=password, token=token) except EnvoyAuthenticationRequired: print("Could not athenticate with Envoy") return None target_dir = f"enphase-{envoy.firmware}{label}" try: os.mkdir(target_dir) except FileExistsError: pass end_points = [ "/info", "/api/v1/production", "/api/v1/production/inverters", "/production.json", "/production.json?details=1", "/production", "/ivp/ensemble/power", "/ivp/ensemble/inventory", "/ivp/ensemble/dry_contacts", "/ivp/ensemble/status", "/ivp/ensemble/secctrl", "/ivp/ss/dry_contact_settings", "/admin/lib/tariff", "/ivp/ss/gen_config", "/ivp/ss/gen_schedule", "/ivp/sc/pvlimit", "/ivp/ss/pel_settings", "/ivp/ensemble/generator", "/ivp/meters", "/ivp/meters/readings", ] assert envoy.auth # nosec for end_point in end_points: url = envoy.auth.get_endpoint_url(end_point) if verbose: print(end_point) try: response = await envoy._client.get( url, headers={**DEFAULT_HEADERS, **envoy.auth.headers}, cookies=envoy.auth.cookies, follow_redirects=True, auth=envoy.auth.auth, timeout=envoy._timeout, ) except Exception: continue # nosec file_name = end_point[1:].replace("/", "_").replace("?", "_").replace("=", "_") with open(os.path.join(target_dir, file_name), "w") as fixture_file: fixture_file.write(response.text) with open( os.path.join(target_dir, f"{file_name}_log.json"), "w" ) as metadata_file: metadata_file.write( json.dumps( { "headers": {k: v for k, v in response.headers.items()}, "code": response.status_code, } ) ) if not clean or verbose: print(f"Fixtures written to {target_dir}") zip_file_name = f"{target_dir}.zip" with zipfile.ZipFile(zip_file_name, "w") as zip_file: for file_name in os.listdir(target_dir): zip_file.write(os.path.join(target_dir, file_name), file_name) if clean: os.remove(os.path.join(target_dir, file_name)) print(f"Zip file written to {zip_file_name}") if clean: try: os.rmdir(target_dir) if verbose: print(f"Removed {target_dir}") except OSError as err: print(f"Could not clean folder: {err.strerror}") except FileNotFoundError: pass def _read_ha_config(file_path: str) -> dict[str, list[str | None]]: result: dict[str, list[str | None]] = {} try: with open(file_path) as fp: content = json.load(fp) except (FileNotFoundError, ValueError): return result if content: for entry in content["data"]["entries"]: if entry["domain"] != "enphase_envoy" or entry["source"] == "ignore": continue data = entry["data"] unique_id = entry["unique_id"] result[unique_id] = [ data["host"], data["username"], data["password"], data["token"], ] return result if __name__ == "__main__": description = "Scan Enphase Envoy for endpoint list usable for pyenphase test fixtures. \ Creates output folder envoy_