[RELEASE] HD+ - Android Dashboard

Yeah, I should have mentioned that's what I've been using. I had them both going for a while but figured the native Hubitat app notifications have always worked well for me so no need for both.

When I originally added that functionality it was to do Text To Speech notifications to start with.. I had some ideas of other things that the native app couldn't do but for the most part it's just the TTS stuff that's different..

@jpage4500 Is there an embedded web browser tile type that I can use to display arbitrary HTML and JavaScript?

I have some custom device drivers that have attributes that emit HTML and JavaScript. When I display those attributes on a classic dashboard, they become interactive. I'm looking to replicate this functionality in HD+. Note that they don't emit a full HTML document; just a snippet that can be placed inside an HTML document.

Since you are diving back into this I should mention the text to speech notifications on my and my wife's phone often would not come through till we unlocked the phone. Which has caused a few problems.

Before I was using the Hubitat app with something called MacroDroid which would convert notifications to speech for me. That was instant. I think it used a helper service though. I am not sure if the helper service was for the TTS or something else.

@jpage4500 Hey Joe, (just reminded me of a song). Sorry to tag you but I do not have any idea how to troubleshoot this and no one has offered to help. I posted on Aug 25 post #5636 and still have the same problem. The only way to get it back is to restart the tablet. Since the post I have reset the tablet back to scratch still every day I lose control over all my devices. I put the same dashboard on an old phone and it has worked flawlessly. Phone and tablet stay in house on LAN only. Tablet is Galaxy Tab A running android 7.1.1. HE is 2.3.9.176 and HD+ is latest from the play store. Hope you or someone will tell me what to do.

@jpage4500, about 4 - 5 minutes after I open my garage door, it shows that it has closed on my HD+ dashboard, even though it is still open, and the contact sensor continues to show that it is open. The timing of when this happens varies, but it happens on both my Samsung Galaxy A8 tablet and my Samsung Galaxy S23+ phone.

Both devices are running 1.0.2563.

I have 3 garage doors and the other 2 do not exhibit this problem. The 2 that are working properly are using a ZEN17 with 2 wired contact sensors. The one that exhibits the problem is z Zooz ZSE41 800LR XS contact sensor.

Below are some screenshots -- any help you can provide would be great appreciated.

Marc

Starting state: Screenshots of device activity and dashboard. Everything properly shows closed.

Door is opened. Screenshots of device activity and dashboard. Everything properly shows open.

4-5 minutes later, activity history still shows the contact is open, as does Hubitat, but the dashboard is showing it is closed.

Tried to run HD+ on a Chromebook and it would work for about 2 minutes and the app would just crash. The log shows this error message:

GsonHelper fromJson: Exception:java.lang.illegalStateException:Expected BEGIN_OBJECT but was STRING at line 1 column 1 path $, JSON:<!doctype html>

I played around with changing the video player from RTSP to ExoPlayer and the app doesn't crash anymore. So weird...

Is there more in the logs that I can get? It's probably something easy to fix if I could see the JSON document

Picked up an IKEA Vindstyrka Air Quality Sensor (E2112) using this driver from this thread.
Trying to just display the single attribute:
"airQuality": "\u003Cspan style="color:green"\u003Egood\u003C/span\u003E",

Can't figure out how to get it on a tile other than using Custom and ending up with it being tiny and up in the corner.

