Fully Kiosk Browser

motiondetector state is not the motion.
that state shows if the motion detector is switched on or off.

to get motion from the tablet you indeed need mqtt. (but dont expect much from it. i dont use them because on all tablets i got they are very unreliable, they detect changes in lightlevel (sun changes, lights going on or off) as motion no matter what you do)

Ok, I’ve now installed hass.io with MQTT / Mosquitto. The logs show that HA is connecting to the MQTT broker but the tablet is failing to.

New connection from 192.168.1.195 on port 1883.
Socket error on client , disconnecting.

I have no idea what user id and password MQTT is expecting, but it’s not getting it. I thought I may need to make the tablet a ‘trusted user’, as per this guide:

I would use

  trusted_users:
    192.168.1.233: [device id].

However the guide says you can get the device id of the tablet from:

CONFIGURATION > USERS > (Select a user) and the id will be on the panel that pops up.

I only have 2 users, myself and Hass.io, and using neither of those ids works. Would anyone know how to authenticate my tablet with the MQTT broker?

OK, I figured this out. Had to change the MQTT configuration to:

logins:

  • username: xxx
    password: yyy
    anonymous: true

And now I have motion detection!!! Would have preferred to not require a username and login but at least I finally got there.

its the username and password you did setup for your mqtt server.
so if you want it without user, you need to delete the user in mosquito.

1 Like

i got mine set up but i dont get any attribute for motion detection. im using the firetablet and it is enabled in fully kiosk on the tablet. any ideas why?

  - platform: rest
    name: tablet
    json_attributes:
      - batteryLevel
      - kioskMode
      - screenBrightness
      - maintenanceMode
      - appFreeMemory
      - appUsedMemory
      - totalFreeMemory
      - totalUsedMemory
      - hostname4
      - ip4
      - motionDetectorState
      - mac
      - locationLatitude
      - locationLongitude
      - locationAltitude
      - startUrl
      - currentPage
    resource: http://192.168.1.191:2323/?cmd=deviceInfo&type=json&password=taitum
    value_template: '{{ value_json.isScreenOn }}'
1 Like

Hast someone managed to use a physical barcode scanner in fully kiosk and then passing the data to barcode buddy without leaving the app?

Hi
Have those sensors changed?
Here’s my config

sensor:
- platform: rest
  name: Tablet Living
  json_attributes:
    - isScreenOn
    - batteryLevel
    - kioskMode
    - screenBrightness
    - motionDetectorState
    - maintenanceMode
    - appFreeMemory
    - appUsedMemory
    - totalFreeMemory
    - totalUsedMemory
    - hostname4
    - ip4
    - mac
    - locationLatitude
    - locationLongitude
    - locationAltitude
    - startUrl
    - currentPage
  resource: !secret tablet_info
  value_template: '{{ value_json.isScreenOn }}'
  scan_interval: 10

- platform: rest
  name: Tablet Living Settings
  json_attributes:
    - timeToScreenOffV2
    - screenBrightness
    - motionSensitivity
    - motionDection
    - motionDetectionAcoustic
    - motionSensitivityAcoustic
    - screenOffInDarkness
    - darknessLevel
  resource: !secret tablet_settings
  value_template: '{{ value_json.motionSensitivity }}'
  scan_interval: 10

I’m getting following errors:

  • Template variable warning: ‘dict object’ has no attribute ‘isScreenOn’ when rendering ‘{{ value_json.isScreenOn }}’
  • Template variable warning: ‘dict object’ has no attribute ‘on’ when rendering ‘{{ value_json.on }}’
1 Like

I’m running Fully Kiosk 1.43.4-fire, and that setting is called screenOn in this version.

Hi thx mate, will change it and see it fixes it.
Do you have a complete list of the current settings?

You can just look at the JSON response of the URL you have configured here resource: !secret tablet_info. It’s a simple list of key-value-pairs, and the keys are what you can configure as json_attributes.

Thanks for the help here.
I’m trying to use a Home Assistant, Lovelace, Graph card and it does not seem to work.

type: gauge
entity: sensor.kiosk_kitchen_battery_level
min: 0
max: 100
severity:
  green: 50
  yellow: 25
  red: 10
name: Kitchen Kiosk

It does not work in an Entities card:

type: entities
entities:
  - entity: sensor.kiosk_kitchen_battery_level
    name: Kitchen Kiosk
  - entity: sensor.kiosk_loft_battery_level
    name: Loft Kiosk
state_color: true

It works in a Markdown card:

