Skip to content

Commit 3606ee9

Browse files
committed
modbus-connection
1 parent 6fcc39b commit 3606ee9

95 files changed

Lines changed: 40431 additions & 7432 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.cursor/rules/graphify.mdc‎

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,25 @@ alwaysApply: true
55

66
This project has a graphify knowledge graph at graphify-out/.
77

8-
**MANDATORY: Before using Read, Grep, Glob, or Bash to explore the codebase, you MUST run graphify first:**
8+
**MANDATORY: Before using Read, Grep, Glob, or Bash to explore the codebase, you MUST run graphify
9+
first:**
10+
911
- `graphify query "<question>"` — scoped subgraph for any codebase or architecture question
1012
- `graphify path "<A>" "<B>"` — dependency path between two symbols
1113
- `graphify explain "<concept>"` — all nodes related to a concept
1214

13-
This applies to YOU and to every subagent you spawn. Include this rule explicitly in every subagent prompt that involves code exploration. Do not skip graphify because files are "already known" or because you are executing a plan — the graph surfaces cross-file dependencies and INFERRED edges that grep and Read cannot find.
15+
This applies to YOU and to every subagent you spawn. Include this rule explicitly in every subagent
16+
prompt that involves code exploration. Do not skip graphify because files are "already known" or
17+
because you are executing a plan — the graph surfaces cross-file dependencies and INFERRED edges
18+
that grep and Read cannot find.
1419

1520
Only use Read/Grep/Glob directly when:
21+
1622
1. graphify has already oriented you and you need to modify or debug specific lines
1723
2. `graphify-out/graph.json` does not exist yet
1824

1925
- If `graphify-out/wiki/index.md` exists, navigate it instead of reading raw files
20-
- Read `graphify-out/GRAPH_REPORT.md` only for broad architecture review when query/path/explain do not surface enough context
21-
- After modifying code files, run `graphify update .` to keep the graph current (AST-only, no API cost)
26+
- Read `graphify-out/GRAPH_REPORT.md` only for broad architecture review when query/path/explain do
27+
not surface enough context
28+
- After modifying code files, run `graphify update .` to keep the graph current (AST-only, no API
29+
cost)

‎.github/workflows/ci.yml‎

Lines changed: 1 addition & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -83,41 +83,20 @@ jobs:
8383
- name: Install Requirements
8484
run: uv sync --frozen --extra solarman
8585
- name: Run tests and generate coverage report
86-
run: uv run pytest -vv -m "not modbusrs"
86+
run: uv run pytest -vv
8787
- name: Upload coverage to Codecov
8888
uses: codecov/codecov-action@v7
8989
with:
9090
token: ${{ secrets.CODECOV_TOKEN }}
9191
env_vars: PYTHON
9292
verbose: true
9393

94-
modbusrs:
95-
name: modbus-rs driver tests
96-
needs: [ruff]
97-
runs-on: ubuntu-latest
98-
steps:
99-
- uses: actions/checkout@v7
100-
- uses: dtolnay/rust-toolchain@stable
101-
- name: "Set up Python"
102-
uses: actions/setup-python@v7
103-
with:
104-
python-version: "3.13"
105-
- name: Install uv
106-
uses: astral-sh/setup-uv@v7
107-
with:
108-
version: ${{ env.UV_VERSION }}
109-
- name: Install Requirements
110-
run: uv sync --frozen --extra solarman --extra modbusrs
111-
- name: Run modbus-rs tests
112-
run: uv run pytest -vv -m modbusrs
113-
11494
build-n-publish:
11595
name: Build and publish Python 🐍 distributions 📦 to PyPI
11696
runs-on: ubuntu-latest
11797
if: startsWith(github.ref, 'refs/tags')
11898
needs:
11999
- pytest
120-
- modbusrs
121100
permissions:
122101
id-token: write # used for trusted publishing
123102
steps:
@@ -134,4 +113,3 @@ jobs:
134113
run: uv build
135114
- name: Publish distribution 📦 to PyPI
136115
run: uv publish
137-

‎.github/workflows/deploy-addons.yml‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,3 +56,4 @@ jobs:
5656
app-stable: hass-addon-sunsynk-multi
5757
app-edge: hass-addon-sunsynk-edge
5858
publish: true
59+

‎graphify-out/.graphify_labels.json‎

