Fully Kiosk Browser Custom Component

Problem solved… just in case anyone else encounters the light entity being unavailable: Once I updated FullyKiosk to v1.43.1-fire, the light entity became available and is able to turn on/off the screen and report its status.

Thanks for creating this component @cgarwood!

Thanks @cgarwood for this component. I just setup Fully Kiosk Browser on an Amazon Tablet HD 8 (10th gen) and it’s working great so far.

One question regarding the play_audio service - is there any way to play from a file path off the host machine (i.e. from the /media folder)?

I haven’t tried it myself, but it should be possible by passing a URL to play_sound like file:///sdcard/path/to/file.mp3

Based on this info from the Fully website:

You can use a file URL to address local files each time an URL is required in Fully. The full file URL looks like file:///sdcard/path/to/file.html Note the triple slash and that /sdcard usually refers to internal storage. You can use the file picker in URL dialog boxes to pick the file from storage. You can also select a file on external SD card. The path to external SD card will be saved in settings as /sd_ext and replaced by the real path on each device dynamically. Note that Fully Kiosk doesn’t support any write access to external SD card due to restrictions in Android OS.

Note the any links to local files or embedding local files from HTTP/HTTPS documents are disabled by Android Webview for some security reasons. But you can use the Localhost File Access option in Advanced Web Settings in order to access local files using https://localhost/… or http://localhost/… address. The full URL for a local file should look like https://localhost/sdcard/path/to/file.mp4. So you can for example embed the local video/image files in your HTTPS website.

1 Like

Appreciate the info. Can’t seem to get this to work. I have Home Assistant running in a docker container with my audio file (mp3) in /config/media within the container itself. Attempting to use the play_audio service with: file:///config/media/double-beep-beep.mp3 and nothing happens. If I put in an actual audio file of a web hosted mp3, it works, so I know it’s definitely an issue with the path I’m using.

Anyone else with HA in a docker container able to play an audio file hosted within the container itself (well, on the host machine but I just have the config folder mounted).

Edit: Thinking about this, I’m guess using file:/// is trying to play an audio file on the tablet itself which is probably the issue since I’m trying to play an audio file on my Home Assistant host machine.

Edit 2: Ah, figured out an easy way. Created a folder called www in /config and added the double-beep-beep.mp3 file to that www folder. From there, I can just access the mp3 using http://my-server-ip:8123/local/double-beep-beep.mp3.

ah yeah, thought you wanted to play from the tablet, not the HA instance. The /config/www and http://ha-server/local/sound.mp3 is the way to go :smile:

1 Like

Anyone else using this integration experiencing an issue where the connection to your tablet will repeatedly drop and reconnect? You can see the tablet entities in HA become unavailable for several seconds then come back as well as “Timeout fetching…” errors in the HA logs. I made a post about it here.

same here with the cache, now showing up , thanks :slight_smile:

this integration is a life saver, damn fire hd tablets are always getting messed up after a while with FKB, a simple automation of a daily restart of FKB fixed this perfectly , thank you!

Just adding my thanks here, integration works great.

Having the display brightness and control as a light entity is really handy.

Thank you. I am not able to get the reboot device to reboot the Fire hd8. Does the reboot device work for others on a FireHD 8?
The error I seem to be getting is

websocket_api script: Error executing script. Unexpected error for call_service at pos 1: ('Error', 'Missing device owner or root rights to reboot the device')

Reboot requires root access to the device. If you’re running FireOS on the tablets you would need to look and see if there is a root available for that (some devices were rootable but Amazon keeps them pretty locked down). I got lucky with my 8" Fire tablets and found a root that let me flash them with LineageOS which gives me root access and got rid of all the Amazon bloat.

Just installed - great integration - was wondering if there is an entity for motion on the tablet, to essentially use it as a motion sensor ?

No entity for motion detection currently, as we have to poll the Fully remote admin API (so motion events could get missed or be up to 30 seconds delayed). Fully can publish motion status to MQTT though, and you could use an MQTT sensor for that.

Release 1.0.0 :tada: just got published. Some refactoring to make it easier to maintain, and new number and button entities.

2 Likes

Nice work with this component.

Since updating I was seeing this error in the logs when opening the auto generated lovelace dashboard.

2022-01-04 10:53:00 ERROR (MainThread) [frontend.js.latest.202112290] https://homeassistant.url.com/frontend_latest/3ac4c648.js:1:351 Uncaught RangeError: Value need to be finite number for Intl.RelativeTimeFormat.prototype.format()

Long story short I tracked it down to this component, specifically the “Last App Start” sensor which was Showing “invalid timestamp” as below on my fire tablets.

disabling this entity has stopped the errors.

it seems that the 3 fire tablets I’m using are creating this key in 12 hour clock (even though the time is set to 24hour in settings) and the one that is not a fire tablet is outputting 24 hour.

fire tablet

non fire tablet

the US date format is causing issues too

let me know if you want me to help with any more investigation

2 Likes

Hi Charles,

I am trying to get this set up with the configuration below but I get unexpected error when I enter my IP and remote password (port 2323). I have copied the log below my config.I have tried 3 separate installations from HACs and got the same result. I can connect remotely through any remote device with the same IP and password via a url so connection is there. Any advice gratefully received.
Thanks,

Johnny

