Skip to main content

Blockchain.com smart home integration, free and open source

Blockchain.com integration for Gladys Assistant

Balance of your Bitcoin addresses in Gladys, read-only, from Blockchain.com.

Follow the balance of your Bitcoin addresses in Gladys: the amount in BTC, its value in your currency, the number of transactions and the date of the last one, read from the public API of Blockchain.com, with mempool.space as a fallback. No account, no API key.

This integration only follows addresses. For the fees, the mempool, the blocks and the network, see the Bitcoin Monitor integration of the store: both can be installed side by side.

Read-only: the integration only reads public data and never asks for a private key, a seed phrase or a wallet file. It cannot send anything. Not affiliated with Blockchain.com.

What you get​

  • One device per address, under the name you give it: balance in BTC, value in your currency (euro, dollar, pound sterling, Swiss franc, Canadian or Australian dollar, yen), number of transactions and date of the last one, with their history.
  • A total device when you follow several addresses: the sum of the balances and its value.
  • A dashboard widget listing the addresses with their balance and value, and the total.
  • Two scene triggers: funds received and funds sent on an address.
  • A scene action: read the balance of an address (or the total) as a sentence to send by message or have it read aloud.

Requirements​

  • Gladys Assistant 5.1 or later.
  • Internet access from the Gladys host (the integration reads blockchain.info and mempool.space).

Configuration​

Settings​

SettingWhat it does
Bitcoin addressesSeparated by semicolons, 20 at most, each with an optional name: Savings: bc1q…; Donations: 3J98….
Currency of the valueEUR, USD, GBP, CHF, CAD, AUD or JPY (EUR by default), at the bitcoin price of Blockchain.com.
Refresh interval5 to 60 minutes (10 by default).
LanguageNames of the devices and features (at their creation) and texts sent to the scenes. French by default.

Every kind of mainnet address is accepted: legacy (1…), P2SH (3…), SegWit (bc1q…) and Taproot (bc1p…). The checksum of each address is verified: an address with a typing mistake is ignored, and the status of the integration names it. Extended public keys (xpub) and testnet addresses are not supported.

Save, then open the Discover tab of the integration and create the devices you want.

The Show the balances now button of the configuration reads every address at once and says which source answered.

Privacy​

The followed addresses are sent to Blockchain.com (and to mempool.space when Blockchain.com does not answer) at every reading: these services can link them to the public IP address of your home. Only public addresses are sent, never anything that could spend your bitcoins. The addresses and their last balances are kept in the data volume of the integration, on your Gladys.

Devices​

FeatureTypeDescription
BalanceCurrency, in bitcoinConfirmed and unconfirmed transactions, like Blockchain.com.
ValueCurrencyBalance multiplied by the bitcoin price, rounded to the cent.
TransactionsCounterNumber of transactions of the address.
Last transactionTextDate and time of the last transaction, in the time zone of Gladys.

The total device has the balance and the value only. The names of the features are given at their creation, in the language of the configuration. Changing the currency changes the unit of the value: Gladys then offers to update the device in the Discover tab.

Dashboard widget​

Bitcoin balances lists the followed addresses with their balance and value, then the total, under the names given in Gladys. Tap a row to see the full address, its transactions and the date of the last one, and a link to the Blockchain.com explorer. Two settings hide the value and the total. The widget shows 8 rows at most: beyond 7 addresses, the total stays on the last row.

Scene triggers​

  • Bitcoin: funds received: the balance of an address went up.
  • Bitcoin: funds sent: the balance of an address went down.

Choose an address, or none for all of them. An unconfirmed transaction already counts: the trigger fires at the next reading after the transaction is seen (every 10 minutes by default). A movement made while Gladys was stopped fires at the next start.

Variables: name of the address, the address, amount (BTC), new balance (BTC), amount in currency, currency, and a ready-made sentence ("Savings received 0.015 BTC (€774.08). Balance: 0.19769271 BTC.").

Scene actions​

Bitcoin: read a balance gives the balance of an address (or the total) and its value: a sentence, the balance in BTC, the value and the currency, to use in the next actions of the scene.

