opencode-skills-collection 4.0.71 → 4.0.72
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.
- package/bundled-skills/.antigravity-install-manifest.json +7 -1
- package/bundled-skills/chatexport-need-miner/SKILL.md +196 -0
- package/bundled-skills/dali-short-address-commissioner/SKILL.md +185 -0
- package/bundled-skills/eol-resistor-calculator/SKILL.md +211 -0
- package/bundled-skills/esl-price-sync/SKILL.md +210 -0
- package/bundled-skills/marlin-bed-leveling/SKILL.md +181 -0
- package/bundled-skills/oneroster-csv-validator/SKILL.md +205 -0
- package/bundled-skills/telegram-mini-app/references/detailed-guide.md +26 -0
- package/package.json +1 -1
- package/skills_index.json +197 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schemaVersion": 1,
|
|
3
|
-
"updatedAt": "2026-09-
|
|
3
|
+
"updatedAt": "2026-09-24T01:56:44.424Z",
|
|
4
4
|
"entries": [
|
|
5
5
|
"00-andruia-consultant",
|
|
6
6
|
"007",
|
|
@@ -475,6 +475,7 @@
|
|
|
475
475
|
"changelog-automation",
|
|
476
476
|
"changelog-updates",
|
|
477
477
|
"chat-widget",
|
|
478
|
+
"chatexport-need-miner",
|
|
478
479
|
"check-identity-pack",
|
|
479
480
|
"chrome-extension-developer",
|
|
480
481
|
"churn-prevention",
|
|
@@ -656,6 +657,7 @@
|
|
|
656
657
|
"daily",
|
|
657
658
|
"daily-gift",
|
|
658
659
|
"daily-news-report",
|
|
660
|
+
"dali-short-address-commissioner",
|
|
659
661
|
"dast-scanning",
|
|
660
662
|
"data-engineer",
|
|
661
663
|
"data-engineering-data-driven-feature",
|
|
@@ -869,6 +871,7 @@
|
|
|
869
871
|
"enterprise-vpn-attack",
|
|
870
872
|
"entropy-box",
|
|
871
873
|
"environment-setup-guide",
|
|
874
|
+
"eol-resistor-calculator",
|
|
872
875
|
"error-debugging-error-analysis",
|
|
873
876
|
"error-debugging-error-trace",
|
|
874
877
|
"error-debugging-multi-agent-review",
|
|
@@ -877,6 +880,7 @@
|
|
|
877
880
|
"error-diagnostics-error-trace",
|
|
878
881
|
"error-diagnostics-smart-debug",
|
|
879
882
|
"error-handling-patterns",
|
|
883
|
+
"esl-price-sync",
|
|
880
884
|
"ethical-hacking-methodology",
|
|
881
885
|
"evaluation",
|
|
882
886
|
"event-sourcing-architect",
|
|
@@ -1477,6 +1481,7 @@
|
|
|
1477
1481
|
"markstream-vue2",
|
|
1478
1482
|
"markstream-vue2-cli",
|
|
1479
1483
|
"markstream-vue2-vite",
|
|
1484
|
+
"marlin-bed-leveling",
|
|
1480
1485
|
"matematico-tao",
|
|
1481
1486
|
"mathguard",
|
|
1482
1487
|
"matplotlib",
|
|
@@ -1655,6 +1660,7 @@
|
|
|
1655
1660
|
"onboarding-cro",
|
|
1656
1661
|
"onboarding-psychologist",
|
|
1657
1662
|
"one-drive-automation",
|
|
1663
|
+
"oneroster-csv-validator",
|
|
1658
1664
|
"ontoly-software-graph",
|
|
1659
1665
|
"open-dynamic-workflows",
|
|
1660
1666
|
"open-source-marketing",
|
|
@@ -0,0 +1,196 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: chatexport-need-miner
|
|
3
|
+
description: "Mines offline Telegram Desktop chat exports (result.json) for unmet market needs and product opportunities using chunked streaming and verbatim quote grounding. Trigger phrases: mine chat export, telegram result.json, find unmet needs, analyze telegram chat."
|
|
4
|
+
category: development
|
|
5
|
+
risk: safe
|
|
6
|
+
source: community
|
|
7
|
+
source_repo: wwewtech/chatexport-need-miner
|
|
8
|
+
source_type: community
|
|
9
|
+
date_added: "2026-09-22"
|
|
10
|
+
author: wwewtech
|
|
11
|
+
tags: [telegram, market-research, text-mining, offline-analytics, developer-tools]
|
|
12
|
+
tools: [claude, cursor, gemini, windsurf]
|
|
13
|
+
license: "MIT"
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
# ChatExport Need Miner: Offline Market Signal & Pain-Point Extractor
|
|
17
|
+
|
|
18
|
+
Transform offline Telegram Desktop chat exports (`result.json`) into quantified, quote-grounded rankings of unmet market needs with zero memory crashes and absolute source fidelity.
|
|
19
|
+
|
|
20
|
+
## When to Use This Skill
|
|
21
|
+
|
|
22
|
+
Activate this skill when:
|
|
23
|
+
- The user provides an offline Telegram Desktop chat export (`result.json` or multi-file directory) and requests market research, customer problem analysis, or tool opportunity discovery.
|
|
24
|
+
- The user asks: "What are people in this chat struggling with?", "Find product ideas from this export", "What tools do users wish existed?", or "Mine complaints from this group".
|
|
25
|
+
- Analyzing multi-megabyte or gigabyte JSON dumps where standard in-memory deserialization (`json.load()`) risks out-of-memory (OOM) fatal crashes.
|
|
26
|
+
- Cross-referencing user complaints across multiple independent communities to eliminate echo-chamber noise.
|
|
27
|
+
|
|
28
|
+
Do NOT use this skill when:
|
|
29
|
+
- The user wants live channel scraping, continuous bot monitoring, or MTProto API automation (use dedicated online fetchers).
|
|
30
|
+
- Analyzing personal 1-on-1 romantic or private relationships.
|
|
31
|
+
- Processing generic SaaS helpdesk feeds (Zendesk, Intercom, Gong) with structured ticket schemas.
|
|
32
|
+
|
|
33
|
+
## Core Mental Models & Non-Negotiable Rules
|
|
34
|
+
|
|
35
|
+
1. **The 4MB Stream & Overlap Invariant (Memory Ceiling <= 8MB)**:
|
|
36
|
+
- Telegram Desktop `result.json` files routinely exceed 500MB to 5GB.
|
|
37
|
+
- NEVER load an entire export into memory with `json.load()` or `fs.readFileSync()`.
|
|
38
|
+
- Read the file in fixed 4MB chunks with a 4KB overlap tail.
|
|
39
|
+
- **Boundary Counting Law**: A substring hit is recorded if and only if its terminus falls past the overlap boundary. This guarantees zero missed boundary-spanning phrases and strictly zero duplicate counts.
|
|
40
|
+
|
|
41
|
+
2. **Cross-Chat Multiplicity Law ($U \ge 3$ Priority)**:
|
|
42
|
+
- One user posting 50 complaints in a single chat is an anecdote; 5 distinct users posting the same complaint across 3 independent chats is a market signal.
|
|
43
|
+
- Cluster rank score is calculated as:
|
|
44
|
+
$$\text{Score} = U \times \sqrt{H}$$
|
|
45
|
+
where $U$ is the number of distinct chat exports containing the signal, and $H$ is the total verified keyword hits.
|
|
46
|
+
- A pattern appearing in $U \ge 3$ chats always outranks a pattern confined to $U = 1$, regardless of raw hit volume.
|
|
47
|
+
|
|
48
|
+
3. **Verbatim Quote Anchor & Anti-Hallucination Law**:
|
|
49
|
+
- Every identified need theme MUST be backed by 2 to 5 verbatim quotes with exact ISO timestamp (`date`) and chat identifier.
|
|
50
|
+
- NEVER paraphrase a quote inside quotation marks. NEVER synthesize synthetic user statements.
|
|
51
|
+
- If a hypothesized theme lacks verbatim quote support, it MUST be marked `[UNCONFIRMED / NO VERBATIM EVIDENCE]`.
|
|
52
|
+
|
|
53
|
+
4. **Bi-Lingual Case-Insensitive Seed Lexicons**:
|
|
54
|
+
- Russian Lexicon: `не хватает`, `вот бы`, `бесит`, `надоело`, `задолбал`, `ищу инструмент`, `ищу бот`, `есть ли бот`, `есть ли сервис`, `посоветуйте тул`, `не работает`, `вручную`, `рутина`, `приходится руками`.
|
|
55
|
+
- English Lexicon: `i wish`, `missing`, `annoying`, `frustrating`, `looking for a tool`, `is there an app`, `is there a bot`, `any alternative to`, `doesn't work`, `manually`, `repetitive`, `waste of time`.
|
|
56
|
+
- Custom terms may be added only when explicitly approved or provided by the user.
|
|
57
|
+
|
|
58
|
+
5. **Strict Air-Gap & Zero Exfiltration**:
|
|
59
|
+
- The entire analysis executes locally and offline. No network requests, no external telemetry, no remote LLM proxying of raw message contents.
|
|
60
|
+
|
|
61
|
+
## Named Sins & Anti-Patterns (Что категорически ЗАПРЕЩЕНО)
|
|
62
|
+
|
|
63
|
+
| Anti-Pattern | Manifestation in Code/Workflow | Mandatory Production Counter-Rule |
|
|
64
|
+
| :--- | :--- | :--- |
|
|
65
|
+
| **The OOM Slurp** | `data = json.load(open('result.json'))` on 800MB file. | Use incremental regex streaming or chunked buffered file reading with `<= 8MB` RAM footprint. |
|
|
66
|
+
| **Chunk Boundary Blindness** | Chunking without overlap, truncating `"looking for a tool"` across 4096-byte splits. | Maintain a 4KB sliding overlap tail across chunk transitions. |
|
|
67
|
+
| **Double-Count Overlap Trap** | Counting hits found in both chunk $N$ and the overlap window of chunk $N+1$. | Only increment match counter if `match.end() > overlap_size`. |
|
|
68
|
+
| **The Echo-Chamber Distortion** | Elevating a bug mentioned 80 times by 1 single user in 1 chat to the #1 product opportunity. | Apply Cross-Chat Multiplicity Law ($U \times \sqrt{H}$) and count unique authors when available. |
|
|
69
|
+
| **Hallucinated Quotations** | "User expressed desire for better sync" written in quotes as `"I really need better sync"`. | Exact substring slice from source buffer; if unquoted, label as synthetic analysis. |
|
|
70
|
+
| **Service Message Pollution** | Mining system notifications (`"pinned a message"`, `"joined group"`, bot spam) as human needs. | Filter out messages where `type == "service"` or text begins with known bot commands (`/start`). |
|
|
71
|
+
| **Premature Uniqueness Claim** | Stating "No tool currently exists for this problem" without validation. | Run explicit coverage audit; if unverified, output strictly: `I cannot confirm this`. |
|
|
72
|
+
| **Lossy Encoding Crash** | Crashing on multi-byte emoji surrogate pairs or non-UTF-8 characters in chat history. | Decode with `errors='replace'` or raw byte-level UTF-8 traversal. |
|
|
73
|
+
| **Monolithic Theme Lumping** | Grouping all complaints under `"Users want better UI"` or `"Performance issues"`. | Disaggregate into specific actionable workflows (e.g. `"No zero-downtime database migration path"`). |
|
|
74
|
+
| **API Creep** | Prompting the user for Telegram Bot tokens or phone numbers for MTProto login. | Reject live requests; reiterate that input contract requires offline `result.json` exports only. |
|
|
75
|
+
|
|
76
|
+
## Concrete Archetypes / Presets
|
|
77
|
+
|
|
78
|
+
### Archetype 1: Streaming Regex Need Scanner (Python 3.10+)
|
|
79
|
+
```python
|
|
80
|
+
import re
|
|
81
|
+
import os
|
|
82
|
+
from typing import Generator, Dict, List, Tuple
|
|
83
|
+
|
|
84
|
+
CHUNK_SIZE = 4 * 1024 * 1024 # 4 MB
|
|
85
|
+
OVERLAP = 4096 # 4 KB
|
|
86
|
+
|
|
87
|
+
RU_LEXICON = re.compile(
|
|
88
|
+
r"(?i)\b(не\s+хватает|вот\s+бы|бесит|надоело|задолбал|ищу\s+(?:инструмент|бот|софт)|"
|
|
89
|
+
r"есть\s+ли\s+(?:бот|сервис|тул)|посоветуйте|вручную|рутина|приходится\s+руками)\b"
|
|
90
|
+
)
|
|
91
|
+
EN_LEXICON = re.compile(
|
|
92
|
+
r"(?i)\b(i\s+wish|missing|annoying|frustrating|looking\s+for\s+a\s+(?:tool|bot|app)|"
|
|
93
|
+
r"is\s+there\s+(?:an?\s+app|a\s+bot|a\s+tool)|any\s+alternative\s+to|manually|waste\s+of\s+time)\b"
|
|
94
|
+
)
|
|
95
|
+
|
|
96
|
+
def stream_chat_chunks(filepath: str) -> Generator[Tuple[str, int], None, None]:
|
|
97
|
+
overlap_tail = ""
|
|
98
|
+
with open(filepath, "r", encoding="utf-8", errors="replace") as f:
|
|
99
|
+
while True:
|
|
100
|
+
chunk = f.read(CHUNK_SIZE)
|
|
101
|
+
if not chunk:
|
|
102
|
+
break
|
|
103
|
+
combined = overlap_tail + chunk
|
|
104
|
+
yield combined, len(overlap_tail)
|
|
105
|
+
overlap_tail = combined[-OVERLAP:] if len(combined) >= OVERLAP else combined
|
|
106
|
+
|
|
107
|
+
def mine_need_signals(filepath: str, regex: re.Pattern, max_samples: int = 5) -> Dict:
|
|
108
|
+
hits = 0
|
|
109
|
+
samples: List[str] = []
|
|
110
|
+
for text_block, overlap_len in stream_chat_chunks(filepath):
|
|
111
|
+
for m in regex.finditer(text_block):
|
|
112
|
+
if m.end() > overlap_len:
|
|
113
|
+
hits += 1
|
|
114
|
+
if len(samples) < max_samples:
|
|
115
|
+
start = max(0, m.start() - 60)
|
|
116
|
+
end = min(len(text_block), m.end() + 140)
|
|
117
|
+
snippet = " ".join(text_block[start:end].split())
|
|
118
|
+
samples.append(snippet)
|
|
119
|
+
return {"total_hits": hits, "samples": samples}
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
### Archetype 2: Need Cluster & Prioritization Schema
|
|
123
|
+
```json
|
|
124
|
+
{
|
|
125
|
+
"theme_id": "NEED-001",
|
|
126
|
+
"theme_name": "Zero-Downtime SQLite Replication for Edge Daemons",
|
|
127
|
+
"aggregate_score": 14.14,
|
|
128
|
+
"distinct_chats": 4,
|
|
129
|
+
"total_hits": 50,
|
|
130
|
+
"chats_observed": ["devops_talk_ru", "sqlite_users", "homelab_ops", "backend_craft"],
|
|
131
|
+
"evidence": [
|
|
132
|
+
{
|
|
133
|
+
"date": "2026-08-14T11:22:04",
|
|
134
|
+
"chat": "devops_talk_ru",
|
|
135
|
+
"verbatim_quote": "бесит что нет нормальной репликации для sqlite на edge серверах без поднятия тяжелого postgres"
|
|
136
|
+
},
|
|
137
|
+
{
|
|
138
|
+
"date": "2026-09-02T19:40:12",
|
|
139
|
+
"chat": "sqlite_users",
|
|
140
|
+
"verbatim_quote": "is there a tool that actually handles multi-master sqlite sync without crashing on high concurrency?"
|
|
141
|
+
}
|
|
142
|
+
],
|
|
143
|
+
"existing_coverage": [
|
|
144
|
+
{"tool": "LiteFS", "gap": "Requires Consul / Fly.io infrastructure; complex on bare-metal edge."},
|
|
145
|
+
{"tool": "rqlite", "gap": "Raft layer alters SQLite interface semantics."}
|
|
146
|
+
],
|
|
147
|
+
"verdict": "Real commercial gap for turnkey lightweight edge replication."
|
|
148
|
+
}
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
### Archetype 3: Multi-File Directory Batch Orchestrator
|
|
152
|
+
```python
|
|
153
|
+
def process_export_directory(dir_path: str, pattern: re.Pattern) -> List[Dict]:
|
|
154
|
+
results = []
|
|
155
|
+
for root, _, files in os.walk(dir_path):
|
|
156
|
+
for file in files:
|
|
157
|
+
if file == "result.json" or file.endswith(".json"):
|
|
158
|
+
full_path = os.path.join(root, file)
|
|
159
|
+
chat_name = os.path.basename(root) if file == "result.json" else file
|
|
160
|
+
data = mine_need_signals(full_path, pattern)
|
|
161
|
+
if data["total_hits"] > 0:
|
|
162
|
+
results.append({"chat": chat_name, **data})
|
|
163
|
+
return results
|
|
164
|
+
```
|
|
165
|
+
|
|
166
|
+
## The Pre-Emit Quality Gate Checklist
|
|
167
|
+
|
|
168
|
+
Before emitting any market research summary or opportunity report, verify:
|
|
169
|
+
- [ ] **Memory Protection**: Confirmed that raw JSON was parsed via chunked stream or filtered iterator, never loaded as a monolithic object.
|
|
170
|
+
- [ ] **Boundary Integrity**: Overlap boundary logic was applied so split phrases across chunk cuts were not lost or double-counted.
|
|
171
|
+
- [ ] **Verbatim Quote Integrity**: Every listed quote exists word-for-word in the input file with exact date and source. Zero paraphrasing.
|
|
172
|
+
- [ ] **Cross-Chat Breadth**: Verified how many independent chat files the signal appeared in ($U \ge 3$ emphasized).
|
|
173
|
+
- [ ] **Service Message Stripping**: Confirmed system and bot notifications were not tabulated as customer pain points.
|
|
174
|
+
- [ ] **Honesty and Verification Clause**: If a gap or existing competitor cannot be verified, explicitly output: `"I cannot confirm this"`.
|
|
175
|
+
- [ ] **Actionable Granularity**: Themes are tied to specific engineering or operational workflows, not generic platitudes.
|
|
176
|
+
|
|
177
|
+
## Self-Correction & Verification Loop
|
|
178
|
+
|
|
179
|
+
### Bad (Vibe-Coded AI Slop Output):
|
|
180
|
+
> "I reviewed the chats and users are looking for better dev tools. Many people complain about speed and say they wish things worked better. There is a huge opportunity to build an AI bot for developers."
|
|
181
|
+
*Problems: Zero verbatim quotes, zero date citations, zero chat distribution count, ungrounded speculation, generic meaningless advice.*
|
|
182
|
+
|
|
183
|
+
### Good (Production ChatExport Need Miner Output):
|
|
184
|
+
> ### 1. Schema Migration Rollbacks for Flyway in CI/CD — 38 hits across 4 chats ($U=4, H=38, \text{Score}=24.66$)
|
|
185
|
+
> - **Chat Distribution**: `k8s_ru` (14 hits), `devops_community` (12 hits), `backend_pro` (8 hits), `java_chat` (4 hits).
|
|
186
|
+
> - **Evidence 1**: *"бесит когда flyway падает на миграции в CI и приходится вручную чистить schema_version таблицу на стейдже"* (2026-07-19T09:12:44, `devops_community`).
|
|
187
|
+
> - **Evidence 2**: *"is there a tool to safely dry-run flyway down migrations before merging to master?"* (2026-08-04T16:21:09, `k8s_ru`).
|
|
188
|
+
> - **Coverage Check**: Flyway Pro provides undo migrations; however, community tier users lack automated sandbox validation without custom Docker scripts.
|
|
189
|
+
> - **Verdict**: Confirmed gap for a lightweight CLI pre-flight validator for open-source Flyway migrations.
|
|
190
|
+
|
|
191
|
+
## Limitations
|
|
192
|
+
|
|
193
|
+
- Use only exports you are authorized to analyze. Chat exports can contain personal or sensitive information; minimize copied excerpts, redact identifiers in reports, and follow applicable retention and privacy requirements.
|
|
194
|
+
- Keep raw exports local and offline as described above. Do not upload messages, quotes, or identifiers to external services or include them in public reports without explicit authorization.
|
|
195
|
+
- Keyword counts and clustered themes are exploratory signals, not representative market research. Validate conclusions with independent evidence and do not infer intent from isolated messages.
|
|
196
|
+
- Chunked text scanning is not a complete Telegram JSON parser; malformed exports, escaped content, nested schemas, or encoding issues can affect counts. Verify any quoted excerpt against the original export.
|
|
@@ -0,0 +1,185 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: dali-short-address-commissioner
|
|
3
|
+
description: "Commissions DALI and DALI-2 (IEC 62386) lighting buses: short-address assignment (0-63), 24-bit binary search collision resolution, groups, and DT8 color control. Trigger phrases: commission dali, dali short address, dali collision resolution, dali bus addressing, dali-2 setup."
|
|
4
|
+
category: architecture
|
|
5
|
+
risk: safe
|
|
6
|
+
source: community
|
|
7
|
+
source_repo: wwewtech/dali-short-address-commissioner
|
|
8
|
+
source_type: community
|
|
9
|
+
date_added: "2026-09-22"
|
|
10
|
+
author: wwewtech
|
|
11
|
+
tags: [dali, dali-2, lighting-control, iec-62386, building-automation, iot]
|
|
12
|
+
tools: [claude, cursor, gemini, windsurf]
|
|
13
|
+
license: "MIT"
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
# DALI Short-Address Commissioner: Deterministic IEC 62386 Bus Provisioning
|
|
17
|
+
|
|
18
|
+
Systematically discover, resolve address collisions, assign short addresses (0–63), program groups and scenes, configure DT8 color gear, and schedule emergency battery duration tests on DALI and DALI-2 networks per IEC 62386.
|
|
19
|
+
|
|
20
|
+
## When to Use This Skill
|
|
21
|
+
|
|
22
|
+
Activate this skill when:
|
|
23
|
+
- Bringing up, commissioning, or expanding DALI or DALI-2 lighting installations (KNX/DALI gateways, Tridonic, Philips Dynalite, Helvar, Osram, Lunatone).
|
|
24
|
+
- The user asks: "How do I commission this DALI bus?", "Fix duplicate DALI short addresses", "Assign DALI addresses without erasing existing fixtures", or "Program DALI groups and DT8 tunable white".
|
|
25
|
+
- Resolving address clash loops where multiple ballasts respond simultaneously to broadcast queries.
|
|
26
|
+
- Designing or scheduling DALI-2 Part 202 emergency lighting duration and function tests across staggered floor circuits.
|
|
27
|
+
|
|
28
|
+
Do NOT use this skill when:
|
|
29
|
+
- Commissioning DMX512/RDM stage lighting, 0–10V analog dimming, or proprietary wireless RF networks (Zigbee, Bluetooth Mesh, Casambi).
|
|
30
|
+
- Diagnosing dead ballasts or physical wiring faults before basic DALI bus voltage (12V–20.5V DC) and current limits (<= 250mA) are confirmed.
|
|
31
|
+
- Programming building-wide KNX logic (this skill covers the DALI protocol domain strictly).
|
|
32
|
+
|
|
33
|
+
## Core Mental Models & Non-Negotiable Rules
|
|
34
|
+
|
|
35
|
+
1. **The 64-Address Bus Capacity Law**:
|
|
36
|
+
- A single DALI subnet supports strictly **0 to 63 short addresses** (64 control gear units maximum).
|
|
37
|
+
- Groups are strictly bounded to **0 to 15** (16 groups).
|
|
38
|
+
- Scenes are strictly bounded to **0 to 15** (16 scenes).
|
|
39
|
+
- If an installation has 65+ ballasts, the physical bus MUST be segmented into multiple DALI subnets with separate line masters or gateways.
|
|
40
|
+
|
|
41
|
+
2. **The Double-Command 100ms Transmission Invariant**:
|
|
42
|
+
- Configuration and addressing commands (INITIALISE [cmd 258], RANDOMISE [259], SET SHORT ADDRESS [267], ENABLE WRITE [cmd 32], etc.) MUST be transmitted **twice within 100ms** to be executed by control gear.
|
|
43
|
+
- Sending an addressing command only once will result in silent ignored execution by all IEC 62386 compliant gear.
|
|
44
|
+
|
|
45
|
+
3. **The 15-Minute Hardware Commissioning Timer**:
|
|
46
|
+
- Transmitting `INITIALISE` (cmd 258) starts a mandatory 15-minute countdown timer inside every ballast's micro-controller.
|
|
47
|
+
- All discovery, random address binary searching, and short address assignment MUST complete within 15 minutes, or the bus must receive a periodic keep-alive `INITIALISE` refresh.
|
|
48
|
+
- Upon completion, the master MUST transmit `TERMINATE` (cmd 257) to lock operational memory and exit programming state.
|
|
49
|
+
|
|
50
|
+
4. **24-Bit Random Address Binary Search ($2^{24} = 16,777,216$ Space)**:
|
|
51
|
+
- When gear enters randomizing state (`RANDOMISE`), each unit generates a pseudo-random 24-bit integer (`0x000000` to `0xFFFFFF`).
|
|
52
|
+
- The master searches the 24-bit space using `SEARCHADDRH`, `SEARCHADDRM`, `SEARCHADDRL` and `COMPARE` (cmd 265).
|
|
53
|
+
- If multiple ballasts match, the master performs binary search down to a single device.
|
|
54
|
+
- Once isolated, assign short address via `PROGRAM SHORT ADDRESS` (cmd 267) and immediately transmit `WITHDRAW` (cmd 266) so the addressed fixture drops out of remaining search iterations.
|
|
55
|
+
|
|
56
|
+
5. **Physical Identify & Non-Destructive Extension Invariant**:
|
|
57
|
+
- Every assigned short address MUST be verified visually using `IDENTIFY` or toggling `RECALL MAX LEVEL` / `OFF` before committing to lighting schedules.
|
|
58
|
+
- When adding fixtures to an existing operational line, NEVER broadcast a global `INITIALISE (all)`; use `INITIALISE (without short address)` so already-commissioned ballasts (0–63) preserve their programming.
|
|
59
|
+
|
|
60
|
+
## Named Sins & Anti-Patterns (Что категорически ЗАПРЕЩЕНО)
|
|
61
|
+
|
|
62
|
+
| Anti-Pattern | Manifestation in Code/Workflow | Mandatory Production Counter-Rule |
|
|
63
|
+
| :--- | :--- | :--- |
|
|
64
|
+
| **Single-Shot Addressing Commands** | Sending cmd 258 or cmd 267 once without repetition. | Always repeat configuration commands within a strict 100ms window. |
|
|
65
|
+
| **Exceeding 64 Short Addresses** | Attempting to assign address 64 or 65 on one loop. | Partition into Subnet A and Subnet B; enforce 0–63 maximum. |
|
|
66
|
+
| **Timer Starvation** | Letting the 15-minute `INITIALISE` window expire mid-search. | Issue keep-alive refresh or optimize binary search loop to < 3 minutes. |
|
|
67
|
+
| **Ghost Address Overwrite** | Assigning address 0 without scanning if address 0 is in use. | Run non-destructive `QUERY STATUS` (cmd 144) across 0–63 before reassigning. |
|
|
68
|
+
| **Bus Overcurrent Overload** | Connecting 64 ballasts (2mA each) + sensors to a 100mA PSU. | Verify total quiescent load $\le$ PSU rating (250mA max per IEC 62386). |
|
|
69
|
+
| **DT8 / DT6 Type Mismatch** | Controlling tunable white gear with single-channel DT6 arc power. | Issue `SELECT DIMMING CURVE / COLOUR` (Part 209) and send DT8 color coordinates. |
|
|
70
|
+
| **Simultaneous Emergency Discharge** | Triggering 3-hour duration tests on all emergency lights at once. | Stagger tests across alternating weeks/groups to ensure safety illumination. |
|
|
71
|
+
| **Missing WITHDRAW Command** | Forgetting cmd 266 after addressing a found ballast. | Send `WITHDRAW` immediately after `PROGRAM SHORT ADDRESS` to exclude from search. |
|
|
72
|
+
| **DALI Polarity Panic** | Halting installation claiming standard DALI requires polarity. | Note DALI uses an integrated bridge rectifier; polarity is non-critical (though consistent coloring is advised). |
|
|
73
|
+
| **Energizing Unverified Mains** | Commissioning ballasts while 230V live mains work is ongoing. | Enforce physical lockout/tagout (LOTO) prior to terminal connection. |
|
|
74
|
+
|
|
75
|
+
## Concrete Archetypes / Presets
|
|
76
|
+
|
|
77
|
+
### Archetype 1: Greenfield DALI Discovery & Binary Search (Python/C Pseudo-code)
|
|
78
|
+
```python
|
|
79
|
+
import time
|
|
80
|
+
|
|
81
|
+
def send_dali_double_cmd(cmd_byte1: int, cmd_byte2: int):
|
|
82
|
+
transmit_dali_frame(cmd_byte1, cmd_byte2)
|
|
83
|
+
time.sleep(0.015) # 15ms spacing
|
|
84
|
+
transmit_dali_frame(cmd_byte1, cmd_byte2)
|
|
85
|
+
|
|
86
|
+
def commission_greenfield_bus() -> dict:
|
|
87
|
+
assigned = {}
|
|
88
|
+
# 1. Start 15-min commissioning session
|
|
89
|
+
send_dali_double_cmd(0xA5, 0x00) # INITIALISE (all gear)
|
|
90
|
+
send_dali_double_cmd(0xA7, 0x00) # RANDOMISE
|
|
91
|
+
time.sleep(0.100) # Wait 100ms for random address generation
|
|
92
|
+
|
|
93
|
+
next_short_addr = 0
|
|
94
|
+
while next_short_addr < 64:
|
|
95
|
+
low, high = 0x000000, 0xFFFFFF
|
|
96
|
+
found_random_addr = None
|
|
97
|
+
|
|
98
|
+
# Binary search 24-bit space
|
|
99
|
+
while low <= high:
|
|
100
|
+
mid = (low + high) // 2
|
|
101
|
+
set_search_address(mid)
|
|
102
|
+
if query_compare(): # cmd 265: does any gear have random_addr <= mid?
|
|
103
|
+
found_random_addr = mid
|
|
104
|
+
high = mid - 1
|
|
105
|
+
else:
|
|
106
|
+
low = mid + 1
|
|
107
|
+
|
|
108
|
+
if found_random_addr is None:
|
|
109
|
+
break # No more unaddressed fixtures on the bus
|
|
110
|
+
|
|
111
|
+
# Isolate and assign
|
|
112
|
+
set_search_address(found_random_addr)
|
|
113
|
+
short_addr_payload = (next_short_addr << 1) | 0x01
|
|
114
|
+
send_dali_double_cmd(0xB7, short_addr_payload) # PROGRAM SHORT ADDRESS
|
|
115
|
+
send_dali_cmd(0xAB, 0x00) # WITHDRAW (cmd 266)
|
|
116
|
+
|
|
117
|
+
# Physical verify
|
|
118
|
+
flash_fixture(next_short_addr)
|
|
119
|
+
assigned[next_short_addr] = hex(found_random_addr)
|
|
120
|
+
next_short_addr += 1
|
|
121
|
+
|
|
122
|
+
send_dali_cmd(0xA1, 0x00) # TERMINATE (cmd 257)
|
|
123
|
+
return assigned
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
### Archetype 2: Surgical Replacement of a Failed Ballast
|
|
127
|
+
```python
|
|
128
|
+
def replace_single_failed_ballast(expected_short_addr: int):
|
|
129
|
+
# Do NOT wipe existing 63 ballasts:
|
|
130
|
+
send_dali_double_cmd(0xA5, 0xFF) # INITIALISE (ONLY gear without short address)
|
|
131
|
+
send_dali_double_cmd(0xA7, 0x00) # RANDOMISE
|
|
132
|
+
time.sleep(0.100)
|
|
133
|
+
|
|
134
|
+
# Perform binary search for the single new replacement unit
|
|
135
|
+
random_addr = search_single_unit()
|
|
136
|
+
set_search_address(random_addr)
|
|
137
|
+
|
|
138
|
+
# Program directly into the missing slot
|
|
139
|
+
payload = (expected_short_addr << 1) | 0x01
|
|
140
|
+
send_dali_double_cmd(0xB7, payload)
|
|
141
|
+
send_dali_cmd(0xAB, 0x00) # WITHDRAW
|
|
142
|
+
send_dali_cmd(0xA1, 0x00) # TERMINATE
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
### Archetype 3: Group & DT8 Tunable White Configuration
|
|
146
|
+
```python
|
|
147
|
+
def configure_dt8_tunable_white(short_addr: int, mirek: int, group_id: int):
|
|
148
|
+
# Mirek = 1,000,000 / Kelvin (e.g. 2700K = 370 mirek, 6500K = 153 mirek)
|
|
149
|
+
send_dali_cmd(0x01, 0x00) # DTR0: low byte of mirek
|
|
150
|
+
send_dali_cmd(0x03, 0x00) # DTR1: high byte of mirek
|
|
151
|
+
send_dali_double_cmd(0xE7, 0x20) # SET TEMP COLOUR (DT8 Part 209)
|
|
152
|
+
# Add to group (0-15)
|
|
153
|
+
group_payload = 0x60 | (group_id & 0x0F)
|
|
154
|
+
send_dali_double_cmd(0x01 | (short_addr << 1), group_payload)
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
## The Pre-Emit Quality Gate Checklist
|
|
158
|
+
|
|
159
|
+
Before finalizing any DALI commissioning plan or script, check:
|
|
160
|
+
- [ ] **Address Ceiling**: Total short addresses $\le 64$ (addresses 0–63).
|
|
161
|
+
- [ ] **Double Transmission Timing**: Configuration commands repeat twice within 100ms.
|
|
162
|
+
- [ ] **Commissioning Window**: 15-minute timer monitored with `TERMINATE` sent at conclusion.
|
|
163
|
+
- [ ] **Withdrawal Discipline**: `WITHDRAW` (cmd 266) sent immediately after each address assignment.
|
|
164
|
+
- [ ] **Bus Current Check**: Total quiescent load calculated ($\le 250\text{mA}$ power supply capacity).
|
|
165
|
+
- [ ] **Emergency Test Staggering**: Emergency battery duration tests scheduled in alternating groups.
|
|
166
|
+
- [ ] **Physical Verification**: `IDENTIFY` / `WINK` toggle step included for human visual signoff.
|
|
167
|
+
|
|
168
|
+
## Self-Correction & Verification Loop
|
|
169
|
+
|
|
170
|
+
### Bad (Vibe-Coded AI Slop Output):
|
|
171
|
+
> "To assign addresses on DALI, loop from 1 to 100 and send cmd 267 to each light. If lights don't respond, change the positive and negative wires because DALI needs polarity."
|
|
172
|
+
*Problems: Exceeds 64 addresses, addresses start at 1 instead of 0, misses double-command transmission, forgets random search, wrongly asserts DALI polarity dependence.*
|
|
173
|
+
|
|
174
|
+
### Good (Production DALI Commissioner Output):
|
|
175
|
+
> 1. Verify bus PSU delivers 16V DC with total load under 250mA (e.g., 42 ballasts $\times$ 2mA = 84mA).
|
|
176
|
+
> 2. Send `INITIALISE (all)` [cmd 258] twice within 100ms, starting the 15-minute commissioning watchdog.
|
|
177
|
+
> 3. Transmit `RANDOMISE` [cmd 259] twice within 100ms.
|
|
178
|
+
> 4. Execute 24-bit binary search across `SEARCHADDR` space. For each isolated unit, transmit `PROGRAM SHORT ADDRESS` (slot 0–41) twice within 100ms, immediately followed by `WITHDRAW` [cmd 266].
|
|
179
|
+
> 5. Issue `TERMINATE` [cmd 257] to exit programming mode and physically pulse each luminaire to verify mapping.
|
|
180
|
+
|
|
181
|
+
## Limitations
|
|
182
|
+
|
|
183
|
+
- DALI command support, timing, gear limits, and DT8 behavior vary by control gear, device type, and IEC 62386 edition. Confirm commands against the exact gear and gateway manuals before transmission.
|
|
184
|
+
- Commissioning can disrupt occupied lighting and emergency systems. Coordinate an approved outage and have a qualified lighting professional verify any live bus operation; never treat these examples as a substitute for site procedures.
|
|
185
|
+
- Pseudo-code is illustrative and is not a tested gateway driver. Verify address mapping and every fixture physically before saving configuration.
|
|
@@ -0,0 +1,211 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: eol-resistor-calculator
|
|
3
|
+
description: "Calculates and validates end-of-line (EOL, SEOL, DEOL, TEOL) resistor loops for intrusion alarm panels (Honeywell, DSC, Paradox, Bosch) with wire gauge drop and state tables. Trigger phrases: eol resistor, deol wiring, alarm zone resistor, calculate end of line, double eol tamper."
|
|
4
|
+
category: architecture
|
|
5
|
+
risk: safe
|
|
6
|
+
source: community
|
|
7
|
+
source_repo: wwewtech/eol-resistor-calculator
|
|
8
|
+
source_type: community
|
|
9
|
+
date_added: "2026-09-22"
|
|
10
|
+
author: wwewtech
|
|
11
|
+
tags: [security-systems, hardware, electronics, alarm-panel, circuit-design, electrical-engineering]
|
|
12
|
+
tools: [claude, cursor, gemini, windsurf]
|
|
13
|
+
license: "MIT"
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
# EOL Resistor Calculator: Precision Intrusion Loop Supervision & State Solver
|
|
17
|
+
|
|
18
|
+
Accurately size, configure, and troubleshoot Single (SEOL), Double (DEOL), and Triple (TEOL) end-of-line resistor loops across major security panel architectures with copper wire drop compensation and tamper state discrimination.
|
|
19
|
+
|
|
20
|
+
## When to Use This Skill
|
|
21
|
+
|
|
22
|
+
Activate this skill when:
|
|
23
|
+
- Sizing, retrofitting, or diagnosing hardwired security loops on alarm panels (DSC PowerSeries/Neo, Honeywell Ademco Vista, Paradox EVO/Spectra, Bosch B/G Series, Texecom Premier Elite).
|
|
24
|
+
- The user asks: "How do I wire double EOL on a DSC panel?", "Calculate zone loop resistance for a 200m cable run", "Troubleshoot a constant zone tamper fault", or "What resistor values does Honeywell Vista use?".
|
|
25
|
+
- Differentiating between Normal, Alarm, Tamper (Short), and Cut (Open) circuit states across varying panel threshold windows.
|
|
26
|
+
- Sizing copper loop resistance drops on long perimeter runs (e.g. 22 AWG over 150+ meters) to prevent phantom false alarms.
|
|
27
|
+
|
|
28
|
+
Do NOT use this skill when:
|
|
29
|
+
- Designing wireless sensors or addressable polling loop multiplexers (polling loops use digital transponders, not passive EOL resistors).
|
|
30
|
+
- Bypassing safety or life-safety supervision circuits (never advise strapping out resistors or bypassing line supervision).
|
|
31
|
+
- Working on 2-wire smoke detector loops without consulting panel-specific smoke circuit polarity and current-limiting specs.
|
|
32
|
+
|
|
33
|
+
## Core Mental Models & Non-Negotiable Rules
|
|
34
|
+
|
|
35
|
+
1. **The Far-End Placement Axiom (Strict Anti-Panel Stacking)**:
|
|
36
|
+
- Resistors MUST be installed **inside the sensor housing at the farthest physical end of the cable run**.
|
|
37
|
+
- Placing resistors across screw terminals inside the alarm panel enclosure protects only the metal cabinet itself; the entire 50-meter cable run to the sensor is left vulnerable to undetected wire cuts or staple shorts.
|
|
38
|
+
- Any wiring diagram showing EOL resistors at the panel board for field sensors is flagged as a Grade 2/Grade 3 compliance violation.
|
|
39
|
+
|
|
40
|
+
2. **The 4-State Double-EOL (DEOL) Truth Table**:
|
|
41
|
+
- Double EOL uses two resistors: an End-of-Line resistor ($R_{EOL}$) and an Alarm contact resistor ($R_{ALARM}$).
|
|
42
|
+
- Standard series-parallel configuration (e.g., DSC standard 5.6k / 5.6k):
|
|
43
|
+
$$\text{Loop State} = \begin{cases}
|
|
44
|
+
0\ \Omega\ (\text{Short Circuit}) & \implies \mathbf{Tamper\ (Short)} \\
|
|
45
|
+
R_{EOL}\ (5.6\text{k}\ \Omega) & \implies \mathbf{Normal\ (Secure)} \\
|
|
46
|
+
R_{EOL} + R_{ALARM}\ (11.2\text{k}\ \Omega) & \implies \mathbf{Alarm\ (Tripped)} \\
|
|
47
|
+
\infty\ \Omega\ (\text{Open Circuit}) & \implies \mathbf{Tamper\ (Cut\ Wire)}
|
|
48
|
+
\end{cases}$$
|
|
49
|
+
- This provides complete supervised discrimination between intruder activation and physical sabotage.
|
|
50
|
+
|
|
51
|
+
3. **Copper Wire Resistance Compensation Formula**:
|
|
52
|
+
- Long field cable runs add series loop resistance across both conductors:
|
|
53
|
+
$$R_{loop} = 2 \times D \times \rho_{gauge}$$
|
|
54
|
+
where $D$ is one-way distance in meters, and $\rho_{gauge}$ is resistance per meter:
|
|
55
|
+
- **22 AWG (0.326 mm²)**: $0.053\ \Omega/\text{meter}$ ($16.14\ \Omega/1000\text{ft}$)
|
|
56
|
+
- **20 AWG (0.518 mm²)**: $0.033\ \Omega/\text{meter}$ ($10.15\ \Omega/1000\text{ft}$)
|
|
57
|
+
- **18 AWG (0.823 mm²)**: $0.021\ \Omega/\text{meter}$ ($6.38\ \Omega/1000\text{ft}$)
|
|
58
|
+
- A 150m run of 22 AWG adds $2 \times 150 \times 0.053 \approx 15.9\ \Omega$. Ensure total loop resistance does not push readings beyond the panel's $\pm 15\%$ ADC tolerance window.
|
|
59
|
+
|
|
60
|
+
4. **Panel Reference Resistor Standards Matrix**:
|
|
61
|
+
- **DSC PowerSeries / Neo**: $5.6\text{k}\ \Omega$ SEOL / $5.6\text{k} + 5.6\text{k}$ DEOL.
|
|
62
|
+
- **Honeywell Ademco Vista**: $2.0\text{k}\ \Omega$ SEOL (Standard zones), $1.0\text{k}$ (Zone 1 on some models).
|
|
63
|
+
- **Paradox EVO / Spectra**: $1.0\text{k}\ \Omega$ SEOL / $1.0\text{k} + 1.0\text{k}$ DEOL (or ATZ mode with $1.0\text{k} / 2.2\text{k}$).
|
|
64
|
+
- **Bosch B / G Series**: Dual supervision with $1.0\text{k} / 2.0\text{k}$ or panel-selectable windows.
|
|
65
|
+
- **Texecom Premier Elite**: $2.2\text{k} / 4.7\text{k}$ or selectable Grade 3 Triple-EOL ($4.7\text{k} / 4.7\text{k} / 2.2\text{k}$ anti-mask).
|
|
66
|
+
|
|
67
|
+
5. **ADC Voltage Divider Acceptance Windows**:
|
|
68
|
+
- Security panels measure zone voltage through an internal pull-up resistor ($R_{pullup}$, typically $1\text{k}$ to $3.3\text{k}\ \Omega$) connected to a reference voltage ($V_{ref}$, typically $5.0\text{V}$ or $13.8\text{V}$).
|
|
69
|
+
- Terminal voltage is given by:
|
|
70
|
+
$$V_{zone} = V_{ref} \times \frac{R_{loop\_total}}{R_{pullup} + R_{loop\_total}}$$
|
|
71
|
+
- Always confirm whether a measured terminal voltage falls inside the manufacturer's specified ADC threshold window before replacing field hardware.
|
|
72
|
+
|
|
73
|
+
## Named Sins & Anti-Patterns (Что категорически ЗАПРЕЩЕНО)
|
|
74
|
+
|
|
75
|
+
| Anti-Pattern | Manifestation in Code/Workflow | Mandatory Production Counter-Rule |
|
|
76
|
+
| :--- | :--- | :--- |
|
|
77
|
+
| **Panel-Terminal Resistor Stacking** | Crimping EOL resistors into the screw terminals on the panel PCB. | Install resistors exclusively inside the remote sensor housing. |
|
|
78
|
+
| **Vendor Value Cross-Contamination** | Putting 2.0k Honeywell resistors onto a DSC panel requiring 5.6k. | Verify panel model and enforce manufacturer-specific resistance ratings. |
|
|
79
|
+
| **DEOL Series/Parallel Inversion** | Swapping series and parallel resistors on an alarm PIR contact. | Wire $R_{ALARM}$ in parallel with NC alarm switch; wire $R_{EOL}$ in series with loop. |
|
|
80
|
+
| **Neglecting Wire Drop on Long Runs** | Ignoring 40+ $\Omega$ wire resistance on a 300-meter warehouse fence zone. | Calculate loop resistance $2 \times D \times \rho$ and verify against panel budget. |
|
|
81
|
+
| **Twist-and-Tape Resistor Splices** | Twisting resistor leads by hand and wrapping with electrical tape. | Use soldered heat-shrink sleeves or grease-filled B-connectors/crimps. |
|
|
82
|
+
| **Fire/Burg Supervised Mix-up** | Applying burglar DEOL tamper logic to 2-wire latching fire zones. | Fire loops strictly require Normally Open (NO) contacts with SEOL supervision. |
|
|
83
|
+
| **Unshielded AC Parallel Run** | Running 22/4 unshielded alarm cable in parallel with 230V mains. | Maintain 300mm physical separation or use twisted shielded pair (STP). |
|
|
84
|
+
| **Strapping Out Trouble Zones** | Advising a user to twist zone wires together to clear a trouble condition. | Diagnose root cause (open wire, bad contact, corroded resistor) methodically. |
|
|
85
|
+
| **Confusing NO and NC Contacts** | Treating a magnetic reed switch (NC) like an exit request button (NO). | Verify sensor contact behavior in quiescent, non-alarm states. |
|
|
86
|
+
| **Unrecorded Commissioning Values** | Leaving an install without recording measured DC resistance values. | Deliver an audit log of measured loop ohms across Normal, Alarm, and Tamper. |
|
|
87
|
+
|
|
88
|
+
## Concrete Archetypes / Presets
|
|
89
|
+
|
|
90
|
+
### Archetype 1: Double-EOL (DEOL) Sensor Wiring Schematic (DSC 5.6k)
|
|
91
|
+
```
|
|
92
|
+
(+) ZONE TERMINAL (Panel)
|
|
93
|
+
│
|
|
94
|
+
▼ [Core 1: Field Wire]
|
|
95
|
+
┌───────┴────────────────────────┐
|
|
96
|
+
│ SENSOR HOUSING (Far End) │
|
|
97
|
+
│ │
|
|
98
|
+
│ TAMPER SWITCH (NC) │
|
|
99
|
+
│ ┌────[ / ]────┐ │
|
|
100
|
+
│ │ │ │
|
|
101
|
+
│ ▼ ▼ │
|
|
102
|
+
│ ( ) ( ) │
|
|
103
|
+
│ │ │ │
|
|
104
|
+
│ │ ALARM RELAY (NC) │
|
|
105
|
+
│ │ ┌────[ / ]────┐ │
|
|
106
|
+
│ │ │ │ │
|
|
107
|
+
│ │ │ R_ALARM │ │
|
|
108
|
+
│ │ └───[5.6k]────┘ │
|
|
109
|
+
│ │ │ │
|
|
110
|
+
│ ▼ ▼ │
|
|
111
|
+
│ R_EOL [5.6k] │ │
|
|
112
|
+
│ │ │ │
|
|
113
|
+
└─────┼─────────────┼────────────┘
|
|
114
|
+
│ │
|
|
115
|
+
└─────────────┘
|
|
116
|
+
▲
|
|
117
|
+
│ [Core 2: Field Wire]
|
|
118
|
+
(─) COMMON TERMINAL (Panel)
|
|
119
|
+
|
|
120
|
+
State Resistance:
|
|
121
|
+
• Secure: 5.6k Ω
|
|
122
|
+
• Alarm: 11.2k Ω (Alarm contact opens, forcing current through R_ALARM)
|
|
123
|
+
• Tamper: 0 Ω (Short circuit) or ∞ Ω (Cut wire or Tamper contact opens)
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
### Archetype 2: Loop Resistance & Tolerance Calculator (Python 3.10+)
|
|
127
|
+
```python
|
|
128
|
+
def calculate_loop_parameters(
|
|
129
|
+
panel_eol_nominal: float,
|
|
130
|
+
panel_tolerance_pct: float,
|
|
131
|
+
one_way_distance_m: float,
|
|
132
|
+
wire_gauge_awg: int = 22,
|
|
133
|
+
deol_mode: bool = True
|
|
134
|
+
) -> dict:
|
|
135
|
+
# Ohms per meter for solid annealed copper conductors
|
|
136
|
+
RESISTANCE_PER_M = {18: 0.0209, 20: 0.0333, 22: 0.0530, 24: 0.0842}
|
|
137
|
+
rho = RESISTANCE_PER_M.get(wire_gauge_awg, 0.0530)
|
|
138
|
+
|
|
139
|
+
wire_loop_ohms = 2.0 * one_way_distance_m * rho
|
|
140
|
+
normal_resistance = panel_eol_nominal + wire_loop_ohms
|
|
141
|
+
alarm_resistance = (panel_eol_nominal * 2.0 if deol_mode else float('inf')) + wire_loop_ohms
|
|
142
|
+
|
|
143
|
+
tol_window = panel_eol_nominal * (panel_tolerance_pct / 100.0)
|
|
144
|
+
normal_min = panel_eol_nominal - tol_window
|
|
145
|
+
normal_max = panel_eol_nominal + tol_window
|
|
146
|
+
|
|
147
|
+
is_normal_acceptable = (normal_min <= normal_resistance <= normal_max)
|
|
148
|
+
|
|
149
|
+
return {
|
|
150
|
+
"wire_loop_resistance_ohms": round(wire_loop_ohms, 2),
|
|
151
|
+
"measured_normal_expected": round(normal_resistance, 2),
|
|
152
|
+
"measured_alarm_expected": round(alarm_resistance, 2),
|
|
153
|
+
"panel_acceptance_window": (round(normal_min, 2), round(normal_max, 2)),
|
|
154
|
+
"is_acceptable": is_normal_acceptable,
|
|
155
|
+
"recommendation": "OK" if is_normal_acceptable else "Wire resistance exceeds panel tolerance! Upsize to 20 AWG or 18 AWG."
|
|
156
|
+
}
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
### Archetype 3: Multimeter Field Diagnostic Workflow
|
|
160
|
+
```markdown
|
|
161
|
+
1. Disconnect zone loop wires from panel terminal Z1 and COM.
|
|
162
|
+
2. Set digital multimeter to 20k Ω DC resistance range.
|
|
163
|
+
3. Clip probes to black and red loop wires.
|
|
164
|
+
4. Read resistance:
|
|
165
|
+
- Reading = 0 Ω: Direct short on cable or tamper circuit pinched.
|
|
166
|
+
- Reading = ~5.6k Ω: Loop is secure and healthy.
|
|
167
|
+
- Reading = ~11.2k Ω: Sensor is currently tripped (door open, motion active).
|
|
168
|
+
- Reading = O.L (∞ Ω): Broken conductor, disconnected terminal, or open tamper switch.
|
|
169
|
+
5. Reconnect to panel and verify terminal voltage across Z1 and COM:
|
|
170
|
+
- Normal secure: 2.2V - 2.8V DC (on 5V pullup).
|
|
171
|
+
- Alarm: 3.5V - 4.1V DC.
|
|
172
|
+
- Tamper/Short: 0.0V DC.
|
|
173
|
+
- Cut/Open: 5.0V DC.
|
|
174
|
+
```
|
|
175
|
+
|
|
176
|
+
## The Pre-Emit Quality Gate Checklist
|
|
177
|
+
|
|
178
|
+
Before emitting any alarm wiring advice, schematic, or resistor calculation:
|
|
179
|
+
- [ ] **Placement Verification**: Explicitly mandate resistor placement at the remote detector, strictly barring panel-terminal stacking.
|
|
180
|
+
- [ ] **Manufacturer Compliance**: Verified nominal EOL values match the specific panel model (Honeywell 2.0k, DSC 5.6k, Paradox 1.0k, etc.).
|
|
181
|
+
- [ ] **Wire Gauge Compensation**: Calculated two-conductor wire loop resistance for distances $> 50$ meters.
|
|
182
|
+
- [ ] **DEOL State Coverage**: Documented all 4 states (Normal, Alarm, Tamper Short, Tamper Open).
|
|
183
|
+
- [ ] **Fire Circuit Distinction**: Confirmed burglary DEOL logic is never recommended for latching fire loops.
|
|
184
|
+
- [ ] **Physical Connection Standards**: Specified soldered heat-shrink or B-connector crimps over raw tape twists.
|
|
185
|
+
- [ ] **Zero Supervision Bypass**: Zero instructions provided to defeat or bypass loop supervision resistors.
|
|
186
|
+
|
|
187
|
+
## Self-Correction & Verification Loop
|
|
188
|
+
|
|
189
|
+
### Bad (Vibe-Coded AI Slop Output):
|
|
190
|
+
> "To wire an alarm sensor, just twist the resistor onto the zone screw terminals on the panel board. A 1k resistor usually works for all panels. If you get a zone fault, just bypass the zone or short the wires together."
|
|
191
|
+
*Problems: Fatal panel-terminal stacking, generic wrong resistor value, advises bypassing safety supervision, ignores tamper discrimination.*
|
|
192
|
+
|
|
193
|
+
### Good (Production EOL Resistor Calculator Output):
|
|
194
|
+
> For a **DSC PowerSeries Neo** panel using a **Double-EOL (DEOL)** PIR detector over an **80m run of 22 AWG** cable:
|
|
195
|
+
> 1. **Resistor Placement**: Install two 5.6k $\Omega$ resistors (5% tolerance, 0.25W) strictly inside the PIR housing at the far end of the run.
|
|
196
|
+
> 2. **Wiring Topology**:
|
|
197
|
+
> - Connect Tamper switch in series with the loop.
|
|
198
|
+
> - Connect first 5.6k $\Omega$ resistor ($R_{EOL}$) in series with the loop.
|
|
199
|
+
> - Connect second 5.6k $\Omega$ resistor ($R_{ALARM}$) in parallel across the NC Alarm relay contacts.
|
|
200
|
+
> 3. **Wire Resistance Drop**: 80m of 22 AWG adds $2 \times 80 \times 0.053 = 8.48\ \Omega$. Total secure loop resistance will be $5,608.5\ \Omega$, well within DSC's $\pm 10\%$ acceptance window ($5,040\ \Omega$ to $6,160\ \Omega$).
|
|
201
|
+
> 4. **Multimeter Diagnostic Verification**:
|
|
202
|
+
> - Secure: $5.61\text{k}\ \Omega$.
|
|
203
|
+
> - Walk-test (Alarm): $11.21\text{k}\ \Omega$.
|
|
204
|
+
> - Sensor cover removed (Tamper): $\infty\ \Omega$ (Open).
|
|
205
|
+
> - Crushed wire (Short): $8.5\ \Omega$ (Panel registers Tamper Short).
|
|
206
|
+
|
|
207
|
+
## Limitations
|
|
208
|
+
|
|
209
|
+
- EOL values, wiring topologies, and zone states are panel- and detector-specific. Use the installation manual and approved wiring diagram for the exact model; the examples are not universal specifications.
|
|
210
|
+
- Work on alarm systems only with owner authorization and qualified personnel. Do not bypass supervision, disable an active alarm, or leave a protected site without a verified restored state.
|
|
211
|
+
- Cable resistance and resistor tolerances are estimates. Measure the installed loop and confirm the panel's published acceptance ranges before changing configuration.
|