Android Dash Board Browser with Motion Detection and MQTT

I meant the native browser. I checked that out today, so the ‘bad’ news is that if you’re using webView that it’s using Chromium 30, and this guy is older than features that HASS is using, so they just dont work. The Chrome you have installed is a stand-alone app so, it’s newer than what the OS has. Sigh.

But as for HADashboard, I’m confused why that one isnt working yet…

Holy cow, magic mirror!

I presume that breaks touch capability? but still… the upshot with the remote control options is maybe you wont have to touch it, you can always push/reload content on it automatically :slight_smile:

Thank @ray0711 for starting this. I never knew I wanted it :slight_smile:

The MQTT should be fine, you want to configure up all of the settings before you turn on the enabled slider. Really right now the enabled slider is what turns it on/off and it doesn’t dynamically reconnect at the moment when you change settings. Can I see what settings you’re using for thoughts of where to go next with it?

That’s probably something to put on the longer term list but I do like the thought. I have some ‘larger’ thoughts about the dashboards that I’m processing, thinking to myself that today people slap up old hardware and do kiosk modes and kind of deal with things one-way, but there really could be a two-way ecosystem thing going on. What might be possible if HASS/HADashboard are able to understand the device on the wall they’re being displayed on? I think some interesting stuff could appear.

Im also concerned about making sure that since people are using hand me downs, as many should work as possible. I’d like to see an iOS version of these ideas too, try to ‘standardize’ so people aren’t locked out. Which is why I am concerned about getting 4.4 working now even though it’s not an issue for me.

@ray0711 Looks like the Crosswalk project is the main hope now for 4.x :slight_smile: Will be looking at that today. Upshot is I can probably lower the min API further if there’s someone actually using something lower than 4.4, but it seems so far in this thread 4.4 is boss :slight_smile:

I’d look to sticking to native webView on 5.0 and up since they made that modular and up to date.

So this should be interesting…

Yes you don’t want to touch a magic mirror really as you get finger marks all over it.

1 Like

I should have another test build ready in a day or two, life has reared its head today. But it’s looking good so far!

It is an iframe of a portion of the logitech media server (squeezebox) web front end. I don’t have the code to hand but I’ll post it when I am home tonight.

I have discovered that android system webview was once built into the android OS, but since 5.0 it is a separate package so that it can be given security updates independent of the OS. So that doesn’t help for Android 4.4.2 (and lower).

I am not sure how to determine what the built in webview supports in Android 4.4.2.

Maybe I will just leave the screen on, use chrome for HA Dashboard and use the camera as a webcam Android IP Webcam - Home Assistant

That’ll work. I’m still working on another option though, which is to leverage Crosswalk. The project ended but, it JUST ended. The code should be well enough uplevel to support anything decent. (And its possible someone else will pick it up).

Cool, looks interesting.

Code in .dash file is:

mediaframe:
  widget_type: iframe
  title: Kitchen
  refresh: 5
  url_list:.
   - http://media:9000/status_header.html?player=00:04:20:XX:XX:XX

media:9000 is my LMS server, 00:04:etc is the MAC address of the player.

1 Like

Nice idea… smart! Would just be nice to know how to make this as me i would see scroll bars then … but nice solved! Great work :muscle::muscle::ok_hand:

my tiles are 120x120 and I put the iframe in as 4x2. Took a bit of experimenting to get it the right size. It’s still not right as it has that white bit at the bottom.

thx for the version.
installed it and it seems to work fine.

at least the parts that i have tested yet.
i tried some apps before to keep my tablet awake and at fullscreen, didnt work
now i finally have something that keeps my tablet like i want it.

i dont have mqtt setup (yet)
so i cant test that part, but i will probably in the near future try that.

1 Like

RE iOS version, would this be a separate app to the Home-assistant one? Is motion activation of the screen possible in iOS?

Well that’s ahead of what I know at this point. Just an idea :slight_smile:

If there’s a synergy that can be had with the iOS app in development for HA that would be great. But I also don’t know if it might add complication that isn’t necessary to have two modes. The way you use your phone vs the way you use your wall dashboard are very different.

I have HASS loading in API19 (4.4) and API25 (7.1.1). I will be adding a configuration option for the browser choice tonight (East Coast US time) and posting it. For now, I have to go to work :slight_smile:

1 Like

I had another idea for controlling the display without touch screen, it’s a bit out there but I think technically straightforward. Rather than physical buttons around the display, I have a motion sensor along each edge. Activating them will toggle switches, and activating pairs of them could init specific actions. I bought 6 for cheap. Thoughts?

Ultrasonic Sensor, Elegoo HC-SR04 Ultrasonic Distance Sensor Kits for Arduino UNO MEGA2560 Raspberry Pi,Datasheet Available to Download https://www.amazon.co.uk/dp/B01M0QL1F1/ref=cm_sw_r_cp_api_Drq2ybC9D0ZWY

I guess the big question is interface. Could you get the microcontroller and the tablet talking over a serial interface, or maybe keyboard?

My thinking for the short term is to take input and just post it to MQTT raw and let HASS logic do something with it. It might be some extra round trips but it lets the hacking commence without boiling the ocean yet on some local API