Scene examples​

  • Receive a message when a payment arrives: trigger Bitcoin: funds received on the address, then Send a message with the sentence of the trigger.
  • Every Sunday morning, have the total read aloud: trigger at a set time, action Bitcoin: read a balance on the total device, then Say a sentence with its text.
  • Watch a cold wallet: trigger Bitcoin: funds sent on its address, then a notification. Such an address should never send anything.

Data sources and limits of use​

  • Blockchain.com: the public API (multiaddr, rawaddr, ticker), without a key. Blockchain.com asks for no more than one request every 10 seconds; the integration makes two per reading, every 5 minutes at the most, plus the last transaction of 3 addresses that moved at most, spaced out. A refusal (HTTP 429) leaves Blockchain.com alone for an hour.
  • mempool.space: the public REST API, used when Blockchain.com does not answer, one request per address, spaced out. mempool.space applies a fair-use limit.
  • The price is the last bitcoin price of the source, refreshed at every reading. It is indicative.

The two sources may count an address slightly differently (unconfirmed transactions, the unspendable reward of the first block): when the source changes, the new reading is a new starting point and fires no trigger.

Troubleshooting​

  • No device in the Discover tab: check that the addresses are saved and valid; the status of the integration lists the ignored entries.
  • "Blockchain.com does not answer" in the status: the balances are read on mempool.space meanwhile.
  • "Neither Blockchain.com nor mempool.space answers": check the internet access of the Gladys host. The last balances are kept.
  • The value is missing: no bitcoin price was read yet; it comes back at the next reading.
  • Detailed logs: set LOG_LEVEL=debug on the container.

Limits​

  • Bitcoin mainnet addresses only: no xpub, no other cryptocurrency, no testnet.
  • 20 addresses at most.
  • A balance moves with the transactions seen by the source: a replaced or dropped unconfirmed transaction moves it back, and fires a trigger in the other direction.
  • Prices and balances are given for information only: not for accounting or tax purposes.

Configuration settings​

These are the settings Blockchain.com asks for in its configuration screen in Gladys.

SettingTypeRequiredDescription
Followed addressessectionNoList the Bitcoin addresses to follow, save, then create their devices in the Discover tab. Public addresses only: never a private key or a seed phrase.
Sources and limitssectionNoPublic APIs of Blockchain.com, and of mempool.space when it does not answer, read without an account: they see the followed addresses. Read-only, nothing is ever sent. Not affiliated with Blockchain.com.
Bitcoin addressesstringNoSeparated by semicolons, 20 at most, each with an optional name before it: "Savings: bc1q…; Donations: 3J98…". Legacy (1…), P2SH (3…), SegWit (bc1q…) and Taproot (bc1p…).
Currency of the valueselectNoThe value of the balances is shown in this currency, at the bitcoin price of Blockchain.com.
Refresh intervalselectNoA new block comes every 10 minutes on average: faster would only load the free public APIs.
Language of the textsselectNoNames of the devices and features (at their creation) and texts sent to the scenes.

How to install Blockchain.com in Gladys​

  1. In Gladys, open Integrations: Blockchain.com appears in the catalog, next to the native integrations, with a community badge.
  2. Click Install. Gladys pulls the Docker image (ghcr.io/guim31/gladys-blockchain:1.0.0), starts it in a sandbox isolated from the core, and generates the integration's interface (devices, discovery and configuration).
  3. Open the Configuration screen of the integration, fill in the settings, and save.
  4. You can also install it directly from its repository URL: https://github.com/guim31/gladys-blockchain.

Blockchain.com requires Gladys >=5.1.0. The catalog inside Gladys refreshes every hour, so a new version becomes available at most one hour after its release.

Not running Gladys yet? It is free and open source: follow the installation guide to get started.

About external integrations​

Blockchain.com is an external integration: a community integration packaged as a Docker container and published on GitHub, that Gladys installs in one click and runs in a sandbox isolated from its core. It is published and maintained by guim31, not by the Gladys core team.

Subscribe to the Gladys Assistant newsletter

A few emails per month about new releases and project news. Sent by Pierre-Gilles Leymarie, founder of the project. Unsubscribe anytime 🙂