Archived
Initial commit with config.yaml, README, and LICENSE
This commit is contained in:
commit
981041a94b
3 files changed
+150
No files matched your search
@@ -0,0 +1,21 @@
|
|||||||
|
MIT License
|
||||||
|
|
||||||
|
Copyright (c) 2026 eigger
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
in the Software without restriction, including without limitation the rights
|
||||||
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
copies of the Software, and to permit persons to whom the Software is
|
||||||
|
furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in all
|
||||||
|
copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
|
SOFTWARE.
|
||||||
@@ -0,0 +1,27 @@
|
|||||||
|
# HassBle Configurations
|
||||||
|
|
||||||
|
This repository stores custom device configurations and decoding rules for the **HassBle** Android application.
|
||||||
|
|
||||||
|
## How It Works
|
||||||
|
|
||||||
|
1. **Configure Devices**: Define the BLE advertisement scanners, active GATT connections, and OBD polling properties inside [config.yaml](config.yaml).
|
||||||
|
2. **Commit & Push**: Push this repository to GitHub (or any Git platform).
|
||||||
|
3. **Register in the App**: In the HassBle Android app settings, enter the **Raw URL** of your `config.yaml` file.
|
||||||
|
- Example: `https://raw.githubusercontent.com/eigger/hassble-config/main/config.yaml`
|
||||||
|
4. **Select & Start**: The app automatically fetches the file, parses the configurations, and presents them in the UI. Turn on the sensors you want to declare them in Home Assistant.
|
||||||
|
|
||||||
|
## Configuration Schema
|
||||||
|
|
||||||
|
The YAML configuration structure supports:
|
||||||
|
|
||||||
|
- **`defaults`**: Default value filters (like `on_change_only` or `min_interval` throttle times) shared across devices.
|
||||||
|
- **`devices`**: List of devices to scan or connect to.
|
||||||
|
- **`source: advertisement`**: Passive advertisement listeners. Decodes custom service data or manufacturer data bytes.
|
||||||
|
- **`source: obd`**: Active OBD polling plans (rpm, speed, GM extensions, etc.).
|
||||||
|
- **`source: gatt_notify`**: Bi-directional active GATT notifier and switch controls.
|
||||||
|
|
||||||
|
Refer to the main [HassBle CONFIG_SCHEMA.md](https://github.com/eigger/hassble-android/blob/main/docs/CONFIG_SCHEMA.md) for full configuration specs.
|
||||||
|
|
||||||
|
## License
|
||||||
|
|
||||||
|
This repository is licensed under the MIT License. See [LICENSE](LICENSE) for details.
|
||||||
+102
@@ -0,0 +1,102 @@
|
|||||||
|
# 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)
|
||||||
|
# ──────────────────────────────────────────────────────────────
|
||||||
|
- id: living_thermo
|
||||||
|
name: "Living Room Thermometer"
|
||||||
|
source: advertisement
|
||||||
|
match:
|
||||||
|
service_data_uuid: "181a"
|
||||||
|
sensors:
|
||||||
|
- key: temperature
|
||||||
|
device_class: temperature
|
||||||
|
unit: "°C"
|
||||||
|
state_class: measurement
|
||||||
|
source_field: service_data
|
||||||
|
decode: { offset: 6, length: 2, type: int16, endian: big, scale: 0.1 }
|
||||||
|
- key: humidity
|
||||||
|
device_class: humidity
|
||||||
|
unit: "%"
|
||||||
|
state_class: measurement
|
||||||
|
source_field: service_data
|
||||||
|
decode: { offset: 8, length: 1, type: uint8 }
|
||||||
|
- key: battery
|
||||||
|
device_class: battery
|
||||||
|
unit: "%"
|
||||||
|
source_field: service_data
|
||||||
|
decode: { offset: 9, length: 1, type: uint8 }
|
||||||
|
|
||||||
|
# ──────────────────────────────────────────────────────────────
|
||||||
|
# Path C: OBD (ELM327) over BLE
|
||||||
|
# ──────────────────────────────────────────────────────────────
|
||||||
|
- id: car_obd
|
||||||
|
name: "Vehicle OBD"
|
||||||
|
source: obd
|
||||||
|
obd:
|
||||||
|
mac: "AA:BB:CC:DD:EE:FF" # If omitted, you can scan and bind in the app UI
|
||||||
|
service_uuid: "18F0"
|
||||||
|
tx_char_uuid: "2AF1"
|
||||||
|
rx_char_uuid: "2AF0"
|
||||||
|
tx_delay: 50ms
|
||||||
|
init_commands:
|
||||||
|
- "ATSP6" # ISO 15765-4 CAN 11-bit 500kbps
|
||||||
|
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
|
||||||
|
filters:
|
||||||
|
- median: { window: 5 }
|
||||||
|
- delta: 0.5
|
||||||
|
- throttle: 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:
|
||||||
|
mac: "11:22:33:44:55:66" # If omitted, you can scan and bind in the app UI
|
||||||
|
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" }
|
||||||
Reference in new issue
Block a user