Lines changed: 21 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -4,39 +4,39 @@
44
"2": "Sensor",
55
"3": "Adaptors & Wiring",
66
"4": "sensors.py",
7-
"5": "a_inverter.py",
7+
"5": "driver.py",
88
"6": "compilerOptions",
99
"7": "test_a_inverter.py",
1010
"8": "InverterState",
11-
"9": "RegType",
11+
"9": "test_helpers.py",
1212
"10": "percentile",
13-
"11": "ASensor",
14-
"12": "__main__.py",
15-
"13": "AInverter",
13+
"11": "sensor_options.py",
14+
"12": "a_inverter.py",
15+
"13": "HoldingUnit",
1616
"14": "RWSensor",
1717
"15": "RegType",
18-
"16": "PySunsynk",
19-
"17": "SolarmanSunsynk",
20-
"18": "sensor_options.py",
21-
"19": "ModbusUnit underlay",
22-
"20": "sunsynk/helpers.py",
23-
"21": ".read_sensors",
24-
"22": ".connected_client",
25-
"23": "BinarySensor",
18+
"16": ".read_sensors",
19+
"17": "SolarmanUnit",
20+
"18": "ASensor",
21+
"19": "test_connection.py",
22+
"20": "Sunsynk",
23+
"21": "AInverter",
24+
"22": ".get",
25+
"23": "Architecture: modbus-connection and sunsynk",
2626
"24": "Groups of sensors",
27-
"25": "unpack_value",
28-
"26": "Sunsynk",
27+
"25": "ToggleLogCallback",
28+
"26": "ModbusUnit underlay",
2929
"27": "definitions.md",
30-
"28": "utils/__init__.py",
30+
"28": ".create_entity",
3131
"29": "tests/conftest.py",
3232
"30": "Run standalone using docker compose",
33-
"31": "ToggleLogCallback",
34-
"32": ".get",
33+
"31": ".from_url",
34+
"32": "test_write_register_timeout",
3535
"33": "Available addons",
3636
"34": "Configuration",
3737
"35": "Single-phase register backfill (proposal)",
3838
"36": "Unreleased",
39-
"37": "hex_str",
39+
"37": "sunsynk.py",
4040
"38": "test_options.py",
4141
"39": "Inverter Automation",
4242
"40": "Deye/Sunsynk Inverters",
@@ -45,7 +45,6 @@
4545
"43": "Schedules",
4646
"44": "Issue related to",
4747
"45": "Deye/Sunsynk Inverters",
48-
"46": ".__post_init__",
4948
"47": "build_prep.sh",
5049
"48": "Sunsynk — align with Cursor rules",
5150
"49": "Issue related to the Python sunsynk library",
@@ -56,8 +55,6 @@
5655
"54": "test_sensor_options.py",
5756
"55": "test_versions.py",
5857
"56": "Modbus TCP to Modbus RTU Gateway Add-on",
59-
"57": ".significant_change",
60-
"58": "ensure_str",
6158
"59": "json_view.vue",
6259
"60": "run.sh",
6360
"61": "hass-addon-sunsynk-edge/DOCS.md",
@@ -77,5 +74,6 @@
7774
"75": "test_zuban.py",
7875
"76": "docs/index.md",
7976
"77": "config.ts",
80-
"78": ".eslintrc.js"
77+
"78": ".eslintrc.js",
78+
"79": "copy2local.sh"
8179
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"0": "dbbd3b181369e390", "1": "d7eff289702b5a96", "2": "fae9c2f3aece92e7", "3": "869f2abe14b8f433", "4": "0de580ae01e050df", "5": "b5d0da6d8870bda2", "6": "f732b42942917d95", "7": "dfebefbf857dda80", "8": "9d8d7f38eb79658a", "9": "45d98b2a463376f7", "10": "a1745bd48bc9c400", "11": "9ee056b77c567ecb", "12": "3b13e080a0d8d551", "13": "6044718e10eac8db", "14": "c0a69cb73b832f53", "15": "67dfc49beb5944ce", "16": "e526d64991125884", "17": "5d4ff5598c76df1c", "18": "5ca93394d3073b54", "19": "64ad0e96083c7e3e", "20": "3bf5de42faafc3c2", "21": "a5b86a07026e1544", "22": "dba4e419c9409fa1", "23": "f6e040d5a1c9e9a0", "24": "d912a2b2d9edb58e", "25": "314f2abbee28cac7", "26": "9cd1164822f0d906", "27": "889d10a55f518608", "28": "e205d548d02b21d6", "29": "b27e1621f42e3457", "30": "4c7b1ac6176ac43f", "31": "d40284ea4fdb9344", "32": "3e7ba5a637ec2616", "33": "62b878daf5110c7e", "34": "7c25cff2b1234040", "35": "92b68165a2cf45e9", "36": "296cf1fbba324077", "37": "847a2b02bac498f9", "38": "ffa824ffa988b4db", "39": "9db7211992a3c63e", "40": "96581cf5de114de1", "41": "0badd1a49fb2a79f", "42": "5fd7348cb743d75d", "43": "1c0de3a556a9e51e", "44": "09e528f265f0c5ab", "45": "1b6b734b18235303", "46": "5737a43d2755c218", "47": "3eb18500770ce5d5", "48": "594087919fd6a8bf", "49": "6a1b71cfaa02fbe4", "50": "676fb1e16d547d75", "51": "8e91020c75f51e60", "52": "6f85c62bd7407043", "53": "c41d0f8469fb4033", "54": "718fe9b4d9e630e0", "55": "0b0ab091a04e9bbd", "56": "8d0ab5753e1ac6d2", "57": "9c1f479a3bcd341b", "58": "ca30820d95603ae5", "59": "690532b304f88171", "60": "4d0607b0908e13f3", "61": "3ec2502bc18dc152", "62": "1d486ec4363f3239", "63": "c949b242a690db15", "64": "e8ae0f4946290bf6", "65": "18316c5d24f790ac", "66": "396e4a0815293b67", "67": "4b7e85283b24d2bb", "68": "7fea16a83bf40f41", "69": "3b16499aaf0de712", "70": "0d4a752d9dda280d", "71": "f59f46a360d37b42", "72": "988bdd5d26ab19f8", "73": "1784db6153045ac1", "74": "8754aeda3c5d62e1", "75": "41e60d101b21e785", "76": "0ea3a21e4cc92283", "77": "b38991a747d1c7fb", "78": "bf4e8f2adf50dbd9"}
1+
{"0": "3d5db59701b7b0a3", "1": "d7eff289702b5a96", "2": "76895e3ad80ea2a4", "3": "869f2abe14b8f433", "4": "d293408fa3601d9f", "5": "c9c0735a76ab3e36", "6": "f732b42942917d95", "7": "6c8b55e53e6e5f9b", "8": "1d7ebabe73c6fd6f", "9": "b54195b4b9f18722", "10": "a1745bd48bc9c400", "11": "69e699385caa60a3", "12": "db1355fb74405e51", "13": "25c515c2acb06404", "14": "d161970950b557a8", "15": "063f7ee05159e605", "16": "77baca422797abcd", "17": "1a10dcb9a6326da5", "18": "9c48f4be50a50c6a", "19": "4c06b7c3e607fdb5", "20": "0f9915331bf26c7a", "21": "f0f293c32befc80c", "22": "204bd3688bb79ed6", "23": "d775060ed8d165b2", "24": "d912a2b2d9edb58e", "25": "d40284ea4fdb9344", "26": "9054a5bd54798b41", "27": "889d10a55f518608", "28": "2cc293e3a09aa9d6", "29": "b27e1621f42e3457", "30": "4c7b1ac6176ac43f", "31": "f0707c539937c7b4", "32": "e62ddf66c348f4e8", "33": "62b878daf5110c7e", "34": "c7f14ab2ace44244", "35": "92b68165a2cf45e9", "36": "296cf1fbba324077", "37": "64fa35e69ed6a564", "38": "c1de9d63eeba24c4", "39": "9db7211992a3c63e", "40": "96581cf5de114de1", "41": "0badd1a49fb2a79f", "42": "5fd7348cb743d75d", "43": "1c0de3a556a9e51e", "44": "09e528f265f0c5ab", "45": "1b6b734b18235303", "47": "3eb18500770ce5d5", "48": "594087919fd6a8bf", "49": "6a1b71cfaa02fbe4", "50": "676fb1e16d547d75", "51": "8e91020c75f51e60", "52": "6f85c62bd7407043", "53": "c41d0f8469fb4033", "54": "718fe9b4d9e630e0", "55": "0b0ab091a04e9bbd", "56": "8d0ab5753e1ac6d2", "59": "690532b304f88171", "60": "4d0607b0908e13f3", "61": "3ec2502bc18dc152", "62": "1d486ec4363f3239", "63": "c949b242a690db15", "64": "e8ae0f4946290bf6", "65": "18316c5d24f790ac", "66": "396e4a0815293b67", "67": "4b7e85283b24d2bb", "68": "7fea16a83bf40f41", "69": "3b16499aaf0de712", "70": "0d4a752d9dda280d", "71": "f59f46a360d37b42", "72": "988bdd5d26ab19f8", "73": "1784db6153045ac1", "74": "8754aeda3c5d62e1", "75": "41e60d101b21e785", "76": "0ea3a21e4cc92283", "77": "b38991a747d1c7fb", "78": "bf4e8f2adf50dbd9", "79": "b2f0b28d1a0427b7"}
Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
{
2+
"0": "SensorDefinitions",
3+
"1": "package.json",
4+
"2": "Sensor",
5+
"3": "Adaptors & Wiring",
6+
"4": "sensors.py",
7+
"5": "driver.py",
8+
"6": "compilerOptions",
9+
"7": "test_a_inverter.py",
10+
"8": "InverterState",
11+
"9": "test_helpers.py",
12+
"10": "percentile",
13+
"11": "sensor_options.py",
14+
"12": "a_inverter.py",
15+
"13": "HoldingUnit",
16+
"14": "RWSensor",
17+
"15": "RegType",
18+
"16": ".read_sensors",
19+
"17": "SolarmanUnit",
20+
"18": "ASensor",
21+
"19": "test_connection.py",
22+
"20": "Sunsynk",
23+
"21": "AInverter",
24+
"22": ".get",
25+
"23": "Architecture: modbus-connection and sunsynk",
26+
"24": "Groups of sensors",
27+
"25": "ToggleLogCallback",
28+
"26": "ModbusUnit underlay",
29+
"27": "definitions.md",
30+
"28": ".create_entity",
31+
"29": "tests/conftest.py",
32+
"30": "Run standalone using docker compose",
33+
"31": ".from_url",
34+
"32": "test_write_register_timeout",
35+
"33": "Available addons",
36+
"34": "Configuration",
37+
"35": "Single-phase register backfill (proposal)",
38+
"36": "Unreleased",
39+
"37": "sunsynk.py",
40+
"38": "test_options.py",
41+
"39": "Inverter Automation",
42+
"40": "Deye/Sunsynk Inverters",
43+
"41": ".reg_value",
44+
"42": "multi-options.md",
45+
"43": "Schedules",
46+
"44": "Issue related to",
47+
"45": "Deye/Sunsynk Inverters",
48+
"47": "build_prep.sh",
49+
"48": "Sunsynk — align with Cursor rules",
50+
"49": "Issue related to the Python sunsynk library",
51+
"50": "Custom/My Sensors",
52+
"51": "types.d.ts",
53+
"52": "Sunsynk User Documentation",
54+
"53": "Your environment",
55+
"54": "test_sensor_options.py",
56+
"55": "test_versions.py",
57+
"56": "Modbus TCP to Modbus RTU Gateway Add-on",
58+
"59": "json_view.vue",
59+
"60": "run.sh",
60+
"61": "hass-addon-sunsynk-edge/DOCS.md",
61+
"62": "hass-addon-sunsynk-edge/README.md",
62+
"63": "hass-addon-sunsynk-multi/CHANGELOG.md",
63+
"64": "hass-addon-sunsynk-multi/DOCS.md",
64+
"65": "hass-addon-sunsynk-multi/README.md",
65+
"66": "tests/README.md",
66+
"67": "templates.md",
67+
"68": "build_sitemap.js",
68+
"69": "index.ts",
69+
"70": "src/ha_addon_sunsynk_multi/__init__.py",
70+
"71": "tests/ha_addon_sunsynk_multi/__init__.py",
71+
"72": "tests/__init__.py",
72+
"73": "tests/sunsynk/definitions/__init__.py",
73+
"74": "tests/sunsynk/__init__.py",
74+
"75": "test_zuban.py",
75+
"76": "docs/index.md",
76+
"77": "config.ts",
77+
"78": ".eslintrc.js",
78+
"79": "copy2local.sh"
79+
}

0 commit comments

Comments
 (0)