All Projects → rsnodgrass → hass-helium

rsnodgrass / hass-helium

Licence: other
Helium blockchain sensors for Home Assistant

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to hass-helium

iocage-homeassistant
Home Assistant Core - TrueNAS CORE Community Plugin
Stars: ✭ 61 (+117.86%)
Mutual labels:  homeassistant
amshan-homeassistant
Home Assistant integrasjon for strømmålere (AMS/HAN/P1). Integrasjonen støter både streaming (serieport/TCP-IP) og MQTT (Tibber Pulse, energyintelligence.se etc)
Stars: ✭ 39 (+39.29%)
Mutual labels:  homeassistant
home
Monorepo for all home automation related development, including integrated firmware, PCBs, configuration, and bridges
Stars: ✭ 104 (+271.43%)
Mutual labels:  homeassistant
HomeAssistant-CustomComponents
No description or website provided.
Stars: ✭ 25 (-10.71%)
Mutual labels:  homeassistant
addon-traccar
Traccar - Home Assistant Community Add-ons
Stars: ✭ 65 (+132.14%)
Mutual labels:  homeassistant
addon-example
Example - Home Assistant Community Add-ons
Stars: ✭ 73 (+160.71%)
Mutual labels:  homeassistant
hhnl.HomeAssistantNet
No description or website provided.
Stars: ✭ 31 (+10.71%)
Mutual labels:  homeassistant
worldtidesinfocustom
world tides info custom component for home assistant
Stars: ✭ 14 (-50%)
Mutual labels:  homeassistant
blockchain-node
A Helum Blockchain Node
Stars: ✭ 43 (+53.57%)
Mutual labels:  helium
wyzesense2mqtt
Configurable WyzeSense to MQTT Gateway intended for use with Home Assistant or other platforms that use MQTT discovery mechanisms.
Stars: ✭ 55 (+96.43%)
Mutual labels:  homeassistant
addon-matrix
Matrix - Home Assistant Community Add-ons
Stars: ✭ 39 (+39.29%)
Mutual labels:  homeassistant
bruces homeassistant config
My Home Assistant Configuration
Stars: ✭ 24 (-14.29%)
Mutual labels:  homeassistant
hometop HT3
Pimp your heater.
Stars: ✭ 34 (+21.43%)
Mutual labels:  homeassistant
hass-livebox-component
Livebox Component for Home assistant
Stars: ✭ 24 (-14.29%)
Mutual labels:  homeassistant
homeassistant-lovelace-alarm-clock-card
Building the perfect alarm clock...
Stars: ✭ 32 (+14.29%)
Mutual labels:  homeassistant
custom-component-store
📦 Manage your custom_components for Home Assistant
Stars: ✭ 12 (-57.14%)
Mutual labels:  homeassistant
openrgb ha
OpenRGB integration for Home Assistant
Stars: ✭ 40 (+42.86%)
Mutual labels:  homeassistant
homeassistant-peloton-sensor
A platform which allows you to get current and past ride data from Peloton into HomeAssistant
Stars: ✭ 45 (+60.71%)
Mutual labels:  homeassistant
esphome-capacitive-touch-panel
A DIY capacitive touch panel based on the mpr121 and esphome.
Stars: ✭ 95 (+239.29%)
Mutual labels:  homeassistant
Tuya-v2-Supported-Devices
A collection of all of the known working Tuya v2 Devices
Stars: ✭ 30 (+7.14%)
Mutual labels:  homeassistant

Helium Blockchain for Home Assistant

Helium Logo

Sensors for monitoring individual Helium hotspots, Helium blockchain wallets, and the Helium HNT/USD Oracle price for Home Assistant. For more detailed metrics, HeliumTracker gives more detailed analytics over time including dashboards for your hosts.

beta_badge release_badge release_date hacs_badge License

Buy Me A Coffee Donate

Support this project, sign up for a Crypto.com account as one of your HNT exchanges and use referral code a8xydwpxxj to get a free $25 credit.

Installation

Make sure Home Assistant Community Store (HACS) is installed. This integration is part of the default HACS store (though can also be added manually using repository: rsnodgrass/hass-helium)

Configuration

The bare minimum configuration creates general sensors to track the Helium blockchange, notably the HNT/USD Oracle price.

sensor:
  - platform: helium

