Categorygithub.com/clunc/hr-monitor-ble-server
repositorypackage
0.0.0-20241026143839-c0b23352ab02
Repository: https://github.com/clunc/hr-monitor-ble-server.git
Documentation: pkg.go.dev

# Packages

No description provided by the author
No description provided by the author

# README

hr-monitor-ble-server

A Go project to retrieve data from Bluetooth Low Energy (BLE) heart rate monitors and make it available to message brokers or databases.

Project Logo

Table of Contents

Overview

hr-monitor-ble-server is a server application designed to connect to BLE heart rate monitors, collect heart rate data, and make it available for further processing or integration with other systems. The application uses Go and is containerized using Docker for easy deployment.

Features

  • Connects to specified BLE heart rate monitors.
  • Retrieves heart rate data and logs it.
  • Easy configuration via JSON file.
  • Dockerized for consistent deployment across environments.

Prerequisites

  • Docker and Docker Compose
  • Go 1.22 or later
  • A BLE heart rate monitor (e.g., Polar H10)

Installation

Docker

  1. Clone the repository:

    git clone https://github.com/yourusername/hr-monitor-ble-server.git
    cd hr-monitor-ble-server
    
  2. Build and run the Docker container:

    docker-compose up --build
    

Local Setup (Without Docker)

  1. Clone the repository:

    git clone https://github.com/yourusername/hr-monitor-ble-server.git
    cd hr-monitor-ble-server
    
  2. Install dependencies:

    go mod tidy
    
  3. Build and run the application:

    go build -o hr-monitor-ble-server
    ./hr-monitor-ble-server
    

Configuration

Configuration is managed through the config.json file. Here is an example configuration:

{
    "TargetDeviceName": "Polar H10",
    "TargetDeviceMAC": "XX:XX:XX:XX:XX:XX",
    "ScanTimeout": 60
}