Booting Android tablet directly into fullscreen HABpanel

Since I use the HABpanels running on Android tablets instead of classic light switches around the house I need then to boot into the HABpanel on the power failure/restore.

I use a combination of
-Autostart to run an app after tablet boot.
-Custom App that’s only purpose is to launch a Chrome home screen shortcut (as it is not listed as App and all autostarting apps cant start it other way.
-Chrome add to home screen function to launch the HABpanel without navigation bar in full screen
-Fullscreen! to remove os toolbars and softbuttons (needs root)

The only problem I see is that when create Chrome home screen shortcut on one of the panels pages ex

http://172.16.10.4:8080/habpanel/index.html#/view/Entrance

it does not point to it on the second run Instead it will point to the main layout page with multiple pannels.

http://172.16.10.4:8080/habpanel/index.html

Any one knows how to work around that?

1 Like

Probably because of this in HABPanel’s manifest.
Maybe it’s better to remove it to allow deep linking. I’ll check.

Is that taken into account when creating a shortcut for the Android home screen?
Because if you just paste the long url into fresh chrome instance it will come up with the right page. not the main index.

@xsherlock: What you are describing is exactly what I want to achieve as well. At the moment I use an app called Kiosk Browser Lockdown to replace the Android Launcher with the Habpanel page. But your solutions seems to be much better in case of a power failure.
Since I am not too familiar with Androids, can you explain a little more in detail how you have setup your tablets ?

My second question is how you are handling the panel configuration. Do you use local storage on the tablet or central storage of the configurations ? I plan to use the latter since I want to be able to modify the panel from a different machine and after saving and restarting the tablet the changes should show up there. My problem is that I so far did not find a possibility to start Habpanel with a specific centrally stored panel configuration since I have several centrally stored configs. How do you handle this ?

I did explore Kiosk Browser Lockdown but found it not to be good for my tablets, for the reason I can not recall right now. It was either subscription requirement for the remote management or it was unable to remove all OS toolbars. I have tried may other but most are not compatible with my Android 4.2.2 that does not have what is called immersive mode (fullscreen) introduced in 4.4.

To get to the same place I’m here you need a device with root. The one I use Sibo Q896 does come with rooted at purchase. Just install SuperSU to manage what app gets root privileges. Then install Full!screen that will remove all OS toollbars and soft buttons on the bottom replacing them with custom transparent (home/back) buttons in the screen corners.

Now the best way to have a HABpanel run without the browser bar full screen is to use Add to Home Screen option. This will create a home screen shortcut that will launch a website in the fullscreen mode. Together with the Full!screen you have a Home Automation panel without any traces of the Android OS. Hence the mother in law will not break it.

There are many apps that will launch an app on system boot. Autostart and Stay is one of them and I found it to be great. Unfortuantely none of those apps and I looked long will not let you launch a home screen web shortcut as they are not seen as apps.

For that I have created a pair of apps. (ok not me I actually paid some Indian freelancer to do it :slight_smile: )

One selects the homescreen shortcut and the purpose of the second is just to launch it.
Now you can use any autostart app to lauch my app that just opens the homesceen chrome shortcut.

here are the apps https://www.dropbox.com/sh/c37j63rtuz2kaz4/AAAE--mcOo1ZA38YvG4sGG1pa?dl=0

That is tested only on 4.2.2 and I pretty much sure it only works on that version of the android.
Sibo now has an upgraded version of the tablet q896S with android 4.4 and I have already ordered it So soon I will test it at 4.4.

This gets you this point (note that you can make the corner home/back buttons fully transparent I just did not do that on this panel yet)

The common problem with the HABpanel is that after any change to Openhab config (items or rules) the panels often become unresponsive. Lucky all my Android tablets are powered with POE (power over Ethernet) so I can just power cycle them from my main house switch with some remote command.

As for the management I’m willing to use one central HABpanel config I think that is the only way to go since you cant have widgets on the main page you always have to dive to the second level. And it is way easier to build the widgets on the PC not on the tablet itself.

The only problem is that chrome shortcut is only pointing to the main page with panels and for some reason does not linkg to the room specific sub-page with widgets that I wish it did.
I have not been able to find any tool to edit the chrome shortcuts and see if it indeed saves the right URL. That remains to be solved.

What tablets do you plan to use?

@xsherlock - you might be interested in this PR:

Now the current URL/dashboard when adding to the homescreen will be brought back when clicking on the icon.
As an added bonus, if you add ?kiosk=on at the end of the URL, the header will go away.

1 Like

Wow Great, but what do I have to do to get that on my install.
I did apt-get upgrade with addons.cfg configured and nothing.
uninstalled installed habpanel from paper UI and still homescreen shortcut gets me to the main page
and in normal launch of the chrome ?kiosk=on does not hide the address bar

In console I have this build. Is that the one?
204 | Active | 80 | 2.0.0.201611051009 | HABPanel User Interface

Brilliant feature (kiosk mode) @ysc

Thank you.

1 Like

@MikeD so you got it working? how?

Yes, I just updated to the latest snapshot of openHAB2.

@MikeD #572?

I updated to #574

Ok does work on 574. It look I was to quick checking it out. Looks fantastic. I now achived exactly what I wanted with fully automated boot into the HABpanel without the OS toolbars.

kiosk=on does remove the top navigation bar so I think I will do there a small custom template with the name of the panel and a clock and maybe room temp
Many thanks for that feature.

Maciej

1 Like

So can I ask on a side note, how do you mean the tablet is PoE allowing you to easily reset? I’m building a house and looking at potentially doing a similar thing, I have the opportunity to put the ethernet in the wall now. So how is this configured or setup to allow you to power it in such a way that you can reset it? I’m less familiar with Android and more familiar with iOS at this point.

After long reaserch I found only one tablet that is designed for HomeAutomation SiBo 896. Google it for the pictures of the back. It has a wall mounting bracket, and Ethernet socket with POE so it does not require WiFi for connectivity. Then I have 48 Port Ethernet switch with POE on all ports. I use one Ubiquity but there is a lot of them. Use one with SNMP control of POE so you can power cycle all the ports with simple SNMP set sent from script or even OH. I also have all the sensors (temp, light , motion, soil humidity in the garden) and light relays connected over Wired Ethernet and I used bricks from Tinkerforge to do that. My advise is to run ehternet just everywhere 2 cables at the time just in case.

Aha, that explains it. Ok I hadn’t ever seen a tablet with such capability. I may look into it. For now I’ve got a basic Amazon cheap one flashed with custom ROM so I can basically run stock Android. Plan to run the PoE thru an adapter for constant power, but doesn’t look as clean as your setup.

Thanks for the input, I’ll definitely have to take a look.

I’m just setting up an similar environment, a few cheap 7" android tablets for habpanel in every room.

How did you manage energy-save options at your tablets?
After a while when entering power-saving mode the wifi connection gets lost too and even when it’s re-established the connection to OH stays broken, so I have to re-enter the OH url, choose habpanel and the right romm-dashboard. That’s not usable.

Only alternative I see so far is preventing energy-save mode at the tablets. The few watts more or less aren#t the big problem but letting the screens powered-on is because I don’t want this in the dorm or the living room next to the TV

My units as designed for always_on and do not have any powersaving, nor screensavers/lockscreens. They shine in night and this is a bit annoying, and later when I finaly get all the things done I will try to do something with it. Like use the camera to do motion detection and ambient light detection and set the screen back lit accordingly

As it comes to the power use it is about 5W per unit, I can live with that.
My POE switch is reporting

OK thanks.
Maybe when all my stuff is working I’ll switch to speech control and therefore maybe I can find a solution where screen is off but the rest of the device is fully on and online, this would fit my needs.

I use the “daydream” feature in Android (recently renamed by Google because the reused the name for virtual reality stuff)

You can display a clock in “night mode” which turns the brightness all the way down. But I don’t use the native clock, I use Timely from http://www.bitspin.ch/.