Tacktab

Remote control

Turn the screen off at night, change the page, dim it or reload it, from Home Assistant or any script on your network. Remote control needs Tacktab Pro.

Home Assistant

The open-source Tacktab integration adds each tablet as a device, with a screen switch, brightness, the page, a reload button, the battery and charging.

  1. In Tacktab's settings, under Remote control, tap Generate, then Copy and Save. Turn on Remote control API.
  2. In Home Assistant, add the integration through HACS as a custom repository: https://github.com/edihasaj/tacktab-homeassistant.
  3. Home Assistant finds the tablet on your network by itself. Paste the password when it asks.

An automation that sleeps a kitchen panel at night and wakes it for breakfast:

automation:
  - alias: Kitchen panel at night
    triggers:
      - trigger: time
        at: "23:30:00"
    actions:
      - action: switch.turn_off
        target:
          entity_id: switch.kitchen_tablet_screen

  - alias: Kitchen panel in the morning
    triggers:
      - trigger: time
        at: "06:30:00"
    actions:
      - action: switch.turn_on
        target:
          entity_id: switch.kitchen_tablet_screen

Without the integration, call the API with rest_command in configuration.yaml:

rest_command:
  tacktab_sleep:
    url: http://TABLET-IP:7979/api/sleep
    method: post
    headers:
      Authorization: !secret tacktab_bearer   # "Bearer YOUR-PASSWORD"
  tacktab_wake:
    url: http://TABLET-IP:7979/api/wake
    method: post
    headers:
      Authorization: !secret tacktab_bearer

The API

Tacktab listens on port 7979 on your local network while it is open. The settings screen shows the full address. Send the password in an Authorization: Bearer header. A password in the address (?password=) is refused.

RequestWhat it does
GET /api/statusReturns the page address, the screen (on, off, or sleep when dimmed), how off works (screen_off: display or dim), brightness, battery, charging and model.
POST /api/reloadReloads the page.
POST /api/load?url=…Opens another address (http or https).
POST /api/sleepTurns the screen off. On Android the display switches off when Tacktab is device owner or allowed under Screen off in settings. Otherwise, and on iPad, the screen goes black and dims.
POST /api/wakeTurns the screen back on, straight into the page. A tap on a dimmed screen does the same.
POST /api/brightness?percent=0-100Sets the screen brightness.
curl -H "Authorization: Bearer YOUR-PASSWORD" http://TABLET-IP:7979/api/status
curl -X POST -H "Authorization: Bearer YOUR-PASSWORD" http://TABLET-IP:7979/api/sleep

Errors and protection