> ## Documentation Index
> Fetch the complete documentation index at: https://docs.myzendo.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Automate kiosk devices

> Control a Kiosk Mode tablet from your Home Assistant or Homey automations, and react to its battery, screen, and lock state.

## Intro

Once [Kiosk Mode](/permanent-devices/configure-zendo) is on, your mounted device shows up in Home Assistant/Homey like any other device. Your automations can **control** it and **react** to its state, so the tablet on your wall becomes part of your home's automations, not just a display.

* **Control**: wake the screen, set the brightness and colour scheme (light/dark mode), configure the screensaver, set the device volume, reload the app, and lock the screen with a PIN code (or unlock it).
* **React to**: battery level and charging state, screen and screensaver status, whether the screen is locked, and whether the device is online.

Every example below comes in a **Home Assistant** and a **Homey** version. Expand the one you use.

<Note>
  These automations need [Kiosk Mode](/permanent-devices/configure-zendo) switched on, that's how Zendo registers the tablet with Home Assistant/Homey. Control actions also need the device **online and responding**: if it's offline, or doesn't answer within about ten seconds, the action fails. Reading state always works from the last values the device reported.

  In the Home Assistant snippets, replace `YOUR_ZENDO_DEVICE_ID` with your tablet's device (the `device` field is a list, so add more to target several at once), or pick the devices from the dropdown in the visual editor - each is named after its tablet.
</Note>

***

## Available options and commands

Every managed device offers the same controls and state to Home Assistant/Homey. This is the full list to build automations from.

<AccordionGroup>
  <Accordion title="Home Assistant">
    **State you can read** - each tablet registers these entities, named after the device (a tablet called "Kitchen" gives `sensor.kitchen_battery`, and so on):

    | State             | Entity                            | Values                                                  |
    | ----------------- | --------------------------------- | ------------------------------------------------------- |
    | Battery level     | `sensor.<name>_battery`           | 0-100%                                                  |
    | Charging state    | `sensor.<name>_battery_state`     | `charger_unplugged`, `charging`, `plugged_not_charging` |
    | Screen brightness | `sensor.<name>_screen_brightness` | 0-100%                                                  |
    | Volume            | `sensor.<name>_volume`            | 0-100%                                                  |
    | Screen state      | `sensor.<name>_screen`            | `active`, `screensaver`                                 |
    | Colour scheme     | `sensor.<name>_color_scheme`      | `dark`, `light`                                         |
    | Screensaver mode  | `sensor.<name>_screensaver_mode`  | `none`, `dim`, `black`, `clock`                         |
    | Screensaver timer | `sensor.<name>_screensaver_timer` | minutes                                                 |
    | Locked            | `binary_sensor.<name>_locked`     | `on`, `off`                                             |

    There's no separate online sensor. When a tablet goes offline, all of its entities read `unavailable`.

    **Actions you can call** - each targets one or more tablets (the `device` field is a list), picked from the device selector:

    | Service                                      | What it does                                                               |
    | -------------------------------------------- | -------------------------------------------------------------------------- |
    | `zendo.managed_device_screen_wake_up`        | Wake the screen                                                            |
    | `zendo.managed_device_screen_configure`      | Set the brightness (1-100%) and colour scheme (dark or light)              |
    | `zendo.managed_device_screensaver_configure` | Set the screensaver mode (none, dim, black, or clock) and timer (1-60 min) |
    | `zendo.managed_device_audio_configure`       | Set the volume (0-100%)                                                    |
    | `zendo.managed_device_app_lock`              | Lock the screen with a PIN (4, 6, or 8 digits) and an optional message     |
    | `zendo.managed_device_app_unlock`            | Unlock the screen                                                          |
    | `zendo.managed_device_app_reload`            | Reload the app                                                             |

    A single call can control several tablets at once - list their device IDs:

    ```yaml theme={null}
    action: zendo.managed_device_screen_wake_up
    data:
      device:
        - KITCHEN_TABLET_ID
        - HALLWAY_TABLET_ID
    ```

    In **Developer Tools > Actions** or the automation editor, the Home Assistant UI shows a description and the available choices (dropdowns, sliders) for every field.
  </Accordion>

  <Accordion title="Homey">
    These cards target a tablet through the **Kiosk Device** picker. Actions and triggers can aim at **All devices** / **Any device**, a **Devices for...** group (a person), or a single tablet. Conditions target a single tablet.

    **Triggers** (each also carries a **Device name** tag for use in messages):

    * **Kiosk Device battery level changed** - tag: battery level
    * **Kiosk Device battery state changed** - tag: charging state
    * **Kiosk Device screen state changed** - tag: screen state
    * **Kiosk Device was locked** / **Kiosk Device was unlocked**
    * **Kiosk Device came online** / **Kiosk Device went offline**

    **Conditions** (each can be flipped to its opposite):

    * **Kiosk Device battery level is above...** a level you set
    * **Kiosk Device battery charging state is...** charger unplugged / charging / plugged in, not charging
    * **Kiosk Device screen state is...** active / screensaver
    * **Kiosk Device is locked**
    * **Kiosk Device is online**

    **Actions**:

    * **Wake up Kiosk Device screen** - wake the screen
    * **Configure screen for Kiosk Device** - brightness (1-100%) and colour scheme (dark/light)
    * **Configure screensaver for Kiosk Device** - mode (none/dim/black/clock) and timer (1-60 min)
    * **Set volume for Kiosk Device** - volume (0-100%)
    * **Lock Kiosk Device** - lock with a PIN (4/6/8 digits) and an optional message
    * **Unlock Kiosk Device** - unlock the screen
    * **Reload app** - re-fetch settings and return to the start screen
  </Accordion>
