Compare commits

...
7 Commits
Author SHA1 Message Date
randy 3f9a8c3117 nrf-ant: Garmin HRM-Dual, HRM-Tri, Rally RS200, Speed Sensor 2, SRAM Force AXS
CI / ESPHome config validation (push) Successful in 50s
CI / YAML lint (push) Successful in 8s
Also sets the unused UART1 RX to P1.02: without it the fork keeps the DK's
default RX pin, P1.01, and the UART hears its own transmissions.
2026-09-30 22:13:33 +02:00
randy 38ede7fab6 nrf-ant: Garmin HRM-Pro, Concept2 PM5, Garmin Tempe, Garmin Varia RTL515, status LEDs
LED 1 lights while a configured ANT+ device is received, LED 2 while an
unconfigured one is in range; everything is forwarded to mcu-nrf-dk.
2026-09-30 21:55:04 +02:00
randy ad9aeea346 nrf-dk: Thread MTD, frees 52 KB of the MCUboot slot (98 % -> 87 %) 2026-09-30 21:34:17 +02:00
randy 3a397cfb4b ANT+ via ESPHome: mcu-nrf-ant (RadiANT) sends heart rate to mcu-nrf-dk over packet_transport
Replaces the E73 running the archived nrf-ant-bridge firmware and drops
mcu-ant-host, which read that bridge's line protocol.
2026-09-30 21:17:20 +02:00
randy 6fd5ee1fa7 Add ant-host: host ESPHome reading an ANT+ bridge over serial 2026-09-30 20:07:57 +02:00
randy eb25302e9b nrf-dk: Thread, buttons, LEDs and ANT+ heart rate from the E73 bridge 2026-09-30 20:07:57 +02:00
randy 34929a38c7 CI: skip zephyr: configs, they need the esphomeplatformzephyr fork 2026-09-30 20:07:57 +02:00
4 changed files with 481 additions and 6 deletions

No files matched your search

