Archived
142 lines
6.0 KiB
YAML
142 lines
6.0 KiB
YAML
# HassBle Configuration File
|
|
#
|
|
# Host this config.yaml file in a Git repository (e.g., GitHub) and enter the RAW URL in the HassBle Android app.
|
|
# The app will download this configuration, decode BLE advertisements/sensors, and declare/update them in Home Assistant.
|
|
#
|
|
# Do NOT put any Home Assistant credentials (URL/Token) in this file. Enter them directly 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:
|
|
service_data_uuid: "F51C"
|
|
manufacturer_id: 0x004C
|
|
manufacturer_min_length: 24
|
|
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바이트: [7..10]=월·일·시·분, [11]=배터리(역산), [12..13]=코드
|
|
- id: parking_beacon
|
|
name: "Parking Beacon"
|
|
source: advertisement
|
|
instance_mode: shared
|
|
match:
|
|
manufacturer_id: 0x035D
|
|
sensors:
|
|
- key: parking_time
|
|
device_class: timestamp
|
|
state_class: measurement
|
|
source_field: manufacturer_data
|
|
min_length: 14
|
|
decode: { offset: 7, length: 4, type: timestamp }
|
|
- key: parking_battery
|
|
device_class: battery
|
|
unit: "%"
|
|
state_class: measurement
|
|
source_field: manufacturer_data
|
|
min_length: 14
|
|
decode: { offset: 11, length: 1, type: uint8, scale: -1, offset_value: 256 }
|
|
- key: parking_location
|
|
platform: text_sensor
|
|
source_field: manufacturer_data
|
|
min_length: 14
|
|
decode: { offset: 12, length: 2, type: string }
|
|
|
|
# ──────────────────────────────────────────────────────────────
|
|
# 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:
|
|
- "ATZ"
|
|
- "ATE0"
|
|
- "ATL0"
|
|
- "ATS0"
|
|
- "ATH0"
|
|
- "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" }
|