</AccordionGroup>

***

## Lock a device

Locking puts a full-screen PIN pad over the app, so the tablet can't be used to control your property until it's unlocked. It's useful when you arm the alarm, head out, or have guests over.

### How the lock works

* **PIN**: 4, 6, or 8 digits, chosen when you lock. An optional message shows above the keypad (for example "Locked while we're out").
* **Unlocking at the device**: anyone can unlock by typing the PIN on the keypad, so pick one you're happy to share with whoever's home. There's no override code or fingerprint, only the PIN.
* **Wrong PINs slow down**: the first few tries are instant, then a delay builds up - a few seconds at first, up to a minute if someone keeps guessing. There's no hard lockout, and nothing is wiped.
* **Unlocking remotely**: an automation can unlock the tablet at any time, with no PIN needed.
* **It survives a restart**: the lock stays on even if the app is force-quit or the device reboots, so it can't be bypassed by closing the app. Like every managed-device feature, it needs Kiosk Mode on to show.

### Lock and unlock from an automation

Lock on one trigger (leaving, arming the alarm) and unlock on another (arriving, disarming).

<AccordionGroup>
  <Accordion title="Home Assistant">
    The PIN must be 4, 6, or 8 digits. List more device IDs under `device` to lock several tablets together.

    ```yaml theme={null}
    automation:
      - alias: "Lock the tablets when armed away"
        trigger:
          - platform: state
            entity_id: alarm_control_panel.home
            to: "armed_away"
        action:
          - action: zendo.managed_device_app_lock
            data:
              device:
                - YOUR_ZENDO_DEVICE_ID
              pin: "1234"
              message: "Locked while we're out"

      - alias: "Unlock the tablets when disarmed"
        trigger:
          - platform: state
            entity_id: alarm_control_panel.home
            to: "disarmed"
        action:
          - action: zendo.managed_device_app_unlock
            data:
              device:
                - YOUR_ZENDO_DEVICE_ID
    ```
  </Accordion>

  <Accordion title="Homey">
    Two flows, one to lock and one to unlock.

    **Lock**

    * **When**: for example Homey's **leaves home** presence trigger, or your alarm's *armed* trigger.
    * **Then**: **Lock Kiosk Device**. Set **Kiosk Device** to your tablet, **PIN (required, 4/6/8 digits)** to something like `1234`, and **Lock screen message (optional)** to a note like `Locked while we're out`.

    **Unlock**

    * **When**: for example Homey's **comes home** presence trigger, or your alarm's *disarmed* trigger.
    * **Then**: **Unlock Kiosk Device**. Set **Kiosk Device** to the same tablet. No PIN is needed to unlock remotely.
  </Accordion>
