edgeloom 0.1.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.
- edgeloom-0.1.0/.gitignore +12 -0
- edgeloom-0.1.0/CHANGELOG.md +73 -0
- edgeloom-0.1.0/CITATION.cff +57 -0
- edgeloom-0.1.0/LICENSE +201 -0
- edgeloom-0.1.0/PKG-INFO +217 -0
- edgeloom-0.1.0/README.md +186 -0
- edgeloom-0.1.0/SECURITY.md +68 -0
- edgeloom-0.1.0/auto_patch/__init__.py +14 -0
- edgeloom-0.1.0/auto_patch/auto_patch.sh +154 -0
- edgeloom-0.1.0/auto_patch/cap-patches/button_patch.lua +177 -0
- edgeloom-0.1.0/auto_patch/cap-patches/contact_patch.lua +176 -0
- edgeloom-0.1.0/auto_patch/cap-patches/dimmer_patch.lua +142 -0
- edgeloom-0.1.0/auto_patch/cap-patches/hue_patch.lua +143 -0
- edgeloom-0.1.0/auto_patch/cap-patches/lock_patch.lua +265 -0
- edgeloom-0.1.0/auto_patch/cap-patches/motion_patch.lua +176 -0
- edgeloom-0.1.0/auto_patch/cap-patches/presence_patch.lua +158 -0
- edgeloom-0.1.0/auto_patch/cap-patches/siren_patch.lua +16 -0
- edgeloom-0.1.0/auto_patch/cap-patches/switch_patch.lua +240 -0
- edgeloom-0.1.0/auto_patch/cap-patches/water_patch.lua +176 -0
- edgeloom-0.1.0/auto_patch/capability-map.yaml +86 -0
- edgeloom-0.1.0/auto_patch/custom_capability_list.config +60 -0
- edgeloom-0.1.0/auto_patch/driver2patch.config +39 -0
- edgeloom-0.1.0/auto_patch/patch_handlers.py +90 -0
- edgeloom-0.1.0/auto_patch/patch_profiles.py +203 -0
- edgeloom-0.1.0/auto_patch/patch_subdriver.py +192 -0
- edgeloom-0.1.0/auto_patch/requirements.txt +3 -0
- edgeloom-0.1.0/auto_patch/restore_from_backup.py +108 -0
- edgeloom-0.1.0/auto_patch/subdrivers/button-patch/init.lua +73 -0
- edgeloom-0.1.0/auto_patch/subdrivers/contact-patch/init.lua +73 -0
- edgeloom-0.1.0/auto_patch/subdrivers/dimmer-patch/init.lua +57 -0
- edgeloom-0.1.0/auto_patch/subdrivers/hue-patch/init.lua +56 -0
- edgeloom-0.1.0/auto_patch/subdrivers/lock-patch/init.lua +85 -0
- edgeloom-0.1.0/auto_patch/subdrivers/motion-patch/init.lua +73 -0
- edgeloom-0.1.0/auto_patch/subdrivers/presence-patch/init.lua +65 -0
- edgeloom-0.1.0/auto_patch/subdrivers/siren-patch/init.lua +40 -0
- edgeloom-0.1.0/auto_patch/subdrivers/switch-patch/init.lua +100 -0
- edgeloom-0.1.0/auto_patch/subdrivers/water-patch/init.lua +73 -0
- edgeloom-0.1.0/auto_patch/zigbee-lock/config.yml +6 -0
- edgeloom-0.1.0/auto_patch/zigbee-lock/fingerprints.yml +134 -0
- edgeloom-0.1.0/auto_patch/zigbee-lock/profiles/base-lock.yml +16 -0
- edgeloom-0.1.0/auto_patch/zigbee-lock/profiles/lock-battery.yml +14 -0
- edgeloom-0.1.0/auto_patch/zigbee-lock/profiles/lock-without-codes.yml +16 -0
- edgeloom-0.1.0/auto_patch/zigbee-lock/src/configurations.lua +51 -0
- edgeloom-0.1.0/auto_patch/zigbee-lock/src/init.lua +356 -0
- edgeloom-0.1.0/auto_patch/zigbee-lock/src/lock-without-codes/init.lua +102 -0
- edgeloom-0.1.0/auto_patch/zigbee-lock/src/lock_utils.lua +98 -0
- edgeloom-0.1.0/auto_patch/zigbee-lock/src/samsungsds/init.lua +111 -0
- edgeloom-0.1.0/auto_patch/zigbee-lock/src/test/test_c2o_lock.lua +148 -0
- edgeloom-0.1.0/auto_patch/zigbee-lock/src/test/test_generic_lock_migration.lua +50 -0
- edgeloom-0.1.0/auto_patch/zigbee-lock/src/test/test_yale_fingerprint_bad_battery_reporter.lua +63 -0
- edgeloom-0.1.0/auto_patch/zigbee-lock/src/test/test_zigbee_lock.lua +724 -0
- edgeloom-0.1.0/auto_patch/zigbee-lock/src/test/test_zigbee_lock_code_migration.lua +246 -0
- edgeloom-0.1.0/auto_patch/zigbee-lock/src/test/test_zigbee_samsungsds.lua +1363 -0
- edgeloom-0.1.0/auto_patch/zigbee-lock/src/test/test_zigbee_yale-bad-battery-reporter.lua +51 -0
- edgeloom-0.1.0/auto_patch/zigbee-lock/src/test/test_zigbee_yale-fingerprint-lock.lua +51 -0
- edgeloom-0.1.0/auto_patch/zigbee-lock/src/test/test_zigbee_yale.lua +288 -0
- edgeloom-0.1.0/auto_patch/zigbee-lock/src/yale/init.lua +160 -0
- edgeloom-0.1.0/auto_patch/zigbee-lock/src/yale/yale-bad-battery-reporter/init.lua +52 -0
- edgeloom-0.1.0/auto_patch/zigbee-lock/src/yale-fingerprint-lock/init.lua +54 -0
- edgeloom-0.1.0/discovery/__init__.py +5 -0
- edgeloom-0.1.0/discovery/discover_drivers.py +263 -0
- edgeloom-0.1.0/edgeloom/__init__.py +19 -0
- edgeloom-0.1.0/edgeloom/cli.py +273 -0
- edgeloom-0.1.0/edgeloom/patching.py +116 -0
- edgeloom-0.1.0/edgeloom/schemas.py +127 -0
- edgeloom-0.1.0/pyproject.toml +69 -0
- edgeloom-0.1.0/schema/capability-map.schema.json +59 -0
- edgeloom-0.1.0/schema/profile.schema.json +92 -0
- edgeloom-0.1.0/tests/conftest.py +27 -0
- edgeloom-0.1.0/tests/test_auto_patch_script.py +119 -0
- edgeloom-0.1.0/tests/test_cli.py +74 -0
- edgeloom-0.1.0/tests/test_discovery.py +45 -0
- edgeloom-0.1.0/tests/test_patch_handlers.py +18 -0
- edgeloom-0.1.0/tests/test_patch_profiles.py +54 -0
- edgeloom-0.1.0/tests/test_patch_subdriver.py +39 -0
- edgeloom-0.1.0/tests/test_patching.py +73 -0
- edgeloom-0.1.0/tests/test_restore_from_backup.py +69 -0
- edgeloom-0.1.0/tests/test_schemas.py +147 -0
- edgeloom-0.1.0/translator/README.md +26 -0
- edgeloom-0.1.0/translator/ha2st_edge/__init__.py +4 -0
- edgeloom-0.1.0/translator/ha2st_edge/cli.py +96 -0
- edgeloom-0.1.0/translator/ha2st_edge/generator.py +64 -0
- edgeloom-0.1.0/translator/ha2st_edge/ha_client.py +31 -0
- edgeloom-0.1.0/translator/ha2st_edge/mapping.py +50 -0
- edgeloom-0.1.0/translator/ha_proxy_edge_driver/config.yaml +12 -0
- edgeloom-0.1.0/translator/ha_proxy_edge_driver/profiles/ha_contact_sensor.yaml +12 -0
- edgeloom-0.1.0/translator/ha_proxy_edge_driver/profiles/ha_light_color.yaml +16 -0
- edgeloom-0.1.0/translator/ha_proxy_edge_driver/profiles/ha_light_dimmable.yaml +14 -0
- edgeloom-0.1.0/translator/ha_proxy_edge_driver/profiles/ha_lock_basic.yaml +12 -0
- edgeloom-0.1.0/translator/ha_proxy_edge_driver/profiles/ha_motion_sensor.yaml +12 -0
- edgeloom-0.1.0/translator/ha_proxy_edge_driver/profiles/ha_switch_basic.yaml +12 -0
- edgeloom-0.1.0/translator/ha_proxy_edge_driver/src/ha_proxy.lua +129 -0
- edgeloom-0.1.0/translator/ha_proxy_edge_driver/src/init.lua +78 -0
- edgeloom-0.1.0/translator/requirements.txt +3 -0
- edgeloom-0.1.0/translator/tests/test_generator.py +47 -0
- edgeloom-0.1.0/translator/tests/test_mapping.py +50 -0
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this project are documented here.
|
|
4
|
+
|
|
5
|
+
The format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/) and
|
|
6
|
+
this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
|
+
|
|
8
|
+
## [Unreleased]
|
|
9
|
+
|
|
10
|
+
## [0.1.0] - 2026-08-23
|
|
11
|
+
|
|
12
|
+
First release under the EdgeLoom name. Unifies the SmartThings Edge driver
|
|
13
|
+
patcher and the Home Assistant translator into one installable toolchain with a
|
|
14
|
+
published schema between them.
|
|
15
|
+
|
|
16
|
+
### Added
|
|
17
|
+
|
|
18
|
+
- **Unified `edgeloom` CLI** with four subcommands: `patch`, `translate`,
|
|
19
|
+
`discover`, and `validate`.
|
|
20
|
+
- **Schema v0.1** — two JSON Schemas (draft 2020-12) published under `schema/`:
|
|
21
|
+
`profile.schema.json` for device profiles and `capability-map.schema.json` for
|
|
22
|
+
attribute-to-capability bindings. Both ship inside the installed package.
|
|
23
|
+
- **`edgeloom validate`** as a CI-ready assurance gate. It checks profiles
|
|
24
|
+
emitted by either toolchain path against one contract, and exits non-zero both
|
|
25
|
+
on a violation and on finding nothing to check.
|
|
26
|
+
- **`auto_patch/capability-map.yaml`**, generated from the legacy INI pair and
|
|
27
|
+
validated in CI, so the schema is grounded in the mapping actually in use.
|
|
28
|
+
- **Python packaging** via hatchling. `pip install edgeloom` provides the CLI;
|
|
29
|
+
the distribution spans `edgeloom`, `auto_patch`, `discovery`, and
|
|
30
|
+
`ha2st_edge`.
|
|
31
|
+
- **Home Assistant translator** merged from
|
|
32
|
+
[HA2ST-Translator](https://github.com/edgeloom-oss/HA2ST-Translator) with its
|
|
33
|
+
commit history preserved, now at `translator/` and reachable as
|
|
34
|
+
`edgeloom translate`.
|
|
35
|
+
- **`SECURITY.md`** with a private disclosure path and an explicit statement of
|
|
36
|
+
the tool's by-design behaviour.
|
|
37
|
+
- **First tests for the shell entrypoint**, covering backup creation, reuse,
|
|
38
|
+
dry-run, and argument rejection.
|
|
39
|
+
|
|
40
|
+
### Fixed
|
|
41
|
+
|
|
42
|
+
- **`auto_patch.sh` never created the driver backup.** The guard used `else:`
|
|
43
|
+
rather than the bash reserved word `else`, so it parsed as a command inside
|
|
44
|
+
the then-list and the if-statement had no else-branch. On a first run the
|
|
45
|
+
backup step was skipped entirely and the driver was patched destructively,
|
|
46
|
+
contradicting the documented safety guarantee; when a backup did exist the
|
|
47
|
+
stray command aborted the run at exit 127. `bash -n` reports the file clean,
|
|
48
|
+
and CI linted only Python, so nothing caught it.
|
|
49
|
+
- **A failed patch could delete the driver.** `restore_backup` ran
|
|
50
|
+
`rm -rf "$DRIVER"` before moving the backup into place, without checking the
|
|
51
|
+
backup existed — which, given the bug above, it never did. Restore now refuses
|
|
52
|
+
to remove anything when no backup is present.
|
|
53
|
+
- **`auto_patch.sh` failed on macOS.** The three step invocations expanded
|
|
54
|
+
`"${COMMON_ARGS[@]}"` directly, and bash 3.2 treats expansion of an empty
|
|
55
|
+
array under `set -u` as an unbound variable error, so every run without an
|
|
56
|
+
optional flag — including the documented Quickstart command — died at step 1.
|
|
57
|
+
- **`auto_patch.sh` was not executable** (mode 644), so the documented
|
|
58
|
+
`./auto_patch.sh` failed on a fresh clone.
|
|
59
|
+
- **Two wrong assertions** in the translator's `test_generate_profiles_and_config`,
|
|
60
|
+
which expected device entries to be de-duplicated the way profiles are.
|
|
61
|
+
|
|
62
|
+
### Changed
|
|
63
|
+
|
|
64
|
+
- Minimum Python is now **3.11**. `discovery` imports `datetime.UTC`, which does
|
|
65
|
+
not exist earlier, so the previously documented "Python 3.10+" was inaccurate.
|
|
66
|
+
- `edgeloom patch` orchestrates the three patch steps in Python rather than
|
|
67
|
+
through bash, so patching runs on native Windows and is directly testable.
|
|
68
|
+
`auto_patch/auto_patch.sh` remains available.
|
|
69
|
+
- The README is now an umbrella; component detail moved to `docs/`.
|
|
70
|
+
- The merged translator is covered by the repository's `ruff` and pytest gates.
|
|
71
|
+
|
|
72
|
+
[Unreleased]: https://github.com/edgeloom-oss/edgeloom/compare/v0.1.0...HEAD
|
|
73
|
+
[0.1.0]: https://github.com/edgeloom-oss/edgeloom/releases/tag/v0.1.0
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
cff-version: 1.2.0
|
|
2
|
+
title: "EdgeLoom"
|
|
3
|
+
abstract: >-
|
|
4
|
+
An open toolchain for validating, patching, and translating smart-home edge
|
|
5
|
+
drivers across platforms.
|
|
6
|
+
type: software
|
|
7
|
+
version: 0.1.0
|
|
8
|
+
date-released: 2026-08-23
|
|
9
|
+
license: Apache-2.0
|
|
10
|
+
repository-code: https://github.com/edgeloom-oss/edgeloom
|
|
11
|
+
url: https://github.com/edgeloom-oss/edgeloom
|
|
12
|
+
keywords:
|
|
13
|
+
- smart home
|
|
14
|
+
- internet of things
|
|
15
|
+
- SmartThings
|
|
16
|
+
- Home Assistant
|
|
17
|
+
- Zigbee
|
|
18
|
+
- edge drivers
|
|
19
|
+
- security
|
|
20
|
+
authors:
|
|
21
|
+
- family-names: Xu
|
|
22
|
+
given-names: Xuening
|
|
23
|
+
affiliation: Stevens Institute of Technology
|
|
24
|
+
- family-names: Fu
|
|
25
|
+
given-names: Chenglong
|
|
26
|
+
affiliation: University of North Carolina at Charlotte
|
|
27
|
+
- family-names: Du
|
|
28
|
+
given-names: Xiaojiang
|
|
29
|
+
affiliation: Stevens Institute of Technology
|
|
30
|
+
- family-names: Luo
|
|
31
|
+
given-names: Bo
|
|
32
|
+
affiliation: University of Kansas
|
|
33
|
+
- family-names: Wu
|
|
34
|
+
given-names: Chuxiong
|
|
35
|
+
affiliation: Southern Illinois University Carbondale
|
|
36
|
+
preferred-citation:
|
|
37
|
+
type: conference-paper
|
|
38
|
+
title: "Discovering and Exploiting IoT Device Hidden Attributes: A New Vulnerability in Smart Homes"
|
|
39
|
+
authors:
|
|
40
|
+
- family-names: Xu
|
|
41
|
+
given-names: Xuening
|
|
42
|
+
- family-names: Fu
|
|
43
|
+
given-names: Chenglong
|
|
44
|
+
- family-names: Du
|
|
45
|
+
given-names: Xiaojiang
|
|
46
|
+
- family-names: Luo
|
|
47
|
+
given-names: Bo
|
|
48
|
+
collection-title: "Proceedings of the ACM Conference on Computer and Communications Security (CCS)"
|
|
49
|
+
conference:
|
|
50
|
+
name: "ACM Conference on Computer and Communications Security (CCS)"
|
|
51
|
+
date-start: 2025-11-10
|
|
52
|
+
date-end: 2025-11-14
|
|
53
|
+
year: 2025
|
|
54
|
+
month: 11
|
|
55
|
+
message: |
|
|
56
|
+
If you use this software, please cite our CCS 2025 paper:
|
|
57
|
+
"Discovering and Exploiting IoT Device Hidden Attributes: A New Vulnerability in Smart Homes."
|
edgeloom-0.1.0/LICENSE
ADDED
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
+
|
|
7
|
+
1. Definitions.
|
|
8
|
+
|
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
+
|
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
+
the copyright owner that is granting the License.
|
|
14
|
+
|
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
+
other entities that control, are controlled by, or are under common
|
|
17
|
+
control with that entity. For the purposes of this definition,
|
|
18
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
19
|
+
direction or management of such entity, whether by contract or
|
|
20
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
21
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
22
|
+
|
|
23
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
24
|
+
exercising permissions granted by this License.
|
|
25
|
+
|
|
26
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
+
including but not limited to software source code, documentation
|
|
28
|
+
source, and configuration files.
|
|
29
|
+
|
|
30
|
+
"Object" form shall mean any form resulting from mechanical
|
|
31
|
+
transformation or translation of a Source form, including but
|
|
32
|
+
not limited to compiled object code, generated documentation,
|
|
33
|
+
and conversions to other media types.
|
|
34
|
+
|
|
35
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
36
|
+
Object form, made available under the License, as indicated by a
|
|
37
|
+
copyright notice that is included in or attached to the work
|
|
38
|
+
(an example is provided in the Appendix below).
|
|
39
|
+
|
|
40
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
41
|
+
form, that is based on (or derived from) the Work and for which the
|
|
42
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
43
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
44
|
+
of this License, Derivative Works shall not include works that remain
|
|
45
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
46
|
+
the Work and Derivative Works thereof.
|
|
47
|
+
|
|
48
|
+
"Contribution" shall mean any work of authorship, including
|
|
49
|
+
the original version of the Work and any modifications or additions
|
|
50
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
51
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
52
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
53
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
54
|
+
means any form of electronic, verbal, or written communication sent
|
|
55
|
+
to the Licensor or its representatives, including but not limited to
|
|
56
|
+
communication on electronic mailing lists, source code control systems,
|
|
57
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
58
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
59
|
+
excluding communication that is conspicuously marked or otherwise
|
|
60
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
61
|
+
|
|
62
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
63
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
64
|
+
subsequently incorporated within the Work.
|
|
65
|
+
|
|
66
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
67
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
68
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
69
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
70
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
71
|
+
Work and such Derivative Works in Source or Object form.
|
|
72
|
+
|
|
73
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
74
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
75
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
76
|
+
(except as stated in this section) patent license to make, have made,
|
|
77
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
78
|
+
where such license applies only to those patent claims licensable
|
|
79
|
+
by such Contributor that are necessarily infringed by their
|
|
80
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
81
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
82
|
+
institute patent litigation against any entity (including a
|
|
83
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
84
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
85
|
+
or contributory patent infringement, then any patent licenses
|
|
86
|
+
granted to You under this License for that Work shall terminate
|
|
87
|
+
as of the date such litigation is filed.
|
|
88
|
+
|
|
89
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
90
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
91
|
+
modifications, and in Source or Object form, provided that You
|
|
92
|
+
meet the following conditions:
|
|
93
|
+
|
|
94
|
+
(a) You must give any other recipients of the Work or
|
|
95
|
+
Derivative Works a copy of this License; and
|
|
96
|
+
|
|
97
|
+
(b) You must cause any modified files to carry prominent notices
|
|
98
|
+
stating that You changed the files; and
|
|
99
|
+
|
|
100
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
101
|
+
that You distribute, all copyright, patent, trademark, and
|
|
102
|
+
attribution notices from the Source form of the Work,
|
|
103
|
+
excluding those notices that do not pertain to any part of
|
|
104
|
+
the Derivative Works; and
|
|
105
|
+
|
|
106
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
107
|
+
distribution, then any Derivative Works that You distribute must
|
|
108
|
+
include a readable copy of the attribution notices contained
|
|
109
|
+
within such NOTICE file, excluding those notices that do not
|
|
110
|
+
pertain to any part of the Derivative Works, in at least one
|
|
111
|
+
of the following places: within a NOTICE text file distributed
|
|
112
|
+
as part of the Derivative Works; within the Source form or
|
|
113
|
+
documentation, if provided along with the Derivative Works; or,
|
|
114
|
+
within a display generated by the Derivative Works, if and
|
|
115
|
+
wherever such third-party notices normally appear. The contents
|
|
116
|
+
of the NOTICE file are for informational purposes only and
|
|
117
|
+
do not modify the License. You may add Your own attribution
|
|
118
|
+
notices within Derivative Works that You distribute, alongside
|
|
119
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
120
|
+
that such additional attribution notices cannot be construed
|
|
121
|
+
as modifying the License.
|
|
122
|
+
|
|
123
|
+
You may add Your own copyright statement to Your modifications and
|
|
124
|
+
may provide additional or different license terms and conditions
|
|
125
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
126
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
127
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
128
|
+
the conditions stated in this License.
|
|
129
|
+
|
|
130
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
131
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
132
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
133
|
+
this License, without any additional terms or conditions.
|
|
134
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
135
|
+
the terms of any separate license agreement you may have executed
|
|
136
|
+
with Licensor regarding such Contributions.
|
|
137
|
+
|
|
138
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
139
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
140
|
+
except as required for reasonable and customary use in describing the
|
|
141
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
142
|
+
|
|
143
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
144
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
145
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
146
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
147
|
+
implied, including, without limitation, any warranties or conditions
|
|
148
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
149
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
150
|
+
appropriateness of using or redistributing the Work and assume any
|
|
151
|
+
risks associated with Your exercise of permissions under this License.
|
|
152
|
+
|
|
153
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
154
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
155
|
+
unless required by applicable law (such as deliberate and grossly
|
|
156
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
157
|
+
liable to You for damages, including any direct, indirect, special,
|
|
158
|
+
incidental, or consequential damages of any character arising as a
|
|
159
|
+
result of this License or out of the use or inability to use the
|
|
160
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
161
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
162
|
+
other commercial damages or losses), even if such Contributor
|
|
163
|
+
has been advised of the possibility of such damages.
|
|
164
|
+
|
|
165
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
166
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
167
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
168
|
+
or other liability obligations and/or rights consistent with this
|
|
169
|
+
License. However, in accepting such obligations, You may act only
|
|
170
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
171
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
172
|
+
defend, and hold each Contributor harmless for any liability
|
|
173
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
174
|
+
of your accepting any such warranty or additional liability.
|
|
175
|
+
|
|
176
|
+
END OF TERMS AND CONDITIONS
|
|
177
|
+
|
|
178
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
179
|
+
|
|
180
|
+
To apply the Apache License to your work, attach the following
|
|
181
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
182
|
+
replaced with your own identifying information. (Don't include
|
|
183
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
184
|
+
comment syntax for the file format. We also recommend that a
|
|
185
|
+
file or class name and description of purpose be included on the
|
|
186
|
+
same "printed page" as the copyright notice for easier
|
|
187
|
+
identification within third-party archives.
|
|
188
|
+
|
|
189
|
+
Copyright [yyyy] [name of copyright owner]
|
|
190
|
+
|
|
191
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
192
|
+
you may not use this file except in compliance with the License.
|
|
193
|
+
You may obtain a copy of the License at
|
|
194
|
+
|
|
195
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
196
|
+
|
|
197
|
+
Unless required by applicable law or agreed to in writing, software
|
|
198
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
199
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
200
|
+
See the License for the specific language governing permissions and
|
|
201
|
+
limitations under the License.
|
edgeloom-0.1.0/PKG-INFO
ADDED
|
@@ -0,0 +1,217 @@
|
|
|
1
|
+
Metadata-Version: 2.5
|
|
2
|
+
Name: edgeloom
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: An open toolchain for validating, patching, and translating smart-home edge drivers across platforms
|
|
5
|
+
Project-URL: Homepage, https://github.com/edgeloom-oss/edgeloom
|
|
6
|
+
Project-URL: Repository, https://github.com/edgeloom-oss/edgeloom
|
|
7
|
+
Project-URL: Issues, https://github.com/edgeloom-oss/edgeloom/issues
|
|
8
|
+
Project-URL: Changelog, https://github.com/edgeloom-oss/edgeloom/blob/main/CHANGELOG.md
|
|
9
|
+
Author-email: Chenglong Fu <chenglong.fu@charlotte.edu>
|
|
10
|
+
License-Expression: Apache-2.0
|
|
11
|
+
License-File: LICENSE
|
|
12
|
+
Keywords: edge-drivers,home-assistant,iot,security,smarthome,smartthings,zigbee
|
|
13
|
+
Classifier: Development Status :: 3 - Alpha
|
|
14
|
+
Classifier: Intended Audience :: Developers
|
|
15
|
+
Classifier: Intended Audience :: Science/Research
|
|
16
|
+
Classifier: Programming Language :: Python :: 3
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
19
|
+
Classifier: Topic :: Home Automation
|
|
20
|
+
Classifier: Topic :: Security
|
|
21
|
+
Classifier: Topic :: Software Development :: Code Generators
|
|
22
|
+
Requires-Python: >=3.11
|
|
23
|
+
Requires-Dist: jsonschema>=4.18
|
|
24
|
+
Requires-Dist: pyyaml>=6.0
|
|
25
|
+
Requires-Dist: requests>=2.28
|
|
26
|
+
Provides-Extra: dev
|
|
27
|
+
Requires-Dist: pytest-cov; extra == 'dev'
|
|
28
|
+
Requires-Dist: pytest>=7.0; extra == 'dev'
|
|
29
|
+
Requires-Dist: ruff; extra == 'dev'
|
|
30
|
+
Description-Content-Type: text/markdown
|
|
31
|
+
|
|
32
|
+
# EdgeLoom
|
|
33
|
+
|
|
34
|
+
[](https://github.com/edgeloom-oss/edgeloom/actions/workflows/ci.yml)
|
|
35
|
+
[](LICENSE)
|
|
36
|
+
[](pyproject.toml)
|
|
37
|
+
|
|
38
|
+
**An open toolchain for validating, patching, and translating smart-home edge
|
|
39
|
+
drivers across platforms.**
|
|
40
|
+
|
|
41
|
+
Smart-home hubs decide what a device is allowed to be. A lock that reports nine
|
|
42
|
+
configurable attributes over Zigbee may surface two of them, because the stock
|
|
43
|
+
driver's *profile* — the declared set of capabilities — never mentions the rest.
|
|
44
|
+
The device is not the limit; the driver is. EdgeLoom is the toolchain for
|
|
45
|
+
inspecting, rewriting, and checking those drivers.
|
|
46
|
+
|
|
47
|
+
The three tools do different jobs, but they all produce or consume the same
|
|
48
|
+
artifact: a device profile. EdgeLoom's position is that this artifact should be
|
|
49
|
+
a **checked contract** rather than a file each tool invents privately. So the
|
|
50
|
+
schema sits at the centre, and `edgeloom validate` is the gate everything passes
|
|
51
|
+
through.
|
|
52
|
+
|
|
53
|
+
```mermaid
|
|
54
|
+
flowchart TD
|
|
55
|
+
subgraph inputs [Inputs]
|
|
56
|
+
A["Stock SmartThings<br/>Edge driver"]
|
|
57
|
+
B["Home Assistant<br/>instance"]
|
|
58
|
+
C["Driver catalog<br/>(GitHub or local)"]
|
|
59
|
+
end
|
|
60
|
+
|
|
61
|
+
A --> P["edgeloom patch<br/><i>expose hidden attributes</i>"]
|
|
62
|
+
B --> T["edgeloom translate<br/><i>project HA entities onto Edge</i>"]
|
|
63
|
+
C --> D["edgeloom discover<br/><i>enumerate drivers + fingerprints</i>"]
|
|
64
|
+
|
|
65
|
+
P --> S
|
|
66
|
+
T --> S
|
|
67
|
+
D -.->|"flags drivers with<br/>no mapping"| S
|
|
68
|
+
|
|
69
|
+
S{{"schema/ v0.1<br/><b>profile · capability-map</b>"}}
|
|
70
|
+
|
|
71
|
+
S --> V["edgeloom validate<br/><i>assurance gate, CI-ready</i>"]
|
|
72
|
+
V --> O["Hub-installable driver<br/>with a checked profile"]
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
Because both paths converge on one schema, a profile rewritten by the patcher
|
|
76
|
+
and a profile emitted by the translator are checked against identical rules —
|
|
77
|
+
which is what makes `validate` an assurance layer and not just a linter.
|
|
78
|
+
|
|
79
|
+
## Install
|
|
80
|
+
|
|
81
|
+
```bash
|
|
82
|
+
pip install edgeloom
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
From a checkout:
|
|
86
|
+
|
|
87
|
+
```bash
|
|
88
|
+
git clone https://github.com/edgeloom-oss/edgeloom.git
|
|
89
|
+
cd edgeloom
|
|
90
|
+
pip install -e ".[dev]"
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
Requires Python 3.11 or newer.
|
|
94
|
+
|
|
95
|
+
## Commands
|
|
96
|
+
|
|
97
|
+
```
|
|
98
|
+
edgeloom patch DRIVER MODEL MANUFACTURER [ATTRIBUTES] Expose hidden device attributes
|
|
99
|
+
edgeloom translate --ha-url URL --output DIR Bridge Home Assistant to SmartThings
|
|
100
|
+
edgeloom discover [--source github|local] Enumerate drivers and fingerprints
|
|
101
|
+
edgeloom validate [PATHS...] Check artifacts against the schema
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
Patch a Zigbee lock so its language and auto-relock settings become visible,
|
|
105
|
+
previewing first:
|
|
106
|
+
|
|
107
|
+
```bash
|
|
108
|
+
edgeloom patch auto_patch/zigbee-lock "YRD226 TSDB" Yale Language:AutoRelockTime --dry-run
|
|
109
|
+
edgeloom patch auto_patch/zigbee-lock "YRD226 TSDB" Yale Language:AutoRelockTime
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
The original driver is copied to `<driver>-backup` before anything is written,
|
|
113
|
+
and restored automatically if any step fails.
|
|
114
|
+
|
|
115
|
+
Generate SmartThings Edge proxy artifacts for your Home Assistant entities:
|
|
116
|
+
|
|
117
|
+
```bash
|
|
118
|
+
export HA_TOKEN=... # a long-lived access token
|
|
119
|
+
edgeloom translate --ha-url http://homeassistant.local:8123 --output ./generated_edge
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
Check every profile and capability map in a tree:
|
|
123
|
+
|
|
124
|
+
```bash
|
|
125
|
+
edgeloom validate .
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
`validate` exits non-zero when a document violates the schema, and also when it
|
|
129
|
+
finds nothing to check — a silent pass over zero files would otherwise read as
|
|
130
|
+
success.
|
|
131
|
+
|
|
132
|
+
## Components
|
|
133
|
+
|
|
134
|
+
| Path | Component | Command | Documentation |
|
|
135
|
+
| --- | --- | --- | --- |
|
|
136
|
+
| `auto_patch/` | Edge driver patcher | `edgeloom patch` | [docs/patching.md](docs/patching.md) |
|
|
137
|
+
| `translator/` | Home Assistant bridge | `edgeloom translate` | [translator/README.md](translator/README.md) |
|
|
138
|
+
| `discovery/` | Driver catalog scanner | `edgeloom discover` | [docs/discovery.md](docs/discovery.md) |
|
|
139
|
+
| `schema/` | Published contracts | `edgeloom validate` | [schema/](schema/) |
|
|
140
|
+
|
|
141
|
+
The translator began life as
|
|
142
|
+
[HA2ST-Translator](https://github.com/edgeloom-oss/HA2ST-Translator), written by
|
|
143
|
+
Chuxiong Wu, and was merged here with its history intact. That repository is now
|
|
144
|
+
archived and redirects to this one.
|
|
145
|
+
|
|
146
|
+
## Schema
|
|
147
|
+
|
|
148
|
+
Version 0.1 publishes two JSON Schemas (draft 2020-12):
|
|
149
|
+
|
|
150
|
+
- **[`schema/profile.schema.json`](schema/profile.schema.json)** — a device
|
|
151
|
+
profile: the capabilities a driver exposes for one device, and the categories
|
|
152
|
+
describing it.
|
|
153
|
+
- **[`schema/capability-map.schema.json`](schema/capability-map.schema.json)** —
|
|
154
|
+
which hidden attributes a driver may surface, and the capability each binds
|
|
155
|
+
to. Capability IDs must be namespaced, so a vendor attribute cannot silently
|
|
156
|
+
claim a standard identifier.
|
|
157
|
+
|
|
158
|
+
[`auto_patch/capability-map.yaml`](auto_patch/capability-map.yaml) is the live
|
|
159
|
+
map for the drivers shipped here, and is validated in CI on every push.
|
|
160
|
+
|
|
161
|
+
Both schemas are versioned and shipped inside the installed package, so
|
|
162
|
+
`edgeloom validate` works without a checkout.
|
|
163
|
+
|
|
164
|
+
## Development
|
|
165
|
+
|
|
166
|
+
```bash
|
|
167
|
+
make install # dependencies
|
|
168
|
+
make lint # ruff
|
|
169
|
+
make test # pytest
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
CI runs lint, the full test suite, `edgeloom validate`, and shellcheck on every
|
|
173
|
+
push and pull request. See [docs/development.md](docs/development.md) for the
|
|
174
|
+
container workflow.
|
|
175
|
+
|
|
176
|
+
## Roadmap
|
|
177
|
+
|
|
178
|
+
- Expand the library of subdrivers and handler templates.
|
|
179
|
+
- Broaden the capability map beyond Zigbee locks, switches, and sensors.
|
|
180
|
+
- Grow the schema toward Matter and Home Assistant capability namespaces.
|
|
181
|
+
- Native Windows validation (the Python `patch` path no longer needs bash).
|
|
182
|
+
- Device reports from real hardware — see the
|
|
183
|
+
[device report template](.github/ISSUE_TEMPLATE/device_report.yml).
|
|
184
|
+
|
|
185
|
+
## Security
|
|
186
|
+
|
|
187
|
+
Please report vulnerabilities privately. See [SECURITY.md](SECURITY.md).
|
|
188
|
+
|
|
189
|
+
Patching a driver changes what a device exposes on your own hub. EdgeLoom is
|
|
190
|
+
research tooling: review a diff before installing anything on a hub you depend
|
|
191
|
+
on, and keep the backup it creates.
|
|
192
|
+
|
|
193
|
+
## How to Cite
|
|
194
|
+
|
|
195
|
+
If this project aids your research, cite the following work:
|
|
196
|
+
|
|
197
|
+
```bibtex
|
|
198
|
+
@inproceedings{xu2025hiddenattributes,
|
|
199
|
+
title = {Discovering and Exploiting IoT Device Hidden Attributes: A New Vulnerability in Smart Homes},
|
|
200
|
+
author = {Xuening Xu and Chenglong Fu and Xiaojiang Du and Bo Luo},
|
|
201
|
+
booktitle = {Proceedings of the ACM Conference on Computer and Communications Security (CCS)},
|
|
202
|
+
year = {2025}
|
|
203
|
+
}
|
|
204
|
+
```
|
|
205
|
+
|
|
206
|
+
Machine-readable metadata is in [CITATION.cff](CITATION.cff).
|
|
207
|
+
|
|
208
|
+
## Contributing
|
|
209
|
+
|
|
210
|
+
Bug reports, device reports, and pull requests are welcome. Start with
|
|
211
|
+
[CONTRIBUTING.md](CONTRIBUTING.md) and the
|
|
212
|
+
[Code of Conduct](CODE_OF_CONDUCT.md). Changes are recorded in
|
|
213
|
+
[CHANGELOG.md](CHANGELOG.md).
|
|
214
|
+
|
|
215
|
+
## License
|
|
216
|
+
|
|
217
|
+
Apache License 2.0 — see [LICENSE](LICENSE).
|