diff --git a/devices/protocols/ZwaveJS/README.rst b/devices/protocols/ZwaveJS/README.rst new file mode 100644 index 0000000000000000000000000000000000000000..df82400eaee6612d6353c77be5afabc4d58da656 --- /dev/null +++ b/devices/protocols/ZwaveJS/README.rst @@ -0,0 +1 @@ +ZwaveJS diff --git a/devices/protocols/ZwaveJS/pyproject.toml b/devices/protocols/ZwaveJS/pyproject.toml new file mode 100644 index 0000000000000000000000000000000000000000..12a2f82031040866e0545fba5401399c649f30bb --- /dev/null +++ b/devices/protocols/ZwaveJS/pyproject.toml @@ -0,0 +1,31 @@ +[project] +name = "xaal.zwavejs" +version = "0.1" +description = "xAAL support for ZwaveJS" +readme = "README.rst" +authors = [ + { name = "Jerome Kerdreux", email = "Jerome.Kerdreux@imt-atlantique.fr" }, +] +license = { text = "GPL License" } +classifiers = ["Programming Language :: Python", "Topic :: Home Automation"] +keywords = ["xaal", "zwave","zwavejs"] +dependencies = ["xaal.lib", "zwave-js-server-python"] + +[tool.setuptools.packages.find] +include = ["xaal.zwavejs"] + +[project.urls] +Homepage = "https://recherche.imt-atlantique.fr/xaal/" +Documentation = "https://redmine.imt-atlantique.fr/projects/xaal/repository/xaal/entry/code/Python/branches/0.7/devices/protocols/ZwaveJS/README.rst" +Source = "https://redmine.imt-atlantique.fr/projects/xaal/repository/xaal/show/code/Python/branches/0.7/devices/protocols/ZwaveJS" + +[tool.ruff] +line-length = 122 + +[tool.ruff.format] +quote-style = "preserve" + +[tool.black] +line-length = 122 +skip-string-normalization = true + diff --git a/devices/protocols/ZwaveJS/xaal/__init__.py b/devices/protocols/ZwaveJS/xaal/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..69e3be50dac40cddced86e9df2f9c2df5a75f004 --- /dev/null +++ b/devices/protocols/ZwaveJS/xaal/__init__.py @@ -0,0 +1 @@ +__path__ = __import__('pkgutil').extend_path(__path__, __name__) diff --git a/devices/protocols/ZwaveJS/xaal/zwavejs/__init__.py b/devices/protocols/ZwaveJS/xaal/zwavejs/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..85098d22ea7da7e100883d930288014b6d14bb29 --- /dev/null +++ b/devices/protocols/ZwaveJS/xaal/zwavejs/__init__.py @@ -0,0 +1 @@ +from .gw import setup \ No newline at end of file diff --git a/devices/protocols/ZwaveJS/xaal/zwavejs/__main__.py b/devices/protocols/ZwaveJS/xaal/zwavejs/__main__.py new file mode 100644 index 0000000000000000000000000000000000000000..f628c909308ef143e6f9dd7626071cfda740658d --- /dev/null +++ b/devices/protocols/ZwaveJS/xaal/zwavejs/__main__.py @@ -0,0 +1,4 @@ +from . import gw +from xaal.lib import aiohelpers + +aiohelpers.run_async_package(gw.PACKAGE_NAME, gw.setup) diff --git a/devices/protocols/ZwaveJS/xaal/zwavejs/gw.py b/devices/protocols/ZwaveJS/xaal/zwavejs/gw.py new file mode 100644 index 0000000000000000000000000000000000000000..3bc80a7dd460088425f8daecfac5d245b8cceb29 --- /dev/null +++ b/devices/protocols/ZwaveJS/xaal/zwavejs/gw.py @@ -0,0 +1,17 @@ +# from xaal.lib import tools + +import logging + +PACKAGE_NAME = 'xaal.zwavejs' +logger = logging.getLogger(__name__) + + +class GW: + def __init__(self, engine): + self.engine = engine + logger.debug("ZwaveJS gateway initialized") + + +def setup(eng): + GW(eng) + return True