</AccordionGroup>

***

## Group devices

When you replace a tablet or reinstall the app, it joins as a **brand new** device. How you aim your automations decides whether they keep working after a swap, so group them by person where you can.

* **Homey**: target a **person** instead of a single device. Link each tablet to someone in [People & Invitations](/share/invite), then choose the **Devices for...** entry for that person in your flow. It follows whoever's linked, so it keeps working after a swap. You can still pick a single device when you want to. (Conditions are the one exception, they always target a specific device.)
* **Home Assistant**: an action's `device` field is a **list**, so one automation can control several tablets at once. There's no person grouping like Homey's, though: when you replace a tablet you point automations at the new device, and renaming it and its `sensor.<name>_*` entities to match keeps things tidy.

***

## Automation ideas

Some ready-made automations to get you started, each with a Home Assistant and a Homey version.

### Wake the screen on motion

Got a motion or presence sensor nearby? Let it wake the screen as you approach, so the tablet lights up when you walk up, then settles back to its screensaver once you leave.

<AccordionGroup>
  <Accordion title="Home Assistant">
    Trigger on your motion sensor, then call the wake-up action on your tablet.

    ```yaml theme={null}
    automation:
      - alias: "Wake the tablet on hallway motion"
        trigger:
          - platform: state
            entity_id: binary_sensor.hallway_motion
            to: "on"
        action:
          - action: zendo.managed_device_screen_wake_up
            data:
              device:
                - YOUR_ZENDO_DEVICE_ID
    ```
  </Accordion>

  <Accordion title="Homey">
    Build a two-card flow:

    * **When**: your motion sensor's **Motion turned on** trigger (the exact wording depends on the sensor).
    * **Then**: add **Wake up Kiosk Device screen**. In the **Kiosk Device** field, pick your tablet.

    No condition is needed.
  </Accordion>
</AccordionGroup>