Maker API snip
{
    "name": "IKEA Vindstyrka Air Quality Sensor (E2112)",
    "label": "AQI IKEA 1",
    "type": "IKEA Vindstyrka Air Quality Sensor (E2112)",
    "id": "2122",
    "date": "2024-09-11T18:44:48+0000",
    "model": null,
    "manufacturer": null,
    "room": "Living Room",
    "capabilities": [
      "RelativeHumidityMeasurement",
      "Configuration",
      "PowerSource",
      "Refresh",
      "AirQuality",
      "TemperatureMeasurement",
      "Sensor",
      "HealthCheck"
    ],
    "attributes": {
      "airQuality": "\u003Cspan style=\"color:green\"\u003Egood\u003C/span\u003E",
      "dataType": "NUMBER",
      "values": null,
      "airQualityIndex": "17",
      "checkInterval": "3600",
      "humidity": "60",
      "pm25": "4",
      "powerSource": "mains",
      "vocIndex": "149",
      "healthStatus": "online",
      "temperature": "18"
    },
    "commands": [
      {
        "command": "configure"
      },
      {
        "command": "ping"
      },
      {
        "command": "refresh"
      },
      {
        "command": "updateFirmware"
      }
    ]
  },

Is there some other tile type that will center it and be large enough for my wife me to read? :wink:

thanks for all the details on this one.. my first question would be - is it possible for the device driver to add some option to control the html / font size for that airQuality attribute?

I'm not an HTML expert by any means but something like this would probably make the text much larger and centered

<div align=center>
<span style="font-size: 300%; text-align:center; color:green">good</span>
</div>

If that's not possible worst case I can create a custom handler for that device.. I'd need to learn what to show for the different values.. meaning, what does that 'good' mean? is it a certain range of values for airQualityIndex? I'm guessing the driver has try that logic in it so I could look at it too

Edit: here's that logic mentioned above

I'm not sure -- just looking at the screenshot this is what you're talking about, right?
image

What I can't figure out looking at this is does the device state = 'open' but the UI just not show it? Or, does the device still say 'closed'?

It's too late but if you do see this again can you look at device details?

1 Like

I was curious.. apparently there's an AirQuality Hubitat capability which is generally what I look for when supporting new device types. There's also a chart which explains the range too.

It'll be a lot faster too if there's a built-in device type as displaying HTML uses a WebView (embedded mini browser)

2 Likes

The problem is as you describe -- the contact is actually open, and the device is showing it as Open when I look at it on the hub, but the HD+ UI is showing it closed. I just reproduced the problem, and the details page shows it as "close". Screenshots below.

Note: HD+ showed it as open for approximately the first 8 minutes. HD+ then showed it as closed even though it is still open the hub device shows it as open.

Marc


Note: The "Last Updated" field showed 9:33PM.

@jpage4500 I kept "playing around" with various changes to see if I could find a way to solve the problem and I seem to have stumbled onto a solution.

In the "Maker API" app I turned on the option labeled, "Include Last Evening Date/Time". After I made that change, I am no longer having the problem.

I have no idea why this is making things behave -- perhaps you have an insight...

Marc

I was just hoping to see if the device state (device info screen) in HD+ didn't match the UI displayed and it seems like it does match -- both show the closed state.

That makes me wonder if the device driver is pushing out the wrong state. That would also explain why this is only happening to 1 device type and not 2 others. If I get time I'll try to look at that driver (although I'm not a groovy expert)

sorry I didn't see this post until now.. I've never heard of that option - let me look at it. Technically I don't get push updates via MakerAPI anyway so it shouldn't.. I get push updates in real-time using a different endpoint which is only available locally

version 1.0.2568 (beta)

  • light dimmer: don't turn light off but instead set light = 1%
  • minor changes to calendar display
  • support AirQuality device type

This should be done

I added support for a new Air Quality device type that looks like the tiles below:

  • NOTE: I'm not sure why the text "Very Unhealthy" wrapped the way it did but if I can figure out how to fix it later I will
4 Likes

Thank you!
That's fantastic, never thought I'd want one of these devices but with the amount of smoke this year it's nice to have some sort of reminder to close the windows asap. :face_exhaling:

Update my hub and I think its all linked but it saying failed to get details from hub which is odd and the app is working and notifications are failing

Any Ideas?

That HD+ Device driver is broken

I'm not sure exactly how to fix it at the moment.. I don't have enough server side Groovy experience to do what's needed for the updated Firebase push notification logic

1 Like