mirror of
https://github.com/randybb/esphome-configs.git
synced 2026-10-14 08:35:12 +02:00
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.
This commit is contained in:
1 parent
ad9aeea346
commit
38ede7fab6
2 files changed
+190
-7
No files matched your search
+85
-5
@@ -2,8 +2,15 @@
|
|||||||
# Hardware: Nordic nRF52840 DK
|
# Hardware: Nordic nRF52840 DK
|
||||||
# Pinout:
|
# Pinout:
|
||||||
# P0.06 UART0 TX -> logger (J-Link VCOM)
|
# 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.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
|
# 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:
|
esphome:
|
||||||
name: mcu-nrf-ant
|
name: mcu-nrf-ant
|
||||||
friendly_name: nRF ANT+
|
friendly_name: nRF ANT+
|
||||||
@@ -22,12 +29,71 @@ external_components:
|
|||||||
- source: github://randybb/esphome-components
|
- source: github://randybb/esphome-components
|
||||||
components: [ant_plus]
|
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:
|
ant_plus:
|
||||||
network_key: !secret ant_plus_network_key
|
network_key: !secret ant_plus_network_key
|
||||||
device_number: 655730
|
connected:
|
||||||
heart_rate:
|
id: ant_connected
|
||||||
id: heart_rate
|
name: ANT+ Connected
|
||||||
name: Heart Rate
|
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:
|
uart:
|
||||||
id: link
|
id: link
|
||||||
@@ -40,4 +106,18 @@ packet_transport:
|
|||||||
uart_id: link
|
uart_id: link
|
||||||
update_interval: 1s
|
update_interval: 1s
|
||||||
sensors:
|
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
|
||||||
+105
-2
@@ -10,6 +10,7 @@
|
|||||||
# P0.24 Button 3 (active low) -> Button 3 (binary_sensor gpio)
|
# P0.24 Button 3 (active low) -> Button 3 (binary_sensor gpio)
|
||||||
# P0.25 Button 4 (active low) -> Button 4 (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
|
# 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: nRF DK
|
friendly_name: nRF DK
|
||||||
@@ -52,11 +53,81 @@ packet_transport:
|
|||||||
sensor:
|
sensor:
|
||||||
- platform: packet_transport
|
- platform: packet_transport
|
||||||
provider: mcu-nrf-ant
|
provider: mcu-nrf-ant
|
||||||
remote_id: heart_rate
|
remote_id: hrm_pro_heart_rate
|
||||||
name: Heart Rate
|
name: Garmin HRM-Pro Heart Rate
|
||||||
internal: false
|
internal: false
|
||||||
|
unit_of_measurement: bpm
|
||||||
|
icon: mdi:heart-pulse
|
||||||
filters:
|
filters:
|
||||||
- throttle: 1s
|
- 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:
|
output:
|
||||||
- platform: gpio
|
- platform: gpio
|
||||||
@@ -80,6 +151,38 @@ light:
|
|||||||
|
|
||||||
# each button toggles its LED locally and is visible in HA
|
# each button toggles its LED locally and is visible in HA
|
||||||
binary_sensor:
|
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
|
- platform: gpio
|
||||||
name: Button 1
|
name: Button 1
|
||||||
pin: {number: P0.11, inverted: true, mode: {input: true, pullup: true}}
|
pin: {number: P0.11, inverted: true, mode: {input: true, pullup: true}}
|
||||||
|
|||||||
Reference in new issue
Block a user