Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

DATUM Gateway - Exergy Home Assistant Integration

Monitor your DATUM Gateway bitcoin mining proxy directly in Home Assistant. Track hashrate, shares, pool status, and block template information.

Before You Start

Before installing this integration:

  1. Home Assistant 2023.1.0 or newer - This integration requires HA 2023.1.0+.

  2. HACS installed - This is a custom integration distributed via HACS. See our system configuration guide if you need to set up HACS.

  3. DATUM Gateway running - You need a DATUM Gateway instance running v0.4.0 or higher.

  4. Gateway URL - The URL where your DATUM Gateway is accessible.

What is DATUM Gateway?

DATUM Gateway is self-hosted mining proxy software that enables miners to construct their own block templates while still mining to a pool. Key features:

  • Block template construction - Build your own templates instead of relying solely on pool-provided ones
  • Decentralization - Reduces pool control over transaction selection
  • Transparency - Full visibility into block template details
  • Ocean integration - Works seamlessly with Ocean mining pool

DATUM stands for “Decentralized Alternative Templates for Universal Mining.”

Integration Features

The Exergy DATUM Gateway integration provides monitoring of your gateway operations:

Sensors

SensorEntity ExampleDescription
Combined Hashratesensor.datum_gateway_hashrateTotal hashrate from all connected miners
Thread Countsensor.datum_gateway_thread_countNumber of active mining threads
Shares Acceptedsensor.datum_gateway_shares_acceptedTotal accepted shares
Shares Rejectedsensor.datum_gateway_shares_rejectedTotal rejected shares
Acceptance Ratesensor.datum_gateway_acceptance_rateShare acceptance percentage
Pool Statussensor.datum_gateway_pool_statusConnection status to mining pool
Block Heightsensor.datum_gateway_block_heightCurrent block template height
Block Rewardsensor.datum_gateway_block_rewardCurrent block reward (BTC)
Transaction Countsensor.datum_gateway_tx_countTransactions in current block template
Uptimesensor.datum_gateway_uptimeGateway process uptime
Pool Endpointsensor.datum_gateway_pool_endpointConnected pool URL
Miner Tagsensor.datum_gateway_miner_tagConfigured miner tag

Per-Thread Sensors

For each connected mining thread, additional sensors are created:

SensorEntity ExampleDescription
Thread Hashratesensor.datum_gateway_thread_X_hashrateIndividual thread hashrate
Thread Sharessensor.datum_gateway_thread_X_sharesThread share count

Note: Entity IDs are generated based on your gateway configuration. Find actual IDs at Settings > Devices & Services > DATUM Gateway > [your device].

Installation

Step 1: Install via HACS

  1. Open Home Assistant
  2. Navigate to HACS > Integrations
  3. Click + Explore & Download Repositories
  4. Search for “DATUM Gateway” or “Exergy DATUM”
  5. Click Download
  6. Restart Home Assistant

Step 2: Add Integration

  1. Go to Settings > Devices & Services
  2. Click + Add Integration
  3. Search for “DATUM Gateway”
  4. Enter your configuration:
SettingDefaultDescription
Gateway URLFull URL to your DATUM Gateway
SSL VerificationOnToggle SSL certificate verification
  1. Click Submit

Step 3: Verify

The integration creates sensors for your gateway statistics. Check the device page to see all available entities.

Configuration

Gateway URL

The URL must include the protocol and port:

  • Local: http://192.168.1.100:7152
  • Remote with SSL: https://datum.example.com:7152
  • Docker: http://datum-gateway:7152

SSL Verification

Disable SSL verification only if using self-signed certificates. For production deployments, use valid certificates.

Dashboard Integration

Display your DATUM Gateway stats:

type: vertical-stack
cards:
  - type: entities
    title: DATUM Gateway Status
    entities:
      - entity: sensor.datum_gateway_hashrate
        name: Gateway Hashrate
      - entity: sensor.datum_gateway_pool_status
        name: Pool Status
      - entity: sensor.datum_gateway_acceptance_rate
        name: Acceptance Rate
      - entity: sensor.datum_gateway_thread_count
        name: Active Threads

  - type: entities
    title: Block Template
    entities:
      - entity: sensor.datum_gateway_block_height
        name: Block Height
      - entity: sensor.datum_gateway_block_reward
        name: Block Reward
      - entity: sensor.datum_gateway_tx_count
        name: Transactions

Automation Ideas

Block Height Change Notification

automation:
  - alias: "New block notification"
    trigger:
      - platform: state
        entity_id: sensor.datum_gateway_block_height
    action:
      - service: notify.mobile_app
        data:
          message: "New block! Height: {{ states('sensor.datum_gateway_block_height') }}"

Pool Disconnect Alert

automation:
  - alias: "DATUM pool disconnect alert"
    trigger:
      - platform: state
        entity_id: sensor.datum_gateway_pool_status
        to: "disconnected"
        for:
          minutes: 5
    action:
      - service: notify.mobile_app
        data:
          message: "DATUM Gateway lost pool connection"

Low Acceptance Rate Alert

automation:
  - alias: "DATUM low acceptance rate"
    trigger:
      - platform: numeric_state
        entity_id: sensor.datum_gateway_acceptance_rate
        below: 95
        for:
          minutes: 10
    action:
      - service: notify.mobile_app
        data:
          message: "DATUM acceptance rate below 95%: {{ states('sensor.datum_gateway_acceptance_rate') }}%"

Hashrate Drop Alert

automation:
  - alias: "DATUM hashrate drop"
    trigger:
      - platform: numeric_state
        entity_id: sensor.datum_gateway_hashrate
        below: 50
        for:
          minutes: 15
    action:
      - service: notify.mobile_app
        data:
          message: "DATUM Gateway hashrate dropped below 50 TH/s"

Troubleshooting

No data appearing

  1. Verify Gateway URL is correct and accessible
  2. Ensure DATUM Gateway is running v0.4.0 or higher
  3. Check Home Assistant logs for connection errors
  4. Try accessing the gateway status page directly in a browser

SSL Errors

  1. Verify the SSL certificate is valid
  2. Try disabling SSL verification temporarily to diagnose
  3. Ensure the URL protocol matches your setup (http vs https)

Dependency Issues

This integration requires BeautifulSoup4. If you encounter import errors:

  1. Check Home Assistant logs for specific error messages
  2. Restart Home Assistant to trigger dependency installation

Stale Data

  1. Check gateway is actively receiving work from miners
  2. Verify pool connection is healthy
  3. Reload the integration to force a refresh

What’s Next?

Connect Your Miners

Monitor Pool Stats

Build a Dashboard

Resources

Source Code & Support