Fully Kiosk Browser now supports MQTT

I am using these and you can probably figure out how to write templates for any others you want by using these. I took these from https://github.com/matt8707/hass-config

sensor:
  - platform: mqtt
    state_topic: "fully/event/onMotion/5dxxxxxx-xxxxxxxx"
    name: fully_shield
    json_attributes_topic: fully/deviceInfo/5dxxxxxx-xxxxxxxx

  - platform: template
    sensors:
    ####################################################
    #                                                  #
    #                      TABLET                      #
    #                                                  #
    ####################################################

      fully_shield_plugged:
        friendly_name: Power cord connected
        value_template: >-
          {% if is_state_attr('sensor.fully_shield', 'isPlugged', true) %} Yes {% else %} No {% endif %}
        icon_template: >-
          {% if is_state_attr('sensor.fully_shield', 'isPlugged', true) %} mdi:power-plug {% else %} mdi:power-plug-off {% endif %}
      fully_shield_storage_percentage:
        friendly_name: Storage
        icon_template: mdi:sd
        unit_of_measurement: '%'
        value_template: >
          {% if is_state('sensor.fully_shield', 'unavailable') %}
          {% else %}
          {{ 100 - ( state_attr('sensor.fully_shield', 'internalStorageFreeSpace') / 
          state_attr('sensor.fully_shield', 'internalStorageTotalSpace') * 100 ) | int }}
          {% endif %}
      fully_shield_memory_percentage:
        friendly_name: Memory
        icon_template: mdi:memory
        unit_of_measurement: '%'
        value_template: >
          {% if is_state('sensor.fully_shield', 'unavailable') %}
          {% else %}
          {{ 100 - ( state_attr('sensor.fully_shield', 'ramFreeMemory') / 
          state_attr('sensor.fully_shield', 'ramTotalMemory') * 100 ) | int }}
          {% endif %}
      fully_shield_motion_detector_state:
        friendly_name: Camera
        icon_template: mdi:camera
        value_template: >-
          {% if is_state_attr('sensor.fully_shield', 'motionDetectorState', 0) %}
          Off
          {% else %}
          On
          {% endif %}
      fully_shield_battery_level:
        friendly_name: Battery
        unit_of_measurement: '%'
        value_template: "{{ state_attr('sensor.fully_shield', 'batteryLevel') }}"
        icon_template: >-
          {% set battery_level = state_attr('sensor.fully_shield', 'batteryLevel')|int('unknown') %}
          {% set battery_round = (battery_level|int / 10)|int * 10 %}
          {% if battery_level == 'unknown' %}
            mdi:battery-unknown
          {% else %}
            {% if battery_round >= 100 %}
              mdi:battery
            {% elif battery_round > 0 %}
              mdi:battery-{{ battery_round }}
            {% else %}
              mdi:battery-alert
            {% endif %}
          {% endif %}
2 Likes

Thanks for the help - this worked well for me! Have to put in a feedback request on Fully to support auto discovery though, especially as often as I see their app mentioned in HA related forums.

2 Likes

Hm, strange.
I did copy/paste of your config and changed MyDeviceId only and none of sensors work.
FullyKioskBrowser device is apparently connected to mqtt broker. :frowning:

You say FKB is “apparently” connected to your broker. How did you check this and is FKB posting messages to the broker with the topics you are using for your sensors?

@atomicpapa Just a note on your config above, I am new to MQTT so may be misunderstanding, but it seemed odd to me that your config was watching the onMotion message and then using that to report battery updates. I thought it may cause the battery level to not report changes unless there is motion detected. I am trying out the below instead and it seems to work regardless of motion:

- platform: mqtt
    state_topic: "fully/event/onBatteryLevelChanged/my-device-id"
    name: fully_battery_onchanged
    device_class: battery
    value_template: "{{ value_json.level }}"

That will work as well. I was just throwing out an example.

Good point :slight_smile:
MQTT.fx shows that there are used two device id’s from the FKB

fully/event/onMotion/paho81365942568xxx
fully/deviceInfo/b008ac41-7726yxxx

First one is automatically created by the FKB, second one ???

Nonetheless I’ve changed it accordingly and now it works. Thank you :+1:

Glad to help!

Here is one sensor able to read all events published by FKB :wink:

Can HA trigger things such as turn on screen via mqtt in fully?

FullyKiosk has not such a functionality

Not via MQTT but you can turn the screen on with the REST interface

I just setup the FKB and configured MQTT settings. Through MQTT Explorer, I can only see the topic “fully/deviecInfo/{deviceID}” published.

Could I be missing some configuration as I do not see the topic “fully/event/onBatteryLevelChanged/{deviceID}” ?

Also, what does it take to enable auto-discovery on FKB incase I want to add more tablet dashboards in the future ?

Did you get an answer to this? I see a lot of posts about MQTT not connecting and throwing an error, but I’ve fixed that. It comes up in MQTT Explorer just fine. But no Devices or Entities show up in Home Assistant.

Fully Kiosk doesn’t implement HA’s autodiscovery so you have to configure it in HA yourself.

I use the following to make a simple battery sensor and put the full device info in the sensor’s attributes. Just replace <mqtt_topic> with the topic you configured in Fully Kiosk Browser.

sensor:
  - platform: mqtt
    name: tablet_battery
    state_topic: "<mqtt_topic>/device_info"
    unit_of_measurement: "%"
    value_template: "{{ value_json.batteryLevel | int }}"
    json_attributes_topic: "<mqtt_topic>/device_info"
    device_class: battery

Another option is to use the HACS integration instead of MQTT, it is quite powerful.

:open_mouth: Thank you!

1 Like

Trying to work out if it is possible to create a binary sensor which is true when fully detects motion. I looked here but the MQTT integration has changed so the YAML here no longer works: Fully Kiosk Browser ScreenOn ScreenOff binary sensor

As I am using motion detection on the tablet to set the screen brightness I thought maybe I could indirectly use that to work out when motion is detected. So I tried this which pulls all the JSON into the sensor attributes but the state stays as UNKNOWN. Can anyone help with showing how I can have a sensor which goes true for a short period if motion is detected?

    - name: tablet_motion_detected
      state_topic: "fully/event/onMotion/3571d082-16ee5c32"
      payload_available: visual
      force_update: true
      json_attributes_topic: "fully/deviceInfo/3571d082-16ee5c32"
      value_template: "{% if value_json.screenBrightness > 100 %}
                         true
                       {% else %}
                         false
                       {% endif %}"

If you adopt this to the new format it should work

Thank you thank you this saved me today. Working on a kiosk for my BnB and was trying to get the battery switch thing working so I can tell the tablet when to charge.

Anyone know how to do this today, unfortunately the method proposed in your link @kajmaj seems deprecated in December 2022 with a link to THIS as the new way, however I am almost out of hair trying to figure out how to get events to work, the device info works fine but events are not.

I’ve tried with the $event and without (below) but nothing seems to show up on the fully_wall_tab_events entity that gets created.

In my configuration.yaml

#MQTT#
mqtt:
    sensor:
      - state_topic: fullykios/walltab/devinfo
        name: fully_wall_tab
        json_attributes_topic: fullykios/walltab/devinfo
      - state_topic: fullykios/walltab/event
        name: fully_wall_tab_events
        json_attributes_topic: fullykios/walltab/event

Fully Settings
image