From 38ede7fab6ea31534ee7dda2c23ac69d7a66e544 Mon Sep 17 00:00:00 2001 From: Roman Priesol Date: Wed, 30 Sep 2026 21:55:04 +0200 Subject: [PATCH] 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. --- mcu-nrf-ant.yaml | 90 ++++++++++++++++++++++++++++++++++++--- mcu-nrf-dk.yaml | 107 ++++++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 190 insertions(+), 7 deletions(-) diff --git a/mcu-nrf-ant.yaml b/mcu-nrf-ant.yaml index 2a22d11..8889f9e 100644 --- a/mcu-nrf-ant.yaml +++ b/mcu-nrf-ant.yaml @@ -2,8 +2,15 @@ # 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 # 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 esphome: name: mcu-nrf-ant friendly_name: nRF ANT+ @@ -22,12 +29,71 @@ 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 - device_number: 655730 - heart_rate: - id: heart_rate - name: Heart Rate + 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 uart: id: link @@ -40,4 +106,18 @@ packet_transport: uart_id: link update_interval: 1s sensors: - - heart_rate + - hrm_pro_heart_rate + - hrm_pro_battery + - pm5_power + - pm5_stroke_rate + - tempe_temperature + - tempe_temperature_min + - tempe_temperature_max + - tempe_battery + - varia_battery + binary_sensors: + - ant_connected + - ant_unknown_device + - pm5_in_use + - tempe_battery_low + - varia_battery_low diff --git a/mcu-nrf-dk.yaml b/mcu-nrf-dk.yaml index 1c0fcd3..3d50c9a 100644 --- a/mcu-nrf-dk.yaml +++ b/mcu-nrf-dk.yaml @@ -10,6 +10,7 @@ # 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: name: mcu-nrf-dk friendly_name: nRF DK @@ -52,11 +53,81 @@ packet_transport: sensor: - platform: packet_transport provider: mcu-nrf-ant - remote_id: heart_rate - name: Heart Rate + 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 output: - platform: gpio @@ -80,6 +151,38 @@ light: # 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: gpio name: Button 1 pin: {number: P0.11, inverted: true, mode: {input: true, pullup: true}}