Fully Kiosk Browser

First of all, I know a lot of people have been using the Fully Kiosk Browser on Android for displaying HA, or Floorplan, which works great (I use it myself). But I haven’t come across a write up describing what else you can do with Fully, so I thought I’d share that here.

So, besides installing Fully on an Android device, setting the start URL to your HA URL, and putting it in kiosk mode, it also has a plethora of sensors, and even switches you can control from HA.

The Fully browser is also capable of reporting motion via the camera, or gyroscope. I experimented with this a bit, but had some erratic behavior. Your mileage may vary.

note, in order for the below to work, you’ll need a (Plus) license for Fully, which is a few bux at the time of this writing. You’ll also need to enable the “Remote Admin” in settings, which enables the device info, screen-switch (below), and REST interface.

For instance, here’s a list of some of the sensors that I monitor, and pull into HA:
batterylevel, kioskmode, screenbrightness, motiondetectorstate, maintenancemode, appfreememory, appusedmemory, totalfreememory, totalusedmemory, hostname4, ip4, mac, locationlatitude, locationlongitude, locationaltitude, starturl, currentpage.

I’ve also setup the ability to turn the screen on/off from HA. Which works great for not-home, or asleep automations.

The sensors are polled into HA via the REST API (documented on the website). What I’ve done is, create a single rest sensor, with the name of the device, and the value of “isScreenOn”. Then using the json_attributes list I’ve pulled in the rest of the values, and stored them as attributes to the original sensor. So at the end of the day, you’ve got a sensor named, ‘foo’ with a value of ‘on’ (or off depending on screen state), but this sensor has a large list of attributes, that you can use elsewhere. I’ll go more into this later.

Here’s what the REST sensor looks like (sensors.yaml):

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

The foo_rest is set to the following, in my secrets file:

http://[device-IP]:2323/?cmd=deviceInfo&type=json&password=[Fully Password]

Then I decided to break out the “Battery Level” from the sensor.foo attribute, which looks like this:

  - platform: template
    sensors:
      foo_battery_level:
        friendly_name: "foo_battery_level"
        unit_of_measurement: '%'
        value_template: "{{ states.sensor.foo.attributes.batteryLevel }}"

You could do this for any of the sensor values listed above, which could give each attribute it’s own sensor. Seems a little bloated if you ask me, but it’s possible!

So now I have 2 sensors in HA, one for the state of the screen, and another for the battery level. Which was great to detecting if the battery was getting low, or to verify if the screen was actually on (or not).

But I really wanted to be able to turn the screen on or off, from HA, and more importantly, from automations!
So I wasn’t able to find a way to cleanly do this through the REST API, though I haven’t dug too far into it either. What I did find, is the ability to send a specific HTTP POST/GET command, and control the screen state that way. In practice, it actually works great, every time! It’s a little “hacky”, but it works.

switches.yaml:

- platform: command_line
  switches:
    foo_screen:
      command_on: !secret foo_screen_on
      command_off: !secret foo_screen_off
      command_state: !secret foo_screen_state
      value_template: '{{ value == "on" }}'
      friendly_name: Foo Screen

Secrets.yaml:

foo_screen_on: "/usr/bin/curl -X POST 'http://[device-IP]:2323/?cmd=screenOn&type=json&password=[Fully Password]'"
foo_screen_off: "/usr/bin/curl -X POST 'http://[device-IP]:2323/?cmd=screenOff&type=json&password=[Fully Password]'"
foo_screen_state: '/usr/bin/curl --silent -X GET "http://[device-IP]:2323/?password=[Fully Password]" |grep "Screen status" |grep "on\|off" |sed "s/<[^>]*>//g" |sed "s/Screen status//g" |sed "s/Turn on//g" |sed "s/Turn off//g"'

When that’s in place, you’ll have a switch called switch.foo_screen which will allow you to control the state of the screen, through the UI, or automations!

Now, whenever you leave the house, you can turn the tablet screen off, as well as all your lights. I’ve been using this for a few months, and it works great!

Anyways, I’m sure there’s better ways of doing some of this, but the above works great for me! If you try to get it setup, and run into issues, let me know, I’ll do my best to answer them.

