theengsgateway 1.6.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (59) hide show
  1. theengsgateway-1.6.0/.github/ISSUE_TEMPLATE/bug_report.md +26 -0
  2. theengsgateway-1.6.0/.github/ISSUE_TEMPLATE/feature_request.md +17 -0
  3. theengsgateway-1.6.0/.github/pull_request_template.md +6 -0
  4. theengsgateway-1.6.0/.github/workflows/manual_test-pypi.yml +25 -0
  5. theengsgateway-1.6.0/.github/workflows/publish_docs.yml +36 -0
  6. theengsgateway-1.6.0/.github/workflows/release.yml +26 -0
  7. theengsgateway-1.6.0/.github/workflows/test.yml +50 -0
  8. theengsgateway-1.6.0/.gitignore +136 -0
  9. theengsgateway-1.6.0/.gitmodules +0 -0
  10. theengsgateway-1.6.0/.npmignore +12 -0
  11. theengsgateway-1.6.0/.pre-commit-config.yaml +24 -0
  12. theengsgateway-1.6.0/.vale.ini +13 -0
  13. theengsgateway-1.6.0/CODE_OF_CONDUCT.md +45 -0
  14. theengsgateway-1.6.0/LICENSE +674 -0
  15. theengsgateway-1.6.0/MANIFEST.in +4 -0
  16. theengsgateway-1.6.0/PKG-INFO +84 -0
  17. theengsgateway-1.6.0/README.md +60 -0
  18. theengsgateway-1.6.0/TheengsGateway/__init__.py +82 -0
  19. theengsgateway-1.6.0/TheengsGateway/__main__.py +5 -0
  20. theengsgateway-1.6.0/TheengsGateway/ble_gateway.py +784 -0
  21. theengsgateway-1.6.0/TheengsGateway/config.py +342 -0
  22. theengsgateway-1.6.0/TheengsGateway/decryption.py +201 -0
  23. theengsgateway-1.6.0/TheengsGateway/diagnose.py +190 -0
  24. theengsgateway-1.6.0/TheengsGateway/discovery.py +295 -0
  25. theengsgateway-1.6.0/TheengsGateway/privacy.py +42 -0
  26. theengsgateway-1.6.0/bin/TheengsGateway +4 -0
  27. theengsgateway-1.6.0/docs/.vuepress/config.js +30 -0
  28. theengsgateway-1.6.0/docs/.vuepress/public/apple-touch-icon.png +0 -0
  29. theengsgateway-1.6.0/docs/.vuepress/public/favicon-144x144.png +0 -0
  30. theengsgateway-1.6.0/docs/.vuepress/public/favicon-16x16.png +0 -0
  31. theengsgateway-1.6.0/docs/.vuepress/public/favicon-32x32.png +0 -0
  32. theengsgateway-1.6.0/docs/.vuepress/styles/index.styl +8 -0
  33. theengsgateway-1.6.0/docs/README.md +20 -0
  34. theengsgateway-1.6.0/docs/img/Theengs-IRK-extraction.png +0 -0
  35. theengsgateway-1.6.0/docs/img/TheengsGateway_controllers.png +0 -0
  36. theengsgateway-1.6.0/docs/img/TheengsGateway_mqtt_explorer.png +0 -0
  37. theengsgateway-1.6.0/docs/img/Victron01.png +0 -0
  38. theengsgateway-1.6.0/docs/img/Victron02.png +0 -0
  39. theengsgateway-1.6.0/docs/img/logo-Theengs.png +0 -0
  40. theengsgateway-1.6.0/docs/install/install.md +114 -0
  41. theengsgateway-1.6.0/docs/participate/adding-decoders.md +5 -0
  42. theengsgateway-1.6.0/docs/participate/development.md +59 -0
  43. theengsgateway-1.6.0/docs/participate/support.md +8 -0
  44. theengsgateway-1.6.0/docs/prerequisites/broker.md +19 -0
  45. theengsgateway-1.6.0/docs/prerequisites/controller.md +16 -0
  46. theengsgateway-1.6.0/docs/prerequisites/hardware.md +14 -0
  47. theengsgateway-1.6.0/docs/use/use.md +392 -0
  48. theengsgateway-1.6.0/package-lock.json +11750 -0
  49. theengsgateway-1.6.0/package.json +9 -0
  50. theengsgateway-1.6.0/pyproject.toml +14 -0
  51. theengsgateway-1.6.0/ruff.toml +17 -0
  52. theengsgateway-1.6.0/setup.cfg +4 -0
  53. theengsgateway-1.6.0/setup.py +32 -0
  54. theengsgateway-1.6.0/theengsgateway.egg-info/PKG-INFO +84 -0
  55. theengsgateway-1.6.0/theengsgateway.egg-info/SOURCES.txt +57 -0
  56. theengsgateway-1.6.0/theengsgateway.egg-info/dependency_links.txt +1 -0
  57. theengsgateway-1.6.0/theengsgateway.egg-info/requires.txt +10 -0
  58. theengsgateway-1.6.0/theengsgateway.egg-info/top_level.txt +1 -0
  59. theengsgateway-1.6.0/vale/styles/config/vocabularies/Theengs/accept.txt +21 -0
@@ -0,0 +1,26 @@
1
+ ---
2
+ name: Bug report
3
+ about: Create a report to help us improve
4
+
5
+ ---
6
+
7
+ **Describe the bug**
8
+ A clear and concise description of what the bug is.
9
+
10
+ **To Reproduce**
11
+ Steps to reproduce the behavior:
12
+ 1. Data processed
13
+ 2. Expected data
14
+ 3. See error
15
+
16
+ **Expected behavior**
17
+ A clear and concise description of what you expected to happen.
18
+
19
+ **Screenshots**
20
+ If applicable, add screenshots to help explain your problem.
21
+
22
+ **Environment**
23
+ Output of `python -m TheengsGateway.diagnose` or `python -m TheengsGateway.diagnose -c path_to_conf_file` if not using the default path for the configuration file.
24
+
25
+ **Additional context**
26
+ Add any other relevant context about the problem here.
@@ -0,0 +1,17 @@
1
+ ---
2
+ name: Feature request
3
+ about: Suggest an idea for this project
4
+
5
+ ---
6
+
7
+ **Is your feature request related to a problem? Please describe.**
8
+ A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
9
+
10
+ **Describe the solution you'd like**
11
+ A clear and concise description of what you want to happen.
12
+
13
+ **Describe alternatives you've considered**
14
+ A clear and concise description of any alternative solutions or features you've considered.
15
+
16
+ **Additional context**
17
+ Add any other context or screenshots about the feature request here.
@@ -0,0 +1,6 @@
1
+ ## Description:
2
+
3
+ ## Checklist:
4
+ - [ ] I have created the pull request against the latest development branch
5
+ - [ ] I have added only one feature/fix per PR and the code change compiles without warnings
6
+ - [ ] I accept the [Developer Certificate of Origin (DCO)](https://github.com/theengs/gateway/blob/development/docs/participate/development.md#developer-certificate-of-origin).
@@ -0,0 +1,25 @@
1
+ name: Publish distribution to TestPyPI
2
+ on:
3
+ workflow_dispatch:
4
+ jobs:
5
+ build-n-publish:
6
+ name: Build and publish distribution to TestPyPI
7
+ runs-on: ubuntu-22.04
8
+ steps:
9
+ - uses: actions/checkout@v3
10
+ with: {fetch-depth: 0} # deep clone for setuptools-scm
11
+ - uses: actions/setup-python@v4
12
+ with:
13
+ python-version: '3.12'
14
+ - name: Install pypa/build
15
+ run: |
16
+ python3 -m pip install --upgrade pip
17
+ pip3 install setuptools setuptools_scm cmake wheel scikit-build ninja
18
+ - name: Build a source tarball
19
+ run: |
20
+ python3 setup.py sdist
21
+ - name: Publish distribution 📦 to Test PyPI
22
+ uses: pypa/gh-action-pypi-publish@release/v1
23
+ with:
24
+ password: ${{ secrets.TEST_PYPI_API_TOKEN }}
25
+ repository-url: https://test.pypi.org/legacy/
@@ -0,0 +1,36 @@
1
+ name: Create and publish documentation
2
+ on:
3
+ workflow_dispatch:
4
+ release:
5
+ types: [published]
6
+ jobs:
7
+ documentation:
8
+ runs-on: ubuntu-22.04
9
+ name: Create the documentation and deploy it to GitHub Pages
10
+ steps:
11
+ - uses: actions/checkout@v3
12
+ - name: Set up Node.js
13
+ uses: actions/setup-node@v3
14
+ with:
15
+ node-version: "14.x"
16
+ - name: Set up Python
17
+ uses: actions/setup-python@v4
18
+ with:
19
+ python-version: "3.12"
20
+ - name: Install build dependencies
21
+ run: |
22
+ python -m pip install --upgrade pip
23
+ pip install requests
24
+ npm install
25
+ - name: Download Common Config
26
+ run: |
27
+ curl -o docs/.vuepress/public/commonConfig.js https://www.theengs.io/commonConfig.js
28
+ - name: Build documentation
29
+ run: |
30
+ npm run docs:build
31
+ - name: Deploy to GitHub Pages
32
+ uses: peaceiris/actions-gh-pages@v3
33
+ with:
34
+ github_token: ${{ secrets.GITHUB_TOKEN }}
35
+ publish_dir: ./docs/.vuepress/dist
36
+ cname: gateway.theengs.io
@@ -0,0 +1,26 @@
1
+ name: Publish distributions to PyPI and documentation to GH pages
2
+ on:
3
+ release:
4
+ types: [published]
5
+
6
+ jobs:
7
+ build-n-publish:
8
+ name: Build and publish distributions to PyPI
9
+ runs-on: ubuntu-22.04
10
+ steps:
11
+ - uses: actions/checkout@v3
12
+ with: {fetch-depth: 0} # deep clone for setuptools-scm
13
+ - uses: actions/setup-python@v4
14
+ with:
15
+ python-version: '3.12'
16
+ - name: Install pypa/build
17
+ run: |
18
+ python3 -m pip install --upgrade pip
19
+ pip3 install setuptools setuptools_scm cmake wheel scikit-build ninja
20
+ - name: Build a source tarball
21
+ run: |
22
+ python3 setup.py sdist
23
+ - name: Publish distribution 📦 to PyPI
24
+ uses: pypa/gh-action-pypi-publish@release/v1
25
+ with:
26
+ password: ${{ secrets.PYPI_API_TOKEN }}
@@ -0,0 +1,50 @@
1
+ name: Test build
2
+
3
+ on:
4
+ pull_request:
5
+
6
+ jobs:
7
+ docs:
8
+ runs-on: ubuntu-22.04
9
+ steps:
10
+ - name: Checkout repository
11
+ uses: actions/checkout@v3
12
+ - name: Vale
13
+ uses: pre-commit/action@v3.0.0
14
+ with:
15
+ extra_args: --all-files vale
16
+ test:
17
+ strategy:
18
+ fail-fast: false
19
+ matrix:
20
+ python:
21
+ - "3.8" # oldest Python supported by PSF
22
+ - "3.9"
23
+ - "3.10"
24
+ - "3.11"
25
+ - "3.12" # newest stable Python
26
+ runs-on: ubuntu-22.04
27
+ steps:
28
+ - name: Checkout repository
29
+ uses: actions/checkout@v3
30
+ with: {fetch-depth: 0} # deep clone for setuptools-scm
31
+ - name: Set up Python
32
+ uses: actions/setup-python@v4
33
+ with:
34
+ python-version: ${{ matrix.python }}
35
+ - name: Mypy
36
+ uses: pre-commit/action@v3.0.0
37
+ with:
38
+ extra_args: --all-files mypy
39
+ - name: Install requirements
40
+ run: |
41
+ pip3 install --upgrade pip
42
+ pip3 install setuptools setuptools_scm cmake wheel scikit-build ninja
43
+ - name: Build package
44
+ run: |
45
+ python3 setup.py sdist
46
+ - uses: actions/upload-artifact@v4
47
+ if: ${{ matrix.python == 3.12 }}
48
+ with:
49
+ name: python-package
50
+ path: dist/
@@ -0,0 +1,136 @@
1
+ # Byte-compiled / optimized / DLL files
2
+ __pycache__/
3
+ *.py[cod]
4
+ *$py.class
5
+ _skbuild
6
+
7
+ # C extensions
8
+ *.so
9
+
10
+ # Distribution / packaging
11
+ .Python
12
+ build/
13
+ develop-eggs/
14
+ dist/
15
+ downloads/
16
+ eggs/
17
+ .eggs/
18
+ lib/
19
+ lib64/
20
+ parts/
21
+ sdist/
22
+ var/
23
+ wheels/
24
+ pip-wheel-metadata/
25
+ share/python-wheels/
26
+ *.egg-info/
27
+ .installed.cfg
28
+ *.egg
29
+ MANIFEST
30
+
31
+ # PyInstaller
32
+ # Usually these files are written by a python script from a template
33
+ # before PyInstaller builds the exe, so as to inject date/other infos into it.
34
+ *.manifest
35
+ *.spec
36
+
37
+ # Installer logs
38
+ pip-log.txt
39
+ pip-delete-this-directory.txt
40
+
41
+ # Unit test / coverage reports
42
+ htmlcov/
43
+ .tox/
44
+ .nox/
45
+ .coverage
46
+ .coverage.*
47
+ .cache
48
+ nosetests.xml
49
+ coverage.xml
50
+ *.cover
51
+ *.py,cover
52
+ .hypothesis/
53
+ .pytest_cache/
54
+
55
+ # Translations
56
+ *.mo
57
+ *.pot
58
+
59
+ # Django stuff:
60
+ *.log
61
+ local_settings.py
62
+ db.sqlite3
63
+ db.sqlite3-journal
64
+
65
+ # Flask stuff:
66
+ instance/
67
+ .webassets-cache
68
+
69
+ # Scrapy stuff:
70
+ .scrapy
71
+
72
+ # Sphinx documentation
73
+ docs/_build/
74
+
75
+ # PyBuilder
76
+ target/
77
+
78
+ # Jupyter Notebook
79
+ .ipynb_checkpoints
80
+
81
+ # IPython
82
+ profile_default/
83
+ ipython_config.py
84
+
85
+ # pyenv
86
+ .python-version
87
+
88
+ # pipenv
89
+ # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
90
+ # However, in case of collaboration, if having platform-specific dependencies or dependencies
91
+ # having no cross-platform support, pipenv may install dependencies that don't work, or not
92
+ # install all needed dependencies.
93
+ #Pipfile.lock
94
+
95
+ # PEP 582; used by e.g. github.com/David-OConnor/pyflow
96
+ __pypackages__/
97
+
98
+ # Celery stuff
99
+ celerybeat-schedule
100
+ celerybeat.pid
101
+
102
+ # SageMath parsed files
103
+ *.sage.py
104
+
105
+ # Environments
106
+ .env
107
+ .venv
108
+ env/
109
+ venv/
110
+ ENV/
111
+ env.bak/
112
+ venv.bak/
113
+
114
+ # Spyder project settings
115
+ .spyderproject
116
+ .spyproject
117
+
118
+ # Rope project settings
119
+ .ropeproject
120
+
121
+ # mkdocs documentation
122
+ /site
123
+
124
+ # mypy
125
+ .mypy_cache/
126
+ .dmypy.json
127
+ dmypy.json
128
+
129
+ # Pyre type checker
130
+ .pyre/
131
+
132
+ # VuePress
133
+ node_modules/
134
+
135
+ # Vale styles
136
+ vale/styles/Google
File without changes
@@ -0,0 +1,12 @@
1
+ pids
2
+ logs
3
+ node_modules
4
+ npm-debug.log
5
+ coverage/
6
+ run
7
+ dist
8
+ .DS_Store
9
+ .nyc_output
10
+ .basement
11
+ config.local.js
12
+ basement_dist
@@ -0,0 +1,24 @@
1
+ ---
2
+ repos:
3
+ - repo: https://github.com/errata-ai/vale
4
+ rev: 'v3.0.4'
5
+ hooks:
6
+ - id: vale
7
+ name: vale-sync
8
+ pass_filenames: false
9
+ args: [sync]
10
+ - id: vale
11
+ - repo: https://github.com/pre-commit/mirrors-mypy
12
+ rev: v1.8.0
13
+ hooks:
14
+ - id: mypy
15
+ entry: env MYPYPATH=TheengsGateway mypy
16
+ args: []
17
+ additional_dependencies:
18
+ - bleak>=0.19.0
19
+ - bluetooth-adapters>=0.15.3; python_version>="3.9"
20
+ - bluetooth-clocks<1.0
21
+ - bluetooth-numbers>=1.0,<2.0
22
+ - importlib-metadata
23
+ - paho-mqtt>=2.0.0,<3.0.0
24
+ - theengsdecoder>=1.9.5
@@ -0,0 +1,13 @@
1
+ StylesPath = "vale/styles"
2
+ MinAlertLevel = suggestion
3
+ Vocab = Theengs
4
+ Packages = Google
5
+
6
+ [*.md]
7
+ BasedOnStyles = Vale, Google
8
+ Google.Ellipses = NO
9
+ Google.FirstPerson = NO
10
+ Google.Headings = NO
11
+ Google.Parens = NO
12
+ Google.WordList = NO
13
+ Google.We = NO
@@ -0,0 +1,45 @@
1
+ <!-- vale Google.Passive = NO -->
2
+
3
+ # Contributor Covenant Code of Conduct
4
+
5
+ ## Our Pledge
6
+
7
+ In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation.
8
+
9
+ ## Our Standards
10
+
11
+ Examples of behavior that contributes to creating a positive environment include:
12
+
13
+ * Using welcoming and inclusive language
14
+ * Being respectful of differing viewpoints and experiences
15
+ * Gracefully accepting constructive criticism
16
+ * Focusing on what's best for the community
17
+ * Showing empathy towards other community members
18
+
19
+ Examples of unacceptable behavior by participants include:
20
+
21
+ * The use of sexualized language or imagery and unwelcome sexual attention or advances
22
+ * Trolling, insulting/derogatory comments, and personal or political attacks
23
+ * Public or private harassment
24
+ * Publishing others' private information, such as a physical or electronic address, without explicit permission
25
+ * Other conduct which could reasonably be considered inappropriate in a professional setting
26
+
27
+ ## Our Responsibilities
28
+
29
+ Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior.
30
+
31
+ Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that aren't aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.
32
+
33
+ ## Scope
34
+
35
+ This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers.
36
+
37
+ ## Enforcement
38
+
39
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at untechnophile@gmail.com. The project team reviews and investigates all complaints, and responds in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.
40
+
41
+ Project maintainers who don't follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.
42
+
43
+ ## Attribution
44
+
45
+ This Code of Conduct is adapted from the [Contributor Covenant homepage](https://contributor-covenant.org), [version 1.4](https://contributor-covenant.org/version/1/4/).