Configure sensors for Helium hotspots:

sensor:
  - platform: helium
    hotspots:
      - 112JbKk4fvYmoSqHR93vRYugjiduT1JrF8EyC86iMUWjUrmW95Mn

Configure sensors for Helium wallets:

sensor:
  - platform: helium
    wallets:
      - 12ywrqqzeNFwSMvCcaohpVdiwEeK4NZChtL9rs7dhKYd85fKG9U
      - 14YeKFGXE23yAdACj6hu5NWEcYzzKxptYbm5jHgzw9A1P1UQfMv

NOTE: By default, the sensors update from the Helium Blockchain every 15 minutes. This interval can be changed by adding a 'scan_interval' entry for the sensor, but this effects all sensors. You can create automations to dynamically trigger more frequent of specific sensors using the 'homeassistant.update_entity' service call.

Advanced Configuration

This configuration.yaml setting adds a sensor to track total HNT added to wallet by day/week/month usng the utility meter integration.

utility_meter:
  helium_wallet_today:
    source: sensor.helium_wallet_12ywrqqzeNFwSMvCcaohpVdiwEeK4NZChtL9rs7dhKYd85fKG9U
    cycle: daily

  helium_wallet_weekly:
    source: sensor.helium_wallet_12ywrqqzeNFwSMvCcaohpVdiwEeK4NZChtL9rs7dhKYd85fKG9U
    cycle: weekly

  helium_wallet_monthly:
    source: sensor.helium_wallet_12ywrqqzeNFwSMvCcaohpVdiwEeK4NZChtL9rs7dhKYd85fKG9U
    cycle: monthly

Example Lovelace UI

Status of Helium hotspots using uptime card:

Lovelace Status Example

type: custom:uptime-card
entity: sensor.helium_rough_chili_bird
icon: mdi:router-wireless
ok: online
ko: offline
ko_icon: mdi:router-wireless-off
hours_to_show: 24
status_adaptive_color: true
color:
  icon: grey
show:
  icon: true
  status: false
  timeline: true
  average: true
title_adaptive_color: true
name: Rough Chili Bird

HNT Price Tracking

Track the price of HNT using mini-graph-card:

Lovelace Price Example

animate: true
entities:
  - entity: sensor.helium_hnt_oracle_price
    name: HNT/USD
graph: line
hour24: true
font_size: 75
hours_to_show: 24
points_per_hour: 12
name: Helium HNT/USD
show:
  extrema: true
  icon: false
  name: true
type: custom:mini-graph-card

Track the price of HNT using apexcharts-card:

Lovelace Price Example

type: custom:apexcharts-card
header:
  show: true
  title: Helium HNT/USD
  show_states: true
  colorize_states: true
series:
  - entity: sensor.helium_hnt_oracle_price
  - entity: sensor.helium_hnt_oracle_price
    type: column

For custom price alerts ideas, see example stock alert.

Helium Wallet

Helium wallet size per day over last 7 days:

entities:
  - entity: sensor.helium_wallet_12ywrqqzeNFwSMvCcaohpVdiwEeK4NZChtL9rs7dhKYd85fKG9U
    name: Wallet HNT
hours_to_show: 168
icon: mdi:cash
name: Helium Wallet
group_by: date
show:
  graph: bar
  icon: false
  state: true
type: custom:mini-graph-card

Wallet value:

  - platform: template
    sensors:
      helium_wallet_value:
        value_template:
          "{{ (states('sensor.helium_hnt_oracle_price') |float(0) * states('sensor.helium_wallet_12ywrqqzeNFwSMvCcaohpVdiwEeK4NZChtL9rs7dhKYd85fKG9U') | float(0)) | round(2) }}"  

Total HNT Mined Today

This requires the advanced configuration above to add a utility meter for tracking today's HNT wallet amount versus yesterday's wallet. This requires the apexcharts-card.

Lovelace Today Example

type: custom:config-template-card
entities:
  - sensor.helium_wallet_today
