Archived
1. parking_beacon: manufacturer_hex_prefix "04" 추가 - SmartKey 인증 패킷(07xx, 22B)이 parking_floor/location을 오염시키던 문제 수정 - length: 14 (정확한 길이 일치)로 22B 패킷 디코드 단계에서도 차단 2. apt_key_door 신규 추가 - manufacturer_id 861 + prefix "02" → 출입 이벤트 6바이트 패킷만 매칭 - instance_mode: shared, MAC 지정 없음 - door_status: entering / exiting / idle 텍스트 센서 - publish.min_interval: 1s (기본 10s 오버라이드, 이벤트가 수 초 내 전환) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
169 lines
7.7 KiB
YAML
169 lines
7.7 KiB
YAML
# HassBle Configuration File
|
|
#
|
|
# Host config.yaml and templates.yaml in a Git repository (e.g., GitHub).
|
|
# In the HassBle app: enter owner/repo and branch (e.g. eigger/hassble-config, main).
|
|
# The app loads config.yaml for the gateway and templates.yaml for Import template.
|
|
#
|
|
# Do NOT put any Home Assistant credentials (URL/Token) in this file. Enter them in the app.
|
|
|
|
version: 1
|
|
|
|
defaults:
|
|
publish:
|
|
on_change_only: true
|
|
min_interval: 10s
|
|
|
|
devices:
|
|
# ──────────────────────────────────────────────────────────────
|
|
# Path A: BLE Passive Scanning (Advertisements)
|
|
# ──────────────────────────────────────────────────────────────
|
|
# Jaalee JHT — instance_mode: mac → 스캔된 MAC마다 jaalee_jht_{MAC} 엔티티 자동 생성
|
|
# Ref: https://github.com/eigger/espcomponents/tree/master/components/jaalee_jht
|
|
# Temp/Humidity formula: https://sensor.jaalee.com/scan_api.html
|
|
#- id: jaalee_jht
|
|
# name: "Jaalee JHT"
|
|
# source: advertisement
|
|
# instance_mode: mac
|
|
# match:
|
|
# manufacturer_id: 76 # Apple Inc. (0x004C) — decimal 사용 필수 (hex 0x... 파싱 불안정)
|
|
# manufacturer_min_length: 24
|
|
# manufacturer_hex_prefix: "0215" # iBeacon 타입 마커 (0x02=subtype, 0x15=length 21)
|
|
# sensors:
|
|
# - key: temperature
|
|
# device_class: temperature
|
|
# unit: "°C"
|
|
# state_class: measurement
|
|
# accuracy_decimals: 2
|
|
# source_field: manufacturer_data
|
|
# decode: { offset: 18, length: 2, type: uint16, endian: big, scale: 0.002670288, offset_value: -45 }
|
|
# - key: humidity
|
|
# device_class: humidity
|
|
# unit: "%"
|
|
# state_class: measurement
|
|
# accuracy_decimals: 2
|
|
# source_field: manufacturer_data
|
|
# decode: { offset: 20, length: 2, type: uint16, endian: big, scale: 0.001524504 }
|
|
# - key: battery
|
|
# device_class: battery
|
|
# unit: "%"
|
|
# state_class: measurement
|
|
# source_field: manufacturer_data
|
|
# decode: { offset: 23, length: 1, type: uint8 }
|
|
|
|
# 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" 로 응답만 매칭
|
|
- id: parking_beacon
|
|
name: "Parking Beacon"
|
|
source: advertisement
|
|
instance_mode: shared
|
|
match:
|
|
manufacturer_id: 861 # 0x035D
|
|
manufacturer_hex_prefix: "04" # 응답 비콘만 매칭 (07=SmartKey 인증, 02=출입 이벤트 제외)
|
|
sensors:
|
|
- key: parking_time
|
|
device_class: timestamp
|
|
icon: mdi:clock-time-four-outline
|
|
source_field: manufacturer_data
|
|
length: 14
|
|
decode: { offset: 7, length: 4, type: timestamp }
|
|
- key: parking_floor
|
|
icon: mdi:layers-outline
|
|
source_field: manufacturer_data
|
|
length: 14
|
|
accuracy_decimals: 0
|
|
decode: { offset: 11, length: 1, type: uint8, scale: -1, offset_value: 256 }
|
|
- key: parking_location
|
|
platform: text_sensor
|
|
icon: mdi:map-marker-outline
|
|
source_field: manufacturer_data
|
|
length: 14
|
|
decode: { offset: 12, length: 2, type: string }
|
|
|
|
# APT SmartKey 출입문 이벤트 — 고정 MAC으로 하드웨어 필터, 02xx 6바이트 패킷만 파싱
|
|
# payload 6바이트: [0]=02(이벤트타입), [1..3]=05 00 55, [4]=상태, [5]=카운터
|
|
# byte[4] 상태값: 0x41(65)=entering_start, 0x01(1)=entering, 0x40(64)=exiting, 0x00(0)=idle
|
|
# 0x41→0x01 두 값 모두 "entering"으로 매핑 → on_change_only가 중간 전환 노이즈 제거
|
|
- id: apt_key_door
|
|
name: "APT Door Event"
|
|
source: advertisement
|
|
instance_mode: shared
|
|
match:
|
|
manufacturer_id: 861 # 0x035D
|
|
manufacturer_hex_prefix: "02" # 출입 이벤트 타입만 (07xx=인증 22B, 04xx=주차응답 14B 제외)
|
|
sensors:
|
|
- key: door_status
|
|
platform: text_sensor
|
|
icon: mdi:door
|
|
source_field: manufacturer_data
|
|
length: 6
|
|
publish:
|
|
min_interval: 1s # 기본 10s 오버라이드 — 이벤트가 수 초 내 전환됨
|
|
decode:
|
|
offset: 4
|
|
length: 1
|
|
type: uint8
|
|
map:
|
|
"65": "entering" # 0x41 인증 시작
|
|
"1": "entering" # 0x01 인증 완료 (entering과 동일 → 전환 노이즈 제거)
|
|
"64": "exiting" # 0x40
|
|
"0": "idle" # 0x00
|
|
|
|
# ──────────────────────────────────────────────────────────────
|
|
# Path C: OBD (ELM327) over BLE
|
|
# ──────────────────────────────────────────────────────────────
|
|
- id: car_obd
|
|
name: "Vehicle OBD"
|
|
source: obd
|
|
obd:
|
|
service_uuid: "18F0"
|
|
tx_char_uuid: "2AF1"
|
|
rx_char_uuid: "2AF0"
|
|
tx_delay: 50ms
|
|
init_commands:
|
|
- "ATSP6"
|
|
sensors:
|
|
#- { key: rpm, preset: rpm, update_interval: 1s }
|
|
#- { key: speed, preset: speed, update_interval: 1s }
|
|
#- { key: engine_load, preset: engine_load, update_interval: 1s }
|
|
#- { key: throttle, preset: throttle, update_interval: 1s }
|
|
#- { key: coolant_temp, preset: coolant_temp, update_interval: 10s }
|
|
#- { key: intake_temp, preset: intake_air_temp, update_interval: 10s }
|
|
#- { key: ambient_temp, preset: ambient_temp, update_interval: 30s }
|
|
- { key: battery, preset: battery_voltage, update_interval: 10s }
|
|
- { key: run_time, preset: run_time, update_interval: 5s }
|
|
- { key: odometer, preset: odometer, update_interval: 30s }
|
|
- key: fuel_level
|
|
preset: fuel_level
|
|
update_interval: 30s
|
|
publish:
|
|
deadband: 0.5
|
|
min_interval: 60s
|
|
# GM Extensions (mode 22)
|
|
#- { key: gear, preset: gm_current_gear, update_interval: 1s }
|
|
#- { key: prnd, preset: gm_prnd_status_alt, update_interval: 1s }
|
|
#- { key: torque, preset: actual_torque, update_interval: 1s }
|
|
#- { key: oil_pressure, preset: gm_oil_pressure, update_interval: 2s }
|
|
#- { key: trans_temp, preset: gm_trans_temp, update_interval: 10s }
|
|
|
|
# ──────────────────────────────────────────────────────────────
|
|
# Path B: GATT Notify & Write (Bi-directional Control)
|
|
# ──────────────────────────────────────────────────────────────
|
|
#- id: custom_meter
|
|
# name: "Custom BLE Meter"
|
|
# source: gatt_notify
|
|
# gatt:
|
|
# service_uuid: "ffe0"
|
|
# notify_char_uuid: "ffe1"
|
|
# write_char_uuid: "ffe2"
|
|
# sensors:
|
|
# - key: power
|
|
# unit: "W"
|
|
# device_class: power
|
|
# state_class: measurement
|
|
# decode: { offset: 0, length: 2, type: uint16, endian: little }
|
|
# controls:
|
|
# - key: relay
|
|
# type: switch
|
|
# command: { on: "A10100", off: "A10000" }
|