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.
- In Tacktab's settings, under Remote control, tap Generate, then Copy and Save. Turn on Remote control API.
- In Home Assistant, add the integration through HACS as a custom repository:
https://github.com/edihasaj/tacktab-homeassistant. - 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.
| Request | What it does |
|---|---|
GET /api/status | Returns 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/reload | Reloads the page. |
POST /api/load?url=… | Opens another address (http or https). |
POST /api/sleep | Turns 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/wake | Turns the screen back on, straight into the page. A tap on a dimmed screen does the same. |
POST /api/brightness?percent=0-100 | Sets 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
401: the password is missing or wrong.403: the request came from a web page (it had anOriginheader). Websites cannot control the tablet, even with the password.429: 5 wrong passwords came from this address. Tacktab refuses it for 30 seconds, doubling up to 15 minutes, and says how long inRetry-After. Other addresses are not affected.- Tacktab serves 8 connections at a time. The API is plain HTTP, so keep it on your own network: do not forward port 7979 on your router.
- On Android, a "Remote control is on" notification shows while the API is on. It keeps the tablet reachable while the screen is off.
- On iPad, remote control answers only while Tacktab is on screen, so keep "Keep screen on" enabled.