Connect Your Bleskomat ATM to LNBits

LNBits is a free and open-source Lightning Network wallet/accounts system.

The legend.lnbits.com website is a public instance of the LNBits open-source project. It is run by the project’s maintainers as a free service to the community. It is recommended only for hobby and experimental use. But it can be useful if you want to get up and running quickly to test your Bleskomat ATM.

This guide will assume you already have access to an LNBits installation – either legend.lnbits.com or your own self-hosted instance. For setup or installation instructions of LNBits, we recommend that you find the latest installation instructions on the official LNBits github.

Create a new wallet account

With LNBits, it is possible to create your own wallet account. You do not need to have your own Lightning Network node to use it. The LNBits instance has its own node or Lightning service provider account as its funding source. So when you use your LNBits wallet to send or receive Lightning payments, LNBits will credit or debit your wallet account in its database and handle the Lightning interactions on your behalf.

The first step toward connecting your Bleskomat ATM to LNBits is to create a new wallet account.

  1. Open LNBits in your browser
  2. Type the name of your new wallet
  3. Click the “Add a new wallet” button to create the new wallet

The new wallet has been created and has 0 sats available to spend. You will need to fund the wallet before your Bleskomat ATM will be able to sell bitcoin. But before you do that, let’s finish the rest of the setup process.

For the next step there are 2 options, please follow one of the options and then proceed to the section “Configure your Bleskomat ATM”.

Enable the Bleskomat extension – Option 1

The LNBits project is an open-source initiative, so several developers from the community have created extensions to add extra functionality to LNBits. The Bleskomat team has created and maintains an extension which allows Bleskomat ATM owners and operators to connect their Bleskomat ATM to an LNBits wallet account.

  1. Find and click the “Manage extensions” button on the left side of the page
  2. Find and click the “Enable” button for the Bleskomat extension
  3. Click the “Open” button to open the Bleskomat extension page

Add a New Bleskomat to Your LNBits Wallet Account

Now it’s time to connect the Bleskomat ATM to your LNBits wallet account.

  1. Click the “Add Bleskomat” button at the top
  2. Select your wallet account from the list at the top of the form
    • Fiat Currency – The currency (bills and coins) which your ATM accepts
    • Exchange Rate Provider – The exchange rate API to use when fetching BTC to fiat exchange rate
    • Fee % – The percent amount deducted from the final BTC amount when sending Lightning payments
  3. Click the “Add Bleskomat” button at the bottom of the form
  4. Click the small download icon on the left side of the first list item

A file named “bleskomat.conf” should be downloaded and saved to your computer. This is your Bleskomat ATM’s configuration file. It includes the API key information which your ATM will use to create signed lnurl-withdraw QR codes. This is how the LNBits website knows that a request for payment was initiated by your ATM.

You can now proceed to the Configure your Bleskomat ATM section.

Connect Your Bleskomat Platform Account to LNBits – Option 2

Let’s now connect your Bleskomat Platform account to your LNBits wallet.

  1. Get your LNBits API Key
    • On the home page of your LNBits wallet, click on the API info dropdown menu on the right side of the screen. You will use the Admin key provided here in the next steps of this guide.
  1. Login to your Bleskomat Platform account
    • For first time login:
      • Find and click the “Redeem Link” in the email that you received after placing your order.
      • Select “Create a new account” from the list of options in the “Action” field.
      • Click the “Confirm” button.
      • Complete the Account Settings step to set an email, username, and password.
  1. Lightning Configuration
    • Select “LNBits” from the list of options for “Lightning Backend Type”
    • Copy/paste the Admin API key from earlier into the “Admin Key” input field
    • In the Hostname field you will either use the default if you are utilizing the public instance of LNBits, or your own URL if you are self-hosting
    • Save and complete the initial account setup
  1. Management Interface
    • Click “Devices” on the left side of the account screen
    • If you don’t find any devices yet, click the “Create new device” button.
  1. Click the gear icon on the right side of one of the listed devices
    • This will open the device’s settings page
  1. Note the various settings available:
    • Enabled – Whether or not the Bleskomat Platform will process payments on behalf of the ATM
    • Device Type – Various types of devices supported by the Bleskomat Platform:
      • ATM – The full-sized product version of the Bleskomat ATM
      • Do-it-yourself ATM – The DIY hardware project
      • Point-of-sale – The POS terminal device
    • Fiat Currency – The currency (bills and coins) which your ATM accepts. Changing this requires re-programming the bill and coin acceptors.
    • Buy Limit – The maximum per trade limit for the ATM
    • Exchange Rate Provider – The exchange rate API to use when fetching BTC to fiat exchange rate
    • Fee Percent (%) – The percent amount deducted from the final BTC amount when sending Lightning payments –
    • Fixed Fee – A fixed fee denominated in the fiat currency of the device
    • Custom Invoice Memo Prefix – If set, this will replace the default invoice memo prefix – e.g. Bleskomat (absurd cake). Your ATM customers will see this in the memo field of their wallet application’s invoice.
  1. Press the “Save” button to save the settings, in the case that you’ve made any changes.

Configure Your Bleskomat ATM

In order for your Bleskomat ATM to create QR codes that the Bleskomat Platform will accept, you must configure it using the Hardware Configuration tool in your Platform account. This requires a USB cable and a web browser with Web Serial support – e.g. Chrome, Chromium, Brave, and Edge.

  1. Connect your Bleskomat ATM to your computer via USB cable
  2. Open the “Hardware Configuration” page in your Bleskomat Platform account
  3. Click the “Connect” button

The tool should automatically connect to your Bleskomat ATM. Then it will check if the device has the latest firmware installed. If not, it will ask you if you would like to update it. After firmware is updated, a few automatic checks are performed before the hardware configuration options are presented.

Once the Hardware Configuration tool is finished, you can move on to the next step.

Fund Your LNBits Wallet

The final step is to fund the LNBits wallet account so that your LNBits wallet can send Lightning payments on behalf of your Bleskomat ATM.

  1. Open your LNBits wallet account page
  2. Click the “Create invoice” button at the top of the page
  3. Set the amount to whatever you are comfortable with for testing purposes
  4. Click the “Create invoice” button at the bottom of the form

Pay the invoice by scanning the QR code with a mobile wallet app that has sufficient funds to pay it. Or copy/paste the invoice as text to your Lightning service provider account or Lightning node software.

When your LNBits wallet account is funded, you can move on to testing your setup.

Test the setup

Now let’s test the whole setup to make sure it’s working as expected.

  1. Insert a coin or bill into the Bleskomat ATM
  2. Push the button
  3. Open a compatible mobile wallet app
    • Please see apps for a list of wallet apps which are compatible
  4. Scan the QR code with the mobile wallet app
  5. Follow the instructions in the mobile wallet app to complete the Lightning payment

You should now see a transaction in your LNBits connected wallet.