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

+51
View File
@@ -50,6 +50,57 @@ devices:
# source_field: manufacturer_data
# decode: { offset: 23, length: 1, type: uint8 }
# 지하주차장 위치 요청 비콘 (BLE 광고 송신 및 수신 예제)
# UUID는 본인의 패킷 캡처에서 추출한 고유값으로 교체하세요.
#- id: mytown_parking
# name: "마이타운 주차위치"
# source: advertisement
# instance_mode: shared # 기둥 MAC이 매번 달라도 엔티티 1벌 유지
# match:
# manufacturer_id: 861 # 0x035D — kaml 파싱을 위해 10진수(decimal) 사용 권장
# manufacturer_hex_prefix: "06" # 06 응답 포맷 (본인 16B UUID 접두사)
# manufacturer_min_length: 18
# advertise:
# manufacturer_id: 861
# payload: "05<본인_16BYTE_UUID_HEX>40{counter:02X}"
# counter_mode: reset # reset(기본) | persist
# counter_start: 0 # reset 모드 시작값 (기본 0)
# mode: balanced # low_power | balanced | low_latency
# tx_power: high # ultra_low | low | medium | high
# timeout: 15s # 이 시간 지나면 자동 송신 중단
# repeat_interval: 1s # (선택) 이 주기로 payload 갱신 = counter 증가
# stop_on_response: true # 06 응답 수신 시 즉시 송신 중단
# controls:
# - key: request_location
# type: button
# name: "주차위치 요청"
# action: advertise # command 대신 앱 내부 광고 송신 동작 실행
# icon: mdi:car-search
# sensors:
# - key: parking_floor
# platform: text_sensor
# icon: mdi:layers-outline
# source_field: manufacturer_data
# decode:
# offset: 17
# length: 1
# type: uint8
# map:
# "251": "B5"
# "252": "B4"
# "253": "B3"
# "254": "B2"
# "255": "B1"
# "0": "LB"
# "1": "1F"
# "2": "2F"
# "3": "3F"
# - key: parking_location
# platform: text_sensor
# icon: mdi:map-marker-outline
# source_field: manufacturer_data
# decode: { offset: 18, length: 0, type: string }
# Parking beacon — instance_mode: shared → MAC 무관, manufacturer 0x035D 광고가 하나의 엔티티 공유
# payload 14바이트: [0]=04(응답타입), [1..6]=KeyMAC, [7..10]=월·일·시·분, [11]=층(256-raw), [12..13]=구역코드
# 04xx: 주차위치 응답 비콘, 07xx: SmartKey 인증(22B 암호화), 02xx: 출입 이벤트(6B) — prefix "04" 로 응답만 매칭