Skip to content
Orvyn

Smart home

Orvyn in Home Assistant

A sensor with the number, its unit and its history, step by step, for someone who has never installed anything.

Takes
About 10 minutes
You need
  • Home Assistant, any kind of install
  • A way to put a folder in its config directory: the Samba share add-on, the File editor add-on, Studio Code Server or SSH
  • Nothing to pay: the free number needs no key
Costs
Nothing for the free number, which runs a little behind. The signed, newest number takes a pack bought on the feed’s page; every guide ends with how.

First, pick the number you want

Every line further down is then written for it, ready to copy.

Or one of these:

You picked

EUR / USD, ECB reference rate

by Orvyn · changes every day · its page

Its address, which the lines below carry:orvyn/eur-usd-ecb-reference

The free number right now

1.1411

measured · runs 15 minutes behind

Then follow the steps

In about ten minutes EUR / USD, ECB reference rate is a sensor in Home Assistant, with its unit and its history, for dashboards and automations. One folder goes into your configuration directory; after that everything is done in the Home Assistant screens.

  1. Download and unzip the integration

    orvyn-home-assistant-0.1.0.zip. Unzipped, it holds a folder custom_components with orvyn inside.
  2. Put the orvyn folder into your configuration directory

    Copy orvyn into the custom_components folder of your configuration directory, making custom_components if it is not there. When you are done, this file exists:

    your config directory
    config/custom_components/orvyn/manifest.json

    Easiest with the Samba share add-on: open the config share from your computer and drop the folder in. Studio Code Server and SSH work too. The File editor add-on uploads one file at a time, which is slow for a folder.

  3. Restart Home Assistant

    Settings › System, the power icon at the top right, Restart Home Assistant.
  4. Add the integration and pick the feed

    Settings › Devices & services › Add integration, search for Orvyn. It asks for a few words: type these, pick the feed from the list, leave the key empty, and press Submit.

    Orvyn, find a feed
    EUR / USD, ECB reference rate

    You should see: A sensor shows 1.1411. Its unit is the feed’s own, and its history starts collecting. It reads the free number every day.

  5. Use it

    Find the sensor under Settings › Devices & services › Entities by searching for Orvyn; its id will be close to sensor.eur_usd_ecb_reference_rate. Add it to a dashboard card, or to an automation. This one sends a notification when the number drops below a line, and never acts on a stale number:

    automations.yaml
    automation:
      - alias: Do something when the number is low
        triggers:
          - trigger: numeric_state
            entity_id: sensor.eur_usd_ecb_reference_rate
            below: 1
        conditions:
          - condition: template
            value_template: "{{ not state_attr('sensor.eur_usd_ecb_reference_rate', 'stale') }}"
        actions:
          - action: notify.notify
            data:
              message: "It is {{ states('sensor.eur_usd_ecb_reference_rate') }} now"

Without the integration: a rest sensor

If you would rather add nothing to custom_components, a rest sensor in configuration.yaml reads the same free number. It has no search and no proof link, and the unit is written in by hand.

configuration.yaml
rest:
  - resource: https://orvyn.me/gw/v1/feeds/orvyn/eur-usd-ecb-reference/preview
    scan_interval: 86400
    sensor:
      - name: "Orvyn orvyn/eur-usd-ecb-reference"
        unit_of_measurement: ""
        value_template: "{{ (value_json.preview.value | float) / (10 ** value_json.decimals) }}"
        json_attributes_path: "$.preview"
        json_attributes:
          - observedAtMs
          - changeBps

Want the signed number instead?

What you set up above shows the free number. It runs 15 minutes behind and is not signed, which is fine for a dashboard. The signed number is the newest one, and it comes with a proof anyone can check on the check page or on chain. It costs a little: you buy a pack of reads once, with your wallet, then a key spends from that pack. Three steps, in this order.

  1. 1

    Buy a pack on the feed’s page. The smallest is enough to start; a pack is a number of reads, and the page says what each costs.

  2. 2

    Make a key with the wallet that bought the pack. Sign in here and it is made for you, or make one under Dashboard, API keys, with the read scope only. A read key can spend the reads you bought and nothing more, and you revoke it there.

  3. 3

    Put the key in Home Assistant. The key is given when the feed is added: remove the entry under Settings › Devices & services › Orvyn, add the integration again and paste the key in the last step. The sensor then shows the signed number, and its proof_url attribute opens the report on orvyn.me. With the rest sensor, point resource at /latest, add Authorization: Bearer lk_… under headers (from secrets.yaml), and read value_json.report instead of value_json.preview.

No tool holds a wallet or pays by itself. However often a sheet recalculates or a workflow runs, a feed is read from your pack at most once every day, because that is how often it changes.

If something looks wrong

You seeIt means
Orvyn is not in the Add integration listThe folder is not where step 2 says, or Home Assistant was not restarted after it was copied. Check that manifest.json is at that path.
No calls left for this feedYour key holds no pack for this feed. Buy one on the feed’s page, then add the entry again.
The key was refusedThe key is wrong or was revoked. Make a new one.
The sensor is unavailableOrvyn could not be reached, or the feed has not published yet. It recovers by itself; the stale attribute says when the number is old.

Still stuck? Say so on X with the words on your screen, and we will answer.

Take it out again

Delete the entry under Settings › Devices & services › Orvyn, delete config/custom_components/orvyn, and restart.