Skip to content

Installation

Ari Sosnovsky edited this page Aug 6, 2022 · 7 revisions

HA Addon

Add the repository URL under Supervisor → Add-on store → ⋮ → Manage add-on repositories:

https://github.com/asosnovsky/Shortumation

It should now appear in your Add-on Store and you should be able to install it!

Please note that you may need to enable advance mode in your settings first!

Containerized / HA Core

Take a look at the example folder for a complete example of how to run this.

The guide below assumes you use docker compose to run, however the same steps can be replicated using kubernetes or just using docker. Additionally, if you are using HA Core, you will still need docker to run this addon.

Step 1 - Define the image

Shortumations is deployed via different images that are built against different cpus. Define your container in the following way:

shortumation:
    image: "asosnovsky/shortumation-${ARCH}:${SHORTUMATIONS_VERSION}"
  • Where ${ARCH} can be one of:

    • aarch64
    • amd64
    • armhf
    • armv7
    • i386

    For example a raspberry pi 4 arch would be armv7 while a common x86 machine would use the amd64.

  • Where ${SHORTUMATIONS_VERSION} can either be latest (not recommended) or the current latest version GitHub release (latest by date) .

Step 2 - Mount Config Folder

Assuming you've mounted your home-assistant /config folder to a volume called ha_config, include this volume to Shortumation by mounting it in the same way. I.e.

shortumation:
    image: "asosnovsky/shortumation-${ARCH}:${SHORTUMATIONS_VERSION}"
    volumes:
      - ha_config:/config

If you are using HA Core simply replace ha_config above to the location of the /config folder in your host system (i.e. /home/myuser/.homeassistant/config:/config ).

Step 3 - Adding a Long-lived token

In HA, go to an admin users profile by login as them and selecting their profile:

image

Then scroll all the way to the bottom where you see "Long Lived Access Token"

image

Create a token called "Shortumation" and copy it (it will disapper once you close the popup)

image

Add this token as following to your Shortumation container, and add a reference to your homeassistant websocket port:

shortumation:
    image: "asosnovsky/shortumation-${ARCH}:${SHORTUMATIONS_VERSION}"
    ...
    network_mode: host
    environment:
      - SUPERVISOR_TOKEN=<<YOUR TOKEN HERE>>
      - HASSIO_WS=ws://0.0.0.0:8123/api/websocket

*Please note that if you've setup your networking stack to something other than host or are using some other port you will need to set the HASSIO_WS variable accordingly. Please note that network_mode: host needs to be set in order for Shortumation to be able to communicate with HA over 0.0.0.0.

Step 4 - Set Port (Optional)

By default Shortumation runs on port 8000, if you want to change this (and are running in host network) then set the following environment variable:

shortumation:
    image: "asosnovsky/shortumation-${ARCH}:${SHORTUMATIONS_VERSION}"
    ...
    environment:
      ...
      - PORT=<<SOME OTHER PORT>>

Step 5 - Open the browser and start coding :D

Go to http://localhost:8000/web (or whatever port you set in step 4) and enjoy!