+2
View File
@@ -55,6 +55,8 @@ jobs:
if: steps.changed.outputs.any_changed == 'true' if: steps.changed.outputs.any_changed == 'true'
run: | run: |
for f in ${{ steps.changed.outputs.all_changed_files }}; do for f in ${{ steps.changed.outputs.all_changed_files }}; do
# zephyr: needs the esphomeplatformzephyr fork, upstream doesn't know it yet
if grep -q '^zephyr:' "$f"; then echo "Skipping $f (zephyr fork)"; continue; fi
echo "Validating $f..." echo "Validating $f..."
esphome config "$f" esphome config "$f"
done done
+186
View File
@@ -0,0 +1,186 @@
---
# Hardware: Nordic nRF52840 DK
# Pinout:
# P0.06 UART0 TX -> logger (J-Link VCOM)
# P0.13 LED 1 (active low) -> ANT+ Connected (a configured device is received)
# P0.14 LED 2 (active low) -> ANT+ Unknown Device (an unconfigured one is in range)
# P1.01 UART1 TX -> mcu-nrf-dk UART1 RX (P1.01), packet_transport; plus GND
# P1.02 UART1 RX (unused)
# Radio: ANT+ receiver (RadiANT), no network of its own; values go to mcu-nrf-dk
# ANT+ devices:
# 655730 Garmin HRM-Pro heart rate
# 498521 Concept2 PM5 (rower) fitness equipment (FE-C)
# 1044953 Garmin Tempe environment (temperature)
# 604693 Garmin Varia RTL515 bike radar, battery only
# 136052 Garmin HRM-Dual heart rate (pain cave)
# 334424 Garmin HRM-Tri heart rate (bike)
# 886796 Garmin Rally RS200 power + cadence
# 343922 Garmin Speed Sensor 2 speed
# 42898 SRAM Force AXS shifting (Cube Litening C:68X), battery only
esphome:
name: mcu-nrf-ant
friendly_name: nRF ANT+
# needs the esphomeplatformzephyr fork (esphome-zephyr); RadiANT needs NCS
zephyr:
variant: NRF52
board: nrf52840dk/nrf52840
framework:
type: ncs
logger:
hardware_uart: UART0
external_components:
- source: github://randybb/esphome-components
components: [ant_plus]
output:
- platform: gpio
id: led_known
pin: {number: P0.13, inverted: true}
- platform: gpio
id: led_unknown
pin: {number: P0.14, inverted: true}
ant_plus:
network_key: !secret ant_plus_network_key
connected:
id: ant_connected
name: ANT+ Connected
on_press: {output.turn_on: led_known}
on_release: {output.turn_off: led_known}
unknown_device:
id: ant_unknown_device
name: ANT+ Unknown Device
on_press: {output.turn_on: led_unknown}
on_release: {output.turn_off: led_unknown}
devices:
- type: heart_rate # Garmin HRM-Pro
device_number: 655730
heart_rate:
id: hrm_pro_heart_rate
name: Garmin HRM-Pro Heart Rate
battery_level:
id: hrm_pro_battery
name: Garmin HRM-Pro Battery
- type: fitness_equipment # Concept2 PM5 (rower)
device_number: 498521
power:
id: pm5_power
name: Concept2 PM5 Power
cadence:
id: pm5_stroke_rate
name: Concept2 PM5 Stroke Rate
in_use:
id: pm5_in_use
name: Concept2 PM5 In Use
- type: temperature # Garmin Tempe
device_number: 1044953
temperature:
id: tempe_temperature
name: Garmin Tempe Temperature
temperature_min:
id: tempe_temperature_min
name: Garmin Tempe Temperature 24h Min
temperature_max:
id: tempe_temperature_max
name: Garmin Tempe Temperature 24h Max
battery_voltage:
id: tempe_battery
name: Garmin Tempe Battery
battery_low:
id: tempe_battery_low
name: Garmin Tempe Battery Low
- type: bike_radar # Garmin Varia RTL515
device_number: 604693
battery_voltage:
id: varia_battery
name: Garmin Varia RTL515 Battery
battery_low:
id: varia_battery_low
name: Garmin Varia RTL515 Battery Low
- type: heart_rate # Garmin HRM-Dual
device_number: 136052
heart_rate:
id: hrm_dual_heart_rate
name: Garmin HRM-Dual Heart Rate
battery_level:
id: hrm_dual_battery
name: Garmin HRM-Dual Battery
- type: heart_rate # Garmin HRM-Tri
device_number: 334424
heart_rate:
id: hrm_tri_heart_rate
name: Garmin HRM-Tri Heart Rate
battery_level:
id: hrm_tri_battery
name: Garmin HRM-Tri Battery
- type: power # Garmin Rally RS200 (a battery in each pedal)
device_number: 886796
power:
id: rally_power
name: Garmin Rally RS200 Power
cadence:
id: rally_cadence
name: Garmin Rally RS200 Cadence
battery_low:
id: rally_battery_low
name: Garmin Rally RS200 Battery Low
- type: speed # Garmin Speed Sensor 2
device_number: 343922
speed:
id: speed2_speed
name: Garmin Speed Sensor 2 Speed
battery_voltage:
id: speed2_battery
name: Garmin Speed Sensor 2 Battery
battery_low:
id: speed2_battery_low
name: Garmin Speed Sensor 2 Battery Low
- type: shifting # SRAM Force AXS (Cube Litening C:68X)
device_number: 42898
battery_low:
id: sram_battery_low
name: SRAM Force AXS Battery Low
uart:
id: link
port: UART1
tx_pin: P1.01
# unused, but must be set: the fork otherwise keeps the board's default RX, which on
# the DK is P1.01 too, and the UART hears its own transmissions
rx_pin: P1.02
baud_rate: 115200
packet_transport:
- platform: uart
uart_id: link
update_interval: 1s
sensors:
- hrm_pro_heart_rate
- hrm_pro_battery
- pm5_power
- pm5_stroke_rate
- tempe_temperature
- tempe_temperature_min
- tempe_temperature_max
- tempe_battery
- varia_battery
- hrm_dual_heart_rate
- hrm_dual_battery
- hrm_tri_heart_rate
- hrm_tri_battery
- rally_power
- rally_cadence
- speed2_speed
- speed2_battery
binary_sensors:
- ant_connected
- ant_unknown_device
- pm5_in_use
- tempe_battery_low
- varia_battery_low
- rally_battery_low
- speed2_battery_low
- sram_battery_low
+286 -5
View File
@@ -1,12 +1,293 @@
--- ---
# Hardware: Nordic nRF52840 DK # Hardware: Nordic nRF52840 DK
# Pinout:
# P0.11 Button 1 (active low) -> Button 1 (binary_sensor gpio)
# P0.12 Button 2 (active low) -> Button 2 (binary_sensor gpio)
# P0.13 LED 1 (active low) -> LED 1 (light binary)
# P0.14 LED 2 (active low) -> LED 2 (light binary)
# P0.15 LED 3 (active low) -> LED 3 (light binary)
# P0.16 LED 4 (active low) -> LED 4 (light binary)
# P0.24 Button 3 (active low) -> Button 3 (binary_sensor gpio)
# P0.25 Button 4 (active low) -> Button 4 (binary_sensor gpio)
# P1.01 UART1 RX <- mcu-nrf-ant UART1 TX (P1.01), packet_transport; plus GND
# ANT+ values (Garmin HRM-Pro, Concept2 PM5, Garmin Tempe, Garmin Varia RTL515) come from mcu-nrf-ant
esphome: esphome:
name: mcu-nrf-dk name: mcu-nrf-dk
friendly_name: mcu-nrf-dk friendly_name: nRF DK
nrf52: # needs the esphomeplatformzephyr fork (esphome-zephyr), upstream has no zephyr: platform yet
board: nrf52840_dk zephyr:
bootloader: adafruit_nrf52_sd140_v7 variant: NRF52
board: nrf52840dk/nrf52840
framework:
type: zephyr
# Enable logging
logger: logger:
network:
enable_ipv6: true
# Active dataset of the Thread network (HA: Settings > Thread > ... > dataset TLV)
openthread:
tlv: !secret thread_tlv
# end device, doesn't route for others; saves flash (FTD fills the MCUboot slot)
device_type: MTD
api:
encryption:
key: !secret api_key
# ANT+ values from mcu-nrf-ant (second nRF52840 DK) over UART
uart:
id: ant_link
port: UART1
rx_pin: P1.01
baud_rate: 115200
packet_transport:
- platform: uart
uart_id: ant_link
providers:
- name: mcu-nrf-ant
sensor:
- platform: packet_transport
provider: mcu-nrf-ant
remote_id: hrm_pro_heart_rate
name: Garmin HRM-Pro Heart Rate
internal: false
unit_of_measurement: bpm
icon: mdi:heart-pulse
filters:
- throttle: 1s
- platform: packet_transport
provider: mcu-nrf-ant
remote_id: hrm_pro_battery
name: Garmin HRM-Pro Battery
internal: false
unit_of_measurement: "%"
device_class: battery
entity_category: diagnostic
- platform: packet_transport
provider: mcu-nrf-ant
remote_id: pm5_power
name: Concept2 PM5 Power
internal: false
unit_of_measurement: W
device_class: power
filters:
- throttle: 1s
- platform: packet_transport
provider: mcu-nrf-ant
remote_id: pm5_stroke_rate
name: Concept2 PM5 Stroke Rate
internal: false
unit_of_measurement: spm
icon: mdi:rowing
filters:
- throttle: 1s
- platform: packet_transport
provider: mcu-nrf-ant
remote_id: tempe_temperature
name: Garmin Tempe Temperature
internal: false
unit_of_measurement: °C
device_class: temperature
accuracy_decimals: 1
- platform: packet_transport
provider: mcu-nrf-ant
remote_id: tempe_temperature_min
name: Garmin Tempe Temperature 24h Min
internal: false
unit_of_measurement: °C
device_class: temperature
accuracy_decimals: 1
- platform: packet_transport
provider: mcu-nrf-ant
remote_id: tempe_temperature_max
name: Garmin Tempe Temperature 24h Max
internal: false
unit_of_measurement: °C
device_class: temperature
accuracy_decimals: 1
- platform: packet_transport
provider: mcu-nrf-ant
remote_id: tempe_battery
name: Garmin Tempe Battery
internal: false
unit_of_measurement: V
device_class: voltage
accuracy_decimals: 2
entity_category: diagnostic
- platform: packet_transport
provider: mcu-nrf-ant
remote_id: varia_battery
name: Garmin Varia RTL515 Battery
internal: false
unit_of_measurement: V
device_class: voltage
accuracy_decimals: 2
entity_category: diagnostic
- platform: packet_transport
provider: mcu-nrf-ant
remote_id: hrm_dual_heart_rate
name: Garmin HRM-Dual Heart Rate
internal: false
unit_of_measurement: bpm
icon: mdi:heart-pulse
filters:
- throttle: 1s
- platform: packet_transport
provider: mcu-nrf-ant
remote_id: hrm_dual_battery
name: Garmin HRM-Dual Battery
internal: false
unit_of_measurement: "%"
device_class: battery
entity_category: diagnostic
- platform: packet_transport
provider: mcu-nrf-ant
remote_id: hrm_tri_heart_rate
name: Garmin HRM-Tri Heart Rate
internal: false
unit_of_measurement: bpm
icon: mdi:heart-pulse
filters:
- throttle: 1s
- platform: packet_transport
provider: mcu-nrf-ant
remote_id: hrm_tri_battery
name: Garmin HRM-Tri Battery
internal: false
unit_of_measurement: "%"
device_class: battery
entity_category: diagnostic
- platform: packet_transport
provider: mcu-nrf-ant
remote_id: rally_power
name: Garmin Rally RS200 Power
internal: false
unit_of_measurement: W
device_class: power
filters:
- throttle: 1s
- platform: packet_transport
provider: mcu-nrf-ant
remote_id: rally_cadence
name: Garmin Rally RS200 Cadence
internal: false
unit_of_measurement: rpm
icon: mdi:rotate-right
filters:
- throttle: 1s
- platform: packet_transport
provider: mcu-nrf-ant
remote_id: speed2_speed
name: Garmin Speed Sensor 2 Speed
internal: false
unit_of_measurement: m/s
device_class: speed
accuracy_decimals: 2
filters:
- throttle: 1s
- platform: packet_transport
provider: mcu-nrf-ant
remote_id: speed2_battery
name: Garmin Speed Sensor 2 Battery
internal: false
unit_of_measurement: V
device_class: voltage
accuracy_decimals: 2
entity_category: diagnostic
output:
- platform: gpio
id: led_1_out
pin: {number: P0.13, inverted: true}
- platform: gpio
id: led_2_out
pin: {number: P0.14, inverted: true}
- platform: gpio
id: led_3_out
pin: {number: P0.15, inverted: true}
- platform: gpio
id: led_4_out
pin: {number: P0.16, inverted: true}
light:
- {platform: binary, name: LED 1, id: led_1, output: led_1_out}
- {platform: binary, name: LED 2, id: led_2, output: led_2_out}
- {platform: binary, name: LED 3, id: led_3, output: led_3_out}
- {platform: binary, name: LED 4, id: led_4, output: led_4_out}
# each button toggles its LED locally and is visible in HA
binary_sensor:
- platform: packet_transport
provider: mcu-nrf-ant
remote_id: ant_connected
name: ANT+ Connected
internal: false
device_class: connectivity
- platform: packet_transport
provider: mcu-nrf-ant
remote_id: ant_unknown_device
name: ANT+ Unknown Device
internal: false
icon: mdi:access-point
- platform: packet_transport
provider: mcu-nrf-ant
remote_id: pm5_in_use
name: Concept2 PM5 In Use
internal: false
device_class: running
- platform: packet_transport
provider: mcu-nrf-ant
remote_id: tempe_battery_low
name: Garmin Tempe Battery Low
internal: false
device_class: battery
entity_category: diagnostic
- platform: packet_transport
provider: mcu-nrf-ant
remote_id: varia_battery_low
name: Garmin Varia RTL515 Battery Low
internal: false
device_class: battery
entity_category: diagnostic
- platform: packet_transport
provider: mcu-nrf-ant
remote_id: rally_battery_low
name: Garmin Rally RS200 Battery Low
internal: false
device_class: battery
entity_category: diagnostic
- platform: packet_transport
provider: mcu-nrf-ant
remote_id: speed2_battery_low
name: Garmin Speed Sensor 2 Battery Low
internal: false
device_class: battery
entity_category: diagnostic
- platform: packet_transport
provider: mcu-nrf-ant
remote_id: sram_battery_low
name: SRAM Force AXS Battery Low
internal: false
device_class: battery
entity_category: diagnostic
- platform: gpio
name: Button 1
pin: {number: P0.11, inverted: true, mode: {input: true, pullup: true}}
on_press: {light.toggle: led_1}
- platform: gpio
name: Button 2
pin: {number: P0.12, inverted: true, mode: {input: true, pullup: true}}
on_press: {light.toggle: led_2}
- platform: gpio
name: Button 3
pin: {number: P0.24, inverted: true, mode: {input: true, pullup: true}}
on_press: {light.toggle: led_3}
- platform: gpio
name: Button 4
pin: {number: P0.25, inverted: true, mode: {input: true, pullup: true}}
on_press: {light.toggle: led_4}
+7 -1
View File
@@ -28,4 +28,10 @@ ble_beacon_toyota_auris_major: 10167
ble_beacon_toyota_auris_minor: 61958 ble_beacon_toyota_auris_minor: 61958
ble_beacon_toyota_yaris_uuid: "00000000-0000-0000-0000-000000000000" ble_beacon_toyota_yaris_uuid: "00000000-0000-0000-0000-000000000000"
ble_beacon_toyota_yaris_honda_major: 10167 ble_beacon_toyota_yaris_honda_major: 10167
ble_beacon_toyota_yaris_honda_minor: 61958 ble_beacon_toyota_yaris_honda_minor: 61958
# Thread active dataset (hex TLV) from Home Assistant
thread_tlv: "0E080000000000010000"
# ANT+ network key (8 bytes hex), from thisisant.com
ant_plus_network_key: "0000000000000000"