Is it possible to simply switch a tab using Fully Kiosk Browser/App?

Does anyone know if it’s possible to either:

  1. Switch a tab using FK App using the Home Assistant Android app (preferred) or
  2. Switch a tab without completly reloading the browser using Fully Kiosk Browser.

I have the dashboard below with three tabs. The 2nd tab has a giant thermometer on it and the 3rd just one camera; my front door. I want to use Fully Kiosk to switch tabs using automations but on trying it with Chrome, the whole browser reloads when a URL is called which is undesirable as it significantly increases the tab loading time.

I went with Fully Kiosk as I need a way to either reload the HA Android app or the Browser when HA restarts as at the moment, Lovelace does not reload my tablet camera images when it restarts. This can be fixed by setting all six camera images to live but then none of the sensors below it load (documented here).

Because I restart 5 times a day due to testing/config mods, I’m getting over shutting down the HA app and relaunching it every time I perform a restart. Fully Kiosk will take care of this for me using an automation if I can get the tabs to switch quickly.

Anyone know if that is possible?

Anyone tried this?

Fully Kiosk IS a browser. A good one, with an API, but it is a browser. So when you say

It is a bit out of scope for Fully. You can use tasker for this kind of situation, or macrodroid.
However, what you can do is reload Fully itself when HA restarts. That is possible.

GV

Sorry, I was referring to Fully Kiosk App.

OK missed that. Instead of using Fully Kiosk APP + Browser why not using Fully Kiosk Browser directly. With this, you can do exactly what you describe. I don’t use HA App, so I don’t know if through api call or something you can switch tab…
GV

Thanks. I tried FKB too but when I called a secondary URL (TAB), it refreshed the whole page taking way longer than just switching tabs and same when I reloaded the main URL. I also would need a way to kill FKB and restart it (to force reload my camera images) but I’m assuming you can do that with an API call?

With FKB (the full browser) version, you can using the bowser_mod custom component navigate to a tab which is fast.
With an API call reload the entire page (so the all HA lovelace) which is slow.
For this, just call:
http://IP_Android:2323/?cmd=setStringSetting&key=loadURL&value=http://IP_HA:8123&password=whatever

This will force a full reload using FKB API.

GV

Thanks. I’ll give those a try.

Hi,
Did you ever get this to work?
I can’t seem to find any documentation that shows how to change ‘view’. If I use the loadURL then the whole interface reloads which is slow.
And if I load a new ‘tab’, and then select that tab its fast but then the user can change the content of the tab which means it won’t work again.

Yes, this works for me. I used a combination of Fully Kiosk Browser and Browser Mod that together are freak’n powerful!

script:
  browser_mod_switch_to_thermometer:
    alias: 'Switch Kitchen Tablet to thermometer TAB'
    sequence:      
      - service: browser_mod.navigate
        data:
          navigation_path: /lovelace-tablets/thermometer
          deviceID:
            - samsung10_fkb_tabletui

  browser_mod_switch_to_tablets_main:            
    alias: 'Switch Kitchen Tablet to Tablets TAB'
    sequence:          
    - service: browser_mod.navigate
      data:
        navigation_path: /lovelace-tablets/tablets
        deviceID:
          - samsung10_fkb_tabletui

Browser mod also exposes a sensor, sensor.samsung10_fkb_tabletui in my case, that has multiple attributes, one of them being path so that would allow you to detect what each display is currently displaying. If a user changes to a view you can detect this and change it back if you want or after a time limit.

1 Like

Thanks for your suggestion. This is exactly what I’m after.
When someone approaches my front door, my tablet stops Daydream (using rest api) and switches to the porch cam tab. It only takes about 2 seconds to wake up and load the cam feed now.

Now I’m having trouble detecting when Daydream is running. I’d like to load the main tab if Daydream starts. FKB custom component has a screensaver sensor, but Daydream doesn’t count as a screensaver. The auto-reload settings in FKB app don’t include an option either.

I notice the latest version of FKB has a feature called ‘Start Daydream’. That may require further investigation but as I’m not using it, I’m not much help :frowning:

/?cmd=startDaydream&password=[pass]
/?cmd=stopDaydream&password=[pass]

Thanks. I noticed that too. My workaround is I’ve moved all the start/stop daydream & idle time things to HA. Let it detect human presence, wake up the tablet, switch to the cam tab and put the tablet into daydream after a certain time. It works perfectly now.

1 Like

Hopefully not too late. Tried Browser Mod previously. HA update made it no longer working and I never liked how it works - so many random IDs generated.

Came across this on github. Simple and works like a charm.

3 Likes

Thanks for the tip, much appreciated.