Todo: Swap out the “foo_screen_state” curl command for the REST attribute from above. Less-Hacky == Better.

EDIT: As illistrated below by @Hefford27 here’s an example of how to send TTS messages to Fully:

- platform: command_line        
  switches:
    dashdiningdisarmnotify:
      command_on: /usr/bin/curl -k "http://TabletIP:2323/?cmd=textToSpeech&text=The+House+Alarm+Has+Been+Disarmed&password=FullyOpenKisokPassword"
      friendly_name: Dining Room Dashboard Nofify Alarm Disarmed Open 

Happy Automating!

53 Likes

This is super helpful! Thanks for sharing.

I’m using an android tablet setup to turn on the screen when the camera detects movement, but this does not work in the dark. This way I can set up one of my xiaomi sensors to trigger the screen!

1 Like

Hi, good post I am doing similar things with Kisok browser and I have created a switch to wake the screen and built into my automation so when the sensor is triggered it turns on the screen.

thanks for this.
i have fully running also, i guess i need to try the plus licence. :wink:
what android version do you run?

This isvery interesting, thank you for sharing!!

I have a question:

I’m using the IP Cam app to stream the front cam to HASS, the problem is that if I activate the Motion sensors, as both this tool and the IP Cam try to use the front cam at the same time one of them doesn’t work.

If this tool streams the Cam I’'d definetly move completely to this and not use the other tool.

Does it stream the cam as well?

thanks!

Thank you for this write up. I have read elsewhere of fully kiosk being used as a media player. I struggled to set it and could not get it to work. Has anyone else succeeded?

Lovely, on the todo list

nope @Fezile, but interested too :slight_smile:

would that means that TTS messages can be sent ?

Correct.

See the following work done by Petar Kozul with Floorpan https://github.com/pkozul/ha-floorplan-kiosk

I also tried to get this working, it’s a great idea, in theory, but after following every guide and recommendation, I couldn’t make it work.

No, it cannot, at least not yet. Though it does support snapshots, which may work in a pinch.

It does take a little work to get setup, but once you do, it is well worth it. Floorplan-Kiosk is now our daily driver. We even have it running with iBeacon support so when my 8 yr old son, with no cell phone, gets home from school, the iBeacon in his backpack let’s the house know he is home and a TTS welcomes him home and let’s him know his chores for that particular day of the week.

1 Like

Thanks, I’ll give it another try!

The nice thing is, the Floorplan-Kiosk by @pkozul would work in tandem with the configuration I’ve outlined above. I’ve used the REST API, where his is using the Website Integration feature. Both are enabled with the Plus license.

1 Like

It’s definetly an amazing solution.

I’ve based my home configuration in tablets in all the rooms and for now I’m using other apps to provide video, tts, etc.

Should this merge all this things … would make my life far easier :slight_smile:

Thanks for sharing the media_player config … I’ll give it a try.

Good to hear that that you managed to get it working. it will be appreciated if you could advise us how to go about setting up the media player (TTS) on fully kiosk and getting it to work

Check Petar’s repo for the media player custom component. On mobile right now so difficult to go look for it.

I am running mine on 5.1, one some Chinese 8 inch tablets around the house.

Does a good job displaying HADashboard, and the Alarm Panel in the HA UI.

2 Likes

Hi You can send TTS messages to Fully Kisok via the rest API’s.

I send commands for some of the tablets to say when the back door has been left open for 5 mins, then the alarm is set to Home Mode and Disarmed.

I also use the rest commands to show the front door camera, then the doorbell rings in HADashboard on all the tablets so you can who is at the door from the rooms with the tablet in.

Also do a nightly restart of Fully Kisok via the rest interface from HA, its quite powerful

1 Like

Could you share an example of sending TTS messages to Fully Kisok via the rest API’s.

Hi here is one of my TTS to say when the Alarm is disarmed, I simply use automation to turn this switch on when the arm is disarmed.

- platform: command_line        
  switches:
    dashdiningdisarmnotify:
      command_on: /usr/bin/curl -k "http://TabletIP:2323/?cmd=textToSpeech&text=The+House+Alarm+Has+Been+Disarmed&password=FullyOpenKisokPassword"
      friendly_name: Dining Room Dashboard Nofify Alarm Disarmed Open
1 Like