<Tip>
  There's a **Wake up** action but no matching turn-off, and that's on purpose. Once woken, the screen returns to its screensaver on its own after the timer you set in [Kiosk Mode](/permanent-devices/configure-zendo#settings). A raw on/off switch wired to a motion sensor would flicker the screen every time the sensor tripped; waking on motion and letting the timer take over keeps it smooth.
</Tip>

You can fire the same **Wake up** action from any trigger, not just motion. A door unlocking or an arrival [geofence/location-based automation](/automate/geofences) works just as well, and you can target every tablet at once (**All devices** on Homey, or a list of devices in a single Home Assistant action).

***

### Keep the battery healthy

A wall tablet left plugged in sits at 100% all day, which wears the battery down over time. Keeping it in a healthier range helps: put its charger on a smart plug, then start charging when the battery drops below 20% and switch the plug off once it climbs above 80%.

<AccordionGroup>
  <Accordion title="Home Assistant">
    Read the tablet's battery sensor (named after the device, e.g. `sensor.kitchen_battery`) and switch the plug from two numeric-state automations.

    ```yaml theme={null}
    automation:
      - alias: "Start charging the tablet below 20%"
        trigger:
          - platform: numeric_state
            entity_id: sensor.kitchen_battery
            below: 20
        action:
          - action: switch.turn_on
            target:
              entity_id: switch.kitchen_tablet_plug

      - alias: "Stop charging the tablet above 80%"
        trigger:
          - platform: numeric_state
            entity_id: sensor.kitchen_battery
            above: 80
        action:
          - action: switch.turn_off
            target:
              entity_id: switch.kitchen_tablet_plug
    ```
  </Accordion>

  <Accordion title="Homey">
    Two flows, one to start charging and one to stop.

    **Start charging when low**

    * **When**: **Kiosk Device battery level changed**. Set **Kiosk Device** to your tablet.
    * **And**: **Kiosk Device battery level is above...**. Set the level to `20`, then invert the card (tap it so it reads as *not* above 20%) so it matches when the battery is at or below 20%.
    * **Then**: your smart plug's **Turn on**.

    **Stop charging when full**

    * **When**: **Kiosk Device battery level changed**. Set **Kiosk Device** to your tablet.
    * **And**: **Kiosk Device battery level is above...**. Set the level to `80` and leave it as-is.
    * **Then**: your smart plug's **Turn off**.
  </Accordion>
</AccordionGroup>

***

### Dim the tablet in the evening

In the evening, make the tablet dimmer and quieter: dark mode, lower brightness, a shorter screensaver timer so it isn't sitting bright for long, and lower volume. The examples switch to these settings at 20:00 and back to day settings at 08:00.

Lowering the volume here also quiets a [doorbell ring that follows the device volume](/permanent-devices/doorbell-alerts-intercom#ring-volume).

<AccordionGroup>
  <Accordion title="Home Assistant">
    One automation switches to night settings at 20:00, another switches back to day settings at 08:00.

    ```yaml theme={null}
    automation:
      - alias: "Tablet night mode at 20:00"
        trigger:
          - platform: time
            at: "20:00:00"
        action:
          - action: zendo.managed_device_screen_configure
            data:
              device:
                - YOUR_ZENDO_DEVICE_ID
              color_scheme: dark
              brightness: 15
          - action: zendo.managed_device_screensaver_configure
            data:
              device:
                - YOUR_ZENDO_DEVICE_ID
              timer: 2
          - action: zendo.managed_device_audio_configure
            data:
              device:
                - YOUR_ZENDO_DEVICE_ID
              volume: 20

      - alias: "Tablet day mode at 08:00"
        trigger:
          - platform: time
            at: "08:00:00"
        action:
          - action: zendo.managed_device_screen_configure
            data:
              device:
                - YOUR_ZENDO_DEVICE_ID
              color_scheme: light
              brightness: 80
          - action: zendo.managed_device_screensaver_configure
            data:
              device:
                - YOUR_ZENDO_DEVICE_ID
              timer: 10
          - action: zendo.managed_device_audio_configure
            data:
              device:
                - YOUR_ZENDO_DEVICE_ID
              volume: 60
    ```
  </Accordion>

  <Accordion title="Homey">
    Two flows, one for night and one for morning.

    **Night mode at 20:00**

    * **When**: **Date & Time**'s **The time is...** trigger, set to `20:00`.
    * **Then**, add three action cards, all pointed at your tablet in the **Kiosk Device** field:
      * **Configure screen for Kiosk Device**: set **Color scheme** to **Dark** and **Brightness %** to something low like `15`.
      * **Configure screensaver for Kiosk Device**: set **Timer in minutes** to `2`.
      * **Set volume for Kiosk Device**: set **Volume %** to `20`.

    **Day mode at 08:00**

    * **When**: the same **The time is...** trigger, set to `08:00`.
    * **Then**: the same three cards with daytime values, a **Light** colour scheme, higher brightness, a longer timer, and a higher volume.
  </Accordion>
</AccordionGroup>

***

### Know when a device goes offline

Get an alert if a device drops off the network, after a crash, a reboot, or a Wi-Fi drop, so a dark screen doesn't go unnoticed.

<AccordionGroup>
  <Accordion title="Home Assistant">
    There's no dedicated offline sensor. Instead, an offline device's entities read `unavailable`, so trigger on any one of them changing to `unavailable`. The `for` delay avoids alerting on a brief blip.

    ```yaml theme={null}
    automation:
      - alias: "Alert when the kitchen tablet goes offline"
        trigger:
          - platform: state
            entity_id: sensor.kitchen_battery
            to: "unavailable"
            for:
              minutes: 1
        action:
          - action: notify.mobile_app_your_phone
            data:
              message: "The kitchen tablet has gone offline."
    ```
  </Accordion>

  <Accordion title="Homey">
    * **When**: **Kiosk Device went offline**. Set **Kiosk Device** to **Any device** so one flow watches them all, or pick a single tablet to watch just that one.
    * **Then**: a notification card, for example **Send a push notification**. Put the trigger's **Device name** tag in the message, like `[Device name] has gone offline`, so it names whichever tablet dropped.

    To be told when it recovers, add a matching flow with the **Kiosk Device came online** trigger.
  </Accordion>
</AccordionGroup>
