feat(advertise): add BLE advertising TX schema, templates, and validation

- Update scripts/validate.py with advertise block and control action validation
- Update templates.yaml with mytown_parking_beacon advertising TX template
- Add commented parking beacon TX/RX example to config.yaml
- Document advertise schema, counter_mode, counter_start, and control actions in README.md / README.ko.md
This commit is contained in:
eigger committed 2026-08-28 21:55:05 +09:00
1 parent 5659408d8d
commit b4fc6f799f
5 files changed
+229 -10

No files matched your search

+19 -3
View File
@@ -68,7 +68,7 @@ templates:
- id: mytown_parking_beacon
name: "마이타운 주차 비콘 (MyTown Parking)"
description: "마이타운 주차 위치 비콘 (제조사 861 / 0x035D, 포맷 0x06)"
description: "마이타운 주차 위치 비콘 (제조사 861 / 0x035D, 05 요청 광고 송신 + 06 응답 수신)"
device:
id: mytown_parking
name: "마이타운 주차위치"
@@ -78,6 +78,22 @@ templates:
manufacturer_id: 861 # 0x035D
manufacturer_hex_prefix: "06" # 06 응답 포맷 (특정 세대만 필터링 시 06 + 16B 수신 UUID HEX 입력)
manufacturer_min_length: 18 # 포맷(1B) + 세대 UUID(16B) + 층(1B) = 최소 18바이트
advertise:
manufacturer_id: 861 # 0x035D
payload: "05CB34447B91F8C69BBE41157C70BB631C40{counter:02X}" # 05 + 16B UUID + 40 + counter
counter_mode: reset # reset(기본) | persist
counter_start: 0
mode: balanced
tx_power: high
timeout: 15s
repeat_interval: 1s
stop_on_response: true
controls:
- key: request_location
type: button
name: "주차위치 요청"
action: advertise
icon: mdi:car-search
sensors:
# 주차 층수: 1B uint8 (254=0xFE: B2, 255=0xFF: B1, 0=0x00: LB, 1=0x01: 1F, 2=0x02: 2F 등)
- key: parking_floor
@@ -100,12 +116,12 @@ templates:
"3": "3F"
"4": "4F"
"5": "5F"
# 주차 구역: ASCII 텍스트 (예: 42 33 31 -> "B31", 41 2D 30 31 -> "A-01", 단지 포맷에 맞춰 length 조정)
# 주차 구역: ASCII 텍스트 (예: 42 33 31 -> "B31", 41 2D 30 31 -> "A-01", length: 0으로 가변 길이 자동 트림)
- key: parking_location
platform: text_sensor
icon: mdi:map-marker-outline
source_field: manufacturer_data
decode: { offset: 18, length: 3, type: string }
decode: { offset: 18, length: 0, type: string }
- id: obd_standard
name: "OBD-II (standard PIDs)"