Port of OpenHaystack as an ESPHome component. Compatible with all Espressif BLE devices.
OpenHaystack is an application that allows you to create your own accessories that are tracked by Apple’s Find My network. They have reverse-engineered Apple’s protocol and documented it, a quite impressive project.
I wanted to track my electric scooter in case it got stolen. Although the “official” way to build your accessories was “acceptable,” it turns out to be quite problematic with several compatibility issues on different Espressif boards.
So I ported it as a component of ESPHome, a software that I already use for my embedded devices’ needs.
I am a little obsessed with keeping my IoT/Embedded devices as up-to-date as possible (and, of course, off any cloud if possible), so ESPHome is an attractive solution to keep your devices updated with Arduino and Espressif frameworks. Through ESPHome, I can “update” my scooter whenever I want.
I tried! I opened Add support for OpenHaystack #3584, and its support documentation, but understandably they didn’t want to merge it.
external_components:
- source:
type: git
url: https://github.com/barrenechea/esphome-config-files
ref: main
components: [openhaystack]
esphome:
name: openhaystack-demo
esp32:
board: wemos_d1_mini32
wifi:
ssid: <your-wifi-ssid>
password: <your-wifi-password>
# Enable logs
logger:
# Enable Home Assistant API
api:
ota:
password: !secret ota_password
openhaystack:
# Here goes the OpenHaystack key encoded in Base64
# I strongly suggest you handle it as a secret
key: !secret openhaystack_key
external_components:
- source:
type: git
url: https://github.com/barrenechea/esphome-config-files
ref: main
components: [openhaystack]
esphome:
name: openhaystack-demo
platformio_options:
board_build.flash_mode: dio
esp32:
board: esp32-c3-devkitm-1
variant: ESP32C3
framework:
type: esp-idf
version: latest
sdkconfig_options:
CONFIG_FREERTOS_UNICORE: y
CONFIG_COMPILER_OPTIMIZATION_SIZE: y
# Enable WPA3 support just because we can
CONFIG_WPA_SUITE_B_192: y
# Specific for Bluetooth use
CONFIG_BT_BLE_50_FEATURES_SUPPORTED: y
CONFIG_BT_BLE_42_FEATURES_SUPPORTED: y
# Fix "Payload size error" - Extend Watchdog timeout
CONFIG_ESP_TASK_WDT_TIMEOUT_S: '10'
wifi:
ssid: <your-wifi-ssid>
password: <your-wifi-password>
# Enable logs
logger:
# Enable Home Assistant API
api:
ota:
password: !secret ota_password
openhaystack:
# Here goes the OpenHaystack key encoded in Base64
# I strongly suggest you handle it as a secret
key: !secret openhaystack_key
©2022-2024 Sebastian Barrenechea. All rights reserved.
Built with Astro v4.16.13.