Android Dash Board Browser with Motion Detection and MQTT

https://crosswalk-project.org did something alike but the project is dead by now.

Embedding a full rendering engine is massive effort
http://stackoverflow.com/questions/16604150/embedded-chromium-or-webkit-in-android-app .

So the only thing left seems to be customtabs. Drawback they offer way less control.
https://developer.chrome.com/multidevice/android/customtabs
Wakeup and url command would still be possible just no js injection and full screen.

Yucky. I think I may have to draw the line myself at a 4.4 minimum :slight_smile: However that certainly grabs a lot more devices than 5.0.

I’m used to iOS versioning. Why is 5.0 5.0? Where is the line drawn? Would there be 4.x devices that can’t do 4.4?

It’s rarely about the hardware but rather if there are drivers available. Same as with old iOS devices. Somebody decided I it ain’t worth it anymore. Thanks to CM / lineage lots of very old devices still got her Android versions.

I agree setting a limit on 4.4 is reasonable. Webview is too much effort, all other issues should be solvable.

my tablets have 4.4.2 so i am save when the line is set at 4.4 :wink:
and if i had the option tu upgrade android, i probably would, but its a cheap tablet and they dont give that option, so i am stuck with 4.4.2

not that i am sad about that, because 4.4 is not a bad version anyway in my eyes :wink:

Perfect… I should have a test build for you later today

1 Like

nice. i will test it tommorow then :wink:
today i really dont have the time for it.

1 Like

Ok, I’ve posted an APK to try. It should still be feature complete! The jsExec example will not work if it needs to create a dialog I think (quick search says its a bug), at least it doesnt in the emulator. But it will still work on Android 5.0+

0.2-qpn-API19 Test Release

Note to anyone using an older copy, a number of the preferences have been renamed to make everything consistently named, so you may need to set them again (eg, default URL and MQTT enable)

1 Like

Very happy to see this install on the cheapie tablets I bought for home assistant control/display. They are Android 4.4.2, I sent hours online last night trying to figure if I could update them to Android 5, no luck there.

Now strange thing, the browser gets to the homeassistant front page and asks for a password, which I don’t have set. It won’t go any further.

Glad it worked – now for the harder part :slight_smile:

I honestly never actually pointed this at HASS, since I am using HADashboard v2, so I didn’t go too deep into the browser side yet. I can verify side by side right now that a newer version of Android goes in fine to my HASS but the API19 version has the same behavior you are seeing

I’ll dig into that tomorrow, since its just about bedtime here. My hunch is that there’s some feature around websockets that is broken right now.

Question for you, if you use the default OS browser to hit HASS, does it have the same behavior or does it work?

Chrome works fine, and HA Dashboard 2 doesn’t seem to load at all in Homedash. Thanks for your fine efforts.

OK the HA Dashboard does now load, kinda.

Comparative pics from firefox on laptop, and homedash on android (homedash is the first pic)

Note on android:

  1. Icon missing in weather.
  2. Data and icon missing in most widgets.
  3. Tile is still at top right after I changed my dash file to move it to the bottom row. Refresh in firefox shifted it, but it is still stubbornly top right in homedash even after a reboot. Caching problem?
  4. Interestingly iframe seems to appear correctly on homedash.

Impressive work!

On 4.4 you should still have the same rendering engine in the webview so that’s really weird.
On your desktop chrome you can connect the remote debugger to see the webview error console, maybe that gives a hint.
On the Android 6 tablet in front of me “Android system webview” has version 56.0.2924.87 is that the same for your tablets?

Where do I find “Android System Webview”?

In the Play Store

It doesn’t seem to be on my tablet, and the play store tells me “Your device isn’t compatible with this version”.

Teach me for buying a cheap crap chinese tablet.

Hi which camera is motion detection configured on by default? Appears motion on front facing camera is not triggering the display and I don’t see an option to set which camera to use…

EDIT: screen lock must be of…

how the hell did u include the media player?? want this!!! :slight_smile:

To my pleasant surprise the motion detection works even with the tablet behind some cheap two way glass, so I can place it in a ‘smart mirror’ setup :slight_smile:

The mirror material I use… https://www.amazon.co.uk/dp/B01MRI4KYY/ref=cm_cr_ryp_prd_ttl_sol_26

On

Off

4 Likes

Another suggestion for this project, could a wired keypad attached to the tablet be used to send MQTT to HA? My idea is to have the tablet embedded in the smart mirror, then have the keypad disguised in the mirror frame so I could toggle switches using a physical button

1 Like

@quadportnick you’re a genius!
This is a great addition to the hass universe. Very cool.
Working-ish on my galaxy tab 7, android 4.4.2
Motion detection and browser working, hass url not loading (buffering/loading indefinately), google and various other pages loading fine.
Mqtt not seeming to send though - listening on my mqtt server (hass AiO mosquitto) and there’s nothing coming in. Is there a particular method to getting mqtt working or shold it work out of the box?
Again, great work :slight_smile:

Edit - my bad, i didnt read the bloody thread properly - @ray0711 thankyou so much :slight_smile: