python-selve-new 2.2.12__tar.gz → 2.2.14__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.
- python_selve_new-2.2.14/.github/FUNDING.yml +13 -0
- python_selve_new-2.2.14/.github/workflows/python-publish.yml +41 -0
- python_selve_new-2.2.14/.gitignore +129 -0
- python_selve_new-2.2.14/.idea/.gitignore +8 -0
- python_selve_new-2.2.14/.idea/inspectionProfiles/profiles_settings.xml +6 -0
- python_selve_new-2.2.14/.idea/misc.xml +7 -0
- python_selve_new-2.2.14/.idea/modules.xml +8 -0
- python_selve_new-2.2.14/.idea/python-selve-new.iml +14 -0
- python_selve_new-2.2.14/.idea/vcs.xml +6 -0
- python_selve_new-2.2.14/.vscode/settings.json +2 -0
- {python-selve-new-2.2.12 → python_selve_new-2.2.14}/PKG-INFO +11 -3
- python_selve_new-2.2.14/package.sh +6 -0
- python_selve_new-2.2.14/pyproject.toml +50 -0
- {python-selve-new-2.2.12 → python_selve_new-2.2.14}/python_selve_new.egg-info/PKG-INFO +11 -3
- {python-selve-new-2.2.12 → python_selve_new-2.2.14}/python_selve_new.egg-info/SOURCES.txt +14 -0
- python_selve_new-2.2.14/python_selve_new.egg-info/entry_points.txt +2 -0
- {python-selve-new-2.2.12 → python_selve_new-2.2.14}/python_selve_new.egg-info/requires.txt +1 -0
- {python-selve-new-2.2.12 → python_selve_new-2.2.14}/selve/__init__.py +9 -12
- {python-selve-new-2.2.12 → python_selve_new-2.2.14}/setup.py +1 -1
- python_selve_new-2.2.14/test.py +41 -0
- {python-selve-new-2.2.12 → python_selve_new-2.2.14}/LICENSE +0 -0
- {python-selve-new-2.2.12 → python_selve_new-2.2.14}/README.md +0 -0
- {python-selve-new-2.2.12 → python_selve_new-2.2.14}/python_selve_new.egg-info/dependency_links.txt +0 -0
- {python-selve-new-2.2.12 → python_selve_new-2.2.14}/python_selve_new.egg-info/top_level.txt +0 -0
- {python-selve-new-2.2.12 → python_selve_new-2.2.14}/selve/commands/__init__.py +0 -0
- {python-selve-new-2.2.12 → python_selve_new-2.2.14}/selve/commands/command.py +0 -0
- {python-selve-new-2.2.12 → python_selve_new-2.2.14}/selve/commands/device.py +0 -0
- {python-selve-new-2.2.12 → python_selve_new-2.2.14}/selve/commands/event.py +0 -0
- {python-selve-new-2.2.12 → python_selve_new-2.2.14}/selve/commands/group.py +0 -0
- {python-selve-new-2.2.12 → python_selve_new-2.2.14}/selve/commands/iveo.py +0 -0
- {python-selve-new-2.2.12 → python_selve_new-2.2.14}/selve/commands/param.py +0 -0
- {python-selve-new-2.2.12 → python_selve_new-2.2.14}/selve/commands/senSim.py +0 -0
- {python-selve-new-2.2.12 → python_selve_new-2.2.14}/selve/commands/sender.py +0 -0
- {python-selve-new-2.2.12 → python_selve_new-2.2.14}/selve/commands/sensor.py +0 -0
- {python-selve-new-2.2.12 → python_selve_new-2.2.14}/selve/commands/service.py +0 -0
- {python-selve-new-2.2.12 → python_selve_new-2.2.14}/selve/device.py +0 -0
- {python-selve-new-2.2.12 → python_selve_new-2.2.14}/selve/gateway.py +0 -0
- {python-selve-new-2.2.12 → python_selve_new-2.2.14}/selve/group.py +0 -0
- {python-selve-new-2.2.12 → python_selve_new-2.2.14}/selve/iveo.py +0 -0
- {python-selve-new-2.2.12 → python_selve_new-2.2.14}/selve/senSim.py +0 -0
- {python-selve-new-2.2.12 → python_selve_new-2.2.14}/selve/sender.py +0 -0
- {python-selve-new-2.2.12 → python_selve_new-2.2.14}/selve/sensor.py +0 -0
- {python-selve-new-2.2.12 → python_selve_new-2.2.14}/selve/util/__init__.py +0 -0
- {python-selve-new-2.2.12 → python_selve_new-2.2.14}/selve/util/errors.py +0 -0
- {python-selve-new-2.2.12 → python_selve_new-2.2.14}/selve/util/protocol.py +0 -0
- {python-selve-new-2.2.12 → python_selve_new-2.2.14}/setup.cfg +0 -0
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# These are supported funding model platforms
|
|
2
|
+
|
|
3
|
+
github: [Kannix2005] # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
|
|
4
|
+
patreon: # Replace with a single Patreon username
|
|
5
|
+
open_collective: # Replace with a single Open Collective username
|
|
6
|
+
ko_fi: # Replace with a single Ko-fi username
|
|
7
|
+
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
|
|
8
|
+
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
|
|
9
|
+
liberapay: # Replace with a single Liberapay username
|
|
10
|
+
issuehunt: # Replace with a single IssueHunt username
|
|
11
|
+
otechie: # Replace with a single Otechie username
|
|
12
|
+
lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry
|
|
13
|
+
custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# This workflow will upload a Python Package using Twine when a release is created
|
|
2
|
+
# For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries
|
|
3
|
+
|
|
4
|
+
# This workflow uses actions that are not certified by GitHub.
|
|
5
|
+
# They are provided by a third-party and are governed by
|
|
6
|
+
# separate terms of service, privacy policy, and support
|
|
7
|
+
# documentation.
|
|
8
|
+
|
|
9
|
+
name: Upload Python Package
|
|
10
|
+
|
|
11
|
+
on:
|
|
12
|
+
push:
|
|
13
|
+
branches:
|
|
14
|
+
- main
|
|
15
|
+
|
|
16
|
+
permissions:
|
|
17
|
+
contents: read
|
|
18
|
+
|
|
19
|
+
jobs:
|
|
20
|
+
deploy:
|
|
21
|
+
|
|
22
|
+
runs-on: ubuntu-latest
|
|
23
|
+
|
|
24
|
+
steps:
|
|
25
|
+
- uses: actions/checkout@v3
|
|
26
|
+
- name: Set up Python
|
|
27
|
+
uses: actions/setup-python@v3
|
|
28
|
+
with:
|
|
29
|
+
python-version: '3.x'
|
|
30
|
+
- name: Install dependencies
|
|
31
|
+
run: |
|
|
32
|
+
python -m pip install --upgrade pip
|
|
33
|
+
pip install build
|
|
34
|
+
- name: Build package
|
|
35
|
+
run: |
|
|
36
|
+
python -m build
|
|
37
|
+
- name: Publish package
|
|
38
|
+
uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29
|
|
39
|
+
with:
|
|
40
|
+
user: __token__
|
|
41
|
+
password: ${{ secrets.PYPI_API_TOKEN }}
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
# Byte-compiled / optimized / DLL files
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[cod]
|
|
4
|
+
*$py.class
|
|
5
|
+
|
|
6
|
+
# C extensions
|
|
7
|
+
*.so
|
|
8
|
+
|
|
9
|
+
# Distribution / packaging
|
|
10
|
+
.Python
|
|
11
|
+
build/
|
|
12
|
+
develop-eggs/
|
|
13
|
+
dist/
|
|
14
|
+
downloads/
|
|
15
|
+
eggs/
|
|
16
|
+
.eggs/
|
|
17
|
+
lib/
|
|
18
|
+
lib64/
|
|
19
|
+
parts/
|
|
20
|
+
sdist/
|
|
21
|
+
var/
|
|
22
|
+
wheels/
|
|
23
|
+
pip-wheel-metadata/
|
|
24
|
+
share/python-wheels/
|
|
25
|
+
*.egg-info/
|
|
26
|
+
.installed.cfg
|
|
27
|
+
*.egg
|
|
28
|
+
MANIFEST
|
|
29
|
+
|
|
30
|
+
# PyInstaller
|
|
31
|
+
# Usually these files are written by a python script from a template
|
|
32
|
+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
|
|
33
|
+
*.manifest
|
|
34
|
+
*.spec
|
|
35
|
+
|
|
36
|
+
# Installer logs
|
|
37
|
+
pip-log.txt
|
|
38
|
+
pip-delete-this-directory.txt
|
|
39
|
+
|
|
40
|
+
# Unit test / coverage reports
|
|
41
|
+
htmlcov/
|
|
42
|
+
.tox/
|
|
43
|
+
.nox/
|
|
44
|
+
.coverage
|
|
45
|
+
.coverage.*
|
|
46
|
+
.cache
|
|
47
|
+
nosetests.xml
|
|
48
|
+
coverage.xml
|
|
49
|
+
*.cover
|
|
50
|
+
*.py,cover
|
|
51
|
+
.hypothesis/
|
|
52
|
+
.pytest_cache/
|
|
53
|
+
|
|
54
|
+
# Translations
|
|
55
|
+
*.mo
|
|
56
|
+
*.pot
|
|
57
|
+
|
|
58
|
+
# Django stuff:
|
|
59
|
+
*.log
|
|
60
|
+
local_settings.py
|
|
61
|
+
db.sqlite3
|
|
62
|
+
db.sqlite3-journal
|
|
63
|
+
|
|
64
|
+
# Flask stuff:
|
|
65
|
+
instance/
|
|
66
|
+
.webassets-cache
|
|
67
|
+
|
|
68
|
+
# Scrapy stuff:
|
|
69
|
+
.scrapy
|
|
70
|
+
|
|
71
|
+
# Sphinx documentation
|
|
72
|
+
docs/_build/
|
|
73
|
+
|
|
74
|
+
# PyBuilder
|
|
75
|
+
target/
|
|
76
|
+
|
|
77
|
+
# Jupyter Notebook
|
|
78
|
+
.ipynb_checkpoints
|
|
79
|
+
|
|
80
|
+
# IPython
|
|
81
|
+
profile_default/
|
|
82
|
+
ipython_config.py
|
|
83
|
+
|
|
84
|
+
# pyenv
|
|
85
|
+
.python-version
|
|
86
|
+
|
|
87
|
+
# pipenv
|
|
88
|
+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
|
|
89
|
+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
|
|
90
|
+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
|
|
91
|
+
# install all needed dependencies.
|
|
92
|
+
#Pipfile.lock
|
|
93
|
+
|
|
94
|
+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow
|
|
95
|
+
__pypackages__/
|
|
96
|
+
|
|
97
|
+
# Celery stuff
|
|
98
|
+
celerybeat-schedule
|
|
99
|
+
celerybeat.pid
|
|
100
|
+
|
|
101
|
+
# SageMath parsed files
|
|
102
|
+
*.sage.py
|
|
103
|
+
|
|
104
|
+
# Environments
|
|
105
|
+
.env
|
|
106
|
+
.venv
|
|
107
|
+
env/
|
|
108
|
+
venv/
|
|
109
|
+
ENV/
|
|
110
|
+
env.bak/
|
|
111
|
+
venv.bak/
|
|
112
|
+
|
|
113
|
+
# Spyder project settings
|
|
114
|
+
.spyderproject
|
|
115
|
+
.spyproject
|
|
116
|
+
|
|
117
|
+
# Rope project settings
|
|
118
|
+
.ropeproject
|
|
119
|
+
|
|
120
|
+
# mkdocs documentation
|
|
121
|
+
/site
|
|
122
|
+
|
|
123
|
+
# mypy
|
|
124
|
+
.mypy_cache/
|
|
125
|
+
.dmypy.json
|
|
126
|
+
dmypy.json
|
|
127
|
+
|
|
128
|
+
# Pyre type checker
|
|
129
|
+
.pyre/
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<project version="4">
|
|
3
|
+
<component name="ProjectRootManager" version="2" project-jdk-name="Python 3.9 (python-selve-new)" project-jdk-type="Python SDK" />
|
|
4
|
+
<component name="PythonCompatibilityInspectionAdvertiser">
|
|
5
|
+
<option name="version" value="3" />
|
|
6
|
+
</component>
|
|
7
|
+
</project>
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<project version="4">
|
|
3
|
+
<component name="ProjectModuleManager">
|
|
4
|
+
<modules>
|
|
5
|
+
<module fileurl="file://$PROJECT_DIR$/.idea/python-selve-new.iml" filepath="$PROJECT_DIR$/.idea/python-selve-new.iml" />
|
|
6
|
+
</modules>
|
|
7
|
+
</component>
|
|
8
|
+
</project>
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<module type="PYTHON_MODULE" version="4">
|
|
3
|
+
<component name="NewModuleRootManager">
|
|
4
|
+
<content url="file://$MODULE_DIR$">
|
|
5
|
+
<excludeFolder url="file://$MODULE_DIR$/venv" />
|
|
6
|
+
</content>
|
|
7
|
+
<orderEntry type="jdk" jdkName="Python 3.9 (python-selve-new)" jdkType="Python SDK" />
|
|
8
|
+
<orderEntry type="sourceFolder" forTests="false" />
|
|
9
|
+
</component>
|
|
10
|
+
<component name="PyDocumentationSettings">
|
|
11
|
+
<option name="format" value="PLAIN" />
|
|
12
|
+
<option name="myDocStringFormat" value="Plain" />
|
|
13
|
+
</component>
|
|
14
|
+
</module>
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: python-selve-new
|
|
3
|
-
Version: 2.2.
|
|
3
|
+
Version: 2.2.14
|
|
4
4
|
Summary: Python library for interfacing with selve devices using the USB-RF controller. Written completely new.
|
|
5
5
|
Home-page: https://github.com/Kannix2005/python-selve-new
|
|
6
6
|
Author: Stefan Altheimer
|
|
7
|
-
Author-email: me@stefan-altheimer.de
|
|
8
|
-
|
|
7
|
+
Author-email: Stefan Altheimer <me@stefan-altheimer.de>
|
|
8
|
+
License: GNU General Public License v2 or later (GPLv2+)
|
|
9
|
+
Keywords: selve,blind,awning,shutter,usb,rf
|
|
9
10
|
Classifier: Development Status :: 5 - Production/Stable
|
|
10
11
|
Classifier: Intended Audience :: Information Technology
|
|
11
12
|
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
@@ -20,8 +21,15 @@ Classifier: Programming Language :: Python :: 3.9
|
|
|
20
21
|
Classifier: Programming Language :: Python :: 3.10
|
|
21
22
|
Classifier: Programming Language :: Python :: 3.11
|
|
22
23
|
Classifier: Programming Language :: Python :: 3.12
|
|
24
|
+
Requires-Python: >=3.8
|
|
23
25
|
Description-Content-Type: text/markdown
|
|
24
26
|
License-File: LICENSE
|
|
27
|
+
Requires-Dist: requests
|
|
28
|
+
Requires-Dist: pyserial
|
|
29
|
+
Requires-Dist: pybase64
|
|
30
|
+
Requires-Dist: untangle
|
|
31
|
+
Requires-Dist: nest_asyncio
|
|
32
|
+
Requires-Dist: aioconsole
|
|
25
33
|
|
|
26
34
|
# python-selve-new
|
|
27
35
|
Python module for controlling Selve devices using an USB-RF-Gateway. Written completely new.
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["setuptools", "setuptools-scm"]
|
|
3
|
+
build-backend = "setuptools.build_meta"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "python-selve-new"
|
|
7
|
+
authors = [
|
|
8
|
+
{name = "Stefan Altheimer", email = "me@stefan-altheimer.de"},
|
|
9
|
+
]
|
|
10
|
+
description = "Python library for interfacing with selve devices using the USB-RF controller. Written completely new."
|
|
11
|
+
readme = "README.md"
|
|
12
|
+
requires-python = ">=3.8"
|
|
13
|
+
keywords = ["selve", "blind", "awning", "shutter", "usb", "rf"]
|
|
14
|
+
license = {text = "GNU General Public License v2 or later (GPLv2+)"}
|
|
15
|
+
classifiers = [
|
|
16
|
+
"Development Status :: 5 - Production/Stable",
|
|
17
|
+
"Intended Audience :: Information Technology",
|
|
18
|
+
"Topic :: Software Development :: Libraries :: Python Modules",
|
|
19
|
+
|
|
20
|
+
# Pick your license as you wish
|
|
21
|
+
"License :: OSI Approved :: GNU General Public License v2 or later (GPLv2+)",
|
|
22
|
+
|
|
23
|
+
# Specify the Python versions you support here. In particular, ensure
|
|
24
|
+
# that you indicate whether you support Python 2, Python 3 or both.
|
|
25
|
+
"Programming Language :: Python :: 3",
|
|
26
|
+
"Programming Language :: Python :: 3.4",
|
|
27
|
+
"Programming Language :: Python :: 3.5",
|
|
28
|
+
"Programming Language :: Python :: 3.6",
|
|
29
|
+
"Programming Language :: Python :: 3.7",
|
|
30
|
+
"Programming Language :: Python :: 3.8",
|
|
31
|
+
"Programming Language :: Python :: 3.9",
|
|
32
|
+
"Programming Language :: Python :: 3.10",
|
|
33
|
+
"Programming Language :: Python :: 3.11",
|
|
34
|
+
"Programming Language :: Python :: 3.12"
|
|
35
|
+
]
|
|
36
|
+
dependencies = [
|
|
37
|
+
"requests",
|
|
38
|
+
"pyserial",
|
|
39
|
+
"pybase64",
|
|
40
|
+
"untangle",
|
|
41
|
+
"nest_asyncio",
|
|
42
|
+
"aioconsole"
|
|
43
|
+
]
|
|
44
|
+
dynamic = ["version"]
|
|
45
|
+
|
|
46
|
+
[project.scripts]
|
|
47
|
+
my-script = "my_package.module:function"
|
|
48
|
+
|
|
49
|
+
# ... other project metadata fields as listed in:
|
|
50
|
+
# https://packaging.python.org/en/latest/guides/writing-pyproject-toml/
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: python-selve-new
|
|
3
|
-
Version: 2.2.
|
|
3
|
+
Version: 2.2.14
|
|
4
4
|
Summary: Python library for interfacing with selve devices using the USB-RF controller. Written completely new.
|
|
5
5
|
Home-page: https://github.com/Kannix2005/python-selve-new
|
|
6
6
|
Author: Stefan Altheimer
|
|
7
|
-
Author-email: me@stefan-altheimer.de
|
|
8
|
-
|
|
7
|
+
Author-email: Stefan Altheimer <me@stefan-altheimer.de>
|
|
8
|
+
License: GNU General Public License v2 or later (GPLv2+)
|
|
9
|
+
Keywords: selve,blind,awning,shutter,usb,rf
|
|
9
10
|
Classifier: Development Status :: 5 - Production/Stable
|
|
10
11
|
Classifier: Intended Audience :: Information Technology
|
|
11
12
|
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
@@ -20,8 +21,15 @@ Classifier: Programming Language :: Python :: 3.9
|
|
|
20
21
|
Classifier: Programming Language :: Python :: 3.10
|
|
21
22
|
Classifier: Programming Language :: Python :: 3.11
|
|
22
23
|
Classifier: Programming Language :: Python :: 3.12
|
|
24
|
+
Requires-Python: >=3.8
|
|
23
25
|
Description-Content-Type: text/markdown
|
|
24
26
|
License-File: LICENSE
|
|
27
|
+
Requires-Dist: requests
|
|
28
|
+
Requires-Dist: pyserial
|
|
29
|
+
Requires-Dist: pybase64
|
|
30
|
+
Requires-Dist: untangle
|
|
31
|
+
Requires-Dist: nest_asyncio
|
|
32
|
+
Requires-Dist: aioconsole
|
|
25
33
|
|
|
26
34
|
# python-selve-new
|
|
27
35
|
Python module for controlling Selve devices using an USB-RF-Gateway. Written completely new.
|
|
@@ -1,9 +1,23 @@
|
|
|
1
|
+
.gitignore
|
|
1
2
|
LICENSE
|
|
2
3
|
README.md
|
|
4
|
+
package.sh
|
|
5
|
+
pyproject.toml
|
|
3
6
|
setup.py
|
|
7
|
+
test.py
|
|
8
|
+
.github/FUNDING.yml
|
|
9
|
+
.github/workflows/python-publish.yml
|
|
10
|
+
.idea/.gitignore
|
|
11
|
+
.idea/misc.xml
|
|
12
|
+
.idea/modules.xml
|
|
13
|
+
.idea/python-selve-new.iml
|
|
14
|
+
.idea/vcs.xml
|
|
15
|
+
.idea/inspectionProfiles/profiles_settings.xml
|
|
16
|
+
.vscode/settings.json
|
|
4
17
|
python_selve_new.egg-info/PKG-INFO
|
|
5
18
|
python_selve_new.egg-info/SOURCES.txt
|
|
6
19
|
python_selve_new.egg-info/dependency_links.txt
|
|
20
|
+
python_selve_new.egg-info/entry_points.txt
|
|
7
21
|
python_selve_new.egg-info/requires.txt
|
|
8
22
|
python_selve_new.egg-info/top_level.txt
|
|
9
23
|
selve/__init__.py
|
|
@@ -179,7 +179,7 @@ class Selve:
|
|
|
179
179
|
except:
|
|
180
180
|
self._LOGGER.debug("Cannot close com port")
|
|
181
181
|
pass
|
|
182
|
-
if await self.pingGateway():
|
|
182
|
+
if await self.pingGateway(fromConfigFlow=fromConfigFlow):
|
|
183
183
|
if not fromConfigFlow:
|
|
184
184
|
if discover:
|
|
185
185
|
self._LOGGER.info("Discovering devices")
|
|
@@ -230,10 +230,7 @@ class Selve:
|
|
|
230
230
|
# wait for the rx/tx thread to end, these need to be gathered to
|
|
231
231
|
# collect all the exceptions
|
|
232
232
|
self._LOGGER.debug("Preparing for termination")
|
|
233
|
-
self.
|
|
234
|
-
if self.workerTask is not None:
|
|
235
|
-
self.workerTask.cancel()
|
|
236
|
-
await self.workerTask
|
|
233
|
+
await self.stopWorker()
|
|
237
234
|
# close the serial port, do the cleanup
|
|
238
235
|
if self._serial.is_open:
|
|
239
236
|
self._serial.close()
|
|
@@ -546,14 +543,14 @@ class Selve:
|
|
|
546
543
|
await self.txQ.put(command)
|
|
547
544
|
|
|
548
545
|
|
|
549
|
-
async def executeCommandSyncWithResponse(self, command: Command):
|
|
546
|
+
async def executeCommandSyncWithResponse(self, command: Command, fromConfigFlow=False):
|
|
550
547
|
await self.stopWorker()
|
|
551
548
|
resp = await self._executeCommandSyncWithResponse(command)
|
|
552
549
|
if (resp == False):
|
|
553
550
|
#something went wrong, try again
|
|
554
551
|
resp = await self._executeCommandSyncWithResponse(command)
|
|
555
|
-
|
|
556
|
-
|
|
552
|
+
if not fromConfigFlow:
|
|
553
|
+
await self.startWorker()
|
|
557
554
|
return resp
|
|
558
555
|
|
|
559
556
|
|
|
@@ -604,8 +601,8 @@ class Selve:
|
|
|
604
601
|
|
|
605
602
|
await self.stopWorker()
|
|
606
603
|
await self.setEvents(0,0,0,0,0)
|
|
607
|
-
|
|
608
|
-
if
|
|
604
|
+
rdy = await self.gatewayReady()
|
|
605
|
+
if rdy:
|
|
609
606
|
iveoIds: IveoGetIdsResponse = await self.executeCommandSyncWithResponse(IveoGetIds())
|
|
610
607
|
deviceIds: DeviceGetIdsResponse = await self.executeCommandSyncWithResponse(DeviceGetIds())
|
|
611
608
|
groupIds: GroupGetIdsResponse = await self.executeCommandSyncWithResponse(GroupGetIds())
|
|
@@ -887,9 +884,9 @@ class Selve:
|
|
|
887
884
|
|
|
888
885
|
### Service
|
|
889
886
|
|
|
890
|
-
async def pingGateway(self):
|
|
887
|
+
async def pingGateway(self, fromConfigFlow=False):
|
|
891
888
|
cmd = ServicePing()
|
|
892
|
-
methodResponse = await self.executeCommandSyncWithResponse(cmd)
|
|
889
|
+
methodResponse = await self.executeCommandSyncWithResponse(cmd, fromConfigFlow=fromConfigFlow)
|
|
893
890
|
try:
|
|
894
891
|
if hasattr(methodResponse, "name"):
|
|
895
892
|
if methodResponse.name == "selve.GW.service.ping":
|
|
@@ -15,7 +15,7 @@ with open(path.join(here, 'README.md'), encoding='utf-8') as f:
|
|
|
15
15
|
setup(
|
|
16
16
|
|
|
17
17
|
name='python-selve-new', # Required
|
|
18
|
-
version='2.2.
|
|
18
|
+
version='2.2.14', # Required
|
|
19
19
|
description='Python library for interfacing with selve devices using the USB-RF controller. Written completely new.', # Required
|
|
20
20
|
long_description=long_description, # Optional
|
|
21
21
|
long_description_content_type="text/markdown",
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import logging
|
|
2
|
+
import sys
|
|
3
|
+
import asyncio
|
|
4
|
+
import threading
|
|
5
|
+
|
|
6
|
+
import selve
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
## In HA this would be loop = self.hass.loop
|
|
10
|
+
loop = asyncio.new_event_loop()
|
|
11
|
+
portname = 'COM4'
|
|
12
|
+
|
|
13
|
+
logger = logging.getLogger("Logger")
|
|
14
|
+
logger.setLevel(logging.DEBUG)
|
|
15
|
+
handler = logging.StreamHandler(sys.stdout)
|
|
16
|
+
handler.setLevel(logging.DEBUG)
|
|
17
|
+
formatter = logging.Formatter('%(asctime)s - %(name)s - %(levelname)s - %(message)s')
|
|
18
|
+
handler.setFormatter(formatter)
|
|
19
|
+
logger.addHandler(handler)
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
selve = selve.Selve(portname, loop, develop=False, discover=False, logger=logger)
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
#try:
|
|
27
|
+
# loop.run_until_complete()
|
|
28
|
+
#except KeyboardInterrupt:
|
|
29
|
+
# loop.close()
|
|
30
|
+
|
|
31
|
+
threading.Thread(target=loop.run_forever, args=())
|
|
32
|
+
|
|
33
|
+
selve.pingGateway()
|
|
34
|
+
#selve.resetGateway()
|
|
35
|
+
selve.discover()
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
#selve.moveDeviceDown(selve.devices['device'][1])
|
|
39
|
+
selve.moveGroupUp(selve.devices['group'][1])
|
|
40
|
+
|
|
41
|
+
loop.run_forever()
|
|
File without changes
|
|
File without changes
|
{python-selve-new-2.2.12 → python_selve_new-2.2.14}/python_selve_new.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|