Fully Kiosk MQTT Sensor Automation

Blurb for Blueprint Page

:satellite: Fully Kiosk REST API + MQTT Automation

Easily integrate and automate multiple Fully Kiosk Browser devices using REST API for screen control and MQTT for real-time sensor updates. This blueprint supports automatic device discovery and allows for custom brightness control, motion-based screensaver activation, and dynamic UI adjustments based on ambient conditions.

:pushpin: Features

:white_check_mark: Automatic Device Discovery – Finds and lists FK devices via MQTT.

:white_check_mark: Adaptive Brightness – Adjusts screen brightness based on light levels.

:white_check_mark: Motion-Activated Screensaver – Turns on when no motion is detected.

:white_check_mark: Multi-Device Support – Works with multiple FK tablets seamlessly.

:white_check_mark: No YAML Editing Required – Uses RESTful Commands via the Home Assistant UI.

Open your Home Assistant instance and show the blueprint import dialog with a specific blueprint pre-filled.

:wrench: Prerequisites

Before using this blueprint, make sure to:

:one: Enable MQTT in Fully Kiosk Browser

β€’ Set MQTT Device Info Topic β†’ fully/deviceInfo/$deviceId

β€’ Set MQTT Event Topic β†’ fully/event/$event/$deviceId

:two: Add the RESTful Command Integration in Home Assistant

β€’ Update configuration.yaml to add the following**

β€’ Search for RESTful Command and add the following commands:

rest_command:
  fk_set_brightness:
    url: "{{ fk_url }}/?cmd=setStringSetting&key=screenBrightness&value={{ brightness }}&password={{ fk_password }}"
    method: GET

  fk_screensaver_on:
    url: "{{ fk_url }}/?cmd=screensaverOn&password={{ fk_password }}"
    method: GET

:three: Ensure Your FK Devices Are Reachable via Local Network

β€’ Verify each tablet’s IP address and port (default: 2323) in FK settings.
I wanted to be able to set up automations in HA using sensors from Fully Kiosk that weren’t exposed through the Fully Kiosk Browser native integration - so I attempted to create this blueprint to make it easier to work with several FK devices that I have around the house.

blueprint:
  name: "Fully Kiosk REST API + MQTT Automation"
  description: "Automatically integrate multiple Fully Kiosk Browser devices using REST API for screen control and MQTT for real-time sensor updates. Supports automatic device discovery."
  domain: automation
  input:
    fk_devices:
      name: "Fully Kiosk Devices"
      description: "Automatically discovered FK devices will be listed here. Select the devices you want to configure."
      selector:
        object:
          options: "{{ states('input_text.fk_discovered_devices').split(',') if states('input_text.fk_discovered_devices') else [] }}"
    device_info_topic:
      name: "MQTT Device Info Topic"
      description: "Define the topic where Fully Kiosk sends device info (default: fully/deviceInfo/#)."
      default: "fully/deviceInfo/#"
      selector:
        text:
    event_topic:
      name: "MQTT Event Topic"
      description: "Define the topic where Fully Kiosk sends event data (default: fully/event/#)."
      default: "fully/event/#"
      selector:
        text:
    brightness_dark:
      name: "Brightness - Dark Room"
      description: "Set screen brightness when the room is dark."
      default: 2
      selector:
        number:
          min: 1
          max: 100
          step: 1
    brightness_dim:
      name: "Brightness - Dim Room"
      description: "Set screen brightness when the room is dimly lit."
      default: 20
      selector:
        number:
          min: 1
          max: 100
          step: 1
    brightness_normal:
      name: "Brightness - Normal Room"
      description: "Set screen brightness when the room has normal light."
      default: 50
      selector:
        number:
          min: 1
          max: 100
          step: 1
    brightness_bright:
      name: "Brightness - Bright Room"
      description: "Set screen brightness when the room is well-lit."
      default: 80
      selector:
        number:
          min: 1
          max: 100
          step: 1
    brightness_very_bright:
      name: "Brightness - Very Bright Room"
      description: "Set screen brightness when the room is extremely bright."
      default: 100
      selector:
        number:
          min: 1
          max: 100
          step: 1
    motion_timeout:
      name: "Motion Timeout Before Screensaver"
      description: "Time (in minutes) after motion stops before screensaver activates for the specific device."
      default: 2
      selector:
        number:
          min: 1
          max: 10
          step: 1