card:
  type: custom:apexcharts-card
  header:
    show: true
    show_states: true
    colorize_states: true
    title: Helium Mined Today
  span:
    start: day
  graph_span: 24h
  all_series_config:
    stroke_width: 4
    type: line
    extend_to_end: false
    float_precision: 2
  color_list:
    - lightblue
    - grey
  series:
    - entity: sensor.helium_wallet_today
      name: Today
      type: area
      group_by:
        func: avg
        duration: 20min
    - entity: sensor.helium_wallet_today
      name: Yesterday
      offset: '-24h'
      opacity: 0.2
      group_by:
        func: avg
        duration: 20min
      show:
        in_header: true
  y_axis_precision: 0
  apex_config:
    yaxis:
      - seriesName: HNT
        decimalsInFloat: 0
      - seriesName: Helium
        show: false
    tooltip:
      x:
        format: ddd dd MMM - HH:mm
    xaxis:
      tooltip:
        enabled: false
    legend:
      show: false
    grid:
      borderColor: '#7B7B7B'
    chart:
      foreColor: '#7B7B7B'
      toolbar:
        show: false

Is there a way to change fiat currency from USD to EUR, GBP, CAD, etc?

No. By design, Helium HNT is currently tightly coupled with USD since both the Oracles are all in USD and the Helium DC (Data Credits) are all fixed to USD prices. However, you can of course convert from the USD price to other currencies using add on sensors.

For example, setting up conversion to CAD:

sensor:
  - platform: openexchangerates
    name: Canadian Currency
    api_key: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
    quote: CAD

  - platform: template
      sensors:
        helium_wallet_value:
          entity_id: sensor.helium_wallet_xxxxxxxxxxxxx, sensor.helium_hnt_oracle_price
          value_template: "{{ ((states('sensor.helium_hnt_oracle_price') | float(0)  * states('sensor.helium_wallet_xxxxxxxx') | float(0)) * states('sensor.canadian_currency') | float(0)) | round(2) }}"
          unit_of_measurement: "CAD"

And a simple Lovelace display (thanks @ThaNerd):

- type: custom:apexcharts-card
  header:
    show: true
    title: Helium Wallet/CAD
    show_states: true
    colorize_states: true
  series:
    - entity: sensor.helium_wallet_value
      name: Helium Wallet
      type: column

Support

This is a community supported custom component integration for Home Assistant. Code improvents and Pull Requests are appreciated.

Community Support

Feature Requests

  • allow auto-creating sensors for ALL hotspots for a given wallet (optionally)
  • create sensor for current wallet value (based on Oracle HNT price)
  • create sensors or attributes for being able to display per-hotspot rewards per 24-hour, 7-day, 30-day
  • disable polling to allow dynamic scan intervals (e.g. every min for price, every 15 min for hotspot avail, every hour for wallet value)

Out of Scope

  • local access to Helium hotspot status from proprietary vendor APIs (e.g. Bobcat diagnosis interface) -- love this idea, but this should be a separate Home Assistant integration

Here is an example for Bobcat 300's using the RESTful sensor:

sensor:
  - platform: rest
    name: "Bobcat Helium Sync Status"
    scan_interval: 300 # 5 min
    resource: http://<your-bobcat-lan-ip>/status.json
    value_template: "{{ (value_json.miner_height|float / value_json.blockchain_height|float) | round(2) }}"
    unit_of_measurement: '%'
    json_attributes:
       - "status"
       - "miner_height"
       - "blockchain_height"
       - "gap"
       - "epoch"

  - platform: rest
    name: "Bobcat Temp 0"
    scan_interval: 305 # 5 min + 5 seconds
    resource: http://<your-bobcat-lan-ip>/temp.json
    device_class: temperature
    value_template: "{{value_json.temp0|float}}"
    unit_of_measurement: "°C"

  - platform: rest
    name: "Bobcat Temp 1"
    scan_interval: 310 # 5 min + 10 seconds
    resource: http://<your-bobcat-lan-ip>/temp.json
    device_class: temperature
    value_template: "{{value_json.temp1|float}}"
    unit_of_measurement: "°C"

  - platform: rest
    name: "Bobcat Light"
    scan_interval: 300 # 5 min
    resource: http://<your-bobcat-lan-ip>/led.json
    value_template: "{{value_json.led}}"
    unit_of_measurement: "color"

Note: If you make multiple calls on bobcat API, make sure that you make unsynchronized calls in order to avoid the bobcat API error 'rate limit exceeded'.

Apple Watch Extensions

Amazing Apple Watch Helium widgets by Neil Williams using this hass-helium integration

Apple Watch Example

See Also

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].