Helium Blockchain custom component

I’ve released an initial version of Helium Blockchain integration that creates sensors for Helium hotspots, wallets, and the current crypto HNT/USD oracle price. You can install this via HACS using this custom repository:

7 Likes

Would love to see some cool visualizations of what people do with the hotspot and wallet data. I’ll add some Lovelace examples to the README.

If anyone has features they’d like added, Pull Requests are happily reviewed! I just implemented the basics to track individual hotspot status, wallet value, and current HNT/USD oracle price.

1 Like

Hi there,
Just installed Helium, wondering how to setup 2 or more hotspots?
I used this (as an example)
sensor:

  • platform: helium
    hotspots:
    • 112JbKk4fvYmoSqHR93vRYugjiduT1JrF8EyC86iMUWjUrmW95Mn
    • nextaddresshotspot

But when i add a second hotspot i get this when i vlaidate the config:
Invalid config for [sensor.helium]: required key not provided @ data[‘hotspots’]. Got None. (See ?, line ?).

I couldn’t quite read your config, is this what you have?

sensor:
  - platform: helium
    hotspots:
       - 12JbKk4fvYmoSqHR93vRYugjiduT1JrF8EyC86iMUWjUrmW95Mn
       - 15JbKk4fvYmoTqHR93vRYugjiduT1k4fvYmoTqHR93vR23523sgn
       - nextaddresshotspot

That should work. I track multiple hotspots and wallets.

Yes indeed that is what i mean, BUT i think i found my problem.
In your example you state hotspots OR wallets…with both “- platform: helium”
I copy-pasted both your examples so i had 2x “- platform: helium”
This was my fault, once i only used 1x “- platform: helium” with “hotspots:” AND “wallets:” it worked.
So all my fault!!!

Hey!

I am using your Lovelace integrations. I am having trouble with it. Mainly because I think something is screwed up with the configurations.

sensor:
  - platform: helium
    hotspots:
        - ggg
        - fff
        - eee
        - ddd
        - ccc
        - bbb
        - aaa

This is in my configuration.yaml folder. I don’t know if this the correct spot to put them or someplace else is.

This is a great integration and has been working perfectly for weeks. I’m embarrassed to have to ask for help but after days of trial and error I’ve had no success. This feels like the right thread because others mining HNT might want to do the same. I simply want to have a notification sent to my phone every time I’m rewarded with HNT but can’t seem to set up an automation to do that. Is anyone able to walk me through the process?

1 Like

Hi @ryans, this is awesome, any chance we can also monitor the rewards per miner? In my case I have 4 but only see the overall wallet.

Thanks!!

3 Likes

Can this be changed in the code somwehre: unit_of_measurement: USD
I want it in CND

OK I managed to convert it to CND using an exchange rate sensor…So now only thing would be to see the earnings per miner not just a global earning sensor.

1 Like

I previously decided not to add earnings per-miner as the Helium ETL data overlays used by the APIs is having lots of performance problems and I did not want to add additional strain on their APIs at this time. You may have seen all the constant notices of delays in Helium Explorer, etc the last month or so…this is due to the ETL layer.

Maybe once the ETL layer performance issues have been resolved by Helium fine-grained earning per-miner can be added.

As the Helium blockchain is implicitly tied to USD (especially given that DCs are directly fixed to USD at this point) and the Oracle’s are in USD, I think keeping the core Helium integration as USD only makes sense.

I think your solution of using one of the exchange rate sensors makes total sense if you want something other than USD. Can you post your YAML (or otherwise) showing how you did this so others can use it if they want in CAD, EUR, etc?

Sure,

I used the folllowing:

  - platform: openexchangerates
    name: Canadian Currency
    api_key: xxxxxxxxx
    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  * states('sensor.helium_wallet_xxxxxxxx') | float) * states('sensor.canadian_currency') | float) | round(2) }}"
        unit_of_measurement: "CAD"

and then Lovelace could be anything as simple as this:

          - 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

The online bar doesn’t really work, I had one miner offline for a few hours and the graph still had it at 100% for that specific day…Guess the refresh rate is not frequent enough.

Also, do you have a sample Lovelace for weekly and monthly hnt mined?

Added examples for more data from Bobcat hotspots that are IP accessible from a Home Assistant instance. This includes the current sync status from the miner (directly so it is not delayed in ETLs or during blockchain slowness) as well as the internal temperatures of the Bobcat.

See the bottom of the page at https://github.com/rsnodgrass/hass-helium

My guess is most only have one Bobcat locally so you would only be able to track one via local IP…

For anyone who wants to monitor their ROI:

- platform: template
    sensors:
      helium_roi:
        entity_id: sensor.eth_balance
        value_template: "{{ (states('sensor.eth_coin_value') | float  * states('sensor.eth_balance') | float) | round(2) - amount_paid }}"
        unit_of_measurement: "CAD"

replace amount_paid by the amount all this cost you.

Lovelace (icon should turn green once ROI is achieved):

- type: custom:button-card
            entity: sensor.helium_roi
            name: Helium ROI
            icon: mdi:currency-usd
            layout: icon_name_state
            show_state: true
            show_icon: true
            show_name: true
            styles:
              icon:
                - color: >
                    [[[
                      if (states['sensor.helium_roi'].state < 0)
                        return "red";
                      return "green";
                    ]]]

That would be awesome! They have New api being stress tested

Would you be able to do this for the Nebra as well?

Someone with a Nebra can certainly contribute example yaml for pulling data from them. I don’t have a Nebra (I ordered in mid April and it still hasn’t arrived…I don’t expect it until next year at this point).