description: |
  ## Setup Instructions
  1. **Set Up RESTful Command Integration** (Required to send commands to Fully Kiosk)
     - Go to **Settings β†’ Devices & Services**
     - Click **+ Add Integration** β†’ Search for **RESTful Command**
     - Add the following commands:
       ```yaml
       fk_set_brightness:
         url: "{{ fk_url }}/?cmd=setStringSetting&key=screenBrightness&value={{ brightness }}&password={{ fk_device_password }}"
         method: GET
       fk_screensaver_on:
         url: "{{ fk_url }}/?cmd=screensaverOn&password={{ fk_device_password }}"
         method: GET
       ```
  2. **Click the 'Discover Fully Kiosk Devices' button in HA UI**
  3. **Wait for 60 seconds while Home Assistant listens for MQTT messages on the user-defined topics.**
  4. **Detected FK devices will appear in the dropdown list.**
  5. **Select the FK devices you want to configure.**
  6. **Restart Home Assistant & Verify MQTT Messages in Developer Tools β†’ MQTT β†’ Use the custom-defined topics.**

trigger:
  - platform: mqtt
    topic: "{{ input.device_info_topic }}"
  - platform: mqtt
    topic: "{{ input.event_topic }}"

action:
  - service: system_log.write
    data:
      message: "Received MQTT message: {{ trigger.topic }} - {{ trigger.payload }}"
      level: debug

  - variables:
      device_id: "{{ trigger.topic.split('/')[-1] }}"
      event_type: "{{ trigger.topic.split('/')[-2] if 'event' in trigger.topic else '' }}"
  - repeat:
      for_each: "{{ input.fk_devices.items() }}"
      sequence:
        - variables:
            fk_device_url: "{{ repeat.item[1].url }}"
            fk_device_password: "{{ repeat.item[1].password }}"
            fk_device_id: "{{ repeat.item[1].device_id }}"
        - condition: template
          value_template: "{{ device_id == fk_device_id }}"
        - service: system_log.write
          data:
            message: "Processing FK device {{ fk_device_id }} for event {{ event_type }}"
            level: debug
        - choose:
            - conditions:
                - condition: template
                  value_template: "{{ event_type == 'onDarkness' or trigger.payload_json.screenBrightness | int < 10 }}"
              sequence:
              - service: rest_command.fk_set_brightness
                data:
                  fk_url: "{{ fk_device_url }}"
                  fk_password: "{{ fk_device_password }}"
                  brightness: "{{ brightness }}"
            - conditions:
                - condition: template
                  value_template: "{{ event_type == 'onMotion' }}"
              sequence:
                - service: system_log.write
                  data:
                    message: "Motion detected on {{ fk_device_id }} - Resetting timeout."
                    level: debug
        - delay: "00:{{ input.motion_timeout }}:00"
        - condition: template
          value_template: "{{ event_type != 'onMotion' }}"
          - service: rest_command.fk_screensaver_on
            data:
              fk_url: "{{ fk_device_url }}"
              fk_password: "{{ fk_device_password }}"

input_button:
  fk_discover_devices:
    name: "Discover Fully Kiosk Devices"
    icon: "mdi:tablet"

input_text:
  fk_discovered_devices:
    name: "Discovered FK Devices"
    initial: ""

automation:
  - alias: "Fully Kiosk Device Discovery"
    trigger:
      - platform: mqtt
        topic: "fully/deviceInfo/#"
    action:
      - service: system_log.write
        data:
          message: "Discovered FK device: {{ trigger.payload_json.deviceId }} at {{ trigger.payload_json.ip4 }}"
          level: debug
      - service: input_text.set_value
        data:
          entity_id: input_text.fk_discovered_devices
          value: "{{ states('input_text.fk_discovered_devices') + ',' + trigger.payload_json.deviceId if states('input_text.fk_discovered_devices') else trigger.payload_json.deviceId }}"

1 Like

Hello ecohash,

Thanks for contributing to the community with a new Blueprint.

I have a suggestion for you. Many people who are not familiar with directory structures will have problems installing this without the Home Assistant MY tools.
Adding a MY link for this Blueprint to your top post would help them a lot.

Here is the link to make that.
Create a link – My Home Assistant

Hi, I tried adding this using the import blueprint, however I ended up getting this error, do you know why?

Getting that same error importing.

Had the same problem, looks like an indenting issue at line 148.
I resolved that and tried to create the Blueprint and import locally - got a different error.
I’m also confused if the passwords need to be stored in a secret file or something.