Configuration:
VM HASS
Home Assistant OS core-2022.7.0b2
Home Assistant OS 8.2
Fully Kiosk Browser 1.48
Fully Kiosk Browser integration for Home Assistant 1.1.0
Logs:

This error originated from a custom integration.

Logger: custom_components.fullykiosk.config_flow
Source: custom_components/fullykiosk/config_flow.py:49
Integration: Fully Kiosk Browser (documentation, issues)
First occurred: 19:13:48 (1 occurrences)
Last logged: 19:13:48

Unexpected exception
Traceback (most recent call last):
  File "/config/custom_components/fullykiosk/config_flow.py", line 50, in validate_input
    deviceInfo = await fully.getDeviceInfo()
  File "/usr/local/lib/python3.10/site-packages/fullykiosk/__init__.py", line 30, in getDeviceInfo
    result = await self.sendCommand("deviceInfo")
  File "/usr/local/lib/python3.10/site-packages/fullykiosk/__init__.py", line 22, in sendCommand
    data = await self._rh.get(
  File "/usr/local/lib/python3.10/site-packages/fullykiosk/__init__.py", line 139, in get
    async with self.session.get(
  File "/usr/local/lib/python3.10/site-packages/aiohttp/client.py", line 1138, in __aenter__
    self._resp = await self._coro
  File "/usr/local/lib/python3.10/site-packages/aiohttp/client.py", line 535, in _request
    conn = await self._connector.connect(
  File "/usr/local/lib/python3.10/site-packages/aiohttp/connector.py", line 542, in connect
    proto = await self._create_connection(req, traces, timeout)
  File "/usr/local/lib/python3.10/site-packages/aiohttp/connector.py", line 907, in _create_connection
    _, proto = await self._create_direct_connection(req, traces, timeout)
  File "/usr/local/lib/python3.10/site-packages/aiohttp/connector.py", line 1175, in _create_direct_connection
    transp, proto = await self._wrap_create_connection(
  File "/usr/local/lib/python3.10/site-packages/aiohttp/connector.py", line 986, in _wrap_create_connection
    return await self._loop.create_connection(*args, **kwargs)  # type: ignore[return-value]  # noqa
  File "/usr/local/lib/python3.10/asyncio/base_events.py", line 1049, in create_connection
    sock = await self._connect_sock(
  File "/usr/local/lib/python3.10/asyncio/base_events.py", line 960, in _connect_sock
    await self.sock_connect(sock, address)
  File "/usr/local/lib/python3.10/asyncio/selector_events.py", line 500, in sock_connect
    return await fut
asyncio.exceptions.CancelledError

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/config/custom_components/fullykiosk/config_flow.py", line 80, in async_step_user
    info = await validate_input(self.hass, user_input)
  File "/config/custom_components/fullykiosk/config_flow.py", line 49, in validate_input
    with timeout(15):
  File "/usr/local/lib/python3.10/site-packages/async_timeout/__init__.py", line 116, in __exit__
    self._do_exit(exc_type)
  File "/usr/local/lib/python3.10/site-packages/async_timeout/__init__.py", line 212, in _do_exit
    raise asyncio.TimeoutError
asyncio.exceptions.TimeoutError

What a great integration! Thank you!

I know this might sound trivial, but I have Fully Kiosk configured to turn off the screen after 30 seconds. However, when the doorbell rings I would like to override or loop some sort of “keep awake” command to keep the screen on for 2 minutes. I can’t find a way to do it with the integration? Is it possible? Am I missing something?

I take a different approach; Home Assistant tells fullykiosk when the screen should turn off based on a single automation that is triggered by a motion sensor in the area turning off, or if the screen has been on for a certain amount of time.

Meanwhile I have a number of triggers to turn the screen on, such as motion in the hallway, alarm state change, the heating system kicking in, etc

- alias: 'Dim Panel'
  id: dim_panel
  trigger:
  - platform: state
    entity_id: binary_sensor.downstairs_hallway_motion_sensor
    to: 'off'
    for:
      minutes: 2
  - platform: state
    entity_id: binary_sensor.downstairs_hallway_motion_sensor
    to: 'off'
    for:
      minutes: 10
  - platform: state     
    entity_id: light.hallway_panel
    to: 'on'
    for:
      minutes: 15
  action:
  - entity_id: light.hallway_panel
    service: homeassistant.turn_off
  condition:                           
    condition: state
    entity_id: light.hallway_panel
    state: 'on'

You could still have a setting in fully kiosk to turn off the screen after say 1 hour, just in case the home assistant automations fail.

@cgarwood, does this integration support talking to Fully remote admin over HTTPS? Provided that HTTPS has been enabled on Fully, obviously.

Hi All,

Im getting this error since the 2022.11 updates:

This error originated from a custom integration.

Logger: custom_components.fullykiosk.coordinator
Source: helpers/update_coordinator.py:182
Integration: Fully Kiosk Browser (documentation, issues)
First occurred: 08:53:51 (81 occurrences)
Last logged: 10:41:05

Error fetching 192.168.100.135 deviceInfo data: Cannot connect to host 192.168.100.135:2323 ssl:default [Connect call failed ('192.168.100.135', 2323)]

I dont really understand the error regarding the “ssl:default” part. Is there a config that Im missing maybe?

Thanx for any advice.

1 Like