Lovelace-fullykiosk

A lovelace plugin to use the features of Fully Kiosk Browser.

This enables home-assistant to monitor and controll the screen of an android device currently viewing your lovelace UI - for example a tablet used as a home automation dashboard. It also lets you add a sensor for motion in front of the devices camera, as well as battery and charging status.

Inspired by Floorplan Kiosk.

Edit: To answer a common question
Yes. This can also be done via the Fully Kiosk Browser REST API. But this method is faster because the data is pushed from the device, rather than polled by home-assistant. Especially with the motion detection.

19 Likes

Nice job! Works really good on my old Nexus 7 tablet :grinning:

I added some debug info to the github repo. If you’ve had trouble setting this up, read the “If things don’t work” section.

very cool, how to manage more than one tablet ?

To add another device, you

  • Add another light
  • Add another binary sensor
  • Add another line to kiosk-config.js

Breaking change!!

I’ve just uploaded a breaking change that fixes the plugin not working in recent versions of Fully Kiosk Browser.

To use the new version, you need to change all references to FullyKiosk to LovelaceFullyKiosk, e.g. in your kiosk-config.js.

I.e. a typical kiosk-config.js now looks like:

setTimeout(function() {
  LovelaceFullyKiosk.bind("fully_kiosk_id", "light.dashboard_screen", "binary_sensor.dashboard_motion");
}, 200);
1 Like

How?

light:
  - platform: template
    lights:
      dashboard_screen_1:
        turn_on:
        turn_off:
        set_level:
  - platform: template
    lights:
      dashboard_screen_2:
        turn_on:
        turn_off:
        set_level:

binary_sensor:
  - platform: mqtt
    name: dashboard_motion_1
    state_topic: any/value
  - platform: mqtt
    name: dashboard_motion_2
    state_topic: any/value

like this?

setTimeout(function() {
  LovelaceFullyKiosk.bind("fully_kiosk_id1", "light.dashboard_screen1", "binary_sensor.dashboard_motion1");
}, 200);
setTimeout(function() {
  LovelaceFullyKiosk.bind("fully_kiosk_id2", "light.dashboard_screen2", "binary_sensor.dashboard_motion2");
}, 200);

Yep

Or you could place the two LovelaceFullyKiosk.bind-lines inside the same setTimeout(

setTimeout(function() {
  LovelaceFullyKiosk.bind("fully_kiosk_id1", "light.dashboard_screen1", "binary_sensor.dashboard_motion1");
  LovelaceFullyKiosk.bind("fully_kiosk_id2", "light.dashboard_screen2", "binary_sensor.dashboard_motion2");
}, 200);

Really great plugin! Thank you!
I have 2 devices and I have them set up correctly and they are working fine.

I have 2 requests:
Can you make it so the icon is changeable from homeassistant? By changing the device class to “motion” it doesnt allow to change the icon.

Another request is to have the battery and the charging info, as separate sensors. That would be really convenient to make some automations work, or to have them in the UI as badges.

You can extract the battery and charging info into a template sensor.

I’ll look at fixing the icon problem. It’s bothered me too. Feel free to add an issue on github to remind me.

1 Like

It works beautifully!

One more question. I am trying to add …
edit: Nevermind. I didnt do it right. I got it now. Thank you!

Well… that was simple…
Now the motion sensor has the right device class.

It looks like I doesnt work for me. I re-downloaded (also copy-pasted the raw) your new file and even changed the version by adding ?2 at the end of the ui-lovelace. Also cleared my cache. I also tried to change the device classh from HA customize menu. Nothing…

Strange…
What does your sensor look like in the states list? Specifically, what are the attributes?
Does anything change when motion is detected?

And - just to be sure - you did reload the page in Fully Kiosk, right? Not in your computers browser?

WOW! Thats it! I was supposed to reload the fully browser for this to work? That was it! I dont get it, but that was it!

The script runs in Fully Kiosk Browser on the device itself. That’s why it’s faster than using the REST interface, and that’s why it only works if Fully Kiosk is open…

1 Like

How can I change the friendly name? I change it in customize and it changes for a few seconds and then returns.
image

I think I have fixed that in a new update. Please download the new one, reload the page in Fully Kiosk and try again.

Yes that worked. Thank you