Kitchen {{ states.sensor.kiosk_kitchen.attributes.batteryLevel }}%

See image:


Here's waht's in my configuation.yaml:

# Fully Kiosk on Fire HD (Kitchen Kiosk)
# Source - https://www.youtube.com/watch?v=6ccK24zAPJI
# Source - https://community.home-assistant.io/t/fully-kiosk-browser/41675
  - platform: rest
    name: Kiosk Kitchen
    json_attributes:
      - batteryLevel
      - kioskMode
      - screenBrightness
      - motionDetectorState
      - maintenanceMode
      - appFreeMemory
      - appUsedMemory
      - totalFreeMemory
      - totalUsedMemory
      - hostname4
      - ip4
      - mac
      - locationLatitude
      - locationLongitude
      - locationAltitude
      - startUrl
      - currentPage
    resource: "http://10.0.0.216:2323/?cmd=deviceInfo&type=json&password=?!%£$"
    value_template: '{{ value_json.isScreenOn }}'
    
  - platform: template
    sensors:
      kiosk_kitchen_battery_level:
        friendly_name: "Kiosk Kitchen Battery level"
        unit_of_measurement: '%'
        value_template: "{{ states.sensor.kiosk_kitchen_battery_level.attributes.batteryLevel }}"
    

I’m quite new to this but I have achieved quite a lot.

What am I not getting correct ?

Thanks in anticipation.

your template sensor is wrong.

value_template: “{{ states.sensor.kiosk_kitchen_battery_level.attributes.batteryLevel }}”

here you try to get the attribute from the sensor you try to create.
that should probably be something like:

value_template: “{{ states.sensor.kiosk_kitchen.attributes.batteryLevel }}”

Thank you so much ReneTode.
Veel dank!

Hi

Great stuff here. I want to be able to turn the motion detector on and off with a switch. Looks like I’ve missed something in the code. Specifically, I have not defined the state correctly.

kiosk1sensor_motionDetectorState_on: "/usr/bin/curl -X POST 'http://192.******:2323/?cmd=screenOn&type=json&password=******]'"
kiosk1sensor_motionDetectorState_off: "/usr/bin/curl -X POST 'http://192.*****:2323/?cmd=screenOff&type=json&password=[******]'"
kiosk1sensor_motionDetectorState: '/usr/bin/curl --silent -X GET "******:2323/?password=[******]" |grep "motion detector" |grep "on\|off" |sed "s/<[^>]*>//g" |sed "s/motion detector//g" |sed "s/Turn on//g" |sed "s/Turn off//g"'


Error from HA

Error loading /config/configuration.yaml: Secret kiosk1sensor_motionDetectorState_state not defined

you use screenOn, and screenOff.
thats never going to turn motiondetection on and off.

and you use: kiosk1sensor_motionDetectorState
and HA tells you you should use: kiosk1sensor_motionDetectorState_state

I have two fire 7 (2019, mustang) tablets, rooted and on LineageOS running lovelace in FKB with no dramas…

Then I bought a new fire 7 last week and turns out this newer version is no longer root-able, so I used Fire Toolbox to drop the amazon launcher and have installed FKB… all good so far… BUT switching views is so so so slow.

I tried changing webview but as this tablet isn’t rooted it seems I cannot replace the amazon webview. I saw @poudenes you (a while ago) had a good response when disabling logger… I don’t actually have that component loaded so unfortunately that wont work for me…

Does anyone have other ideas?

I made the same mistake and ordered before checking the actual FireOS… :frowning: Unfortunately, I can’t say that I had any luck in getting further. I ended up sending the tablet back and tried other ways.

In my experience, FireOS has grown, and therefor the CPU and RAM are to small to run power hungry things like Lovelace. What you can do, try another frontend than Lovelace. There are a few dashboards around, but I can’t say if one of them is less hungry…

To be honest, I’d send it back and work with something else. In my case I ordered an rPi3 and a nice touch display from waveshare. In terms of cost, it was cheaper in the end, and I already wanted it to fit in the wardrobe. :slight_smile:

HAdashboard isnt powerhungry and works on everything.

Can fully kiosk browser manage device charging? Now I am managing device battery level using smart plug + automaatio but I have maybe needs to get rid of that. I rather would not want to device to be plugged in to power 24/7/365.

I have some success using this app on android.
Battery Charge Limit | F-Droid - Free and Open Source Android App Repository

Root required, and not all phones are equal when it comes to battery charge handling. But worth a try.

Googled around and also came across this thread.
battery - How to limit charging to a user defined limit? - Android Enthusiasts Stack Exchange