Skip to content

Latest commit

 

History

12 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Public Pool Home Assistant Integration

HACS-compatible Home Assistant custom integration for the Public Pool Bitcoin API.

Features

This integration polls the Public Pool client API and creates sensors for:

  • Best difficulty
  • Worker count
  • Expected payout
  • Accepted shares (total, last 10 minutes, last hour, last day)
  • Credited difficulty (total, last 10 minutes, last hour, last day)
  • Hashrate (last 10 minutes, last hour)
  • Best submission difficulty
  • Best submission timestamp
  • Current round statistics
  • Network difficulty percentage
  • Block candidate count
  • Latest share timestamp

The worker count sensor also exposes the worker list and protocol breakdown as attributes.

Showing "nice" formatted values in Home Assistant

The integration keeps each sensor's native value in its original raw unit for statistics/history, and also provides optional display attributes for selected hashrate and difficulty sensors:

  • display_value (scaled numeric value)
  • display_unit (auto-selected unit, for example TH/s or TD)
  • display (combined text, for example 184.3 TH/s)

Example Entities card with display attribute rows

type: entities
title: Public Pool (formatted)
entities:
  - entity: sensor.public_pool_hash_rate_last_10_minutes
    name: Hash rate 10m (raw)
  - type: attribute
    entity: sensor.public_pool_hash_rate_last_10_minutes
    attribute: display
    name: Hash rate 10m (display)

  - entity: sensor.public_pool_hash_rate_last_hour
    name: Hash rate 1h (raw)
  - type: attribute
    entity: sensor.public_pool_hash_rate_last_hour
    attribute: display
    name: Hash rate 1h (display)

  - entity: sensor.public_pool_best_difficulty
    name: Best difficulty (raw)
  - type: attribute
    entity: sensor.public_pool_best_difficulty
    attribute: display
    name: Best difficulty (display)

Optional template sensors (display-only)

If you prefer direct dashboard entities for the formatted strings, you can map display attributes into template sensors:

template:
  - sensor:
      - name: Public Pool Hash Rate 10m Display
        state: "{{ state_attr('sensor.public_pool_hash_rate_last_10_minutes', 'display') }}"
      - name: Public Pool Hash Rate 1h Display
        state: "{{ state_attr('sensor.public_pool_hash_rate_last_hour', 'display') }}"
      - name: Public Pool Best Difficulty Display
        state: "{{ state_attr('sensor.public_pool_best_difficulty', 'display') }}"
      - name: Public Pool Total Credited Difficulty Display
        state: "{{ state_attr('sensor.public_pool_total_credited_difficulty', 'display') }}"

These template display sensors are text sensors for UI readability.
Continue using the original numeric sensors for statistics/history.

Installation with HACS

  1. Open HACS in Home Assistant.
  2. Add this repository as a custom repository with the category Integration.
  3. Install Public Pool.
  4. Restart Home Assistant.
  5. Add the integration via Settings → Devices & Services.

Configuration

The integration asks for:

  • Bitcoin address: the wallet or payout address used in the Public Pool API URL
  • Name: optional display name in Home Assistant
  • API base URL: defaults to https://public-pool.io:40557

For the sample endpoint below, the Bitcoin address would be:

bc1q9zu99tss45f49g9dg4w0ma4l2g0xhe7xc5slzw

Resulting API URL:

https://public-pool.io:40557/api/client/bc1q9zu99tss45f49g9dg4w0ma4l2g0xhe7xc5slzw

About

HA Integration for web.Public-pool.io

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages