[tutorial] UI3 Viewing Station with Android Tablet

GentlePumpkin

IPCT Contributor
Joined
Sep 4, 2017
Messages
193
Reaction score
321
This is for everybody who is searching for a viable way to display UI3 on android tablets without the need to have the display always on.

I prefer viewing my cameras in UI3. The Blue Iris app feels quite outdated and UI3 is an amazing alternative thanks to our forum members @bp2008 and @ruppmeister who created its perfect design and functions. Using android this is no problem as long as the screen is on all the time. If you rather just have the display showing ui3 on when you need it, you'll have the problem that as soon as the display turns off, the video stream in UI3 is paused by the browser causing a massively delayed stream the next time you wake the android tablet. Here is the solution.

TL,DR:
1. Install Kiwi Browser.
2. Open ui3 website, tap on the three dot menu and select "add to home screen"
3. Your home screen now contains a shortcut to a fullscreen version of UI3. Voila.

My requirements:
  • fullscreen view and no tab bar
  • tablet display is usually off and I can wake it up on demand.
  • tablet should instantly display the live stream when turned on.

What I tried that did not work:
- before actually trying an android tablet, I tested an Apple iPad: TL,DR: it's complete garbage imho.

Honestly, I never used Apple tablets before and I've had good experience with Apple laptops, so I tried their latest iPad and I was really shocked:​
1. The device is completely locked down by them, they control the app store and p.e. forced Firefox to remove addons support (what's Firefox without addons?!).​
2. Because offering an app on their store cost between 100 and 300usd every year, even simple apps like a network file browser costs 10 usd and free apps sell your data. Unlike in windows or android, free open source software practically does not exist with Apple.​
3. They intentionally created connectors that are incompatible with anything else. They even removed the Bluetooth file sharing protocol so that I can't just quickly copy something from or to another device. It's not even possible to connect the iPad to a normal windows pc and copy some files to the iPad. Every 2005 nokia was able to do both. And the hardware imho is designed to get broken in a short time, p.e. the home button that will get stuck inside if you once accidently pushed it too hard.​
-> Apple practically puts you into a golden cage and rips you off completely. Additionally, they take your freedom to have control over your own overpriced device and try to force you to buy more and more of their products.​

(Ok you're right, I actually promised to review a few browsers but I was just very shocked that people actually defend a company that treats their loyal customers that badly.)​

back to the topic:
  • Chrome for Android: Always-on fullscreen is possible by adding a website shortcut to the home screen.Nice! But: Video stream stops as soon as the tablet is turned off and has a strong delay when turned on again later.
  • Firefox for Android: My favorite android browser (full addon support! uBlock:cool:) fulfills all requirements, but has the know Firefox stutter problem which renders it unusable.
  • Brave: is a chrome fork with background video playback which resolves the problem of the stopped video steam. But when waking up, it automatically leaves the full screen showing the tab bar. And the fullscreen-shortcut mentioned for Chrome for some reasons does work with Brave.
  • Fully Kiosk Browser: depends on the installed SystemWebView which - on my tablet - does not support the HTML5 video stream because it lacks WebGL support. Really nice piece of software, but this time it won't help us.

What finally worked:
  • Kiwi browser: Another chrome fork,
  • continous playback when the screen is off - check
  • can be used in always-fullscreen mode via home screen shortcut - check
  • and has the chrome-typicial fast and fluent video playback - check.
  • additionally, it actually comes with full chrome addon support which is incredible already!

How to get full screen in Kiwi:
When installed, open your ui3 website and tap on the three-dot menu of the browser. Then select "add to home screen" and when you tap on this shortcut on your android home screen, ui3 will automatically load in full screen with no tab bar or anything.

In the ui3 settings I additionally changed the following settings which you might or might not find neccessary:
  • The UI will close itself after this many minutes: disabled
  • Prefered UI scale: large
  • maximum h264 Kbps: 1500
  • HTML5 video delay compensation: Strong
  • Pause when tab is inactive: no

On your android tablet you now just have to figure out how to bypass the lockscreen (on some devices this can be disabled in the settings, others require root, xposed and a module that does the job for you). On my android tablet, I use the home button on the front to turn on the device and it automatically goes into standby after 5 minutes withotu interaction.

And then your good to go with a cost effective, maybe even wall-mounted, viewing station for UI3. Have fun!
 
Last edited:

chaycock

Getting the hang of it
Joined
Oct 23, 2015
Messages
128
Reaction score
31
Would you post a link to the actual tablet that you are using? There are quite a few to choose from and it would be a good reference to see the one that you are actually using.
 

GentlePumpkin

IPCT Contributor
Joined
Sep 4, 2017
Messages
193
Reaction score
321
It's a Samsung Galaxy Note 10.1 2014 which wasn't even bought with the intention to use it as a viewing station. It runs rooted Android 5.1.1 with the stock firmware, but I removed alot of junk apps using Lucky Patcher. It's not a super fast device anymore, but it's absolutely sufficient to display ui3.

My device specific modifications are:
  • compatible xposed installer (the official one is incompatible with Samsung roms)
  • xposed module Lockscreen Disabler (skips the log screen when I turn on the device)
  • xposed module Force Immersive Mode (set to hide the status bar in Kiwi Browser)

Which tablet
I think in general every tablet bought during the last - at least - 3 years should suffice as a viewing station, looking way better than most commercial and expensive viewing stations. The screen should have good brightness, contrast and viewing angle stability (notebookcheck does helpful reviews where you can find something appropriate) and most importantly not be too small, I'd look for 10 inches and larger.

Battery safety
Anyways, one should be aware of the potential dangers when installing p.e. cheapers devices. I think it's unlikely to happen, but during the last couple of years we saw several incidents where batteries in smartphones caught fire while they were charging. At some point I probably will open the tablet and pull the battery connector, I don't really need the battery and it's a better feeling. Individual preference probably :)
 
Last edited:

wittaj

IPCT Contributor
Joined
Apr 28, 2019
Messages
24,859
Reaction score
48,481
Location
USA
Sweet! Thanks for posting this - what does it do to battery life? Is it running in the background or just simply a faster response time?
 

GentlePumpkin

IPCT Contributor
Joined
Sep 4, 2017
Messages
193
Reaction score
321
The video stream is running all the time when the screen is off, which probably drains much more power than regular standy. The advantage is that I see what's going on the very moment I press the on button. The tablet is wall-mounted and and always connected to the charger.
 

wittaj

IPCT Contributor
Joined
Apr 28, 2019
Messages
24,859
Reaction score
48,481
Location
USA
So perfect for that situation! I have one that I could do that with and would certainly make life easier!

Thanks again for posting!
 

hotbrass

Young grasshopper
Joined
Mar 16, 2016
Messages
99
Reaction score
12
You inspired me to dig out my old Toshiba Thrive with an ancient Android OS and it works great! I have not plugged it in since 2016 and it was a bit slow getting started but works great with Firefox and it will stay on next to my bed. Thanks GentlePumpkin!
 

ljw2k

Known around here
Joined
Jun 9, 2014
Messages
1,489
Reaction score
2,264
Location
United Kingdom
I use an Huawei p5 10" tablet running the Dahua gDMSS app and it runs 24/7 Full Screen. The last Tablet I tried an Old Samsung 10" use to drain the battery even though it was plugged in.
 

bp2008

Staff member
Joined
Mar 10, 2014
Messages
12,672
Reaction score
14,016
Location
USA
@GentlePumpkin It is curious that the video stream would be delayed when you woke up the tablet. What is supposed to happen is UI3 would stop streaming when the tab is inactive, and start streaming again when the tab activates again. Starting the stream could take a fraction of a second but it would not be delayed video. (This functionality is controllable via the setting "Pause when tab is inactive"). Delayed video might happen if UI3 did NOT stop streaming, but the browser DID throttle its CPU or network usage while the screen was off.

In Firefox you could switch to the JavaScript H.264 player and thereby avoid its HTML5 live streaming issues, but on an older tablet you'd probably need to also set the streaming resolution or frame rate low or it would lag.

JPEG streaming modes are essentially immune to video delay because it isn't an actual stream so it can't fall behind. But obviously the frame rate is worse and more bandwidth is used.
 

GentlePumpkin

IPCT Contributor
Joined
Sep 4, 2017
Messages
193
Reaction score
321
Starting the stream could take a fraction of a second but it would not be delayed video. (This functionality is controllable via the setting "Pause when tab is inactive").
In Chrome and Firefox on Android this switch sadly had no effect. The video usually is delayed by the time the screen was off in the meantime (up to 60s when the stream is restarted).

Would it technically be possible to enforce always getting the latest stream image with h264 via html5? Then every mentioned browser would work and the device would be saving alot of energy. Thanks @bp2008
 

bp2008

Staff member
Joined
Mar 10, 2014
Messages
12,672
Reaction score
14,016
Location
USA
Would it technically be possible to enforce always getting the latest stream image with h264 via html5?
The problem with H.264 streams is all the frames get created at a fixed rate and the player mostly can't drop any of them. This ensures a good frame rate and smooth playback but it means if the network or decoding device can't keep up, then delay becomes quickly apparent.

Technically it would be possible to develop a streaming protocol that streams H.264 similar to jpeg, where every frame is created on-demand, and this would ensure low delay at the cost of frame rate and smoothness. This hypothetical streaming protocol would be a lot of work for me and for the Blue Iris dev. And the HTML5 player would fight me on it. See, the HTML5 player doesn't announce when each frame is decoded or displayed. They intentionally left out this information because they thought developers would use it to update their playback progress interfaces too often, leading to performance problems on slow devices. So what we get instead is a playback progress indicator that updates only a few times per second. You can see evidence of this if you look at the "stats for nerds" panel in UI3. When using the HTML5 player it updates in little bursts which coincide with the progress updates from the video player. With the Javascript player, this updates smoothly at each frame because I know when each frame is decoded and I know when each frame is displayed. Anyway this means for the HTML5 player UI3 wouldn't know when it was ready for the next frame, and it would have to guess. Whenever the guess was wrong, it would either cause delay or an unnecessary loss of smoothness. It is a real mess.
 

GentlePumpkin

IPCT Contributor
Joined
Sep 4, 2017
Messages
193
Reaction score
321
Thank you @bp2008 for the thorough explanation, you most obviously have invested more free time than anyone else into all the super useful software that we thankfully rely on every day! The mentioned workaround works fine and regarding energy saving, we all have multiple cams running, IR lights, a BI server and alot of network hardware so this little tablet doesn't really change things :) .

A few last words regarding the iPad
Although I'm really anti-apple since the mentioned experience I must state that on my modern iPad, streaming videos using safari is about 400-600 ms faster than on the 2014 android tablet and the "pause when inactive" switch works as intended by bp2008. Yet, the ipad also has some application-specific downsides like always having to press the home button two times (with a short wait in between) and the two enlarge/ full-screen buttons don't work because apple disabled the ability to go fullscreen for stupid reasons.
 
Joined
May 1, 2019
Messages
2,215
Reaction score
3,504
Location
Reno, NV
You can pull the battery connector, basically bypassing the need to have a battery installed for the device to be running? Didn't know that. Thought it was mandatory to have a battery in these things. Can explain a tad bit more? I wouldn't mind doing this setup with a tablet I find laying around. But also, another tablet for my future Home Assistant. One of my issues about using any 24 hour static tablet is the always charging battery issue.
 

GentlePumpkin

IPCT Contributor
Joined
Sep 4, 2017
Messages
193
Reaction score
321
I actually tried it with the mentioned Samsung Tablet and it would not start anymore after that. It worked on a Lenovo tablet though, so this is something that varies. Disconnecting the battery is just opening the device, and pulling the cable from the battery. The cable usually has between 4 and 7 wires and one should be careful if the connector includes some strange release mechanism which we don't want to damage. As always shut down the device and omit shortcutting the battery connector pins.

If the battery can not be fully removed because the device won't start afterwards, maybe just imitating the voltages of the single cells by adding proper resistors might do the job, but such a procedure requires careful pre tests and more electronic knowledge.
 
Joined
Apr 26, 2016
Messages
1,090
Reaction score
852
Location
Colorado
I actually like my iPad for UI3, its basically the only thing I use the stupidly expensive tablet for. I bought it from a pawn shop. ;)

In RC Cars this would be referred to as a "battery eliminator circuit", although likely more complex for the Apple iPad at least due to all its communications based charging circuitry and serialized components and I believe they also use "smart batteries" where there is minor silicon IC on the battery pack.

Technically, all you should need is a large capacitor (think flat supercapacitor like they are moving to in Dashcams) to provide a little buffer, and a circuit that can fool the device into thinking a battery is connected, that altogether won't catch fire once it's mounted in your wall.

I have the iPad I got for some other reason (only Apple thing I have), it works fine but with the delay like @GentlePumpkin mentions as it always has to relogin and refresh and sometimes locks ITSELF out of Blue Iris, and the battery is slowly wearing out but I don't leave it charging 24x7x365. But you might have better luck with less complicated (cheaper maybe) Android Tablet, particularly if it only has 2-4 pins connecting the battery to the main board a supercap solution would possibly work. Maybe we'll see something aftermarket someday, but demand will be so tiny it will be fringe use case I believe. If you find one that takes only a simple circuit to switch to battery-free operation hopefully someone will post back.
 
Last edited:

CaseyJones

Young grasshopper
Joined
Sep 28, 2020
Messages
40
Reaction score
12
Location
Live Oak, FL

concord

Getting comfortable
Joined
Oct 24, 2017
Messages
664
Reaction score
741
I was thinking about a Home Assistant kiosk tablet, where I would have one lovelace card with selected live cams. Having POE power would make a clean install.
 

bradner

Getting comfortable
Joined
Aug 15, 2019
Messages
426
Reaction score
757
Location
PNW
Would you post a link to the actual tablet that you are using? There are quite a few to choose from and it would be a good reference to see the one that you are actually using.
I use Amazon Fire tablets - super cheap.
 

The Automation Guy

Known around here
Joined
Feb 7, 2019
Messages
1,407
Reaction score
2,795
Location
USA
I cannot seem to keep a stable connection going 24/7 for more than a couple days......

I use a Amazon Fire Tablet that sits on a wireless dock. It is set up to never sleep when charging. This works very well and the tablet really never sleeps while on the docking station, but will sleep if someone has removed it (or it got bumped and the tablet isn't sitting on the charging pins). However if I use a browser and the UI3 interface, the browser will shut down eventually. I haven't ever tried to figure out the timing of this, but it is usually sometime between 1 and 3 days. I'll find the tablet sitting on the home screen and I'll have to restart the browser.

I've also tried using the Android BI app. This never shuts down, but it seems to loose connection to BI and the cameras eventually stop streaming/updating. I usually don't notice it unless the cameras are "stuck" on a nighttime image and it's daytime, or vice versa. There have been times when I've noticed this and the timestamps on the cameras are three days old (because I didn't notice it sooner).

Has anyone been successful in getting a tablet to show their camera streams 24/7 reliably for days, weeks and months at a time? I know I could always change over to something like a mini computer and a screen, but I really like being able to pick up the tablet and interact with it when I want to check something on the camera. Having a hardwired screen sitting on the end table wouldn't allow me to do this.

I guess it is possible that the issue is really a networking issue where the tablet eventually drops the wireless connection for some reason. I have a pretty robust network however (pfSense firewall router with Ubiquity WiFi APs) and there is a WiFi AP on the ceiling directly above the tablet, so it's probably not a signal issue. I am not aware of any tablet setting that would cause a network connection to drop so infrequently, but I'm certainly open to any ideas!

EDIT - as I'm typing this and thinking through the issue, I might have come up with a work around. I use Tasker on my phone for lots of things. I should be able to set it up on the tablet and set a closing task that would open the browser anytime the browser app closed. My only fear is that it might create an endless loop that I can't stop!
 
Last edited:
Top