Launch Other Apps on Your Tablet with the Dashie API

Dashie runs a small HTTP API on your tablet. One of the things it can do is open another app on demand: a camera app when the doorbell rings, a streaming app on movie night, or Settings when you need to change something. This guide takes you from turning the API on to launching your first app, and then back to Dashie.

What You Need

Turn On the API

The API is off until you turn it on.

  1. Tap the ☰ menu at the bottom of the Dashie sidebar, then tap Control Center.
  2. Under Dashboard, open Dashboard config.
  3. Scroll to Device API and turn on Enable API.
  4. Two more fields appear once the API is on: Password (leave it blank if you don't want one) and Port (default 2323). Tap Done.

You'll also need the tablet's IP address. It's printed at the bottom of the Control Center, for example IP: 192.168.1.100. The examples below use that address and the default port.

Using a password?

Add &password=YOUR_PASSWORD to every request. If you left the field blank, leave the parameter out.

Find the App's Package Name

Android identifies an app by its package name (com.android.chrome), not by the name on its icon. listApps returns every app on the tablet that can be launched, with both:

curl "http://192.168.1.100:2323/?cmd=listApps"
{"status":"OK","count":20,"apps":[ {"package":"com.sec.android.app.sbrowser","label":"Browser"}, {"package":"com.android.chrome","label":"Chrome"}, {"package":"com.android.settings","label":"Settings"}, {"package":"com.google.android.youtube","label":"YouTube"}, … ]}

With jq you can list them one per line, or look up a single app by name:

# Package and label, one per line curl -s "http://192.168.1.100:2323/?cmd=listApps" | jq -r '.apps[] | "\(.package) \(.label)"' # Just the package for an app whose label contains "chrome" curl -s "http://192.168.1.100:2323/?cmd=listApps" | jq -r '.apps[] | select(.label | test("chrome"; "i")) | .package'

Launch the App

Pass the package name to startApplication:

curl "http://192.168.1.100:2323/?cmd=startApplication&package=com.android.settings"

The app opens in front of Dashie, and the API replies:

{"status":"OK","message":"Started application: com.android.settings"}

Hide the Return Button

When Dashie opens an app, it shows a small Dashie button in the top-right corner so you can get back. If you don't want it, for example because you'll return with toForeground or a dashboard button, add returnButton=false:

curl "http://192.168.1.100:2323/?cmd=startApplication&package=com.google.android.youtube&returnButton=false"

Leave the parameter out, or set returnButton=true, to show the button. The value is not case-sensitive, and 1/0, yes/no and on/off work too. The same parameter works on the end of the rest_command URL in the Home Assistant section below. Requires Dashie 1.1.4 or later.

Return to Dashie

To bring Dashie back to the front, use toForeground:

curl "http://192.168.1.100:2323/?cmd=toForeground"
{"status":"OK","message":"Brought to foreground"}

The small Dashie button

When Dashie opens an app, a small Dashie button appears in the top-right corner. Tap it to come back to Dashie. toForeground clears it too. To launch without it, see Hide the Return Button.

Launch Apps from Home Assistant

A rest_command turns the launch request into a Home Assistant action you can call from scripts, automations and dashboards. Add it to configuration.yaml, with your tablet's IP:

# configuration.yaml rest_command: dashie_open_app: url: "http://192.168.1.100:2323/?cmd=startApplication&package={{ package }}"

If you set an API password, add &password=YOUR_PASSWORD to the end of the URL. If this is the first rest_command in your configuration, restart Home Assistant so it loads. If you already have others, call the rest_command.reload action instead; no restart needed.

Then call it with the package you want. For example, a script that opens Settings:

# scripts.yaml dashie_open_settings: alias: "Dashie: open Settings on the tablet" sequence: - action: rest_command.dashie_open_app data: package: com.android.settings

The same action block works in an automation. The action's response includes the tablet's reply, so you can check status if you need to:

{"content":{"status":"OK","message":"Started application: com.android.chrome"},"status":200, …}

Add App Buttons to Your Dashboard

With rest_command.dashie_open_app in place, any button on your dashboard can open an app on the tablet. Each button calls the same action with a different package, so you only set the command up once.

In the card editor

  1. Open your dashboard, choose Edit dashboard, then Add card → Button.
  2. Give it a name and an icon, for example YouTube and mdi:youtube.
  3. Under Interactions → Tap behavior, choose Perform action, then search for and pick dashie_open_app.
  4. In the action's data, enter package: com.google.android.youtube.
  5. Save. Tapping the button opens the app on the tablet.

In YAML

A single button:

type: button name: YouTube icon: mdi:youtube tap_action: action: perform-action perform_action: rest_command.dashie_open_app data: package: com.google.android.youtube

A row of app buttons, with one to bring Dashie back:

type: grid columns: 4 square: false cards: - type: button name: YouTube icon: mdi:youtube tap_action: action: perform-action perform_action: rest_command.dashie_open_app data: package: com.google.android.youtube - type: button name: Chrome icon: mdi:google-chrome tap_action: action: perform-action perform_action: rest_command.dashie_open_app data: package: com.android.chrome - type: button name: Settings icon: mdi:cog tap_action: action: perform-action perform_action: rest_command.dashie_open_app data: package: com.android.settings - type: button name: Dashie icon: mdi:home tap_action: action: perform-action perform_action: rest_command.dashie_back

The Dashie button needs a second command next to the first one in configuration.yaml:

rest_command: dashie_open_app: url: "http://192.168.1.100:2323/?cmd=startApplication&package={{ package }}" dashie_back: url: "http://192.168.1.100:2323/?cmd=toForeground"

Buttons on the tablet itself

These buttons work from any device showing the dashboard, including the Dashie tablet: the button asks Home Assistant, and Home Assistant calls the tablet. Use the package names from listApps for the apps on your tablet.

Troubleshooting

What you see What it means
{"status":"ERROR","message":"Failed to start application: com.example.app"} (HTTP 400) Nothing launchable with that package name is installed. Check the spelling against listApps.
{"status":"ERROR","message":"Missing 'package' parameter"} (HTTP 400) The request has no package=. In a URL built by a script, check that the variable isn't empty.
{"status":"ERROR","message":"Invalid 'returnButton' value 'maybe' — use true or false"} (HTTP 400) The returnButton value isn't one Dashie recognises. Use true or false.
{"status":"ERROR","message":"Invalid password"} (HTTP 401) A password is set and the request's password= is missing or doesn't match.
curl: (7) Failed to connect to 192.168.1.100 port 2323 … Couldn't connect to server The API is off, the port is different from the one you're calling, or the tablet's IP has changed. Check Dashboard config → Device API and the IP at the bottom of the Control Center.

For the full list of API commands, see the Dashie Complete Guide.

Need Help?